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

Add default options for numerical question type using user-preferences

    XMLWordPrintable

    Details

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

      For testing you need a Moodle course and at least two users who can create questions.

      1. Create a Moodle course
      2. Create two user (eg. editingteacher), teacher 1 and teacher2.
      3. Enrol teacher1 and teacher2 in the your course
      4. login as teacher1 in to this course
      5. Go to the question bank
      6. Press "Create a new question ..." button
      7. Choose 'Numerical' and press the "Add" button
      8. While filling the question fields, make a note of the original default value of the following fields:
        Default mark (defaultmark)
        Unit handling (unitrole)
        Unit penalty (unitpenalty and unitgradingtypes)
        Units are input using (multichoicedisplay)
        Unit go (unitsleft)
        Then change the values of these fields and remember them
        Press "Save changes" button
        Press "Create a new question ..." button again
        Choose 'Numerical' the press "Add" button
        Verify the values of the fields that you as teacher1 have changed in previous 'Numerical' question appear on the form as defaults.
        In other words, when user create a new question and modify some default setting, they are saved as user preference, so that the next time when a new question of the same type is created by the same user, the default values are taken from the user_preferences table for this user. I.e, teacher1 gets their preference as defaults for a new 'Numerical', whereas teacher2 will get original default values.
      Show
      For testing you need a Moodle course and at least two users who can create questions. Create a Moodle course Create two user (eg. editingteacher), teacher 1 and teacher2. Enrol teacher1 and teacher2 in the your course login as teacher1 in to this course Go to the question bank Press "Create a new question ..." button Choose 'Numerical' and press the "Add" button While filling the question fields, make a note of the original default value of the following fields: Default mark (defaultmark) Unit handling (unitrole) Unit penalty (unitpenalty and unitgradingtypes) Units are input using (multichoicedisplay) Unit go (unitsleft) Then change the values of these fields and remember them Press "Save changes" button Press "Create a new question ..." button again Choose 'Numerical' the press "Add" button Verify the values of the fields that you as teacher1 have changed in previous 'Numerical' question appear on the form as defaults. In other words, when user create a new question and modify some default setting, they are saved as user preference, so that the next time when a new question of the same type is created by the same user, the default values are taken from the user_preferences table for this user. I.e, teacher1 gets their preference as defaults for a new 'Numerical', whereas teacher2 will get original default values.
    • Affected Branches:
      MOODLE_311_STABLE
    • Fixed Branches:
      MOODLE_311_STABLE
    • Pull 3.11 Branch:
      MDL-71205_311
    • Pull Master Branch:

      Description

      Adding the functionality to use user-preferences for setting and getting default value of relevant form elements for the numerical question type

      Based on the functionality introduced in https://tracker.moodle.org/browse/MDL-70895

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              mkassaei Mahmoud Kassaei
              Reporter:
              mkassaei Mahmoud Kassaei
              Peer reviewer:
              Tim Hunt Tim Hunt
              Integrator:
              Adrian Greeve Adrian Greeve
              Tester:
              Gladys Basiana Gladys Basiana
              Participants:
              Component watchers:
              Tim Hunt, Andrew Lyons, Dongsheng Cai, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                17/May/21

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 hour, 20 minutes
                  1h 20m