mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 08:26:37 +02:00
Modified Greg's work to:
- rename the main_frame variable to framename, because it - might have caused some confusion - none of the global variables have underscores - put the config in the config table, with a default of _top
This commit is contained in:
parent
2ea9027bc4
commit
f82c2d428a
12 changed files with 50 additions and 24 deletions
|
@ -91,7 +91,7 @@
|
|||
"<A HREF=\"index.php\">$stradministration</A> -> $strauthenticationoptions", "$focus");
|
||||
|
||||
echo "<CENTER><P><B>";
|
||||
echo "<form TARGET=\"{$CFG->main_frame}\" NAME=\"authmenu\" method=\"post\" action=\"auth.php\">";
|
||||
echo "<form TARGET=\"{$CFG->framename}\" NAME=\"authmenu\" method=\"post\" action=\"auth.php\">";
|
||||
print_string("chooseauthmethod","auth");
|
||||
|
||||
choose_from_menu ($options, "auth", $auth, "","top.location='auth.php?auth='+document.authmenu.auth.options[document.authmenu.auth.selectedIndex].value", "");
|
||||
|
|
|
@ -218,6 +218,19 @@
|
|||
<? print_string("configdebug") ?>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR VALIGN=TOP>
|
||||
<TD ALIGN=RIGHT><P>framename:</TD>
|
||||
<TD>
|
||||
<? if (empty($config->framename)) {
|
||||
$config->framename = "_top";
|
||||
}
|
||||
?>
|
||||
<INPUT NAME=framename TYPE=text SIZE=15 VALUE="<?=$config->framename?>">
|
||||
</TD>
|
||||
<TD>
|
||||
<? print_string("configframename") ?>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
|
||||
<TR>
|
||||
|
|
|
@ -66,6 +66,7 @@ $string['configlang'] = "Choose a default language for the whole site. Users ca
|
|||
$string['configlangdir'] = "Most languages are printed left-to-right, but some, like Arabic and Hebrew, are printed right-to-left.";
|
||||
$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['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['configframename'] = "If you are embedding Moodle within a web frame, then put the name of this frame here. Otherwise this value should remain as '_top'";
|
||||
$string['configmaxeditingtime'] = "This specifies the amount of time people have to re-edit forum postings, journal feedback etc. Usually 30 minutes is a good value.";
|
||||
$string['configproxyhost'] = "If this <B>server</B> needs to use a proxy computer (eg a firewall) to access the Internet, then provide the proxy hostname and port here. Otherwise leave it blank.";
|
||||
$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.";
|
||||
|
|
|
@ -88,6 +88,7 @@ function main_upgrade($oldversion=0) {
|
|||
}
|
||||
|
||||
if ($oldversion < 2002102503) {
|
||||
execute_sql(" ALTER TABLE `course` ADD `modinfo` TEXT NOT NULL AFTER `format` ");
|
||||
require_once("$CFG->dirroot/mod/forum/lib.php");
|
||||
require_once("$CFG->dirroot/course/lib.php");
|
||||
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
"prefix" => "",
|
||||
"guestloginbutton" => 1,
|
||||
"sessiontimeout" => 7200,
|
||||
"framename" => "_top",
|
||||
"debug" => 7
|
||||
);
|
||||
|
||||
|
|
|
@ -319,7 +319,7 @@ function popup_form ($common, $options, $formname, $selected="", $nothing="choos
|
|||
$nothing = get_string("choose")."...";
|
||||
}
|
||||
|
||||
$output = "<FORM TARGET=\"{$CFG->main_frame}\" NAME=$formname>";
|
||||
$output = "<FORM TARGET=\"{$CFG->framename}\" NAME=$formname>";
|
||||
$output .= "<SELECT NAME=popup onChange=\"top.location=document.$formname.popup.options[document.$formname.popup.selectedIndex].value\">\n";
|
||||
|
||||
if ($nothing != "") {
|
||||
|
@ -636,10 +636,10 @@ function print_footer ($course=NULL) {
|
|||
$course = get_site();
|
||||
$homepage = true;
|
||||
} else {
|
||||
$homelink = "<A TARGET=\"{$CFG->main_frame}\" HREF=\"$CFG->wwwroot/course/view.php?id=$course->id\">$course->shortname</A>";
|
||||
$homelink = "<A TARGET=\"{$CFG->framename}\" HREF=\"$CFG->wwwroot/course/view.php?id=$course->id\">$course->shortname</A>";
|
||||
}
|
||||
} else {
|
||||
$homelink = "<A TARGET=\"{$CFG->main_frame}\" HREF=\"$CFG->wwwroot\">".get_string("home")."</A>";
|
||||
$homelink = "<A TARGET=\"{$CFG->framename}\" HREF=\"$CFG->wwwroot\">".get_string("home")."</A>";
|
||||
$course = get_site();
|
||||
}
|
||||
|
||||
|
@ -673,7 +673,7 @@ function print_navigation ($navigation) {
|
|||
if (! $site = get_site()) {
|
||||
$site->shortname = get_string("home");;
|
||||
}
|
||||
echo "<A TARGET=\"{$CFG->main_frame}\" HREF=\"$CFG->wwwroot/\">$site->shortname</A> -> $navigation";
|
||||
echo "<A TARGET=\"{$CFG->framename}\" HREF=\"$CFG->wwwroot/\">$site->shortname</A> -> $navigation";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,8 +1,17 @@
|
|||
<?PHP // $Id$
|
||||
|
||||
$JOURNAL_RATING = array ("3" => get_string("journalrating3", "journal"),
|
||||
"2" => get_string("journalrating2", "journal"),
|
||||
"1" => get_string("journalrating1", "journal") );
|
||||
//$JOURNAL_RATING = array ("3" => get_string("journalrating3", "journal"),
|
||||
// "2" => get_string("journalrating2", "journal"),
|
||||
// "1" => get_string("journalrating1", "journal") );
|
||||
|
||||
// Hack to use 0-x grades
|
||||
|
||||
$JOURNAL_MAX = 30;
|
||||
|
||||
$JOURNAL_RATING = array();
|
||||
for ($journal_i=$JOURNAL_MAX; $journal_i>=0; $journal_i--) {
|
||||
$JOURNAL_RATING["$journal_i"] = "$journal_i";
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -155,7 +164,7 @@ function journal_print_recent_activity(&$logs, $isteacher=false) {
|
|||
|
||||
function journal_grades($journalid) {
|
||||
/// Must return an array of grades, indexed by user, and a max grade.
|
||||
global $JOURNAL_RATING;
|
||||
global $JOURNAL_RATING, $JOURNAL_MAX;
|
||||
|
||||
if ($return->grades = get_records_menu("journal_entries", "journal", $journalid, "", "userid,rating")) {
|
||||
foreach ($return->grades as $key => $value) {
|
||||
|
@ -165,7 +174,7 @@ function journal_grades($journalid) {
|
|||
$return->grades[$key] = "-";
|
||||
}
|
||||
}
|
||||
$return->maxgrade = "";
|
||||
$return->maxgrade = $JOURNAL_MAX;
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
|
@ -312,7 +321,7 @@ function journal_delete_instance($id) {
|
|||
|
||||
|
||||
function journal_print_feedback($course, $entry) {
|
||||
global $CFG, $THEME, $JOURNAL_RATING;
|
||||
global $CFG, $THEME, $JOURNAL_RATING, $JOURNAL_MAX;
|
||||
|
||||
if (! $teacher = get_record("user", "id", $entry->teacher)) {
|
||||
error("Weird journal error");
|
||||
|
@ -335,6 +344,7 @@ function journal_print_feedback($course, $entry) {
|
|||
if ($JOURNAL_RATING[$entry->rating]) {
|
||||
echo get_string("overallrating", "journal").": ";
|
||||
echo $JOURNAL_RATING[$entry->rating];
|
||||
echo " / $JOURNAL_MAX";
|
||||
} else {
|
||||
print_string("noratinggiven", "journal");
|
||||
}
|
||||
|
|
|
@ -23,10 +23,10 @@
|
|||
|
||||
if ($course->category) {
|
||||
require_login($course->id);
|
||||
$navigation = "<A TARGET=\"{$CFG->main_frame}\" HREF=\"../../course/view.php?id=$course->id\">$course->shortname</A> ->
|
||||
<A TARGET=\"{$CFG->main_frame}\" HREF=\"index.php?id=$course->id\">$strresources</A> ->";
|
||||
$navigation = "<A TARGET=\"{$CFG->framename}\" HREF=\"../../course/view.php?id=$course->id\">$course->shortname</A> ->
|
||||
<A TARGET=\"{$CFG->framename}\" HREF=\"index.php?id=$course->id\">$strresources</A> ->";
|
||||
} else {
|
||||
$navigation = "<A TARGET=\"{$CFG->main_frame}\" HREF=\"index.php?id=$course->id\">$strresources</A> ->";
|
||||
$navigation = "<A TARGET=\"{$CFG->framename}\" HREF=\"index.php?id=$course->id\">$strresources</A> ->";
|
||||
}
|
||||
|
||||
|
||||
|
@ -54,7 +54,7 @@
|
|||
case WEBPAGE:
|
||||
if (!empty($frameset)) {
|
||||
print_header("$course->shortname: $resource->name", "$course->fullname",
|
||||
"$navigation <A TARGET=\"{$CFG->main_frame}\" HREF=\"$resource->reference\" TITLE=\"$resource->reference\">$resource->name</A>",
|
||||
"$navigation <A TARGET=\"{$CFG->framename}\" HREF=\"$resource->reference\" TITLE=\"$resource->reference\">$resource->name</A>",
|
||||
"", "", true, update_module_button($cm->id, $course->id, $strresource), navmenu($course, $cm));
|
||||
echo "<CENTER><FONT SIZE=-1>".text_to_html($resource->summary, true, false)."</FONT></CENTER>";
|
||||
|
||||
|
|
|
@ -61,12 +61,12 @@
|
|||
switch ($action) {
|
||||
case "top":
|
||||
if ($course->category) {
|
||||
$navigation = "<A TARGET=\"{$CFG->main_frame}\" HREF=\"../../course/view.php?id=$course->id\">$course->shortname</A> ->
|
||||
<A TARGET=\"{$CFG->main_frame}\" HREF=\"index.php?id=$course->id\">$strsurveys</A> ->
|
||||
<A TARGET=\"{$CFG->main_frame}\" HREF=\"view.php?id=$cm->id\">$survey->name</A> -> ";
|
||||
$navigation = "<A TARGET=\"{$CFG->framename}\" HREF=\"../../course/view.php?id=$course->id\">$course->shortname</A> ->
|
||||
<A TARGET=\"{$CFG->framename}\" HREF=\"index.php?id=$course->id\">$strsurveys</A> ->
|
||||
<A TARGET=\"{$CFG->framename}\" HREF=\"view.php?id=$cm->id\">$survey->name</A> -> ";
|
||||
} else {
|
||||
$navigation = "<A TARGET=\"{$CFG->main_frame}\" HREF=\"index.php?id=$course->id\">$strsurveys</A> ->
|
||||
<A TARGET=\"{$CFG->main_frame}\" HREF=\"view.php?id=$cm->id\">$survey->name</A> -> ";
|
||||
$navigation = "<A TARGET=\"{$CFG->framename}\" HREF=\"index.php?id=$course->id\">$strsurveys</A> ->
|
||||
<A TARGET=\"{$CFG->framename}\" HREF=\"view.php?id=$cm->id\">$survey->name</A> -> ";
|
||||
}
|
||||
print_header("$course->shortname: $survey->name", "$course->fullname", "$navigation $strreport");
|
||||
break;
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
<TABLE WIDTH=100% CELLPADDING=10 CELLSPACING=0 BORDER=0>
|
||||
<TR>
|
||||
<TD VALIGN=TOP><A HREF="<?=$CFG->wwwroot?>" TARGET="<?=$CFG->main_frame?>"><IMG SRC="<?=$CFG->wwwroot?>/theme/oceanblue/logo.jpg" ALT="Moodle" BORDER="0"></A></TD>
|
||||
<TD VALIGN=TOP><A HREF="<?=$CFG->wwwroot?>" TARGET="<?=$CFG->framename?>"><IMG SRC="<?=$CFG->wwwroot?>/theme/oceanblue/logo.jpg" ALT="Moodle" BORDER="0"></A></TD>
|
||||
<TD ALIGN=RIGHT VALIGN=TOP><?=$menu ?></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
|
|
@ -58,7 +58,7 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td width="6" bgcolor="<? echo $THEME->body?>"><img src="<?=$CFG->wwwroot?>/theme/<?=$CFG->theme ?>/images/side_left.gif" width="2" height="100%" /></td>
|
||||
<td align="left" valign="top"><A TARGET=\"{$CFG->main_frame}\" HREF="<? echo $CFG->wwwroot?>"><img src="<? echo "$CFG->wwwroot/theme/$CFG->theme/$THEME->frontlogo" ?>" border="0" /></A></td>
|
||||
<td align="left" valign="top"><A TARGET=\"{$CFG->framename}\" HREF="<? echo $CFG->wwwroot?>"><img src="<? echo "$CFG->wwwroot/theme/$CFG->theme/$THEME->frontlogo" ?>" border="0" /></A></td>
|
||||
<td width="6" bgcolor="<? echo $THEME->body?>"><img src="<?=$CFG->wwwroot?>/theme/<?=$CFG->theme ?>/images/left_sidebar.jpg" width="6" height="100%" /></td>
|
||||
</tr>
|
||||
</table><table border="0" cellspacing="0" cellpadding="0" width="<? echo $THEME->themewidth?>">
|
||||
|
@ -99,7 +99,7 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td width="6" bgcolor="<? echo $THEME->body?>"><img src="<?=$CFG->wwwroot?>/theme/<?=$CFG->theme ?>/images/side_left.gif" width="2" height="100%" /></td>
|
||||
<td align="left" valign="top"><A TARGET="<?=$CFG->main_frame?>" HREF="<? echo $CFG->wwwroot ?>"><img src="<? echo "$CFG->wwwroot/theme/$CFG->theme/$THEME->smalllogo" ?>" border="0" /></A></td>
|
||||
<td align="left" valign="top"><A TARGET="<?=$CFG->framename?>" HREF="<? echo $CFG->wwwroot ?>"><img src="<? echo "$CFG->wwwroot/theme/$CFG->theme/$THEME->smalllogo" ?>" border="0" /></A></td>
|
||||
<td width="6" background="<?=$CFG->wwwroot?>/theme/<?=$CFG->theme ?>/images/left_sidebar.jpg"><img src="<?=$CFG->wwwroot?>/theme/<?=$CFG->theme ?>/images/left_sidebar.jpg" width="6" height="100%" /></td>
|
||||
</tr>
|
||||
</table><table border="0" cellspacing="0" cellpadding="0" width="<? echo $THEME->themewidth?>">
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
// database to determine whether upgrades should
|
||||
// be performed (see lib/db/*.php)
|
||||
|
||||
$version = 2003032600; // The current version is a date (YYYYMMDDXX)
|
||||
$version = 2003032601; // The current version is a date (YYYYMMDDXX)
|
||||
|
||||
$release = "1.0.9 development"; // User-friendly version number
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue