Moodle
  1. Moodle
  2. MDL-35792

In question preview, you should be able to change the display options without restarting the attempt.

    Details

    • Testing Instructions:
      Hide

      1. Preview a question in the question bank.

      2. Submit an answer to the question.

      3. Change the display options, and make sure the question reloads in the same state, just with more or less information displayed.

      4. Now change the attempt options, and restart the preview. Make sure you requested changes happen.

      5. Make sure that, while restarting with new attempt options, you can also change the display options at the same time.

      6. Verify that if you change settings in both parts of the form, then click the Update display options button, then the new display options take effect, but the changes in the top half of the form are ignored.

      Show
      1. Preview a question in the question bank. 2. Submit an answer to the question. 3. Change the display options, and make sure the question reloads in the same state, just with more or less information displayed. 4. Now change the attempt options, and restart the preview. Make sure you requested changes happen. 5. Make sure that, while restarting with new attempt options, you can also change the display options at the same time. 6. Verify that if you change settings in both parts of the form, then click the Update display options button, then the new display options take effect, but the changes in the top half of the form are ignored.
    • Affected Branches:
      MOODLE_23_STABLE, MOODLE_24_STABLE, MOODLE_25_STABLE
    • Fixed Branches:
      MOODLE_23_STABLE, MOODLE_24_STABLE
    • Pull from Repository:
    • Pull Master Branch:
    • Rank:
      44546

      Description

      At the bottom of the preview window, there is a form that lets you change the relevant options. At the moment, there is a single button "Restart with these option".

      Really, the options fall into two classes:

      The top two:

      • How questions behave
      • Marked out of
        really require the question to be re-started for the change to take effect.

      The remaining options could easily be be changed without requiring a re-start - and we should make that possible.

      I suggest we do this by splitting the form into two sections:

      • Attempt options - contains the top two settings, and a "Start again with these options" button. (I am not sure that Attempt options is the best name. Suggestions welcome.)
      • Display options - contains the rest of the settings, with an "Update display options" button at the bottom.

      I am not sure whether it would be better to reverse the order of the two sections of the form.

      If "Update display options" is clicked, we just apply those options to the current question-attempt, and ignore the submitted "How questions behave" and "Marked out of" values.

      If "Start again with these options" is clicked, then all form fields are used. That is, we restart taking into account any changes to behaviour, and any changes to display options. In other words, this button will still work the same way that it works now.

        Activity

        Hide
        Tim Hunt added a comment -

        Thanks Thanh, I am submitting this for integration now. I just had to fix one PHP doc comment, and correct a typo in the original commit comment.

        To INTEGRATORS, the question is which branches this should be integrated into. I would like to see this go into 2.3+, because it is a small but significant usability win. I could even try making the case that we have fixed a small usability bug. However, I will leave the final decision up to you. If you put this into 2.4 (please!) you will need to cherry-pick the master commit.

        Show
        Tim Hunt added a comment - Thanks Thanh, I am submitting this for integration now. I just had to fix one PHP doc comment, and correct a typo in the original commit comment. To INTEGRATORS, the question is which branches this should be integrated into. I would like to see this go into 2.3+, because it is a small but significant usability win. I could even try making the case that we have fixed a small usability bug. However, I will leave the final decision up to you. If you put this into 2.4 (please!) you will need to cherry-pick the master commit.
        Hide
        Eloy Lafuente (stronk7) added a comment -

        Integrated (23, 24 & master), thanks!

        Show
        Eloy Lafuente (stronk7) added a comment - Integrated (23, 24 & master), thanks!
        Hide
        Rajesh Taneja added a comment -

        Thanks Thanh and Tim,

        Display and update options works fine.

        Show
        Rajesh Taneja added a comment - Thanks Thanh and Tim, Display and update options works fine.
        Hide
        Eloy Lafuente (stronk7) added a comment -

        And your fantastic code has met core, hope they become good friends for a long period.

        Closing, thanks!

        Show
        Eloy Lafuente (stronk7) added a comment - And your fantastic code has met core, hope they become good friends for a long period. Closing, thanks!

          People

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

            Dates

            • Created:
              Updated:
              Resolved: