Project

General

Profile

Feature #5462

Make forum cats, fora and topics backupable

Added by Yannick Warnier almost 7 years ago. Updated almost 7 years ago.

Status:
Feature implemented
Priority:
Urgent
Assignee:
-
Category:
Backup
Target version:
Start date:
14/09/2012
Due date:
14/09/2012
% Done:

100%

Estimated time:
4.00 h
Spent time:
Complexity:
Normal
SCRUM pts - complexity:
?

Description

This is set to be included in 1.9.2 because it is financed by Universidad Autónoma de Chile (and it doesn't involve structural changes anyway).

In the backup/restore feature, include the possibility (restore and backup classes) to backup/restore the forum tool.

Given we don't (for data integrity reasons) copy data related to students, the copy will work as follows:
  • pick one, several, or all forum categories
  • pick one, several, or all fora (the plural of forum)
  • pick one, several, or all forum topics

The selector (in the detailed selection for backup restauration) should work as the documents (just separate the levels of data with "/").

When restoring, assign the new forum items to the ID of the first course teacher, with the current date.

For the backup, all forum posts (apart from the topics themselves) should be ignored, even if they are from the teacher.

All parameters from the fora and threads should be restored as well.


Files

foros-imagen.gif (28.3 KB) foros-imagen.gif Yoselyn Castillo, 25/09/2012 15:03

Associated revisions

Revision b9bd96b2 (diff)
Added by Julio Montoya almost 7 years ago

Partial commit implements forum categories, forum post backups see #5462

Revision 6e5e4ac5 (diff)
Added by Julio Montoya almost 7 years ago

Fixes bug when copying forums see #5462

Revision c0017643 (diff)
Added by Julio Montoya almost 7 years ago

Fixing bug when empty documents see #5462

Revision a2d4bfc2 (diff)
Added by Julio Montoya almost 7 years ago

Adding images while restoring forums see #5462

Revision 74f0f99c (diff)
Added by Julio Montoya almost 7 years ago

Adding images while restoring forums see #5462

Revision 7f21a265 (diff)
Added by Julio Montoya almost 7 years ago

Copying the forum_image see #5462

Revision 9946f572 (diff)
Added by Yannick Warnier almost 7 years ago

Course copy: Only copy first forum post in any thread to avoid inconsistency when restoring in another course - refs #5462

History

#1

Updated by Julio Montoya almost 7 years ago

Tomo la tarea

#2

Updated by Julio Montoya almost 7 years ago

  • Status changed from Assigned to Needs testing
  • Assignee changed from Julio Montoya to Yoselyn Castillo
  • % Done changed from 0 to 50

code was sent, requires testing

#3

Updated by Luis Jeremias Saavedra Bendezu almost 7 years ago

  • Assignee changed from Yoselyn Castillo to Julio Montoya

Intenté copiar solo los foros (copia de curso) en stable.chamilo.org pero me sale lo siguiente.

Hice la copia desde http://stable.chamilo.org/main/course_info/maintenance.php?cidReq=DEMOCURSOONLINE&id_session=0&gidReq=0 hacia http://stable.chamilo.org/courses/DEMOCURSOONLINEBK5/index.php?id_session=0 pero me sale el error y no me copia ningun foro.

Aparte de esto la herramienta de copia/backup parece poco funcional (intro, links, eventos, ejercicios y foros no se copian), pero lo voy reportando en otra tarea

array(13) { 'announcement' => array(0) { } 'course_description' => array(0) { } 'document' => NULL 'calendar_event' => array(0) { } 'Forum_Category' => array(1) { [1] => class ForumCategory#316 (11) { public $title => NULL public $description => NULL public $order => NULL public $locked => NULL public $session_id => NULL public $source_id => string(1) "1" public $destination_id => int(2) public $type => string(14) "Forum_Category" public $linked_resources => array(0) { ... } public $item_properties => array(1) { ... } public $obj => class stdClass#314 (7) { ... } } } 'forum' => array(2) { [2] => class Forum#317 (24) { public $title => NULL public $description => NULL public $category_id => NULL public $last_post => NULL public $topics => NULL public $posts => NULL public $allow_anonymous => NULL public $allow_edit => NULL public $approval_direct_post => NULL public $allow_attachements => NULL public $allow_new_topics => NULL public $default_view => NULL public $of_group => NULL public $group_public_private => NULL public $order => NULL public $locked => NULL public $session_id => NULL public $image => NULL public $source_id => string(1) "2" public $destination_id => int(2) public $type => string(5) "forum" public $linked_resources => array(0) { ... } public $item_properties => array(1) { ... } public $obj => class stdClass#318 (22) { ... } } [1] => class Forum#315 (24) { public $title => NULL public $description => NULL public $category_id => NULL public $last_post => NULL public $topics => NULL public $posts => NULL public $allow_anonymous => NULL public $allow_edit => NULL public $approval_direct_post => NULL public $allow_attachements => NULL public $allow_new_topics => NULL public $default_view => NULL public $of_group => NULL public $group_public_private => NULL public $order => NULL public $locked => NULL public $session_id => NULL public $image => NULL public $source_id => string(1) "1" public $destination_id => int(-1) public $type => string(5) "forum" public $linked_resources => array(0) { ... } public $item_properties => array(1) { ... } public $obj => class stdClass#320 (22) { ... } } } 'thread' => array(2) { [1] => class ForumTopic#321 (6) { public $source_id => string(1) "1" public $destination_id => int(-1) public $type => string(6) "thread" public $linked_resources => array(0) { ... } public $item_properties => array(1) { ... } public $obj => class stdClass#322 (17) { ... } } [2] => class ForumTopic#323 (6) { public $source_id => string(1) "2" public $destination_id => int(2) public $type => string(6) "thread" public $linked_resources => array(0) { ... } public $item_properties => array(1) { ... } public $obj => class stdClass#324 (17) { ... } } } 'post' => array(0) { } 'quiz' => array(0) { } 'Exercise_Question' => array(6) { [1] => class QuizQuestion#338 (14) { public $question => string(18) "Que significa SNIP" public $description => string(0) "" public $ponderation => string(6) "100.00" public $quiz_type => string(1) "1" public $position => string(1) "1" public $level => string(1) "1" public $answers => array(4) { ... } public $picture => string(0) "" public $extra => string(0) "" public $source_id => string(1) "1" public $destination_id => int(-1) public $type => string(17) "Exercise_Question" public $linked_resources => array(0) { ... } public $item_properties => array(0) { ... } } [2] => class QuizQuestion#339 (14) { public $question => string(53) "¿Cuál es el nombre del Presidente actual del Perú?" public $description => string(0) "" public $ponderation => string(6) "100.00" public $quiz_type => string(1) "2" public $position => string(1) "2" public $level => string(1) "1" public $answers => array(4) { ... } public $picture => string(0) "" public $extra => string(0) "" public $source_id => string(1) "2" public $destination_id => int(-1) public $type => string(17) "Exercise_Question" public $linked_resources => array(0) { ... } public $item_properties => array(0) { ... } } [3] => class QuizQuestion#340 (14) { public $question => string(61) "¿Cuál es el nombre del Presidente actual del Perú? - Copia" public $description => string(0) "" public $ponderation => string(6) "100.00" public $quiz_type => string(1) "2" public $position => string(1) "2" public $level => string(1) "1" public $answers => array(4) { ... } public $picture => NULL public $extra => string(0) "" public $source_id => string(1) "3" public $destination_id => int(-1) public $type => string(17) "Exercise_Question" public $linked_resources => array(0) { ... } public $item_properties => array(0) { ... } } [4] => class QuizQuestion#341 (14) { public $question => string(36) "La ironía socrática consiste en..." public $description => string(41) "(puede haber varias respuestas correctas)" public $ponderation => string(5) "10.00" public $quiz_type => string(1) "2" public $position => string(1) "1" public $level => string(1) "1" public $answers => array(4) { ... } public $picture => NULL public $extra => string(0) "" public $source_id => string(1) "4" public $destination_id => int(-1) public $type => string(17) "Exercise_Question" public $linked_resources => array(0) { ... } public $item_properties => array(0) { ... } } [5] => class QuizQuestion#342 (14) { public $question => string(26) "Que significa SNIP - Copia" public $description => string(0) "" public $ponderation => string(6) "100.00" public $quiz_type => string(1) "1" public $position => string(1) "1" public $level => string(1) "1" public $answers => array(4) { ... } public $picture => NULL public $extra => string(0) "" public $source_id => string(1) "5" public $destination_id => int(-1) public $type => string(17) "Exercise_Question" public $linked_resources => array(0) { ... } public $item_properties => array(0) { ... } } [6] => class QuizQuestion#343 (14) { public $question => string(61) "¿Cuál es el nombre del Presidente actual del Perú? - Copia" public $description => string(0) "" public $ponderation => string(6) "100.00" public $quiz_type => string(1) "2" public $position => string(1) "2" public $level => string(1) "1" public $answers => array(4) { ... } public $picture => NULL public $extra => string(0) "" public $source_id => string(1) "6" public $destination_id => int(-1) public $type => string(17) "Exercise_Question" public $linked_resources => array(0) { ... } public $item_properties => array(0) { ... } } } 'link' => array(0) { } 'Tool introduction' => array(0) { } 'wiki' => array(0) { } } 
#4

Updated by Julio Montoya almost 7 years ago

  • Assignee deleted (Julio Montoya)

I sent lot of changes in #5499 need help to test

#5

Updated by Luis Jeremias Saavedra Bendezu almost 7 years ago

Realice una prueba creando 5 cursos nuevos para probar como se exportaban los foros creados en el curso de origen (http://stable.chamilo.org/courses/DEMOCURSOONLINE/index.php)
En el curso de origen he creado un foro con 4 conversaciones (2 del docente y 2 del alumno), también subí una imagen del foro.

PRUEBA 1: Importando la copia de seguridad creada del curso de origen (Copia total del curso), en esta prueba me cargo el ejemplo de foro juntamente con el foro que yo he creado pero no cargo la imagen de foro, me muestra la cantidad de temas(1) y la cantidad de mensajes(4). Al acceder al foro que cree, aparece el titulo del tema con 0 respuestas, pero al acceder al tema este me muestra la ventana con el listado de 4 conversaciones a pesar de que me mostraba 0.

PRUEBA 2: Importando la copia de seguridad creada del curso de origen (Copia parcial seleccionado elementos del curso), en esta prueba yo elegí la actividad foro junto a otras actividades para que se realice la copia de seguridad, al momento de importarlas estas cargan sin problema solo en el caso de los foros este no carga la imagen del foro y me muestra la cantidad de temas(1) y no muestra la cantidad de mensajes. Al acceder al foro que cree, aparece el titulo del tema con 0 respuestas, al acceder al tema este no muestra nada.

PRUEBA 3: Creando una copia de un curso origen a otro nuevo (Copia total del curso), en esta prueba me cargo el ejemplo de foro juntamente con el foro que yo he creado pero no cargo la imagen de foro, me muestra la cantidad de temas(1) y la cantidad de mensajes(4). Al acceder al foro que cree, aparece el titulo del tema con 0 respuestas, pero al acceder al tema este me muestra la ventana con el listado de 4 conversaciones a pesar de que me mostraba 0.

PRUEBA 4: Creando una copia de un curso origen a otro nuevo (Copia parcial seleccionado elementos del curso), en esta prueba yo elegí la actividad foro junto a otras actividades para que se realice la copia de curso, al momento de importarlas estas cargan sin problema solo en el caso de los foros este no carga la imagen del foro y me muestra la cantidad de temas(1) y no muestra la cantidad de mensajes. Al acceder al foro que cree, aparece el titulo del tema con 0 respuestas, al acceder al tema este no muestra nada.

PRUEBA 5: Creando una copia de un curso origen a otro nuevo (Copia parcial seleccionado solo el elemento foro del curso), en esta prueba yo elegí solo la actividad foro para que se realice la copia de curso, al momento de importarla esta carga sin problemas pero en el foro no carga la imagen del foro y me muestra la cantidad de temas(1) y no muestra la cantidad de mensajes. Al acceder al foro que cree, aparece el titulo del tema con 0 respuestas, al acceder al tema este no muestra nada.

En todas las pruebas no carga la imagen del foro, tal vez será porque no las guarda?

#7

Updated by Julio Montoya almost 7 years ago

He agregado unas correciones para las imágenes y la cantidad de mensajes

#8

Updated by Yannick Warnier almost 7 years ago

  • Assignee set to Luis Jeremias Saavedra Bendezu
#9

Updated by Yannick Warnier almost 7 years ago

  • Status changed from Needs testing to Assigned
  • Assignee changed from Luis Jeremias Saavedra Bendezu to Julio Montoya

PRUEBA 1: todavía no veo la imagen del foro. Tengo un foro con un tema y dos mensajes (lo que hubiera tenido que ser migrado como solo la categoría + el foro + el tema (un solo mensaje)) pero el foro me indica 1 tema y 2 mensajes, y al entrar al foro me indica un tema con 0 respuestas...

PRUEBA 2: Mismo problema de imagen, sino que ahí la cantidad de mensajes parece estar bien (foro indicar 1 tema, 1 mensaje) y el tema indica 0 respuesta.

Imagino que lo demás será lo mismo!

Julio, I'm not entirely sure about this, but didn't you mixed the "image" we mentionned with the "description" section of the forum? In the advanced options, you can pick an image to represent the forum. This is the one that we mentionned should be copied.

#10

Updated by Julio Montoya almost 7 years ago

Julio, I'm not entirely sure about this, but didn't you mixed the "image" we mentionned with the "description" section of the forum? In the advanced options, you can pick an image to represent the forum. This is the one that we mentionned should be copied.

yeah, you're right. I didn't remember we had an icon in the forums ...

#11

Updated by Julio Montoya almost 7 years ago

  • Status changed from Assigned to Needs testing
  • Assignee changed from Julio Montoya to Yoselyn Castillo

I sent a fix for that now the copy of the forum image should work

#12

Updated by Yoselyn Castillo almost 7 years ago

It works fine for me. I have used the same course "cursodemoonline". With 2 categories, one with 2 themes and the other with 1 message. I have created the course "cursopruebaforo" and the copy of cursodemoonline to cursoprueba foro selecting just foros worked fine. The images are visible too. See the attachment

#13

Updated by Luis Jeremias Saavedra Bendezu almost 7 years ago

  • Status changed from Bug resolved to Needs testing
  • Assignee set to Yannick Warnier
#14

Updated by Yannick Warnier almost 7 years ago

  • % Done changed from 50 to 70

There's still the wrong number of comments (actually, all comments are copied) when selecting a full copy (not just a partial copy), but apart from that it seems fine.

#15

Updated by Yannick Warnier almost 7 years ago

  • Status changed from Needs testing to Feature implemented
  • Assignee changed from Yannick Warnier to Julio Montoya
  • % Done changed from 70 to 100

I just sent the last patch to fix that (the messages actually being migrated)

#16

Updated by Julio Montoya almost 7 years ago

  • Assignee deleted (Julio Montoya)

Also available in: Atom PDF