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

Refactor adaptive behaviour to separate out calculation of mark from display of marks

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Minor Minor
    • 2.4
    • 2.3
    • Questions
    • MOODLE_23_STABLE
    • MOODLE_24_STABLE
    • Hide

      1. Run the unit tests.

      2. Preview some questions using Adaptive, and Adaptive (no penalties) behaviours, and verify that the way information about grading is displayed during the attempt has not changed.

      Show
      1. Run the unit tests. 2. Preview some questions using Adaptive, and Adaptive (no penalties) behaviours, and verify that the way information about grading is displayed during the attempt has not changed.

      qbehaviour_adaptive_renderer::feedback suffers from two problems that makes it hard to reuse the code.

      1. There is a lot of logic in that method to work out what the current score and penalty. Really, the renderer should only contain the display code. The logic should be in the behaviour class.

      2. The output is done directly in feedback, which means that if you want to generate similar output elsewhere, but with different numbers, you can't. Really the actual output should be done in a separate method like render_adaptive_marks, which feedback - a standard API entry point - can then call.

            timhunt Tim Hunt
            timhunt Tim Hunt
            Dan Poltawski Dan Poltawski
            Rajesh Taneja Rajesh Taneja
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved:

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