diff --git a/admin/auth.php b/admin/auth.php index dd73e0ae1d0..334c6ae5874 100644 --- a/admin/auth.php +++ b/admin/auth.php @@ -91,7 +91,7 @@ "$stradministration -> $strauthenticationoptions", "$focus"); echo "
"; - echo "main_frame}\" NAME=\"authmenu\" method=\"post\" action=\"auth.php\">"; + echo "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", ""); diff --git a/admin/config.html b/admin/config.html index e4fea338526..4f65567774a 100644 --- a/admin/config.html +++ b/admin/config.html @@ -218,6 +218,19 @@ print_string("configdebug") ?> + + framename: + + if (empty($config->framename)) { + $config->framename = "_top"; + } + ?> + + + + print_string("configframename") ?> + + diff --git a/lang/en/moodle.php b/lang/en/moodle.php index 4b3540ebabd..6d3526d6548 100644 --- a/lang/en/moodle.php +++ b/lang/en/moodle.php @@ -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 server 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."; diff --git a/lib/db/mysql.php b/lib/db/mysql.php index dd10ad0e16d..a41aeeaf6bf 100644 --- a/lib/db/mysql.php +++ b/lib/db/mysql.php @@ -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"); diff --git a/lib/defaults.php b/lib/defaults.php index 40be0aa1b6d..7dee176a108 100644 --- a/lib/defaults.php +++ b/lib/defaults.php @@ -26,6 +26,7 @@ "prefix" => "", "guestloginbutton" => 1, "sessiontimeout" => 7200, + "framename" => "_top", "debug" => 7 ); diff --git a/lib/weblib.php b/lib/weblib.php index 5362387a80b..c193533f077 100644 --- a/lib/weblib.php +++ b/lib/weblib.php @@ -319,7 +319,7 @@ function popup_form ($common, $options, $formname, $selected="", $nothing="choos $nothing = get_string("choose")."..."; } - $output = "main_frame}\" NAME=$formname>"; + $output = "framename}\" NAME=$formname>"; $output .= "\n"; if ($nothing != "") { @@ -636,10 +636,10 @@ function print_footer ($course=NULL) { $course = get_site(); $homepage = true; } else { - $homelink = "main_frame}\" HREF=\"$CFG->wwwroot/course/view.php?id=$course->id\">$course->shortname"; + $homelink = "framename}\" HREF=\"$CFG->wwwroot/course/view.php?id=$course->id\">$course->shortname"; } } else { - $homelink = "main_frame}\" HREF=\"$CFG->wwwroot\">".get_string("home").""; + $homelink = "framename}\" HREF=\"$CFG->wwwroot\">".get_string("home").""; $course = get_site(); } @@ -673,7 +673,7 @@ function print_navigation ($navigation) { if (! $site = get_site()) { $site->shortname = get_string("home");; } - echo "main_frame}\" HREF=\"$CFG->wwwroot/\">$site->shortname -> $navigation"; + echo "framename}\" HREF=\"$CFG->wwwroot/\">$site->shortname -> $navigation"; } } diff --git a/mod/journal/lib.php b/mod/journal/lib.php index 526c1301868..3740119a58a 100644 --- a/mod/journal/lib.php +++ b/mod/journal/lib.php @@ -1,8 +1,17 @@ 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"); } diff --git a/mod/resource/view.php b/mod/resource/view.php index e008e783531..c945e3487f1 100644 --- a/mod/resource/view.php +++ b/mod/resource/view.php @@ -23,10 +23,10 @@ if ($course->category) { require_login($course->id); - $navigation = "main_frame}\" HREF=\"../../course/view.php?id=$course->id\">$course->shortname -> - main_frame}\" HREF=\"index.php?id=$course->id\">$strresources ->"; + $navigation = "framename}\" HREF=\"../../course/view.php?id=$course->id\">$course->shortname -> + framename}\" HREF=\"index.php?id=$course->id\">$strresources ->"; } else { - $navigation = "main_frame}\" HREF=\"index.php?id=$course->id\">$strresources ->"; + $navigation = "framename}\" HREF=\"index.php?id=$course->id\">$strresources ->"; } @@ -54,7 +54,7 @@ case WEBPAGE: if (!empty($frameset)) { print_header("$course->shortname: $resource->name", "$course->fullname", - "$navigation main_frame}\" HREF=\"$resource->reference\" TITLE=\"$resource->reference\">$resource->name", + "$navigation framename}\" HREF=\"$resource->reference\" TITLE=\"$resource->reference\">$resource->name", "", "", true, update_module_button($cm->id, $course->id, $strresource), navmenu($course, $cm)); echo "".text_to_html($resource->summary, true, false).""; diff --git a/mod/survey/report.php b/mod/survey/report.php index 0ff965cfc09..6cd5dc77c33 100644 --- a/mod/survey/report.php +++ b/mod/survey/report.php @@ -61,12 +61,12 @@ switch ($action) { case "top": if ($course->category) { - $navigation = "main_frame}\" HREF=\"../../course/view.php?id=$course->id\">$course->shortname -> - main_frame}\" HREF=\"index.php?id=$course->id\">$strsurveys -> - main_frame}\" HREF=\"view.php?id=$cm->id\">$survey->name -> "; + $navigation = "framename}\" HREF=\"../../course/view.php?id=$course->id\">$course->shortname -> + framename}\" HREF=\"index.php?id=$course->id\">$strsurveys -> + framename}\" HREF=\"view.php?id=$cm->id\">$survey->name -> "; } else { - $navigation = "main_frame}\" HREF=\"index.php?id=$course->id\">$strsurveys -> - main_frame}\" HREF=\"view.php?id=$cm->id\">$survey->name -> "; + $navigation = "framename}\" HREF=\"index.php?id=$course->id\">$strsurveys -> + framename}\" HREF=\"view.php?id=$cm->id\">$survey->name -> "; } print_header("$course->shortname: $survey->name", "$course->fullname", "$navigation $strreport"); break; diff --git a/theme/oceanblue/header.html_logo b/theme/oceanblue/header.html_logo index d45b1d323be..86b40dcae23 100644 --- a/theme/oceanblue/header.html_logo +++ b/theme/oceanblue/header.html_logo @@ -14,7 +14,7 @@ - + =$menu ?> diff --git a/theme/poweraid/header.html b/theme/poweraid/header.html index f28c100caa6..13898b924ec 100644 --- a/theme/poweraid/header.html +++ b/theme/poweraid/header.html @@ -58,7 +58,7 @@ -main_frame}\" HREF=" echo $CFG->wwwroot?>">wwwroot/theme/$CFG->theme/$THEME->frontlogo" ?>" border="0" /> +framename}\" HREF=" echo $CFG->wwwroot?>">wwwroot/theme/$CFG->theme/$THEME->frontlogo" ?>" border="0" /> @@ -99,7 +99,7 @@ -wwwroot/theme/$CFG->theme/$THEME->smalllogo" ?>" border="0" /> +wwwroot/theme/$CFG->theme/$THEME->smalllogo" ?>" border="0" /> diff --git a/version.php b/version.php index 192e76bae69..3acebac22f1 100644 --- a/version.php +++ b/version.php @@ -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
framename: