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

Add default options for numerical question type using user-preferences

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Minor Minor
    • 3.11
    • 3.11
    • Questions
    • MOODLE_311_STABLE
    • MOODLE_311_STABLE
    • 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.

      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

            mkassaei Mahmoud Kassaei
            mkassaei Mahmoud Kassaei
            Tim Hunt Tim Hunt
            Adrian Greeve Adrian Greeve
            Gladys Basiana Gladys Basiana
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

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

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.