Permalink
Browse files

Merge branch 'MDL-39743-25' of git://github.com/damyon/moodle into MO…

…ODLE_25_STABLE
  • Loading branch information...
2 parents c687e8d + e9efc2b commit e19a07bfcb807ea7e64a6f064b5809134e1f3111 @danpoltawski danpoltawski committed Jun 4, 2013
Showing with 5 additions and 3 deletions.
  1. +1 −1 mod/assign/gradingbatchoperationsform.php
  2. +4 −2 mod/assign/locallib.php
@@ -49,7 +49,7 @@ public 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');
}
if ($instance['attemptreopenmethod'] == ASSIGN_ATTEMPT_REOPEN_METHOD_MANUAL) {
View
@@ -2876,7 +2876,8 @@ protected function view_grading_table() {
'submissiondrafts'=>$this->get_instance()->submissiondrafts,
'duedate'=>$this->get_instance()->duedate,
'attemptreopenmethod'=>$this->get_instance()->attemptreopenmethod,
- 'feedbackplugins'=>$this->get_feedback_plugins());
+ 'feedbackplugins'=>$this->get_feedback_plugins(),
+ 'context'=>$this->get_context());
$classoptions = array('class'=>'gradingbatchoperationsform');
$gradingbatchoperationsform = new mod_assign_grading_batch_operations_form(null,
@@ -3152,7 +3153,8 @@ protected function process_grading_batch_operation(& $mform) {
'submissiondrafts'=>$this->get_instance()->submissiondrafts,
'duedate'=>$this->get_instance()->duedate,
'attemptreopenmethod'=>$this->get_instance()->attemptreopenmethod,
- 'feedbackplugins'=>$this->get_feedback_plugins());
+ 'feedbackplugins'=>$this->get_feedback_plugins(),
+ 'context'=>$this->get_context());
$formclasses = array('class'=>'gradingbatchoperationsform');
$mform = new mod_assign_grading_batch_operations_form(null,
$batchformparams,

0 comments on commit e19a07b

Please sign in to comment.