Bug #4228
Bugs when copying questions from one course to another
Description
When I copy a question from one course to another in 1.8.8.4, I get things wrong: the questions does not copy, or it is copied but replaces one that was there, etc.
Files
Associated revisions
Fixes bug: "The questions are added to the first exercise, although I never selected that exercise as a destination" see #4228
Fixing lang var, minor UI changes see #4228
History
Updated by Julio Montoya almost 9 years ago
- Status changed from New to Needs more info
- % Done changed from 0 to 10
Did you mean using the course backup when copying exercises?
main/coursecopy/copy_course.php?cidReq=XXX&id_session=0&gidReq=0
Updated by Yannick Warnier almost 9 years ago
- Status changed from Needs more info to Assigned
- Assignee set to Julio Montoya
No, I was talking about the copy from inside the questions database, in the exercises tool. I think it has been improved in 1.9 already.
So:- http://chamilodev.beeznest.com/main/exercice/question_pool.php?fromExercise=1&session_id=-1&selected_course=17&courseCategoryId=0&exerciseId=0&exerciseLevel=-1&answerType=-1&course_id_changed=0&exercice_id_changed=0
- I select a session
- nothing in the session, so I select the "-- Select --" option
- a warning appears: "Warning: Invalid argument supplied for foreach() in /var/www/chamilodev.beeznest.com/www/main/exercice/question_pool.php on line 619 Call Stack: 0.0030 1017984 1. {main}() /var/www/chamilodev.beeznest.com/www/main/exercice/question_pool.php:0"
Apart from that, it all seems to be fixed.
Updated by Yannick Warnier almost 9 years ago
- Assignee changed from Julio Montoya to Yoselyn Castillo
Updated by Yoselyn Castillo almost 9 years ago
- File question_pool.php question_pool.php added
- Assignee changed from Yoselyn Castillo to Julio Montoya
Please, upload this file in order to see whether that warning disappears. I have proved in my server and it works fine.
Updated by Julio Montoya almost 9 years ago
- Status changed from Assigned to Needs more info
- Assignee changed from Julio Montoya to Yoselyn Castillo
patch added
Updated by Yoselyn Castillo almost 9 years ago
- Assignee changed from Yoselyn Castillo to Yannick Warnier
- % Done changed from 10 to 90
Fixed
Updated by Yannick Warnier over 8 years ago
- Status changed from Needs more info to Assigned
- Assignee changed from Yannick Warnier to Yoselyn Castillo
- % Done changed from 90 to 50
- create a course selecting the "Create with example content"
- go to the exercise tool of the course
- click the "Excel import" button
- download the excel
- upload the excel
- First bug: the questions are added to the first exercise, although I never selected that exercise as a destination (it should have imported the questions inside the questions pool, that's all)
- click on the exercise tool in the breadcrumb (to come back to the list of exercises)
- click the pencil to edit the first exercise
- Second bug:
Fatal error: Cannot redeclare class multipleanswercombination in /var/www/chamilo/main/exercice/multiple_answer_combination.class.php on line 24 Call Stack: 0.0011 862184 1. {main}() /var/www/chamilo/main/exercice/admin.php:0 0.3843 12627768 2. require('/var/www/chamilo/main/exercice/question_list_admin.inc.php') /var/www/chamilo/main/exercice/admin.php:527 0.3876 12635080 3. Question::display_type_menu() /var/www/chamilo/main/exercice/question_list_admin.inc.php:138 0.3923 13118032 4. require_once('/var/www/chamilo/main/exercice/multiple_answer_combination.class.php') /var/www/chamilo/main/exercice/question.class.php:1284
- click back on the breadcrumb to get back to the exercises list
- click on "Questions database"
- Third bug: in Spanish, instead of saying "Ninguna categorÃa en particular", it says "No hay categorÃa" (which is very different given I had created two categories which appear in the list below, invalidating the "There's no category"). I think the confusion comes because in English "No category" means "There is no category" but also means "No category selected". In Spanish, however, it always says "There's no category".
I cannot test the rest because of the redefine error.
Updated by Yannick Warnier over 8 years ago
I fixed the second bug and can confirm that the moving and importing from the question pool works well. Please fix bugs 1 and 3 for the list above. The language variable for "No category" should be $All (this variable already exists), like in the select boxes below.
Bug 1 should be fixed by importing the questions as orphans in the question pool.
Updated by Yannick Warnier over 8 years ago
- Assignee changed from Yoselyn Castillo to Julio Montoya
Updated by Julio Montoya over 8 years ago
- Status changed from Assigned to Needs more info
- Assignee changed from Julio Montoya to Yannick Warnier
- % Done changed from 50 to 80
First bug fixed, in fact if you look at the xls file, you add one exercise with their questions, not orphan questions (as far as I know)
Updated by Yannick Warnier over 8 years ago
- Status changed from Needs more info to Bug resolved
- Assignee changed from Yannick Warnier to Julio Montoya
- % Done changed from 80 to 100
OK, good enough for beta.
Fixed bugs in XLS imports of questions - refs #4228