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

Temporary column questionid has incorrect definition

XMLWordPrintable

    • MOODLE_400_STABLE, MOODLE_401_STABLE
    • MOODLE_400_STABLE, MOODLE_401_STABLE
    • MDL-76584-401
    • Hide

      These tests are based on those in the original issue (MDL-73808) but create fewer questions

      Migrating from 3.11 (basic test as it changes the migration code and performance test)

      1. Standup a new 3.11 site
      2. Log in as an admin
      3. Create a course and 50 questions with tags using the test_73808_solo_light.php script
      4. Confirm:
        1. That the new course and quiz is created by the script and questions are available in the course context
      5. Add some random questions using the same question category and add some tags for each one of them
      6. Add some regular questions from the question bank
      7. Logout and login as a student
      8. Attempt the quiz
      9. Logout from the account
      10. Change the code using this tracker
      11. Upgrade the site
      12. Log in as a site admin
      13. Confirm:
        1. That the created questions are available in the question bank
        2. That the created questions have only one version and the version is 1
        3. That the added random questions are available in the quiz
        4. That the attempts are available in the quiz
        5. The added tags for the random questions are available in the quiz
      14. Logout and login as a student
      15. Attempt the quiz
      16. Confirm:
        1. The quiz attempt works as expected and all the questions are available.
      17. Confirm:
        1. That the upgrade happens as expected without timeout or asking for extra memory.

       

      Show
      These tests are based on those in the original issue ( MDL-73808 ) but create fewer questions Migrating from 3.11 (basic test as it changes the migration code and performance test) Standup a new 3.11 site Log in as an admin Create a course and 50 questions with tags using the test_73808_solo_light.php script Confirm: That the new course and quiz is created by the script and questions are available in the course context Add some random questions using the same question category and add some tags for each one of them Add some regular questions from the question bank Logout and login as a student Attempt the quiz Logout from the account Change the code using this tracker Upgrade the site Log in as a site admin Confirm: That the created questions are available in the question bank That the created questions have only one version and the version is 1 That the added random questions are available in the quiz That the attempts are available in the quiz The added tags for the random questions are available in the quiz Logout and login as a student Attempt the quiz Confirm: The quiz attempt works as expected and all the questions are available. Confirm: That the upgrade happens as expected without timeout or asking for extra memory.  

      During upgrade to 4.0 or later column questionid is temporarily added to mdl_question_bank_entries. The column's definition in lib/db/upgrade.php (in if ($oldversion < 2022020200.02){} ) is:

              $field = new xmldb_field('questionid', XMLDB_TYPE_INTEGER, '10', null, XMLDB_TYPE_INTEGER);

      That last parameter should be either XMLDB_NOTNULL or null (or not included), but not XMLDB_TYPE_INTEGER.

      Issue exists both with the create and the drop 47 lines later.

        1. 400.png
          884 kB
          Ron Carl Alfon Yu
        2. 401.png
          875 kB
          Ron Carl Alfon Yu
        3. master.png
          877 kB
          Ron Carl Alfon Yu
        4. test_73808_solo_light.php
          3 kB
          Paul Holden

            pholden Paul Holden
            leonstr Leon Stringer
            Tim Hunt Tim Hunt
            Jun Pataleta Jun Pataleta
            Ron Carl Alfon Yu Ron Carl Alfon Yu
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 hours, 39 minutes
                2h 39m

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