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

In User Report, Weights should not be displayed as a percentage

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide
      • Run the following behat test:
        grade/tests/behat/grade_view.feature
      Show
      Run the following behat test: grade/tests/behat/grade_view.feature
    • Workaround:
      Hide

      No workaround, but the patch is trivial. Here:

      diff --git a/grade/report/user/lib.php b/grade/report/user/lib.php
      index bc93369..7109956 100644
      --- a/grade/report/user/lib.php
      +++ b/grade/report/user/lib.php
      @@ -372,7 +372,7 @@ class grade_report_user extends grade_report {
                           $data['weight']['content'] = '-';
                           // has a weight assigned, might be extra credit
                           if ($grade_object->aggregationcoef > 0 && $type <> 'courseitem') {
      -                        $data['weight']['content'] = number_format($grade_object->aggregationcoef,2).'%';
      +                        $data['weight']['content'] = number_format($grade_object->aggregationcoef,2);
                           }
                       }

      Show
      No workaround, but the patch is trivial. Here: diff --git a/grade/report/user/lib.php b/grade/report/user/lib.php index bc93369..7109956 100644 --- a/grade/report/user/lib.php +++ b/grade/report/user/lib.php @@ -372,7 +372,7 @@ class grade_report_user extends grade_report { $data['weight']['content'] = '-'; // has a weight assigned, might be extra credit if ($grade_object->aggregationcoef > 0 && $type <> 'courseitem') { - $data['weight']['content'] = number_format($grade_object->aggregationcoef,2).'%'; + $data['weight']['content'] = number_format($grade_object->aggregationcoef,2); } }
    • Affected Branches:
      MOODLE_22_STABLE, MOODLE_23_STABLE, MOODLE_25_STABLE, MOODLE_26_STABLE, MOODLE_27_STABLE
    • Fixed Branches:
      MOODLE_25_STABLE, MOODLE_26_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      wip-MDL-31597-master
    • Story Points:
      13
    • Sprint:
      BACKEND Sprint 9

      Description

      When you display weights for grade items in the User Report in the Grade Book,
      they are displayed as percentages. This is incorrect - they are not percentages,
      nor are they used as percentages in aggregations

      In Settings -> Grade administration -> Course grade settings
      under 'User Report' set 'Show weightings' to 'Show'. Then assign some
      weights to grade items. They are shown with a '%' following them.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                2 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  10/Mar/14