Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-61614

Move tag data from quiz_slots table into it's own table structure

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Major Major
    • 3.5
    • 3.5
    • Quiz
    • MOODLE_35_STABLE
    • MOODLE_35_STABLE
    • MDL-61614-master
    • Hide

      Setup and attempt the quiz

      1. Log in as an admin and create a course
      2. Enrol someone as a teacher in the course
      3. Log in as the teacher and enter the course
      4. Go to the course's question bank (edit cog > More > Question bank > Categories) and create 2 question categories (cat1 and cat2) in the default category for the course.
      5. Go to the Questions tab in the question bank and create 2 true/false questions in each of the cat1 and cat2 categories (name them cat1-q1cat1-q2cat2-q1cat2-q2) (Also for simplicity of the test, enter the question text the same as the question name).
      6. In the question bank, where you see the list of the questions you created, click on the 'tag' icon next to each question and tag them with t1 and t2 like this:
        cat1-q1 --> t1
        cat1-q2 --> t2
        cat2-q1 --> t1
        cat2-q2 --> t2
      7. Create a quiz activity in the course and name that Quiz1
      8. Create a "random" question in the quiz from cat1. set the tag to t1
      9. Create a "random" question in the quiz from cat2. set the tag to t2
      10. Attempt the quiz as a student
      11. Confirm that the first question is cat1-q1
      12. Confirm that the second question is cat2-q2
      13. Create another quiz in the course and name that Quiz2
      14. Create a "random" question in the new quiz you just created (Quiz2) from cat1. Leave the tags field empty.
      15. Create another "random" question in Quiz2 from the "Top" question category for the course (the one that contains cat1 and cat2). Set the tag to t1.
      16. Attempt the quiz as a student
      17. Confirm that the first question is either cat1-q1 or cat1-q2
      18. Confirm that the second question is either cat1-q1 or cat2-q1
      19. Confirm that the 2 questions that the students see in the exam are not the same

      Backup/Restore

      1. Create a backup of the course with the default settings
      2. Restore the backup as a new course
      3. Go to the new course, then go to the quiz Quiz 1 and go to the quiz editing page (questions list)
      4. Confirm that you see 2 random questions
      5. Click on the edit icon for the first question
      6. Confirm that the question configuration is as below:
        • Category: cat1
        • Include questions from subcategories too: Unchecked
        • Tags: t1
      7. Click on the edit icon for the second question
      8. Confirm that the question configuration is as below:
        • Category: cat2
        • Include questions from subcategories too: Unchecked
        • Tags: t2

      Restoring a 3.4 backup

      1. Restore the file 34.mbz into a new course.
      2. Go to the course, then go to the quiz Quiz 1 and go to the quiz editing page (questions list)
      3. Confirm that you see 5 questions 4 of which are random questions
      4. Click on the edit icon for the third question
      5. Confirm that the question configuration is as below:
        • Category: Default for MDK-61614
        • Include questions from subcategories too: Checked
        • Tags: Any tags

      Restoring a 3.5 backup

      1. Restore the file 35.mbz into a new course.
      2. Go to the course, then go to the quiz Quiz 1 and go to the quiz editing page (questions list)
      3. Confirm that you see 1 random question
      4. Click on the edit icon for the question
      5. Confirm that the question configuration is as below:
        • Category: Default for MDL-61614
        • Include questions from subcategories too: Unchecked
        • Tags: t2
      Show
      Setup and attempt the quiz Log in as an admin and create a course Enrol someone as a teacher in the course Log in as the teacher and enter the course Go to the course's question bank (edit cog > More > Question bank > Categories) and create 2 question categories ( cat1  and  cat2 ) in the default category for the course. Go to the Questions tab in the question bank and create 2 true/false questions in each of the cat1 and cat2 categories (name them  cat1-q1 ,  cat1-q2 ,  cat2-q1 ,  cat2-q2 ) (Also for simplicity of the test, enter the question text the same as the question name). In the question bank, where you see the list of the questions you created, click on the 'tag' icon next to each question and tag them with t1 and t2 like this: cat1-q1 --> t1 cat1-q2 --> t2 cat2-q1 --> t1 cat2-q2 --> t2 Create a quiz activity in the course and name that  Quiz1 Create a "random" question in the quiz from  cat1 . set the tag to  t1 Create a "random" question in the quiz from  cat2 . set the tag to  t2 Attempt the quiz as a student Confirm  that the first question is  cat1-q1 Confirm  that the second question is  cat2-q2 Create another quiz in the course and name that  Quiz2 Create a "random" question in the new quiz you just created (Quiz2) from  cat1 . Leave the tags field empty. Create another "random" question in Quiz2 from the " Top " question category for the course (the one that contains cat1 and cat2). Set the tag to  t1 . Attempt the quiz as a student Confirm  that the first question is either  cat1-q1  or  cat1-q2 Confirm  that the second question is either  cat1-q1  or  cat2-q1 Confirm  that the 2 questions that the students see in the exam are  not  the same Backup/Restore Create a backup of the course with the default settings Restore the backup as a new course Go to the new course, then go to the quiz  Quiz 1  and go to the quiz editing page (questions list) Confirm  that you see 2 random questions Click on the edit icon for the first question Confirm  that the question configuration is as below: Category:  cat1 Include questions from subcategories too:  Unchecked Tags:  t1 Click on the edit icon for the second question Confirm  that the question configuration is as below: Category:  cat2 Include questions from subcategories too:  Unchecked Tags:  t2 Restoring a 3.4 backup Restore the file 34.mbz into a new course. Go to the course, then go to the quiz  Quiz 1  and go to the quiz editing page (questions list) Confirm  that you see 5 questions 4 of which are random questions Click on the edit icon for the  third question Confirm  that the question configuration is as below: Category:  Default for MDK-61614 Include questions from subcategories too:  Checked Tags:  Any tags Restoring a 3.5 backup Restore the file 35.mbz into a new course. Go to the course, then go to the quiz  Quiz 1  and go to the quiz editing page (questions list) Confirm  that you see 1 random question Click on the edit icon for the question Confirm  that the question configuration is as below: Category:  Default for MDL-61614 Include questions from subcategories too:  Unchecked Tags:  t2

      As part of MDL-61380 we added a "tags" column to the quiz_slots table which stores a JSON serialised list of tags for use when adding a random question by tag.

      It was discussed and raised that it would be better to have this data more formally structured in it's own table that references the quiz_slots table rather than as a JSON string.

      While this won't represent any functional improvement for the user it should make the data more maintainable for the future so it's worth doing.

      See this comment for more details around the requirements of the tags stuff.

        1. 1.PNG
          1.PNG
          66 kB
        2. 2.PNG
          2.PNG
          193 kB
        3. 34.mbz
          7 kB
        4. 35.mbz
          7 kB

            rezaie9 Shamim Rezaie
            ryanwyllie Ryan Wyllie
            Ryan Wyllie Ryan Wyllie
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Janelle Barcega Janelle Barcega
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 4 days, 4 hours
                4d 4h

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.