Skip to content

Commit

Permalink
MDL-39743 assign: Fix missing capability check for "grant extension"
Browse files Browse the repository at this point in the history
Conflicts:

	mod/assign/locallib.php
  • Loading branch information
Ashley Holman authored and Damyon Wiese committed May 29, 2013
1 parent 847f1dd commit 24a3f39
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion mod/assign/gradingbatchoperationsform.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ function definition() {
if ($instance['submissiondrafts']) { if ($instance['submissiondrafts']) {
$options['reverttodraft'] = get_string('reverttodraft', 'assign'); $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'); $options['grantextension'] = get_string('grantextension', 'assign');
} }


Expand Down
6 changes: 4 additions & 2 deletions mod/assign/locallib.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -2509,7 +2509,8 @@ private function view_grading_table() {
array('cm'=>$this->get_course_module()->id, array('cm'=>$this->get_course_module()->id,
'submissiondrafts'=>$this->get_instance()->submissiondrafts, 'submissiondrafts'=>$this->get_instance()->submissiondrafts,
'duedate'=>$this->get_instance()->duedate, 'duedate'=>$this->get_instance()->duedate,
'feedbackplugins'=>$this->get_feedback_plugins()), 'feedbackplugins'=>$this->get_feedback_plugins(),
'context'=>$this->get_context()),
'post', '', 'post', '',
array('class'=>'gradingbatchoperationsform')); array('class'=>'gradingbatchoperationsform'));


Expand Down Expand Up @@ -2762,7 +2763,8 @@ private function process_grading_batch_operation(& $mform) {
array('cm'=>$this->get_course_module()->id, array('cm'=>$this->get_course_module()->id,
'submissiondrafts'=>$this->get_instance()->submissiondrafts, 'submissiondrafts'=>$this->get_instance()->submissiondrafts,
'duedate'=>$this->get_instance()->duedate, 'duedate'=>$this->get_instance()->duedate,
'feedbackplugins'=>$this->get_feedback_plugins()), 'feedbackplugins'=>$this->get_feedback_plugins(),
'context'=>$this->get_context()),
'post', 'post',
'', '',
array('class'=>'gradingbatchoperationsform')); array('class'=>'gradingbatchoperationsform'));
Expand Down

0 comments on commit 24a3f39

Please sign in to comment.