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

Tidy up code following MDL-36638

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.4
    • Fix Version/s: 2.4.1
    • Component/s: Questions, Themes
    • Labels:
    • Testing Instructions:
      Hide

      1. Preview a question. Once you have submitted it, make sure the ticks and crosses show up correctly.

      2. Go tot he quiz reports for a quiz with attempts. Make sure the ticks and crosses show up correctly.

      Show
      1. Preview a question. Once you have submitted it, make sure the ticks and crosses show up correctly. 2. Go tot he quiz reports for a quiz with attempts. Make sure the ticks and crosses show up correctly.
    • Affected Branches:
      MOODLE_24_STABLE
    • Fixed Branches:
      MOODLE_24_STABLE
    • Pull from Repository:
    • Pull Master Branch:

      Description

      Following MDL-36638 we have code like

      if ($state == question_state::$gradedright)

      { + $icon = 'grade_correct'; }

      else if ($state == question_state::$gradedpartial)

      { + $icon = 'grade_partiallycorrect'; }

      else

      { + $icon = 'grade_incorrect'; }

      this can be simplifed to the equivalent

      $icon = 'grade_' . $state->get_feedback_class();

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                timhunt Tim Hunt
                Reporter:
                timhunt Tim Hunt
                Integrator:
                Sam Hemelryk
                Tester:
                Jason Fowler
                Participants:
                Component watchers:
                Tim Hunt, Andrew Nicols, Mathew May, Michael Hawkins, Shamim Rezaie, Simey Lameze, Amaia Anabitarte, Bas Brands, Carlos Escobedo, Sara Arjona (@sarjona), Víctor Déniz Falcón
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  14/Jan/13