Browse Source

Merge branch 'master' of http://200.144.254.107/git/LInE/iassign

root 4 years ago
parent
commit
577c06d889
3 changed files with 27 additions and 3 deletions
  1. 10 0
      db/access.php
  2. 15 1
      locallib.php
  3. 2 2
      version.php

+ 10 - 0
db/access.php

@@ -115,4 +115,14 @@ $capabilities = array(
     ),
     'clonepermissionsfrom' => 'moodle/course:manageactivities'
   ),
+  'mod/iassign:runautoevaluate' => array(
+    'captype' => 'read',
+    'contextlevel' => CONTEXT_MODULE,
+    'legacy' => array(
+      'teacher' => CAP_ALLOW,
+      'editingteacher' => CAP_ALLOW,
+      'coursecreator' => CAP_ALLOW,
+      'manager' => CAP_ALLOW
+    )
+  )
 );

+ 15 - 1
locallib.php

@@ -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 action()
 
+  /// This method runs activities auto evaluation in teacher area
+  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();
+
+  }
 
   /// This method moves an iAssign activity
   function move_activity () {

+ 2 - 2
version.php

@@ -86,8 +86,8 @@ defined('MOODLE_INTERNAL') || die();
 // v 1.1 2016/02/13 (2.1.88 2016021300)
 // v 1.0 2012/10/16
 $plugin->component = 'mod_iassign';  // Full name of the plugin (used for diagnostics)
-$plugin->release = '2.5.00 (Build: 2019021000)'; // Human-readable version name
-$plugin->version = 2019021000;                   // The current module version (Date: YYYYMMDDXX)
+$plugin->release = '2.6.00 (Build: 2019072300)'; // Human-readable version name
+$plugin->version = 2019072300;                   // The current module version (Date: YYYYMMDDXX)
 $plugin->requires = 2014021100;      // Requires this Moodle version since 3.0.0)
 $plugin->maturity = MATURITY_STABLE; // How stable the plugin is: MATURITY_ALPHA, MATURITY_BETA, MATURITY_RC, MATURITY_STABLE (Moodle 2.0 and above)
 $plugin->cron = 60;