From: moodler Date: Tue, 25 Jan 2005 14:03:43 +0000 (+0000) Subject: Removed THEME from many course files X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=810393c804b58254880b85798f522bcac6bfc986;p=moodle.git Removed THEME from many course files --- diff --git a/course/category.php b/course/category.php index 3056860654..51c3f9ce61 100644 --- a/course/category.php +++ b/course/category.php @@ -282,11 +282,6 @@ $strallowguests = get_string("allowguests"); $strrequireskey = get_string("requireskey"); - if (empty($THEME->custompix)) { - $pixpath = "$CFG->wwwroot/pix"; - } else { - $pixpath = "$CFG->wwwroot/theme/$CFG->theme/pix"; - } echo '
'; echo "sesskey\">"; @@ -319,33 +314,33 @@ echo ""; echo ''. - ' '; + ' '; echo ''. - ' '; + ' '; echo ''. - ' '; + ' '; if (!empty($acourse->visible)) { echo ''. - ' '; + ' '; } else { echo ''. - ' '; + ' '; } echo ''. - ' '; + ' '; echo ''. - ' '; + ' '; if ($up) { echo ''. - ' '; + ' '; } else { echo ' '; } @@ -353,7 +348,7 @@ if ($down) { echo ''. - ' '; + ' '; } else { echo ' '; } @@ -366,9 +361,9 @@ } else if (isteacheredit($acourse->id)) { echo ""; echo ''. - ' '; + ' '; echo ''. - ' '; + ' '; } echo ""; } else { @@ -376,16 +371,16 @@ if (!empty($acourse->guest)) { echo ''; + $CFG->pixpath.'/i/user.gif" />'; } if (!empty($acourse->password)) { echo ''; + $CFG->pixpath.'/i/key.gif" />'; } if (!empty($acourse->summary)) { link_to_popup_window ("/course/info.php?id=$acourse->id", "courseinfo", - 'info', + 'info', 400, 500, $strsummary); } echo ""; diff --git a/course/edit.php b/course/edit.php index cf131f4d30..02a8564262 100644 --- a/course/edit.php +++ b/course/edit.php @@ -207,7 +207,7 @@ $form->sesskey = !empty($USER->id) ? $USER->sesskey : ''; print_heading($streditcoursesettings); - print_simple_box_start("center", "", "$THEME->cellheading"); + print_simple_box_start("center"); include("edit.html"); print_simple_box_end(); diff --git a/course/editsection.php b/course/editsection.php index 5bc78ead0d..97a487aaf5 100644 --- a/course/editsection.php +++ b/course/editsection.php @@ -55,7 +55,7 @@ -> $stredit"); print_heading(get_string("summaryof", "", "$sectionname $form->section")); - print_simple_box_start("center", "", "$THEME->cellheading"); + print_simple_box_start("center"); include("editsection.html"); print_simple_box_end(); diff --git a/course/enrol.html b/course/enrol.html index 41c6eba4de..b71692e433 100644 --- a/course/enrol.html +++ b/course/enrol.html @@ -32,7 +32,7 @@ -
+
diff --git a/course/groups-summary.html b/course/groups-summary.html index 55e227523a..03acc17039 100644 --- a/course/groups-summary.html +++ b/course/groups-summary.html @@ -2,7 +2,7 @@ name ?> - + - + - + diff --git a/course/importstudents.php b/course/importstudents.php index dfbee66204..7e5d72f818 100644 --- a/course/importstudents.php +++ b/course/importstudents.php @@ -119,7 +119,7 @@ $searchtext = (isset($frm->searchtext)) ? $frm->searchtext : ""; $previoussearch = ($previoussearch) ? '1' : '0'; - print_simple_box_start("center", "", "$THEME->cellheading"); + print_simple_box_start("center"); include('importstudents.html'); @@ -131,4 +131,4 @@ -?> \ No newline at end of file +?> diff --git a/course/index.php b/course/index.php index 8b3f113796..b07b2b2217 100644 --- a/course/index.php +++ b/course/index.php @@ -309,10 +309,9 @@ function print_category_edit($category, $displaylist, $parentslist, $depth=-1, $up=false, $down=false) { /// Recursive function to print all the categories ready for editing - global $THEME, $CFG, $USER; + global $CFG, $USER; static $str = ''; - static $pixpath = ''; if (empty($str)) { $str->delete = get_string("delete"); @@ -323,16 +322,8 @@ function print_category_edit($category, $displaylist, $parentslist, $depth=-1, $ $str->show = get_string("show"); } - if (empty($pixpath)) { - if (empty($THEME->custompix)) { - $pixpath = "$CFG->wwwroot/pix"; - } else { - $pixpath = "$CFG->wwwroot/theme/$CFG->theme/pix"; - } - } - if ($category) { - echo ""; diff --git a/course/info.php b/course/info.php index 14a92a51e4..e1a5cdad86 100644 --- a/course/info.php +++ b/course/info.php @@ -28,12 +28,6 @@ require_login(); } - if (empty($THEME->custompix)) { - $pixpath = "$CFG->wwwroot/pix"; - } else { - $pixpath = "$CFG->wwwroot/theme/$CFG->theme/pix"; - } - print_header(get_string("summaryof", "", $course->fullname)); echo "

$course->fullname
($course->shortname)

"; @@ -41,11 +35,11 @@ echo "
"; if ($course->guest) { $strallowguests = get_string("allowguests"); - echo "

\"\" $strallowguests

"; + echo "

\"\"pixpath/i/guest.gif\" /> $strallowguests

"; } if ($course->password) { $strrequireskey = get_string("requireskey"); - echo "

\"\" $strrequireskey

"; + echo "

\"\"pixpath/i/key.gif\" /> $strrequireskey

"; } diff --git a/course/lib.php b/course/lib.php index 22c6dee351..9b1a9a0160 100644 --- a/course/lib.php +++ b/course/lib.php @@ -659,7 +659,7 @@ function print_recent_activity($course) { // This function trawls through the logs looking for // anything new since the user's last login - global $CFG, $USER, $THEME, $SESSION; + global $CFG, $USER, $SESSION; $isteacher = isteacher($course->id); @@ -1132,10 +1132,9 @@ function rebuild_course_cache($courseid=0) { function print_heading_block($heading, $width="100%", $class="headingblock") { - global $THEME; echo "
@@ -12,14 +12,14 @@

description ?>

linkeditprofile)) { - echo '

'.$t->linkeditprofile->text.'...

'; + echo '

'.$t->linkeditprofile->text.'...

'; } ?>
-

users) { $countusers = count($t->users); foreach ($t->users as $user) { @@ -31,14 +31,13 @@ } } ?> -

