Permalink
Browse files

MDL-39743 assign: Fix missing capability check for "grant extension"

Conflicts:

	mod/assign/locallib.php
  • Loading branch information...
1 parent 847f1dd commit 24a3f392ba69c9e0d4915cf784d4a84b8e02a726 Ashley Holman committed with damyon May 29, 2013
Showing with 5 additions and 3 deletions.
  1. +1 −1 mod/assign/gradingbatchoperationsform.php
  2. +4 −2 mod/assign/locallib.php
@@ -52,7 +52,7 @@ function definition() {
if ($instance['submissiondrafts']) {
$options['reverttodraft'] = get_string('reverttodraft', 'assign');
}
- if ($instance['duedate']) {
+ if ($instance['duedate'] && has_capability('mod/assign:grantextension', $instance['context'])) {
$options['grantextension'] = get_string('grantextension', 'assign');
}
View
@@ -2509,7 +2509,8 @@ private function view_grading_table() {
array('cm'=>$this->get_course_module()->id,
'submissiondrafts'=>$this->get_instance()->submissiondrafts,
'duedate'=>$this->get_instance()->duedate,
- 'feedbackplugins'=>$this->get_feedback_plugins()),
+ 'feedbackplugins'=>$this->get_feedback_plugins(),
+ 'context'=>$this->get_context()),
'post', '',
array('class'=>'gradingbatchoperationsform'));
@@ -2762,7 +2763,8 @@ private function process_grading_batch_operation(& $mform) {
array('cm'=>$this->get_course_module()->id,
'submissiondrafts'=>$this->get_instance()->submissiondrafts,
'duedate'=>$this->get_instance()->duedate,
- 'feedbackplugins'=>$this->get_feedback_plugins()),
+ 'feedbackplugins'=>$this->get_feedback_plugins(),
+ 'context'=>$this->get_context()),
'post',
'',
array('class'=>'gradingbatchoperationsform'));

0 comments on commit 24a3f39

Please sign in to comment.