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

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

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.3
    • Fix Version/s: 2.4
    • Component/s: Questions
    • Labels:
    • Testing Instructions:
      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.
    • Affected Branches:
      MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_24_STABLE
    • Pull from Repository:
    • Pull Master Branch:

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              timhunt Tim Hunt
              Reporter:
              timhunt Tim Hunt
              Integrator:
              Dan Poltawski
              Tester:
              Rajesh Taneja
              Participants:
              Component watchers:
              Tim Hunt, Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                3/Dec/12