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

          Attachments

            Activity

              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