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

Button "Grade" in Activity Overview

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.1.4, 3.4
    • Fix Version/s: 3.3.4, 3.4.1
    • Component/s: Assignment
    • Labels:
    • Testing Instructions:
      Hide
      1. Go to Site administration / Users / Permissions / Define roles
      2. Edit the editingteacher role and remove mod/assign:grade capability.
      3. Save the changes.
      4. As a teacher go to an assignment activity.
        • Confirm that you don't see a "Grade" button.
      5. Click on "View all submissions"
        • Verify you can view the grades table, but no button to "grade" appears on the grading table.

       

      Show
      Go to Site administration / Users / Permissions / Define roles Edit the editingteacher role and remove mod/assign:grade capability. Save the changes. As a teacher go to an assignment activity. Confirm that you don't see a " Grade " button. Click on " View all submissions " Verify you can view the grades table, but no button to "grade" appears on the grading table.  
    • Affected Branches:
      MOODLE_31_STABLE, MOODLE_34_STABLE
    • Fixed Branches:
      MOODLE_33_STABLE, MOODLE_34_STABLE
    • Pull from Repository:
    • Pull 3.4 Branch:
    • Pull Master Branch:
      MDL-58983-master

      Description

      If a student get the right for viewing gradings (mod/assign:grades), without the right grading submissions (mod/assign:grade)

      Moodle shows the button grade now for the user.

      If the student click on the button, he get some error message.

       

      Solution:
      Change source code in method "render_assign_grading_summary" in file mod/assign/renderer.php

      Changes are green. The methode conside now the right "mod/assign:grade".

       

      $context = context_module::instance($summary->coursemoduleid);
              if(has_capability('mod/assign:grade', $context)){
                      $urlparams = array('id' => $summary->coursemoduleid, 'action' => 'grader');
                      $url = new moodle_url('/mod/assign/view.php', $urlparams);
                      $o .= '<a href="' . $url . '" class="btn btn-primary">' . get_string('grade') . '</a>';
             }

       

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                15/Jan/18