Quiz

 
 
Picture of Steven Spoon
Disappearing quizzes
 

Hello, I am using Moodle 2.3.3+ (Build: 20121208). I had a course set up with 4 quizzes. They had a restriction date placed on them but I decided to extend the date(after it had passed). Went into each quiz and "unenabled" the date restrictions on all of the tests and saved.

PROBLEM: 2 of the 4 tests have disappeared. From the student end it's as though I have hidden them. However, from the admin end, everything looks normal. Can someone please, please, please help me with this. Thank you!!!!

 
Average of ratings: -
Picture of Emma Richardson
Re: Disappearing quizzes
Group Particularly helpful Moodlers

I think you might need to extend the date instead of just removing the restriction.  There is probably still an end date in the database that is causing them to be hidden.  I would try renabling the date restriction and extending it out.

 
Average of ratings: -
Picture of Steven Spoon
Re: Disappearing quizzes
 

Thanks Emma, I tried that after my post. And again after I read yours, didn't work. Any other suggestions? 

 
Average of ratings: -
Picture of Emma Richardson
Re: Disappearing quizzes
Group Particularly helpful Moodlers

I am presuming that you have checked the eye icon to make sure that it is not hidden..and you do have the year set right??  

Otherwise I am guessing a glitch in the database and maybe you can go look at in there and see if there is an errant end date that you can change..

Just noticed that only two vanished - was there anything different about those two?  

 

 
Average of ratings: -
Picture of Steven Spoon
Re: Disappearing quizzes
 

Hey Emma, with regard to the "eye", yes, it is "open" or not hidden. I have looked at all of the settings on the two that didn't disappear and I made the invisible setting match the visible. I don't think there is anything different about them now.

Where would I look (file name) for the database. I am using Siteground as my hosting company. They are very helpful but when it comes to Moodle I have to give them specifics of what I need done. I have access to the files but my technical skills are limited.

The biggest thing that puzzles me about this is that only two disappeared when all 4 were set up the same way. If it weren't for having to manually install the grades from previous tests I would just delete the missing quizzes and re-install.

 
Average of ratings: -
Picture of Emma Richardson
Re: Disappearing quizzes
Group Particularly helpful Moodlers

You can install an addin like Adminer or PHPMyAdmin that will let you get into the database through the web interface.  It has to be installed on the server in the local folder and then will show up under Server in the admin settings.  

 
Average of ratings: -
Picture of Steven Spoon
Re: Disappearing quizzes
 

I have access to the files on the server through "File Manager". When I go to file manager it lists all of the files just like on a personal computer. What file do I need to find and what am I looking for in that file? Thanks! smile

Also, I was in the "edit settings/update quiz" screen and clicked "preview" and got the following error message:

Debug info: Duplicate entry '77-2-1' for key 'mdl_quizatte_quiuseatt_uix'
INSERT INTO mdl_quiz_attempts (quiz,userid,preview,layout,attempt,timestart,timefinish,timemodified,state,uniqueid) VALUES(?,?,?,?,?,?,?,?,?,?)
[array (
0 => '77',
1 => '2',
2 => 1,
3 => '38,47,14,20,41,0,12,10,42,16,11,0,31,21,6,36,22,0,55,33,5,53,18,0,34,39,35,60,58,0,2,28,59,23,46,0,44,29,57,49,50,0,1,45,24,61,8,0,51,52,48,9,3,0,43,40,4,56,13,0,19,62,7,26,30,0,27,17,25,15,54,0,37,32,0',
4 => 1,
5 => 1359840617,
6 => 0,
7 => 1359840617,
8 => 'inprogress',
9 => 1118,
)]
Error code: dmlwriteexception
Stack trace:
  • line 410 of /lib/dml/moodle_database.php: dml_write_exception thrown
  • line 1050 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
  • line 1092 of /lib/dml/mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->insert_record_raw()
  • line 251 of /mod/quiz/startattempt.php: call to mysqli_native_moodle_database->insert_record()
 
