From 9a3936a95ef449e76d0ac8276121dc2ead074e9f Mon Sep 17 00:00:00 2001 From: moodler Date: Tue, 31 Aug 2004 08:41:26 +0000 Subject: [PATCH] Merged loginhttps config from stable --- admin/config.html | 32 ++++++++++++++++++++++++++++++++ admin/config.php | 14 ++++++++++++++ config-dist.php | 6 ------ lang/en/moodle.php | 9 ++++++++- lib/defaults.php | 2 ++ 5 files changed, 56 insertions(+), 7 deletions(-) diff --git a/admin/config.html b/admin/config.html index c2d99b3c21..270f46ae39 100644 --- a/admin/config.html +++ b/admin/config.html @@ -387,6 +387,23 @@ + + +

loginhttps: + + loginhttps, "", "", ""); + ?> + + + + + +

teacherassignteachers: @@ -417,6 +434,21 @@ + +

showsiteparticipantslist: + + showsiteparticipantslist, "", "", ""); + ?> + + + + +

allowunenroll: diff --git a/admin/config.php b/admin/config.php index 1b03783883..4a91d85de1 100644 --- a/admin/config.php +++ b/admin/config.php @@ -86,6 +86,20 @@ include("config.html"); print_simple_box_end(); + /// Lock some options + + $httpsurl = str_replace('http://', 'https://', $CFG->wwwroot); + if ($httpsurl != $CFG->wwwroot) { + if ((($fh = @fopen($httpsurl, 'r')) == false) and ($config->loginhttps == 0)) { + echo ''."\n"; + } + } + + if ($site) { print_footer(); } diff --git a/config-dist.php b/config-dist.php index 9ca2a767ca..4e25abaae6 100644 --- a/config-dist.php +++ b/config-dist.php @@ -162,12 +162,6 @@ $CFG->admin = 'admin'; // NOT RECOMMENDED FOR PRODUCTION SITES // $CFG->unicode = true; // -// Turning this on will make Moodle use a https connection just for the -// login page (providing a secure login), and then afterwards revert -// back to the normal http URL. Requires https to be enabled on the -// web server. -// $CFG->loginhttps = true; -// // To use spell-checking (experimental) define a path below to your // locally-installed copy of Aspell (0.50.1 or newer) // $CFG->aspellpath = '/usr/bin/aspell'; // *nix diff --git a/lang/en/moodle.php b/lang/en/moodle.php index 5b78a00d37..c621e5b085 100644 --- a/lang/en/moodle.php +++ b/lang/en/moodle.php @@ -30,6 +30,7 @@ $string['addresource'] = 'Add a resource...'; $string['address'] = 'Address'; $string['addstudent'] = 'Add student'; $string['addteacher'] = 'Add teacher'; +$string['allteachers'] = 'All teachers'; $string['admin'] = 'Admin'; $string['adminhelpaddnewuser'] = 'To manually create a new user account'; $string['adminhelpassignadmins'] = 'Admins can do anything and go anywhere in the site'; @@ -148,7 +149,7 @@ $string['closewindow'] = 'Close this window'; $string['comparelanguage'] = 'Compare and edit current language'; $string['complete'] = 'Complete'; $string['configallowunenroll'] = 'If this is set \'Yes\', then students are allowed to unenroll themselves from courses whenever they like. Otherwise they are not allowed, and this process will be solely controlled by the teachers and administrators.'; -$string['configallusersaresitestudents'] = 'For activities on the front page of the site, should ALL users be considered as students? If you answer \"Yes\", then any confirmed user account will be allowed to participate as a student in those activities. If you answer \"No\", then only users who are already a participant in at least one course will be able to take part in those front page activities.'; +$string['configallusersaresitestudents'] = 'For activities on the front page of the site, should ALL users be considered as students? If you answer \"Yes\", then any confirmed user account will be allowed to participate as a student in those activities. If you answer \"No\", then only users who are already a participant in at least one course will be able to take part in those front page activities. Only admins and specially assigned teachers can act as teachers for these front page activities.'; $string['configautologinguests'] = 'Should visitors be logged in as guests automatically when entering courses with guest access?'; $string['configcachetext'] = 'For larger sites or sites that use text filters, this setting can really speed things up. Copies of texts will be retained in their processed form for the time specified here. Setting this too small may actually slow things down slightly, but setting it too large may mean texts take too long to refresh (with new links, for example).'; $string['configcountry'] = 'If you set a country here, then this country will be selected by default on new user accounts. To force users to choose a country, just leave this unset.'; @@ -176,6 +177,7 @@ $string['configlangdir'] = 'Most languages are printed left-to-right, but some, $string['configlanglist'] = 'Leave this blank to allow users to choose from any language you have in this installation of Moodle. However, you can shorten the language menu by entering a comma-separated list of language codes that you want. For example: en,es_es,fr,it'; $string['configlangmenu'] = 'Choose whether or not you want to display the general-purpose language menu on the home page, login page etc. This does not affect the user\'s ability to set the preferred language in their own profile.'; $string['configlocale'] = 'Choose a sitewide locale - this will affect the format and language of dates. You need to have this locale data installed on your operating system. (eg en_US or es_ES). If you don\'t know what to choose leave it blank.'; +$string['configloginhttps'] = 'Turning this on will make Moodle use a secure https connection just for the login page (providing a secure login), and then afterwards revert back to the normal http URL for general speed. CAUTION: this setting REQUIRES https to be specifically enabled on the web server - if it is not then YOU COULD LOCK YOURSELF OUT OF YOUR SITE.'; $string['configloglifetime'] = 'This specifies the length of time you want to keep logs about user activity. Logs that are older than this age are automatically deleted. It is best to keep logs as long as possible, in case you need them, but if you have a very busy server and are experiencing performance problems, then you may want to lower the log lifetime.'; $string['configlongtimenosee'] = 'If students haven\'t logged in for a very long time, then they are automatically unsubscribed from courses. This parameter specifies that time limit.'; $string['configmaxbytes'] = 'This specifies a maximum size that uploaded files can be throughout the whole site. This setting is limited by the PHP setting upload_max_filesize and the Apache setting LimitRequestBody. In turn, maxbytes limits the range of sizes that can be chosen at course level or module level.'; @@ -188,6 +190,7 @@ $string['configproxyhost'] = 'If this server needs to use a proxy compute $string['configsecureforms'] = 'Moodle can use an additional level of security when accepting data from web forms. If this is enabled, then the browser\'s HTTP_REFERER variable is checked against the current form address. In a very few cases this can cause problems if the user is using a firewall (eg Zonealarm) configured to strip HTTP_REFERER from their web traffic. Symptoms are getting \'stuck\' on a form. If your users are having problems with the login page (for example) you might want to disable this setting, although it might leave your site more open to brute-force password attacks. If in doubt, leave this set to \'Yes\'.'; $string['configsessioncookie'] = 'This setting customises the name of the cookie used for Moodle sessions. This is optional, and only useful to avoid cookies being confused when there is more than one copy of Moodle running within the same web site.'; $string['configsessiontimeout'] = 'If people logged in to this site are idle for a long time (without loading pages) then they are automatically logged out (their session is ended). This variable specifies how long this time should be.'; +$string['configshowsiteparticipantslist'] = 'All of these site students and site teachers will be listed on the site participants list. Who shall be allowed to see this site participants list?'; $string['configslasharguments'] = 'Files (images, uploads etc) are provided via a script using \'slash arguments\' (the second option here). This method allows files to be more easily cached in web browsers, proxy servers etc. Unfortunately, some PHP servers don\'t allow this method, so if you have trouble viewing uploaded files or images (eg user pictures), set this variable to the first option'; $string['configsmtphosts'] = 'Give the full name of one or more local SMTP servers that Moodle should use to send mail (eg \'mail.a.com\' or \'mail.a.com;mail.b.com\'). If you leave it blank, Moodle will use the PHP default method of sending mail.'; $string['configsmtpuser'] = 'If you have specified an SMTP server above, and the server requires authentication, then enter the username and password here.'; @@ -894,10 +897,13 @@ $string['site'] = 'Site'; $string['siteerrors'] = 'Site errors'; $string['sitefiles'] = 'Site files'; $string['sitelogs'] = 'Site logs'; +$string['sitepartlist0'] = 'You must be a site teacher to be allowed to see the site participants list'; +$string['sitepartlist1'] = 'You must be a teacher to be allowed to see the site participants list'; $string['sitenews'] = 'Site news'; $string['sites'] = 'Sites'; $string['sitesection'] = 'Include a topic section'; $string['sitesettings'] = 'Site settings'; +$string['siteteachers'] = 'Site teachers'; $string['size'] = 'Size'; $string['sizeb'] = 'bytes'; $string['sizegb'] = 'Gb'; @@ -926,6 +932,7 @@ $string['strftimetime'] = '%%I:%%M %%p'; $string['stringsnotset'] = 'The following strings are not defined in $a'; $string['studentnotallowed'] = 'Sorry, but you can not enter this course as \'$a\''; $string['students'] = 'Students'; +$string['studentsandteachers'] = 'Students and teachers'; $string['subcategories'] = 'Sub-categories'; $string['success'] = 'Success'; $string['summary'] = 'Summary'; diff --git a/lib/defaults.php b/lib/defaults.php index a50269dcc8..36a13bbb5b 100644 --- a/lib/defaults.php +++ b/lib/defaults.php @@ -38,6 +38,7 @@ "langmenu" => 1, "langlist" => "", "locale" => "en", + "loginhttps" => false, "loglifetime" => 0, "longtimenosee" => 100, "maxbytes" => 0, @@ -52,6 +53,7 @@ "secureforms" => false, "sessioncookie" => "", "sessiontimeout" => 7200, + "showsiteparticipantslist" => 0, "slasharguments" => 1, "smtphosts" => "", "smtppass" => "", -- 2.39.5