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

Upgrade the randomsamatch question type to the new question engine

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • 2.5.5, 2.6.2
    • 2.0.3, 2.1, 2.2, 2.3.7, 2.4.4, 2.5, 2.5.4, 2.6.1
    • Questions
    • MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE, MOODLE_23_STABLE, MOODLE_24_STABLE, MOODLE_25_STABLE, MOODLE_26_STABLE
    • MOODLE_25_STABLE, MOODLE_26_STABLE
    • Hide

      Installation and upgrade

      1. Test upgrade 2.5.4 -> latest MOODLE_25_STABLE -> master
      2. Test upgrade 2.6.1 -> latest MOODLE_26_STABLE -> master
      3. Test upgrade last week's master -> master.
      4. Test new install on each branch. (I believe that re-initialising PHP unit does this, and the CI server has done that already.)

      Question creation, editing and preview

      1. Create some shortanswer questions in various categories (you need a category with a subcategory to be able to test that shortanswer questions from subcategories are correctly picked).
      2. Then create some randomsamatch questions in the same categories.
      3. Re-edit the questions and verify that everything was saved and re-displayed accurately.
      4. Preview the questions using the preview icon in the question bank, and verify that they work properly.

      Things to test:

      • shortanswers questions with images in question text
      • that the checkbox to include or not shortanswers questions in subcategories works
      • shortanswers questions where there are several correct answers (the first one should be used) and also where the correct answer is not the first one
      • that you can't choose more shortanswers questions than available when creating the randomsamatch question
      • that if you remove some shortanswers questions after the randomsamatch question is created, trying to attempt it throw an error.
      • that if 2 shortanswer questions with the same correct answer are chosen in an attempt to a randomsamatch question, this choice is only displayed once in the dropdown menus and it works.

      Using the questions in a quiz

      1. Make a quiz using some of all of your test questions.
      2. Attempt the quiz as a student.
      3. Review the attempt as a student, and as a teacher. Verify that everything is displayed and graded correctly.

      Import / Export

      The only import export format available for randomsamatch questions is Moodle XML and this is the first version it is possible to export/import randomsamatch questions (it was not available in Moodle 1.9/2.0).

      1. Try to export some categories with randomsamatch questions.
      2. Import them into another course.
      3. Verify that the questions were restored accurately. (E.g. open the editing form.)

      Backup and Restore using the new code.

      After having done all the other steps you should have some randomsamatch questions in your question bank, and some quizes using them with some attempts.

      1. Backup your test course, with user data.
      2. Restore it as a new course, or adding to another course.
      3. Verify all the data was transferred accurately.

      Restore of 1.9 backups

      1. Make some quizzes with randomsamatch in a course in a Moodle 1.9 install.
      2. Backup that course.
      3. Restore it. Ensure the question definitions have come across accurately. (It is not possible to restore user data from 1.9.)

      Restore of 2.0 backups

      1. A first test is to try to import the backup file attached to MDL-44053 and verify that the randomsamatch question in the question bank is working, that the "One Quiz" activity which uses it is working and that the attempt on that activity is OK and can be reviewed.
      2. If you can be bothered create some new data in a 2.0 site, including user data, then backup and restore that into a site running the new code..
      Show
      Installation and upgrade Test upgrade 2.5.4 -> latest MOODLE_25_STABLE -> master Test upgrade 2.6.1 -> latest MOODLE_26_STABLE -> master Test upgrade last week's master -> master. Test new install on each branch. (I believe that re-initialising PHP unit does this, and the CI server has done that already.) Question creation, editing and preview Create some shortanswer questions in various categories (you need a category with a subcategory to be able to test that shortanswer questions from subcategories are correctly picked). Then create some randomsamatch questions in the same categories. Re-edit the questions and verify that everything was saved and re-displayed accurately. Preview the questions using the preview icon in the question bank, and verify that they work properly. Things to test: shortanswers questions with images in question text that the checkbox to include or not shortanswers questions in subcategories works shortanswers questions where there are several correct answers (the first one should be used) and also where the correct answer is not the first one that you can't choose more shortanswers questions than available when creating the randomsamatch question that if you remove some shortanswers questions after the randomsamatch question is created, trying to attempt it throw an error. that if 2 shortanswer questions with the same correct answer are chosen in an attempt to a randomsamatch question, this choice is only displayed once in the dropdown menus and it works. Using the questions in a quiz Make a quiz using some of all of your test questions. Attempt the quiz as a student. Review the attempt as a student, and as a teacher. Verify that everything is displayed and graded correctly. Import / Export The only import export format available for randomsamatch questions is Moodle XML and this is the first version it is possible to export/import randomsamatch questions (it was not available in Moodle 1.9/2.0). Try to export some categories with randomsamatch questions. Import them into another course. Verify that the questions were restored accurately. (E.g. open the editing form.) Backup and Restore using the new code. After having done all the other steps you should have some randomsamatch questions in your question bank, and some quizes using them with some attempts. Backup your test course, with user data. Restore it as a new course, or adding to another course. Verify all the data was transferred accurately. Restore of 1.9 backups Make some quizzes with randomsamatch in a course in a Moodle 1.9 install. Backup that course. Restore it. Ensure the question definitions have come across accurately. (It is not possible to restore user data from 1.9.) Restore of 2.0 backups A first test is to try to import the backup file attached to MDL-44053 and verify that the randomsamatch question in the question bank is working, that the "One Quiz" activity which uses it is working and that the attempt on that activity is OK and can be reviewed. If you can be bothered create some new data in a 2.0 site, including user data, then backup and restore that into a site running the new code..

      randomsamatch question type does not work with 2.1 question engine.

      Attempting a quiz that contains a randomsamatch question results in error:
      Coding error detected, it must be fixed by a programmer: Unknown question type (no definition) randomsamatch

            jmvedrine Jean-Michel Vedrine
            timhunt Tim Hunt
            Tim Hunt Tim Hunt
            Dan Poltawski Dan Poltawski
            Jason Fowler Jason Fowler
            Votes:
            42 Vote for this issue
            Watchers:
            36 Start watching this issue

              Created:
              Updated:
              Resolved:

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