Average of ratings: -
Picture of Emma Richardson
Re: Disappearing quizzes
Group Particularly helpful Moodlers

You are not going to find the database in a file.  You need to look into web based sql database access (e.g. Adminer) and find some help on setting that up.

The error proves something is wrong with the quiz.  I suggest trying to backup the two quizzes and then reimport them and see if you can get them to work that way.  However, it appears that the error is maybe attached to a specific attempt but I am  hoping that it is just coming from the preview attempt. Reimporting the quiz should create a new database entry for the quiz and hopefully fix the issue.

If not, perhaps Tim Hunt can take a look at this and offer some insight..

 
Average of ratings: -
Picture of Steven Spoon
Re: Disappearing quizzes
 

Thanks Emma, question. Will a backup/reimport keep the scores that are currently stored or will they be lost? When I go to my "view course report" or "grades" I have access to all of the results from the "hidden" quizzes.

 
Average of ratings: -
Picture of Steven Spoon
Re: Disappearing quizzes
 

I get this when I try to backup. I've had periodic trouble before doing a backup. I'm also getting a "Gateway time-out". This should be a server issue, correct?

Debug info: 
Error code: cannot_finish_ui_if_not_setting_ui
$a contents:
Stack trace:
  • line 161 of /backup/controller/backup_controller.class.php: backup_controller_exception thrown
  • line 110 of /backup/util/ui/backup_ui.class.php: call to backup_controller->finish_ui()
  • line 89 of /backup/backup.php: call to backup_ui->execute()
 
Average of ratings: -
Picture of Steven Spoon
Re: Disappearing quizzes
 
Emma, I get this when I did a restore on one of the quizzes. Also, I have two of the same quizzes and neither is visible. 
 
 
Error: mdb->get_record() found more than one record!
  • line 1372 of /lib/dml/moodle_database.php: call to debugging()
  • line 1433 of /lib/dml/moodle_database.php: call to moodle_database->get_record_sql()
  • line 156 of /backup/moodle2/restore_qtype_plugin.class.php: call to moodle_database->get_field_sql()
  • line 131 of /backup/util/plan/restore_structure_step.class.php: call to restore_qtype_plugin->process_question_answer()
  • line 103 of /backup/util/helper/restore_structure_parser_processor.class.php: call to restore_structure_step->process()
  • line 125 of /backup/util/xml/parser/processors/grouped_parser_processor.class.php: call to restore_structure_parser_processor->dispatch_chunk()
  • line 91 of /backup/util/helper/restore_structure_parser_processor.class.php: call to grouped_parser_processor->postprocess_chunk()
  • line 148 of /backup/util/xml/parser/processors/simplified_parser_processor.class.php: call to restore_structure_parser_processor->postprocess_chunk()
  • line 92 of /backup/util/xml/parser/processors/progressive_parser_processor.class.php: call to simplified_parser_processor->process_chunk()
  • line 169 of /backup/util/xml/parser/progressive_parser.class.php: call to progressive_parser_processor->receive_chunk()
  • line 253 of /backup/util/xml/parser/progressive_parser.class.php: call to progressive_parser->publish()
  • line ? of unknownfile: call to progressive_parser->end_tag()
  • line 158 of /backup/util/xml/parser/progressive_parser.class.php: call to xml_parse()
  • line 137 of /backup/util/xml/parser/progressive_parser.class.php: call to progressive_parser->parse()
  • line 105 of /backup/util/plan/restore_structure_step.class.php: call to progressive_parser->process()
  • line 153 of /backup/util/plan/base_task.class.php: call to restore_structure_step->execute()
  • line 163 of /backup/util/plan/base_plan.class.php: call to base_task->execute()
  • line 157 of /backup/util/plan/restore_plan.class.php: call to base_plan->execute()
  • line 315 of /backup/controller/restore_controller.class.php: call to restore_plan->execute()
  • line 147 of /backup/util/ui/restore_ui.class.php: call to restore_controller->execute_plan()
  • line 46 of /backup/restore.php: call to restore_ui->execute()
