"<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", "");
<? 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>
$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.";
}
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");
"prefix" => "",
"guestloginbutton" => 1,
"sessiontimeout" => 7200,
+ "framename" => "_top",
"debug" => 7
);
$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 != "") {
$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();
}
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";
}
}
<?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";
+}
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) {
$return->grades[$key] = "-";
}
}
- $return->maxgrade = "";
+ $return->maxgrade = $JOURNAL_MAX;
}
return $return;
}
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");
if ($JOURNAL_RATING[$entry->rating]) {
echo get_string("overallrating", "journal").": ";
echo $JOURNAL_RATING[$entry->rating];
+ echo " / $JOURNAL_MAX";
} else {
print_string("noratinggiven", "journal");
}
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> ->";
}
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>";
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;
\r
<TABLE WIDTH=100% CELLPADDING=10 CELLSPACING=0 BORDER=0>\r
<TR>\r
- <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>\r
+ <TD VALIGN=TOP><A HREF="<?=$CFG->wwwroot?>" TARGET="<?=$CFG->framename?>"><IMG SRC="<?=$CFG->wwwroot?>/theme/oceanblue/logo.jpg" ALT="Moodle" BORDER="0"></A></TD>\r
<TD ALIGN=RIGHT VALIGN=TOP><?=$menu ?></TD>\r
</TR>\r
</TABLE>\r
</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?>">
</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?>">
// 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