Home › Forums › Legacy Support › Support queries › Setup issues › Multiple Quiz’s and Final Quiz
- This topic has 3 replies, 3 voices, and was last updated 9 years, 1 month ago by Anshuman Sahu.
Viewing 4 posts - 1 through 4 (of 4 total)
-
AuthorPosts
-
October 22, 2015 at 5:12 pm #4200waterloomediaParticipantHi, Nearly got the system working and ready for use.. I have several in-course chapter quizes (to help students during the course) and then a final course quiz which is where the "grading" is calculated.. Only issue now is that any chapter questions that have been answered are already "answered" in the final quiz which will be an issue. I need to ensure that any questions answered during the course are cleared when the final course is started.. Any help would be useful, I expect that there needs to be a "clear all" option available when the final quiz is taken. Using this addition below... `add_filter('wplms_course_student_marks','student_marks',999,3); function student_marks($student_marks,$id,$user_id){ $curriculum=bp_course_get_curriculum_units($id); if(get_post_type($curriculum[(count($curriculum)-1)]) == 'quiz'){ $student_marks=get_post_meta($curriculum[(count($curriculum)-1)],$user_id,true); } return $student_marks; } add_filter('wplms_course_maximum_marks','total_marks',999,3); function total_marks($total_marks,$id,$user_id){ $curriculum=bp_course_get_curriculum_units($id);//vibe_sanitize(get_post_meta($id,'vibe_course_curriculum',false)); if(is_numeric($curriculum[(count($curriculum)-1)])){ if(get_post_type($curriculum[(count($curriculum)-1)]) == 'quiz'){ $questions = vibe_sanitize(get_post_meta($curriculum[(count($curriculum)-1)],'quiz_questions'.$user_id,false)); if(!isset($questions) || !is_array($questions)) $questions = vibe_sanitize(get_post_meta($c,'vibe_quiz_questions',false)); $total_marks = array_sum($questions['marks']); } } return $total_marks; }`October 23, 2015 at 1:51 pm #4506MrVibeKeymasterAn easy alternate would be to duplicate the questions and add then to the Final quiz. You can use Post duplicator plugin for this, make sure you do not copy comments from the original question to the duplicated question.October 26, 2015 at 3:16 pm #5136waterloomediaParticipantThanks.. Agreed that would sort the issue. however this is one course of a projected 100+ and having a mass of duplicate questions would make the system difficult to manage. As you mentioned the comment posts are where these answers are held, I will look into nulling these comments based on the logged in user... If you could outline where they are referenced... Is is simply posts(questions) >> User (student) >> comments (Answers) Thanks LeeOctober 29, 2015 at 6:19 am #5720Anshuman SahuKeymasterSorry for this we would need to do major changes in the quiz architecture . If you delete the comments then user cannot view the check results popup and also she will not be able to see the results of the quiz . Also for the final quiz same procedure will follow and thene the user will not be able to see the results even of the final quiz . So right now only solution is to duplicate the questions and then include them in the quiz . You can use the import export feature for this also . Just export all questions form your site and then change the if of the questions to random number in the csv file . refer : https://wplms.io/support/knowledge-base/import-bulk-questions-via-csv-file/
-
AuthorPosts
Viewing 4 posts - 1 through 4 (of 4 total)
- The topic ‘Multiple Quiz’s and Final Quiz’ is closed to new replies.