Error: mdb->get_record() found more than one record!
  • line 1372 of /lib/dml/moodle_database.php: call to debugging()
  • line 1433 of /lib/dml/moodle_database.php: call to moodle_database->get_record_sql()
  • line 156 of /backup/moodle2/restore_qtype_plugin.class.php: call to moodle_database->get_field_sql()
  • line 131 of /backup/util/plan/restore_structure_step.class.php: call to restore_qtype_plugin->process_question_answer()
  • line 103 of /backup/util/helper/restore_structure_parser_processor.class.php: call to restore_structure_step->process()
  • line 125 of /backup/util/xml/parser/processors/grouped_parser_processor.class.php: call to restore_structure_parser_processor->dispatch_chunk()
  • line 91 of /backup/util/helper/restore_structure_parser_processor.class.php: call to grouped_parser_processor->postprocess_chunk()
  • line 148 of /backup/util/xml/parser/processors/simplified_parser_processor.class.php: call to restore_structure_parser_processor->postprocess_chunk()
  • line 92 of /backup/util/xml/parser/processors/progressive_parser_processor.class.php: call to simplified_parser_processor->process_chunk()
  • line 169 of /backup/util/xml/parser/progressive_parser.class.php: call to progressive_parser_processor->receive_chunk()
  • line 253 of /backup/util/xml/parser/progressive_parser.class.php: call to progressive_parser->publish()
  • line ? of unknownfile: call to progressive_parser->end_tag()
  • line 158 of /backup/util/xml/parser/progressive_parser.class.php: call to xml_parse()
  • line 137 of /backup/util/xml/parser/progressive_parser.class.php: call to progressive_parser->parse()
  • line 105 of /backup/util/plan/restore_structure_step.class.php: call to progressive_parser->process()
  • line 153 of /backup/util/plan/base_task.class.php: call to restore_structure_step->execute()
  • line 163 of /backup/util/plan/base_plan.class.php: call to base_task->execute()
  • line 157 of /backup/util/plan/restore_plan.class.php: call to base_plan->execute()
  • line 315 of /backup/controller/restore_controller.class.php: call to restore_plan->execute()
  • line 147 of /backup/util/ui/restore_ui.class.php: call to restore_controller->execute_plan()
  • line 46 of /backup/restore.php: call to restore_ui->execute()
Error: mdb->get_record() found more than one record!
  • line 1372 of /lib/dml/moodle_database.php: call to debugging()
  • line 1433 of /lib/dml/moodle_database.php: call to moodle_database->get_record_sql()
  • line 156 of /backup/moodle2/restore_qtype_plugin.class.php: call to moodle_database->get_field_sql()
  • line 131 of /backup/util/plan/restore_structure_step.class.php: call to restore_qtype_plugin->process_question_answer()
  • line 103 of /backup/util/helper/restore_structure_parser_processor.class.php: call to restore_structure_step->process()
  • line 125 of /backup/util/xml/parser/processors/grouped_parser_processor.class.php: call to restore_structure_parser_processor->dispatch_chunk()
  • line 91 of /backup/util/helper/restore_structure_parser_processor.class.php: call to grouped_parser_processor->postprocess_chunk()
  • line 148 of /backup/util/xml/parser/processors/simplified_parser_processor.class.php: call to restore_structure_parser_processor->postprocess_chunk()
  • line 92 of /backup/util/xml/parser/processors/progressive_parser_processor.class.php: call to simplified_parser_processor->process_chunk()
  • line 169 of /backup/util/xml/parser/progressive_parser.class.php: call to progressive_parser_processor->receive_chunk()
  • line 253 of /backup/util/xml/parser/progressive_parser.class.php: call to progressive_parser->publish()
  • line ? of unknownfile: call to progressive_parser->end_tag()
  • line 158 of /backup/util/xml/parser/progressive_parser.class.php: call to xml_parse()
  • line 137 of /backup/util/xml/parser/progressive_parser.class.php: call to progressive_parser->parse()
  • line 105 of /backup/util/plan/restore_structure_step.class.php: call to progressive_parser->process()
  • line 153 of /backup/util/plan/base_task.class.php: call to restore_structure_step->execute()
  • line 163 of /backup/util/plan/base_plan.class.php: call to base_task->execute()
  • line 157 of /backup/util/plan/restore_plan.class.php: call to base_plan->execute()
  • line 315 of /backup/controller/restore_controller.class.php: call to restore_plan->execute()
  • line 147 of /backup/util/ui/restore_ui.class.php: call to restore_controller->execute_plan()
  • line 46 of /backup/restore.php: call to restore_ui->execute()
