Browse files

Merged loginhttps config from stable

  • Loading branch information...
1 parent a46e162 commit 9a3936a95ef449e76d0ac8276121dc2ead074e9f moodler committed Aug 31, 2004
Showing with 56 additions and 7 deletions.
  1. +32 −0 admin/config.html
  2. +14 −0 admin/config.php
  3. +0 −6 config-dist.php
  4. +8 −1 lang/en/moodle.php
  5. +2 −0 lib/defaults.php
View
32 admin/config.html
@@ -387,6 +387,23 @@
<?php print_string("configsecureforms") ?>
</td>
</tr>
+
+<tr valign=top>
+ <td align=right><p>loginhttps:</td>
+ <td>
+ <?php
+ unset($options);
+ $options[0] = get_string("no");
+ $options[1] = get_string("yes");
+
+ choose_from_menu ($options, "loginhttps", $config->loginhttps, "", "", "");
+ ?>
+ </td>
+ <td>
+ <?php print_string("configloginhttps") ?>
+ </td>
+</tr>
+
<tr valign=top>
<td align=right><p>teacherassignteachers:</td>
<td>
@@ -418,6 +435,21 @@
</td>
</tr>
<tr valign=top>
+ <td align=right><p>showsiteparticipantslist:</td>
+ <td>
+ <?php
+ unset($options);
+ $options[0] = get_string("siteteachers");
+ $options[1] = get_string("allteachers");
+ $options[2] = get_string("studentsandteachers");
+ choose_from_menu ($options, "showsiteparticipantslist", $config->showsiteparticipantslist, "", "", "");
+ ?>
+ </td>
+ <td>
+ <?php print_string("configshowsiteparticipantslist") ?>
+ </td>
+</tr>
+<tr valign=top>
<td align=right><p>allowunenroll:</td>
<td>
<?php
View
14 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 '<script>'."\n";
+ echo '<!--'."\n";
+ echo "eval('document.form.loginhttps.disabled=true');\n";
+ echo '-->'."\n";
+ echo '</script>'."\n";
+ }
+ }
+
+
if ($site) {
print_footer();
}
View
6 config-dist.php
@@ -162,12 +162,6 @@
// 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
View
9 lang/en/moodle.php
@@ -30,6 +30,7 @@
$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['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['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['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['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['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';
View
2 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" => "",

0 comments on commit 9a3936a

Please sign in to comment.