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

3rd party manually-graded question types do not upgrade properly

    Details

    • Testing Instructions:
      Hide

      Repeat for versions 2.1 and 2.2

      1. Set up a Moodle 2.0 site, create a quiz and add at least one essay question
      2. Log in as a student and attempt the quiz, answering all answers and submitting
      3. upgrade the site to Moodle [2.1 or 2.2]
      4. login as an admin/teacher and confirm that the question responses are present and that the questions are marked as being in need of manual grading
      Show
      Repeat for versions 2.1 and 2.2 Set up a Moodle 2.0 site, create a quiz and add at least one essay question Log in as a student and attempt the quiz, answering all answers and submitting upgrade the site to Moodle [2.1 or 2.2] login as an admin/teacher and confirm that the question responses are present and that the questions are marked as being in need of manual grading
    • Affected Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE, MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE
    • Pull Master Branch:
      MDL-32213_manual_grade_question_upgrade

      Description

      The function 'get_converter_class_name' in '/question/engine/upgrade/upgradelib.php' is hard-coded to treat the question type 'essay' as manually-graded, when it should treat all manually-graded question types as manually-graded. I'm not sure quite how clear that last sentence was, so hopefully the fix is a bit clearer - change:

      if ($question->qtype == 'essay') {

      to:

      $qtype = question_bank::get_qtype($question->qtype, false);
      if ($qtype->is_manual_graded()) {

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            timhunt Tim Hunt added a comment -

            That looks good. How about a git branch that I can submit for integration?

            Show
            timhunt Tim Hunt added a comment - That looks good. How about a git branch that I can submit for integration?
            Hide
            davosmith Davo Smith added a comment -

            There you go, Tim.

            It should cherry-pick fine to the other branches.

            Show
            davosmith Davo Smith added a comment - There you go, Tim. It should cherry-pick fine to the other branches.
            Hide
            timhunt Tim Hunt added a comment -

            What testing have you done?

            Can you write some testing instructions?

            Show
            timhunt Tim Hunt added a comment - What testing have you done? Can you write some testing instructions?
            Hide
            davosmith Davo Smith added a comment -

            I've tested it by running a 1.9 => 2.2 upgrade several times with a custom question type, based on the essay type.

            Added some testing instructions.

            Show
            davosmith Davo Smith added a comment - I've tested it by running a 1.9 => 2.2 upgrade several times with a custom question type, based on the essay type. Added some testing instructions.
            Hide
            timhunt Tim Hunt added a comment -

            To INTEGRATORS:

            Please cherry-pick to all branches 2.1+

            Show
            timhunt Tim Hunt added a comment - To INTEGRATORS: Please cherry-pick to all branches 2.1+
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week.

            TIA and ciao

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week. TIA and ciao
            Hide
            poltawski Dan Poltawski added a comment -

            Tim, do you know if there are any manually graded question types to use for testing this which aren't the essay question type?

            Show
            poltawski Dan Poltawski added a comment - Tim, do you know if there are any manually graded question types to use for testing this which aren't the essay question type?
            Hide
            timhunt Tim Hunt added a comment -

            No. Sorry. Davo is clearly working on one, and reviewing the code change, it seems very low-risk to me.

            I think what we really need to test is that Upgrade from 2.0 -> 2.1+ still works for standard Moodle essay qtypes. In other words, I think it is sufficient if we just test with essay. We can assume that what Davo has done, works for his 3rd party type.

            Show
            timhunt Tim Hunt added a comment - No. Sorry. Davo is clearly working on one, and reviewing the code change, it seems very low-risk to me. I think what we really need to test is that Upgrade from 2.0 -> 2.1+ still works for standard Moodle essay qtypes. In other words, I think it is sufficient if we just test with essay. We can assume that what Davo has done, works for his 3rd party type.
            Hide
            poltawski Dan Poltawski added a comment -

            Thanks, i've integrated this now.

            Show
            poltawski Dan Poltawski added a comment - Thanks, i've integrated this now.
            Hide
            phalacee Jason Fowler added a comment -

            Works fine - I upgraded from 2.0 to 2.2 ...

            Show
            phalacee Jason Fowler added a comment - Works fine - I upgraded from 2.0 to 2.2 ...
            Hide
            nebgor Aparup Banerjee added a comment -

            The code here has been spread to upstream moodle repositories and mirrors for anyone to use .

            Closing, have a good weekend!

            Show
            nebgor Aparup Banerjee added a comment - The code here has been spread to upstream moodle repositories and mirrors for anyone to use . Closing, have a good weekend!

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  14/May/12