Enrol plugin data can not be restored because it is not enabled
  • line 1523 of /backup/moodle2/restore_stepslib.php: call to debugging()
  • line 131 of /backup/util/plan/restore_structure_step.class.php: call to restore_enrolments_structure_step->process_enrol()
  • line 103 of /backup/util/helper/restore_structure_parser_processor.class.php: call to restore_structure_step->process()
  • line 125 of /backup/util/xml/parser/processors/grouped_parser_processor.class.php: call to restore_structure_parser_processor->dispatch_chunk()
  • line 91 of /backup/util/helper/restore_structure_parser_processor.class.php: call to grouped_parser_processor->postprocess_chunk()
  • line 148 of /backup/util/xml/parser/processors/simplified_parser_processor.class.php: call to restore_structure_parser_processor->postprocess_chunk()
  • line 92 of /backup/util/xml/parser/processors/progressive_parser_processor.class.php: call to simplified_parser_processor->process_chunk()
  • line 169 of /backup/util/xml/parser/progressive_parser.class.php: call to progressive_parser_processor->receive_chunk()
  • line 253 of /backup/util/xml/parser/progressive_parser.class.php: call to progressive_parser->publish()
  • line ? of unknownfile: call to progressive_parser->end_tag()
  • line 158 of /backup/util/xml/parser/progressive_parser.class.php: call to xml_parse()
  • line 137 of /backup/util/xml/parser/progressive_parser.class.php: call to progressive_parser->parse()
  • line 105 of /backup/util/plan/restore_structure_step.class.php: call to progressive_parser->process()
  • line 153 of /backup/util/plan/base_task.class.php: call to restore_structure_step->execute()
  • line 163 of /backup/util/plan/base_plan.class.php: call to base_task->execute()
  • line 157 of /backup/util/plan/restore_plan.class.php: call to base_plan->execute()
  • line 315 of /backup/controller/restore_controller.class.php: call to restore_plan->execute()
  • line 147 of /backup/util/ui/restore_ui.class.php: call to restore_controller->execute_plan()
  • line 46 of /backup/restore.php: call to restore_ui->execute()
Enrol plugin data can not be restored because it is not enabled
  • line 1523 of /backup/moodle2/restore_stepslib.php: call to debugging()
  • line 131 of /backup/util/plan/restore_structure_step.class.php: call to restore_enrolments_structure_step->process_enrol()
  • line 103 of /backup/util/helper/restore_structure_parser_processor.class.php: call to restore_structure_step->process()
  • line 125 of /backup/util/xml/parser/processors/grouped_parser_processor.class.php: call to restore_structure_parser_processor->dispatch_chunk()
  • line 91 of /backup/util/helper/restore_structure_parser_processor.class.php: call to grouped_parser_processor->postprocess_chunk()
  • line 148 of /backup/util/xml/parser/processors/simplified_parser_processor.class.php: call to restore_structure_parser_processor->postprocess_chunk()
  • line 92 of /backup/util/xml/parser/processors/progressive_parser_processor.class.php: call to simplified_parser_processor->process_chunk()
  • line 169 of /backup/util/xml/parser/progressive_parser.class.php: call to progressive_parser_processor->receive_chunk()
  • line 253 of /backup/util/xml/parser/progressive_parser.class.php: call to progressive_parser->publish()
  • line ? of unknownfile: call to progressive_parser->end_tag()
  • line 158 of /backup/util/xml/parser/progressive_parser.class.php: call to xml_parse()
  • line 137 of /backup/util/xml/parser/progressive_parser.class.php: call to progressive_parser->parse()
  • line 105 of /backup/util/plan/restore_structure_step.class.php: call to progressive_parser->process()
  • line 153 of /backup/util/plan/base_task.class.php: call to restore_structure_step->execute()
  • line 163 of /backup/util/plan/base_plan.class.php: call to base_task->execute()
  • line 157 of /backup/util/plan/restore_plan.class.php: call to base_plan->execute()
  • line 315 of /backup/controller/restore_controller.class.php: call to restore_plan->execute()
  • line 147 of /backup/util/ui/restore_ui.class.php: call to restore_controller->execute_plan()
  • line 46 of /backup/restore.php: call to restore_ui->execute()
 
