print_header();
print_heading($strconfigvariables);
print_simple_box(get_string("configintro"), "center");
- echo "<BR>";
+ echo "<br />";
}
print_simple_box_start("center", "", "$THEME->cellheading");
include("config.html");
print_simple_box_end();
- print_footer();
+
+ if ($site) {
+ print_footer();
+ }
exit;
if (!$agreelicence) {
$strlicense = get_string("license");
print_header($strlicense, $strlicense, $strlicense);
- print_heading("<A HREF=\"http://moodle.com\">Moodle</A> - Modular Object-Oriented Dynamic Learning Environment");
+ print_heading("<A HREF=\"http://moodle.org\">Moodle</A> - Modular Object-Oriented Dynamic Learning Environment");
print_heading(get_string("copyrightnotice"));
- print_simple_box_start("CENTER");
+ print_simple_box_start("center");
echo text_to_html(get_string("gpl"));
print_simple_box_end();
echo "<BR>";
}
} else {
- $strdatabaseupgrades = get_string("databaseupgrades");
- print_header($strdatabaseupgrades, $strdatabaseupgrades, $strdatabaseupgrades);
+ $strcurrentversion = get_string("currentversion");
+ print_header($strcurrentversion, $strcurrentversion, $strcurrentversion);
if (set_config("version", $version)) {
print_heading("You are currently using Moodle version $version (Release $release)");
/// Updated human-readable release version if necessary
if ($release <> $CFG->release) { // Update the release version
- $strdatabaseupgrades = get_string("databaseupgrades");
- print_header($strdatabaseupgrades, $strdatabaseupgrades, $strdatabaseupgrades);
+ $strcurrentrelease = get_string("currentrelease");
+ print_header($strcurrentrelease, $strcurrentrelease, $strcurrentrelease);
print_heading($release);
if (!set_config("release", $release)) {
notify("ERROR: Could not update release version in database!!");
}
echo "<TABLE WIDTH=\"100%\" CELLPADDING=2 CELLSPACING=3 BORDER=0>";
foreach ($enstring as $key => $envalue) {
+ $envalue = trim($envalue);
+ $envalue = str_replace("\n\r\n\r","\n",$envalue);
+ $envalue = str_replace("\n\n","\n",$envalue);
$envalue = nl2br(htmlspecialchars($envalue));
$envalue = preg_replace('/(\$a\-\>[a-zA-Z0-9]*|\$a)/', '<b>$0</b>', $envalue); // Make variables bold.
$envalue = str_replace("%%","%",$envalue);
echo "<TD WIDTH=20% BGCOLOR=\"$THEME->cellheading\" NOWRAP VALIGN=TOP>$key</TD>";
echo "<TD WIDTH=40% BGCOLOR=\"$THEME->cellheading\" VALIGN=TOP>$envalue</TD>";
- $value = str_replace("\\","",$string[$key]); // Delete all slashes
+ $value = $string[$key];
+ $value = trim($value);
+ $value = str_replace("\n\r","\n",$value);
+ $value = str_replace("\n\n","\n",$value);
+ $value = str_replace("\n\n","\n",$value);
+ $value = str_replace("\n\n","\n",$value);
+ $value = str_replace("\\","",$value); // Delete all slashes
$value = str_replace("%%","%",$value);
$value = htmlspecialchars($value);
if (!isadmin()) {
error("You need to be admin to edit this page");
}
+ $site->format = "social"; // override
}
- $site->format = "social"; // override
/// If data submitted, then process and store.
if ($form->id) {
if (update_record("course", $form)) {
- redirect("index.php", get_string("changessaved"));
+ redirect("$CFG->wwwroot/admin/index.php", get_string("changessaved"));
} else {
error("Serious Error! Could not update the site record! (id = $form->id)");
}
if ($newid = insert_record("course", $form)) {
$cat->name = get_string("miscellaneous");
if (insert_record("course_categories", $cat)) {
- redirect("index.php", get_string("changessaved"), "1");
+ redirect("$CFG->wwwroot/admin/index.php", get_string("changessaved"));
} else {
error("Serious Error! Could not set up a default course category!");
}
if ($site and empty($form)) {
$form = $site;
+ $firsttime = false;
} else {
$form->category = 0;
$form->format = "social";
$form->newsitems = 0;
+ $firsttime = true;
}
if (empty($focus)) {
$stradmin = get_string("administration");
$strsitesettings = get_string("sitesettings");
- print_header("$site->shortname: $strsitesettings", "$site->fullname",
- "<A HREF=\"index.php\">$stradmin</A> -> $strsitesettings", "$focus");
+ if ($firsttime) {
+ print_header();
+ print_heading($strsitesettings);
+ print_simple_box(get_string("configintrosite"), "center");
+ echo "<br />";
+ } else {
+ print_header("$site->shortname: $strsitesettings", "$site->fullname",
+ "<A HREF=\"index.php\">$stradmin</A> -> $strsitesettings", "$focus");
+ print_heading($strsitesettings);
+ }
- print_heading($strsitesettings);
print_simple_box_start("center", "", "$THEME->cellheading");
include("site.html");
print_simple_box_end();
- print_footer();
+
+ if (!$firsttime) {
+ print_footer();
+ }
exit;
optional_variable($search, "");
if (! record_exists("user_admins")) { // No admin user yet
- $user->firstname = "Admin";
- $user->lastname = "User";
+ $user->firstname = get_string("admin");
+ $user->lastname = get_string("user");
$user->username = "admin";
$user->password = md5("admin");
$user->email = "root@localhost";
$USER->site = $CFG->wwwroot;
$USER->admin = true;
$USER->teacher["$site->id"] = true;
+ $USER->newadminuser = true;
redirect("$CFG->wwwroot/user/edit.php?id=$user->id&course=$site->id");
+ exit;
} else {
if (! $site = get_site()) {
<UL><DL>
<DT> General</DT>
<DD>
- <LI>Various optimisations and significant performance enhancements
- <LI>Moodle is now well-behaved when enclosed within a frame
- <LI>Richtext editor can now be used in more text-editing fields
- <LI>New format "Plain text format", useful when posting code or HTML.
- <LI>New format "Wiki format", allows Wiki-style tagging in most places
- <LI>Ability to specify permissions of new folders and files created on the server
- <LI>Some fixes for servers running in Safe Mode (some file problems remain)
- <LI>Various fixes for cleaning some external text of quotes, etc
- <LI>Various fixes for PostgreSQL 7.3 compatibility
+ <LI>Various optimisations and significant performance enhancements</LI>
+ <LI>Moodle is now well-behaved when enclosed within a frame</LI>
+ <LI>Richtext editor can now be used in more text-editing fields</LI>
+ <LI>New format "Plain text format", useful when posting code or HTML.</LI>
+ <LI>New format "Wiki format", allows Wiki-style tagging in most places</LI>
+ <LI>Ability to specify permissions of new folders and files created on the server</LI>
+ <LI>Some fixes for servers running in Safe Mode (some file problems remain)</LI>
+ <LI>Various fixes for cleaning some external text of quotes, etc</LI>
+ <LI>Various fixes for PostgreSQL 7.3 compatibility</LI>
</DD>
<DT> Languages</DT>
<DD>
- <LI>8 new language packs! Argentinian Spanish, Czech, Portuguese, Slovakian, Romanian, Danish, Russian and Polish.
- <LI>Fixes and upgrades to almost all language packs
- <LI>Language can be specified for the current session (see menu on home page and login page) and can be changed on any page by something to the url, eg: http://moodle.org/?lang=ru
- <LI>Truetype fonts are now part of the language packs
- <LI>ALL dates/times can now be reformatted as part of the language pack
+ <LI>8 new language packs! Argentinian Spanish, Czech, Portuguese, Slovakian, Romanian, Danish, Russian and Polish.</LI>
+ <LI>Fixes and upgrades to almost all language packs</LI>
+ <LI>Language can be specified for the current session (see menu on home page and login page) and can be changed on any page by something to the url, eg: http://moodle.org/?lang=ru </LI>
+ <LI>Truetype fonts are now part of the language packs</LI>
+ <LI>ALL dates/times can now be reformatted as part of the language pack</LI>
</DD>
<DT> Developers</DT>
<DD>
- <LI>Global debug variable gives more feedback about uninitialised variables and the like
- <LI>Various fixes to tidy up and further standardise some of the PHP code
- <LI>Various fixes for robustness (ensuring variables are always initialised)
+ <LI>Global debug variable gives more feedback about uninitialised variables and the like</LI>
+ <LI>Various fixes to tidy up and further standardise some of the PHP code</LI>
+ <LI>Various fixes for robustness (ensuring variables are always initialised)</LI>
</DD>
<DT> Admin</DT>
<DD>
- <LI>Better checking of PHP environment during installation, with warnings
- <LI>Admin directory can be moved from /admin to something else (see config-dist.php)
- <LI>User listing is now paged, and can now be searched for strings
- <LI>Improvements to the language editing page
+ <LI>Better checking of PHP environment during installation, with warnings</LI>
+ <LI>Admin directory can be moved from /admin to something else (see config-dist.php)</LI>
+ <LI>User listing is now paged, and can now be searched for strings</LI>
+ <LI>Improvements to the language editing page</LI>
</DD>
<DT> User management</DT>
<DD>
- <LI>New role: Course creator - just like teacher but can also create new courses
- <LI>New authentication plug-in named "manual", prevents users from creating their own accounts
- <LI>"Forgot Password" routine now uses an email confirmation before resetting password
+ <LI>New role: Course creator - just like teacher but can also create new courses</LI>
+ <LI>New authentication plug-in named "manual", prevents users from creating their own accounts</LI>
+ <LI>"Forgot Password" routine now uses an email confirmation before resetting password</LI>
</DD>
<DT> Courses</DT>
<DD>
- <LI>Activities on the course page now have a little button to hide/show that activity to students
- <LI>Whole topics/weeks can also now be hidden or shown
- <LI>The list of participants now has some paging, to cope with very large classes
+ <LI>Activities on the course page now have a little button to hide/show that activity to students</LI>
+ <LI>Whole topics/weeks can also now be hidden or shown</LI>
+ <LI>The list of participants now has some paging, to cope with very large classes</LI>
<LI>Zip/Unzip is now supported by an internal zip library, removing
the dependence on external programs to do this. This also means that
- zip/unzip now works on Windows.
+ zip/unzip now works on Windows.</LI>
</DD>
<DT> Assignments</DT>
<DD>
- <LI>Assignment submissions can be sorted
- <LI>Assignment notification mail isn't sent to unenrolled students
+ <LI>Assignment submissions can be sorted</LI>
+ <LI>Assignment notification mail isn't sent to unenrolled students</LI>
</DD>
<DT> Forums</DT>
<DD>
- <LI>Display of forum discussions list is greatly improved
- <LI>Whole discussions can be moved to any other forum with a single click
- <LI>Date/time of posts is now "last modified", not "created"
- <LI>Blank subject-lines or messages are now prevented
- <LI>More intelligent parsing and display of text in posts
- <LI>Force Subscribe now works on the "Site News" forum (mails all active students/teachers)
+ <LI>Display of forum discussions list is greatly improved</LI>
+ <LI>Whole discussions can be moved to any other forum with a single click</LI>
+ <LI>Date/time of posts is now "last modified", not "created"</LI>
+ <LI>Blank subject-lines or messages are now prevented</LI>
+ <LI>More intelligent parsing and display of text in posts</LI>
+ <LI>Force Subscribe now works on the "Site News" forum (mails all active students/teachers)</LI>
<LI>Better handling of mailouts to prevent the possibility of double copies
- that sometimes happened with very large classes
+ that sometimes happened with very large classes</LI>
</DD>
<DT> Workshop Assignment module</DT>
<DD>
- <LI>A very interesting new module contributed by Ray Kingdon,
+ <LI>A very interesting new module contributed by Ray Kingdon,</LI>
<LI>A flexible tool that implements a variety of peer-grading and
example-setting schemes that involve a whole group in examining
- and grading peices of work.
+ and grading peices of work.</LI>
</DD>
<DT> Quizzes</DT>
<DD>
- <LI>New question type, Random Question (selects from all questions in the same category)
- <LI>New question type, Matching Question (student must match answers to questions)
+ <LI>New question type, Random Question (selects from all questions in the same category)</LI>
+ <LI>New question type, Matching Question (student must match answers to questions)</LI>
<LI>New question type, Random Matching Short-Answers (randomly creates Matching Questions
- from the available Short Answer questions in the same category)
- <LI>Quiz question import from text files (modular design allows expansion to new formats - a beta Blackboard module is included)
- <LI>'Create multiple questions' wizard to quickly create a random quiz
- <LI>Quiz questions may be randomly shuffled
- <LI>Quiz answers (multiple choice, etc) may be randomly shuffled
- <LI>Fixed off-by-one error when "Save Grades" button wasn't used.
- <LI>Regrading works properly if the quiz has been changed
- <LI>Editing a question after it's already been used in a quiz no longer affects quiz results
- <LI>Multiple choice answers are labelled a,b,c not 1,2,3
+ from the available Short Answer questions in the same category)</LI>
+ <LI>Quiz question import from text files (modular design allows expansion to new formats - a beta Blackboard module is included)</LI>
+ <LI>'Create multiple questions' wizard to quickly create a random quiz</LI>
+ <LI>Quiz questions may be randomly shuffled</LI>
+ <LI>Quiz answers (multiple choice, etc) may be randomly shuffled</LI>
+ <LI>Fixed off-by-one error when "Save Grades" button wasn't used.</LI>
+ <LI>Regrading works properly if the quiz has been changed</LI>
+ <LI>Editing a question after it's already been used in a quiz no longer affects quiz results</LI>
+ <LI>Multiple choice answers are labelled a,b,c not 1,2,3</LI>
</DD>
<DT> Resources</DT>
<DD>
- <LI>Better performance when editing large text or HTML resources
- <LI>Plain images are now display centered within a proper web page (not raw).
- <LI>Wiki format added as a new option for Resource pages
+ <LI>Better performance when editing large text or HTML resources</LI>
+ <LI>Plain images are now display centered within a proper web page (not raw).</LI>
+ <LI>Wiki format added as a new option for Resource pages</LI>
</DD>
<DT> Custom Themes</DT>
<LI>A number of new styles have been added to all built-in themes. Some of these are <BLINK>essential</BLINK>
to viewing some of the new features. <B>PLEASE SEE
<A HREF="http://moodle.org/theme/UPGRADE.txt">theme/UPGRADE.txt</A>
- TO SEE THE CHANGES YOU WILL HAVE TO MAKE TO OLDER THEMES</B>
+ TO SEE THE CHANGES YOU WILL HAVE TO MAKE TO OLDER THEMES</B></LI>
<LI>Custom themes now have the capability to re-define all the little button graphics.
There is a new entry in theme/x/config.php ($THEME->custompix) and a new
- optional subdirectory "pix". See the theme cordoroyblue for an example.
+ optional subdirectory "pix". See the theme cordoroyblue for an example.</LI>
</DD>
</DL></UL>
$string['configerrorlevel'] = "Choose the amount of PHP warnings that you want to be displayed. Normal is usually the best choice.";
$string['confightmleditor'] = "Choose whether or not to allow use of the embedded HTML text editor. Even if you choose allow, this editor will only appear when the user is using a compatible browser (IE 5.5 or later). Users can also choose not to use it.";
$string['configintro'] = "On this page you can specify a number of configuration variables that help make Moodle work properly on your server. Don't worry too much about it - the defaults will usually work fine and you can always come back to this page later and change these settings.";
+$string['configintroadmin'] = "On this page you should configure your main administrator account which will have complete control over the site. Make sure you give it a secure username and password as well as a valid email address. You can create more admin accounts later on.";
+$string['configintrosite'] = "This page allows you to configure the front page and name of this new site. You can come back here later to change these settings any time using the 'Site Settings' link on the home page.";
$string['configlang'] = "Choose a default language for the whole site. Users can override this setting later.";
$string['configlangdir'] = "Most languages are printed left-to-right, but some, like Arabic and Hebrew, are printed right-to-left.";
$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['createziparchive'] = "Create zip archive";
$string['currentlanguage'] = "Current language";
$string['currentlocaltime'] = "your current local time";
+$string['currentrelease'] = "Current release information";
+$string['currentversion'] = "Current version";
$string['databasechecking'] = "Upgrading Moodle database from version \$a->oldversion to \$a->newversion...";
$string['databasesetup'] = "Setting up database";
$string['databasesuccess'] = "Database was successfully upgraded";
$string['gd2'] = "GD 2.x is installed";
$string['gdneed'] = "GD must be installed to see this graph";
$string['gdnot'] = "GD is not installed";
-$string['gpl'] = "Copyright (C) 2001-on Martin Dougiamas (http://dougiamas.com)
+$string['gpl'] = "Copyright (C) 2001-2003 Martin Dougiamas (http://dougiamas.com)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
$string['username'] = "Username";
$string['usernameexists'] = "This username already exists, choose another";
$string['userprofilefor'] = "User profile for \$a";
+$string['user'] = "User";
$string['users'] = "Users";
$string['webpage'] = "Web page";
$string['week'] = "Week";
$string['downloadinfo'] = "You can download the complete raw data for this survey in a form suitable for analysis in Excel, SPSS or other package.";
$string['downloadtext'] = "Download data as a plain text file";
$string['editingasurvey'] = "Editing a survey";
+$string['guestsnotallowed'] = "Guests are not allowed to submit surveys";
$string['helpsurveys'] = "Help on the different types of surveys";
$string['howlong'] = "How long did this survey take you to complete?";
$string['howlongoptions'] = "under 1 min,1-2 min,2-3 min,3-4 min,4-5-min,5-10 min,more than 10";
foreach ($usernew as $variable => $value) {
$USER->$variable = $value;
}
- redirect("view.php?id=$user->id&course=$course->id", get_string("changessaved"));
+ if (isset($USER->newadminuser)) {
+ unset($USER->newadminuser);
+ redirect("$CFG->wwwroot", get_string("changessaved"));
+ }
+ redirect("$CFG->wwwroot/user/view.php?id=$user->id&course=$course->id", get_string("changessaved"));
} else {
- redirect("../admin/user.php", get_string("changessaved"));
+ redirect("$CFG->wwwroot/admin/user.php", get_string("changessaved"));
}
} else {
error("Could not update the user record ($user->id)");
-> <A HREF=\"view.php?id=$user->id&course=$course->id\">$userfullname</A>
-> $streditmyprofile", "");
} else {
- print_header("$course->shortname: $streditmyprofile", "$course->fullname",
- "<A HREF=\"view.php?id=$user->id&course=$course->id\">$userfullname</A>
- -> $streditmyprofile", "");
+ if (isset($USER->newadminuser)) {
+ print_header();
+ } else {
+ print_header("$course->shortname: $streditmyprofile", "$course->fullname",
+ "<A HREF=\"view.php?id=$user->id&course=$course->id\">$userfullname</A>
+ -> $streditmyprofile", "");
+ }
}
} else {
$userfullname = $strnewuser;
}
print_heading( get_string("userprofilefor", "", "$userfullname") );
+
+ if (isset($USER->newadminuser)) {
+ print_simple_box(get_string("configintroadmin"), "center");
+ echo "<br />";
+ }
+
print_simple_box_start("center", "", "$THEME->cellheading");
if (!empty($err)) {
echo "<CENTER>";
}
include("edit.html");
print_simple_box_end();
- print_footer($course);
+ if (!isset($USER->newadminuser)) {
+ print_footer($course);
+ }
+
+ exit;