MDL-50890 enrol_flatfile: Correcting typo and return
authorDavid Monllao <davidm@moodle.com>
Wed, 16 Sep 2015 01:07:47 +0000 (09:07 +0800)
committerDavid Monllao <davidm@moodle.com>
Wed, 16 Sep 2015 01:08:34 +0000 (09:08 +0800)
Would be safer to return nothing, execute methods don't have
a return. I understand this return 2 was inherited from the
previous cron function.

enrol/flatfile/classes/task/flatfile_sync_task.php
enrol/flatfile/cli/sync.php

index 7306778..a34da88 100644 (file)
@@ -53,7 +53,7 @@ class flatfile_sync_task extends \core\task\scheduled_task {
         require_once($CFG->dirroot . '/enrol/flatfile/lib.php');
 
         if (!enrol_is_enabled('flatfile')) {
-            return 2;
+            return;
         }
 
         // Instance of enrol_flatfile_plugin.
index 7f5313a..2b248c1 100644 (file)
@@ -34,7 +34,7 @@
  * $ php admin/tool/task/cli/schedule_task.php -h
  *
  * Execute task:
- * $ sudo -u www-data /usr/bin/php admin/tool/task/cli/scheduled_task.php /
+ * $ sudo -u www-data /usr/bin/php admin/tool/task/cli/schedule_task.php /
  * --execute=\\enrol_flatfile\\task\\flatfile_sync_task
  *
  * @package    enrol_flatfile