Average of ratings: -
Picture of Emma Richardson
Re: Disappearing quizzes
Group Particularly helpful Moodlers

I have seen the same error (first set) with restoring quizzes though it does not seem to stop them from restoring.  Did the student data come into the new quiz?

The second set of errors seem to relate to the user data. I am at a loss here short of looking at the database, trying to find the quiz in question and seeing it there is still an end date there somewhere.

What does the gradebook look like?  Are grades from the quiz there and unhidden?

Could you post screenshots of the quiz settings and course page when logged in as student and as teacher? 

 
Average of ratings: -
Picture of Steven Spoon
Re: Disappearing quizzes
 

Emma, I finally deleted the tests, reinstalled, and manually transferred the test scores. I have the same problem that I had before, the same two tests aren't visible.

I will post some screen shots asap. Thanks!

 
Average of ratings: -
Picture of Steven Spoon
Re: Disappearing quizzes
 

Here is the employee's perspective.


 
Average of ratings: -
Picture of Steven Spoon
Re: Disappearing quizzes
 

Here is the administrative view.


 
Average of ratings: -
Picture of Steven Spoon
Re: Disappearing quizzes
 

Here is the quiz Timing setting.


 
Average of ratings: -
Picture of Steven Spoon
Re: Disappearing quizzes
 

Here is the Restrictions setting.


 
Average of ratings: -
Picture of Steven Spoon
Re: Disappearing quizzes
 

Emma, I have figured out how to look at the database. However, I couldn't really figure out how to determine which particular quiz to look for as they were numbered. I have more than one quiz named "Customer Service" but they are in different courses. Can you tell me how to find this particular test (Period 1 Home > Customer Service)? Thanks!

 
Average of ratings: -
Picture of Emma Richardson
Re: Disappearing quizzes
Group Particularly helpful Moodlers

The quiz number  is in the URL. The quiz that you posted screenshots of is quiz 222.

 

 
Average of ratings: -
Tim at Lone Pine Koala Sanctuary
Re: Disappearing quizzes
Group DevelopersGroup Documentation writersGroup Particularly helpful Moodlers

It looks like it is not hte quiz being hidden, but that whole section (week/topic) of the course. Can you check the settings on the section.

 
Average of ratings: -
Picture of Steven Spoon
Re: Disappearing quizzes
 

Emma, that is good information to know, thank you.

Tim, if you had told me that a couple of days ago I would have kissed you! I would have never thought about the whole section being restricted but that was the problem. Why I set those two sections to close I don't know. Anyway, thanks for giving me the solution!

Emma, thank you soooo much for hanging with me in trying to get this resolved. Hope you both have a great week!

 
Average of ratings: -
Picture of Emma Richardson
Re: Disappearing quizzes
Group Particularly helpful Moodlers

Nice catch Tim - I had looked the eye icon under the admin picture and it was open so didn't think that was it!  

Glad we finally got there! 

 
Average of ratings: -