Updated directories for scripts/ and readme file
authorFrederic Massart <fred@moodle.com>
Wed, 5 Dec 2012 07:34:23 +0000 (15:34 +0800)
committerFrederic Massart <fred@moodle.com>
Wed, 5 Dec 2012 07:34:23 +0000 (15:34 +0800)
lib/moodle.py
scripts/README.md

index ade1f7c..4ccb1a2 100644 (file)
@@ -428,6 +428,7 @@ class Moodle(object):
         directories = ['~/.moodle-sdk']
         if C.get('dirs.moodle') != None:
             directories.insert(0, C.get('dirs.moodle'))
+        directories.append('/etc/moodle-sdk')
         directories.append(os.path.join(os.path.dirname(__file__), '..'))
 
         # Loop over each directory in order of preference.
index 30aac47..921de28 100644 (file)
@@ -10,4 +10,13 @@ Formats
 
 ### PHP
 
-PHP scripts will be executed from the web directory of an instance. They will be executed as any other CLI script.
\ No newline at end of file
+PHP scripts will be executed from the web directory of an instance. They will be executed as any other CLI script.
+
+Directories
+-----------
+
+The scripts are looked for in each of the following directories until found:
+- <Setting dirs.moodle>/scripts
+- ~/.moodle-sdk/scripts
+- /etc/moodle-sdk/scripts
+- /path/to/moodle-sdk/scripts
\ No newline at end of file