|
@@ -295,7 +295,8 @@ class iassign {
|
|
|
'edit' => '$this->add_edit_iassign();',
|
|
|
'get_answer' => '$this->get_answer();',
|
|
|
'duplicate_activity' => '$this->duplicate_activity();',
|
|
|
- 'move_activity' => '$this->move_activity();');
|
|
|
+ 'move_activity' => '$this->move_activity();',
|
|
|
+ 'auto_evaluate' => '$this->auto_evaluate();');
|
|
|
|
|
|
$action_iassign_restricted = array_merge($restricted, $action_iassign_limit, $action_iassign);
|
|
|
|
|
@@ -317,6 +318,19 @@ class iassign {
|
|
|
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ function auto_evaluate () {
|
|
|
+
|
|
|
+ global $COURSE, $CFG, $USER, $DB, $OUTPUT;
|
|
|
+
|
|
|
+ if (!has_capability('mod/iassign:runautoevaluate', $USER->context, $USER->id))
|
|
|
+ exit;
|
|
|
+
|
|
|
+ print $OUTPUT->header();
|
|
|
+
|
|
|
+ print $OUTPUT->footer();
|
|
|
+
|
|
|
+ }
|
|
|
|
|
|
|
|
|
function move_activity () {
|