Merge branch 'MDL-58983-33' of git://github.com/damyon/moodle into MOODLE_33_STABLE
This commit is contained in:
@@ -5187,7 +5187,8 @@ class assign {
|
||||
$this->get_course_module()->id,
|
||||
$this->count_submissions_need_grading(),
|
||||
$instance->teamsubmission,
|
||||
$warnofungroupedusers);
|
||||
$warnofungroupedusers,
|
||||
$this->can_grade());
|
||||
} else {
|
||||
// The active group has already been updated in groups_print_activity_menu().
|
||||
$countparticipants = $this->count_participants($activitygroup);
|
||||
@@ -5201,7 +5202,8 @@ class assign {
|
||||
$this->get_course_module()->id,
|
||||
$this->count_submissions_need_grading(),
|
||||
$instance->teamsubmission,
|
||||
false);
|
||||
false,
|
||||
$this->can_grade());
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -748,6 +748,8 @@ class assign_grading_summary implements renderable {
|
||||
public $teamsubmission = false;
|
||||
/** @var boolean warnofungroupedusers - Do we need to warn people that there are users without groups */
|
||||
public $warnofungroupedusers = false;
|
||||
/** @var boolean cangrade - Can the current user grade students? */
|
||||
public $cangrade = false;
|
||||
|
||||
/**
|
||||
* constructor
|
||||
@@ -762,6 +764,7 @@ class assign_grading_summary implements renderable {
|
||||
* @param int $coursemoduleid
|
||||
* @param int $submissionsneedgradingcount
|
||||
* @param bool $teamsubmission
|
||||
* @param bool $cangrade
|
||||
*/
|
||||
public function __construct($participantcount,
|
||||
$submissiondraftsenabled,
|
||||
@@ -773,7 +776,8 @@ class assign_grading_summary implements renderable {
|
||||
$coursemoduleid,
|
||||
$submissionsneedgradingcount,
|
||||
$teamsubmission,
|
||||
$warnofungroupedusers) {
|
||||
$warnofungroupedusers,
|
||||
$cangrade = true) {
|
||||
$this->participantcount = $participantcount;
|
||||
$this->submissiondraftsenabled = $submissiondraftsenabled;
|
||||
$this->submissiondraftscount = $submissiondraftscount;
|
||||
@@ -785,6 +789,7 @@ class assign_grading_summary implements renderable {
|
||||
$this->submissionsneedgradingcount = $submissionsneedgradingcount;
|
||||
$this->teamsubmission = $teamsubmission;
|
||||
$this->warnofungroupedusers = $warnofungroupedusers;
|
||||
$this->cangrade = $cangrade;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -339,9 +339,11 @@ class mod_assign_renderer extends plugin_renderer_base {
|
||||
$urlparams = array('id' => $summary->coursemoduleid, 'action' => 'grading');
|
||||
$url = new moodle_url('/mod/assign/view.php', $urlparams);
|
||||
$o .= '<a href="' . $url . '" class="btn btn-secondary">' . get_string('viewgrading', 'mod_assign') . '</a> ';
|
||||
$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>';
|
||||
if ($summary->cangrade) {
|
||||
$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>';
|
||||
}
|
||||
$o .= $this->output->container_end();
|
||||
|
||||
// Close the container and insert a spacer.
|
||||
|
||||
Reference in New Issue
Block a user