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

Tidy up code following MDL-36638

    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();

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              Hide
              timhunt Tim Hunt added a comment -

              The two places to fix are in mod/quiz/report/attemptsreport_table.php and question/type/rendererbase.php.

              Show
              timhunt Tim Hunt added a comment - The two places to fix are in mod/quiz/report/attemptsreport_table.php and question/type/rendererbase.php.
              Hide
              samhemelryk Sam Hemelryk added a comment -

              Thanks Tim, has been integrated now

              Show
              samhemelryk Sam Hemelryk added a comment - Thanks Tim, has been integrated now
              Hide
              phalacee Jason Fowler added a comment -

              Worked fine for me Tim.

              Show
              phalacee Jason Fowler added a comment - Worked fine for me Tim.
              Hide
              stronk7 Eloy Lafuente (stronk7) added a comment -

              Many thanks for your effort, the whole Moodle Community will be enjoying your great solutions starting now!

              Closing, ciao

              Show
              stronk7 Eloy Lafuente (stronk7) added a comment - Many thanks for your effort, the whole Moodle Community will be enjoying your great solutions starting now! Closing, ciao

                People

                • Votes:
                  0 Vote for this issue
                  Watchers:
                  1 Start watching this issue

                  Dates

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