From aaa5387554c104467de7768c14b42a328a46ff96 Mon Sep 17 00:00:00 2001 From: Fred Date: Mon, 4 Mar 2013 17:51:15 +0800 Subject: [PATCH] Possibility to set https to installed instances --- config-dist.json | 2 ++ lib/moodle.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/config-dist.json b/config-dist.json index a6c42c5..8671927 100644 --- a/config-dist.json +++ b/config-dist.json @@ -109,6 +109,8 @@ // 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. diff --git a/lib/moodle.py b/lib/moodle.py index 86cdea3..426312e 100644 --- a/lib/moodle.py +++ b/lib/moodle.py @@ -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 -- 2.11.0