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

Minor question editing issues found by Jamie Pratt

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.1
    • Fix Version/s: 2.1
    • Component/s: Questions
    • Labels:
      None
    • Testing Instructions:
      Hide

      This is really hard to test, because even with the ORDER BY id omitted, databases still normally, but not always, load the question_hint rows in order.

      I just suggest the following test:
      1. Create a new quiz question (e.g. shortanswer) with two hints, hint 1 and hint 2.
      2. Edit the question again, and ensure the hints are still in the right order after saving.

      The extraanswerfields bit does not affect any core question types. It only affects some third-party question types like the ones Jamie is working on. I suggest you assume that we have tested that sufficiently. The tests above that editing a standard qtype is not broken is sufficient.

      Show
      This is really hard to test, because even with the ORDER BY id omitted, databases still normally, but not always, load the question_hint rows in order. I just suggest the following test: 1. Create a new quiz question (e.g. shortanswer) with two hints, hint 1 and hint 2. 2. Edit the question again, and ensure the hints are still in the right order after saving. The extraanswerfields bit does not affect any core question types. It only affects some third-party question types like the ones Jamie is working on. I suggest you assume that we have tested that sufficiently. The tests above that editing a standard qtype is not broken is sufficient.
    • Affected Branches:
      MOODLE_21_STABLE
    • Fixed Branches:
      MOODLE_21_STABLE
    • Pull from Repository:
    • Pull Master Branch:

      Description

      The issues are:

      1. The question_type::save_hints method is missing ORDER BY id.

      2. The $extraanswerfields bit of question_type::get_question_options had some SQL errors.

        Gliffy Diagrams

          Activity

          Hide
          timhunt Tim Hunt added a comment -
          Show
          timhunt Tim Hunt added a comment - Jamie's original commits were https://github.com/jamiepratt/Moodle-Question-Engine-2/commit/59a6698ba4c741dde83127dfdbb4b19fb55a355b https://github.com/jamiepratt/Moodle-Question-Engine-2/commit/01f3a6c3628e97787b9874e3c7cb33424b96896b This is not critical for 2.1. The following weekly would be fine. However, this is also very low risk
          Hide
          stronk7 Eloy Lafuente (stronk7) added a comment -

          Integrated, thanks!

          Show
          stronk7 Eloy Lafuente (stronk7) added a comment - Integrated, thanks!
          Hide
          stronk7 Eloy Lafuente (stronk7) added a comment -

          passed, under my entire responsibility. I love risks!

          Show
          stronk7 Eloy Lafuente (stronk7) added a comment - passed, under my entire responsibility. I love risks!
          Hide
          stronk7 Eloy Lafuente (stronk7) added a comment -

          I'm getting tired of telling the same guys the same phrase all the time. Thanks!

          Show
          stronk7 Eloy Lafuente (stronk7) added a comment - I'm getting tired of telling the same guys the same phrase all the time. Thanks!

            People

            • Assignee:
              timhunt Tim Hunt
              Reporter:
              timhunt Tim Hunt
              Integrator:
              Eloy Lafuente (stronk7)
              Tester:
              Eloy Lafuente (stronk7)
              Participants:
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                1/Jul/11