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

Button "Grade" in Activity Overview

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.1.4, 3.4
    • 3.3.4, 3.4.1
    • Assignment
    • MOODLE_31_STABLE, MOODLE_34_STABLE
    • MOODLE_33_STABLE, MOODLE_34_STABLE
    • MDL-58983-master
    • 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.  

    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

            damyon Damyon Wiese
            marcschumann Marc Schumann
            Mihail Geshoski Mihail Geshoski
            David Monllaó David Monllaó
            Janelle Barcega Janelle Barcega
            Adrian Greeve, Ilya Tregubov, Kevin Percy, Mathew May, Mihail Geshoski, Shamim Rezaie
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              15/Jan/18