linkfullprofile)) { - echo '

'.$t->linkfullprofile->text.'...

'; + echo '

'.$t->linkfullprofile->text.'...

'; } ?>
cellcontent\">"; + echo "
"; echo "

"; for ($i=0; $i<$depth;$i++) { echo "      "; @@ -347,23 +338,23 @@ function print_category_edit($category, $displaylist, $parentslist, $depth=-1, $ echo "

"; /// Print little icons echo "delete\" href=\"index.php?delete=$category->id&sesskey=$USER->sesskey\"> "; + " src=\"$CFG->pixpath/t/delete.gif\" height=\"11\" width=\"11\" border=\"0\" alt=\"\" /> "; if (!empty($category->visible)) { echo "hide\" href=\"index.php?hide=$category->id&sesskey=$USER->sesskey\"> "; + " src=\"$CFG->pixpath/t/hide.gif\" height=\"11\" width=\"11\" border=\"0\" alt=\"\" /> "; } else { echo "show\" href=\"index.php?show=$category->id&sesskey=$USER->sesskey\"> "; + " src=\"$CFG->pixpath/t/show.gif\" height=\"11\" width=\"11\" border=\"0\"alt=\"\" /> "; } if ($up) { echo "moveup\" href=\"index.php?moveup=$category->id&sesskey=$USER->sesskey\"> "; + " src=\"$CFG->pixpath/t/up.gif\" height=\"11\" width=\"11\" border=\"0\" alt=\"\" /> "; } if ($down) { echo "movedown\" href=\"index.php?movedown=$category->id&sesskey=$USER->sesskey\"> "; + " src=\"$CFG->pixpath/t/down.gif\" height=\"11\" width=\"11\" border=\"0\"alt=\"\" /> "; } echo "
"; - echo "
cellheading\" class=\"$class\">"; + echo "
"; echo stripslashes($heading); echo "
"; } @@ -1312,7 +1311,7 @@ function print_category_info($category, $depth) { function print_courses($category, $width="100%") { /// Category is 0 (for all courses) or an object - global $CFG, $THEME; + global $CFG; if (empty($category)) { $categories = get_categories(0); // Parent = 0 ie top-level categories only @@ -1342,7 +1341,7 @@ function print_courses($category, $width="100%") { function print_course($course, $width="100%") { - global $CFG, $THEME; + global $CFG; static $enrol; @@ -1351,7 +1350,7 @@ function print_course($course, $width="100%") { $enrol = new enrolment_plugin; } - print_simple_box_start("center", "$width", $THEME->cellcontent, 5, "coursebox"); + print_simple_box_start("center", "$width", '', 5, "coursebox"); $linkcss = $course->visible ? "" : " class=\"dimmed\" "; @@ -1762,7 +1761,7 @@ function move_module($cm, $move) { } function make_editing_buttons($mod, $absolute=false, $moveselect=true, $indent=-1) { - global $CFG, $THEME, $USER; + global $CFG, $USER; static $str; @@ -1790,32 +1789,26 @@ function make_editing_buttons($mod, $absolute=false, $moveselect=true, $indent=- $path = "."; } - if (empty($THEME->custompix)) { - $pixpath = "$path/../pix"; - } else { - $pixpath = "$path/../theme/$CFG->theme/pix"; - } - if ($mod->visible) { $hideshow = "hide\" href=\"$path/mod.php?hide=$mod->id&sesskey=$USER->sesskey\">hide\" /> "; + " src=\"$CFG->pixpath/t/hide.gif\" hspace=\"2\" height=\"11\" width=\"11\" border=\"0\" alt=\"$str->hide\" /> "; } else { $hideshow = "show\" href=\"$path/mod.php?show=$mod->id&sesskey=$USER->sesskey\">pixpath/t/show.gif\" hspace=\"2\" height=\"11\" width=\"11\" ". "border=\"0\" alt=\"$str->show\" /> "; } if ($mod->groupmode !== false) { if ($mod->groupmode == SEPARATEGROUPS) { $grouptitle = $str->groupsseparate; - $groupimage = "$pixpath/t/groups.gif"; + $groupimage = "$CFG->pixpath/t/groups.gif"; $grouplink = "$path/mod.php?id=$mod->id&groupmode=0&sesskey=$USER->sesskey"; } else if ($mod->groupmode == VISIBLEGROUPS) { $grouptitle = $str->groupsvisible; - $groupimage = "$pixpath/t/groupv.gif"; + $groupimage = "$CFG->pixpath/t/groupv.gif"; $grouplink = "$path/mod.php?id=$mod->id&groupmode=1&sesskey=$USER->sesskey"; } else { $grouptitle = $str->groupsnone; - $groupimage = "$pixpath/t/groupn.gif"; + $groupimage = "$CFG->pixpath/t/groupn.gif"; $grouplink = "$path/mod.php?id=$mod->id&groupmode=2&sesskey=$USER->sesskey"; } if ($mod->groupmodelink) { @@ -1833,37 +1826,37 @@ function make_editing_buttons($mod, $absolute=false, $moveselect=true, $indent=- if ($moveselect) { $move = "move\" href=\"$path/mod.php?copy=$mod->id&sesskey=$USER->sesskey\">pixpath/t/move.gif\" hspace=\"2\" height=\"11\" width=\"11\" ". " border=\"0\" alt=\"$str->move\" />"; } else { $move = "moveup\" href=\"$path/mod.php?id=$mod->id&move=-1&sesskey=$USER->sesskey\">pixpath/t/up.gif\" hspace=\"2\" height=\"11\" width=\"11\" ". " border=\"0\" alt=\"$str->moveup\" />". "movedown\" href=\"$path/mod.php?id=$mod->id&move=1&sesskey=$USER->sesskey\">pixpath/t/down.gif\" hspace=\"2\" height=\"11\" width=\"11\" ". " border=\"0\" alt=\"$str->movedown\" />"; } $leftright = ""; if ($indent > 0) { $leftright .= "moveleft\" href=\"$path/mod.php?id=$mod->id&indent=-1&sesskey=$USER->sesskey\">pixpath/t/left.gif\" hspace=\"2\" height=\"11\" width=\"11\" ". " border=\"0\" alt=\"$str->moveleft\" />"; } if ($indent >= 0) { $leftright .= "moveright\" href=\"$path/mod.php?id=$mod->id&indent=1&sesskey=$USER->sesskey\">pixpath/t/right.gif\" hspace=\"2\" height=\"11\" width=\"11\" ". " border=\"0\" alt=\"$str->moveright\" />"; } return "$leftright$move". "update\" href=\"$path/mod.php?update=$mod->id&sesskey=$USER->sesskey\">pixpath/t/edit.gif\" hspace=\"2\" height=\"11\" width=\"11\" border=\"0\" ". " alt=\"$str->update\" />". // Following line is commented out until this feature is more definite -- martin // "duplicate\" href=\"$path/mod.php?duplicate=$mod->id&sesskey=$USER->sesskey\"> 2 ". "delete\" href=\"$path/mod.php?delete=$mod->id&sesskey=$USER->sesskey\">pixpath/t/delete.gif\" hspace=\"2\" height=\"11\" width=\"11\" border=\"0\" ". " alt=\"$str->delete\" />$hideshow$groupmode"; } diff --git a/course/mod.php b/course/mod.php index e87056ef95..ab6c37e8c9 100644 --- a/course/mod.php +++ b/course/mod.php @@ -617,7 +617,7 @@ $icon = "modpixpath/$module->name/icon.gif\" alt=\"\" /> "; print_heading_with_help($pageheading, "mods", $module->name, $icon); - print_simple_box_start("center", "", "$THEME->cellheading"); + print_simple_box_start("center"); include_once($modform); print_simple_box_end(); diff --git a/course/scales.php b/course/scales.php index df58042860..d0af904ed3 100644 --- a/course/scales.php +++ b/course/scales.php @@ -422,12 +422,6 @@ if ($scales) { //Calculate the base path $path = "$CFG->wwwroot/course"; - //Calculate pixpath - if (empty($THEME->custompix)) { - $pixpath = "$path/../pix"; - } else { - $pixpath = "$path/../theme/$CFG->theme/pix"; - } $data = array(); $incustom = true; @@ -454,17 +448,17 @@ $buttons = ""; if (empty($scales_uses) && ($incustom || isadmin())) { $buttons .= "id&scaleid=$scale->id&action=edit\"> "; + " src=\"$CFG->pixpath/t/edit.gif\" hspace=\"2\" height=\"11\" width=\"11\" border=\"0\" alt=\"\" /> "; if ($incustom && isadmin()) { $buttons .= "id&scaleid=$scale->id&action=down&sesskey=$USER->sesskey\"> "; + " src=\"$CFG->pixpath/t/down.gif\" hspace=\"2\" height=\"11\" width=\"11\" border=\"0\" alt=\"\" /> "; } if (!$incustom && isadmin()) { $buttons .= "id&scaleid=$scale->id&action=up&sesskey=$USER->sesskey\"> "; + " src=\"$CFG->pixpath/t/up.gif\" hspace=\"2\" height=\"11\" width=\"11\" border=\"0\" alt=\"\" /> "; } $buttons .= "id&scaleid=$scale->id&action=delete&sesskey=$USER->sesskey\"> "; + " src=\"$CFG->pixpath/t/delete.gif\" hspace=\"2\" height=\"11\" width=\"11\" border=\"0\" alt=\"\" /> "; } $line[] = $buttons; diff --git a/course/student.php b/course/student.php index 132a38a147..11f364fbb7 100644 --- a/course/student.php +++ b/course/student.php @@ -142,7 +142,7 @@ $searchtext = (isset($frm->searchtext)) ? $frm->searchtext : ""; $previoussearch = ($previoussearch) ? '1' : '0'; - print_simple_box_start("center", "", "$THEME->cellheading"); + print_simple_box_start("center"); $sesskey = !empty($USER->id) ? $USER->sesskey : '';