Possibility to set https to installed instances
authorFred <fmcell@gmail.com>
Mon, 4 Mar 2013 09:51:15 +0000 (17:51 +0800)
committerFred <fmcell@gmail.com>
Mon, 4 Mar 2013 09:51:15 +0000 (17:51 +0800)
config-dist.json
lib/moodle.py

index a6c42c5..8671927 100644 (file)
     // The public acccess URL of your repository. It is used to populate the fields on the tracker issue.
     "repositoryUrl": "git://github.com/YourGitHub/moodle.git",
 
+    // The scheme to set during an install (http or https)
+    "scheme": "http",
     // The host name to set during an install
     "host": "localhost",
     // Path to your Moodle instances, http://host/path/ should point to dirs.www.
index 86cdea3..426312e 100644 (file)
@@ -386,7 +386,7 @@ class Moodle(object):
         db.selectdb(dbname)
 
         # Defining wwwroot.
-        wwwroot = 'http://%s/' % C.get('host')
+        wwwroot = '%s://%s/' % (C.get('scheme'), C.get('host'))
         if C.get('path') != '' and C.get('path') != None:
             wwwroot = wwwroot + C.get('path') + '/'
         wwwroot = wwwroot + self.identifier