<td width="<?php echo $leftwidth?>" valign="top">
<?php
$moddata[]="<a title=\"".get_string("listofallpeople")."\" href=\"../user/index.php?id=$course->id\">".get_string("participants")."</a>";
- $modicon[]="<img src=\"$pixpath/i/users.gif\" height=16 width=16 alt=\"\">";
+ $modicon[]="<img src=\"$CFG->pixpath/i/users.gif\" height=16 width=16 alt=\"\">";
$editmyprofile = "<a title=\"$USER->firstname $USER->lastname\" href=\"../user/edit.php?id=$USER->id&course=$course->id\">".
get_string("editmyprofile")."</A>";
if ($USER->description) {
} else {
$moddata[]= $editmyprofile." <blink>*</blink>";
}
- $modicon[]="<img src=\"$pixpath/i/user.gif\" height=16 width=16 alt=\"\">";
+ $modicon[]="<img src=\"$CFG->pixpath/i/user.gif\" height=16 width=16 alt=\"\">";
print_side_block(get_string("people"), "", $moddata, $modicon, "", $leftwidth);
/// Links to people
$moddata[]="<a title=\"".get_string("listofallpeople")."\" href=\"../user/index.php?id=$course->id\">".get_string("participants")."</a>";
- $modicon[]="<img src=\"$pixpath/i/users.gif\" height=16 width=16 alt=\"\">";
+ $modicon[]="<img src=\"$CFG->pixpath/i/users.gif\" height=16 width=16 alt=\"\">";
$editmyprofile = "<a title=\"$USER->firstname $USER->lastname\" href=\"../user/edit.php?id=$USER->id&course=$course->id\">".get_string("editmyprofile")."</a>";
if ($USER->description) {
$moddata[]= $editmyprofile;
} else {
$moddata[]= $editmyprofile." <blink>*</blink>";
}
- $modicon[]="<img src=\"$pixpath/i/user.gif\" height=16 width=16 alt=\"\">";
+ $modicon[]="<img src=\"$CFG->pixpath/i/user.gif\" height=16 width=16 alt=\"\">";
print_side_block(get_string("people"), "", $moddata, $modicon);
if ($modnamesused) {
foreach ($modnamesused as $modname => $modfullname) {
$moddata[] = "<a href=\"../mod/$modname/index.php?id=$course->id\">".$modnamesplural[$modname]."</a>";
- $modicon[] = "<img src=\"$modpixpath/$modname/icon.gif\" height=16 width=16 alt=\"\">";
+ $modicon[] = "<img src=\"$CFG->modpixpath/$modname/icon.gif\" height=16 width=16 alt=\"\">";
}
}
print_side_block($stractivities, "", $moddata, $modicon);
if (isediting($course->id)) {
$thissection->summary .= " <a title=\"$streditsummary\" ".
- "href=\"editsection.php?id=$thissection->id\"><img src=\"$pixpath/t/edit.gif\" ".
+ "href=\"editsection.php?id=$thissection->id\"><img src=\"$CFG->pixpath/t/edit.gif\" ".
"height=11 width=11 border=0 alt=\"$streditsummary\"></a></p>";
}
if (isediting($course->id)) {
$thissection->summary .= " <a title=\"$streditsummary\" href=editsection.php?id=$thissection->id>".
- "<img src=\"$pixpath/t/edit.gif\" border=0 height=11 width=11></a>";
+ "<img src=\"$CFG->pixpath/t/edit.gif\" border=0 height=11 width=11></a>";
}
echo text_to_html($thissection->summary);
if ($displaysection == $section) { // Show the zoom boxes
echo "<a href=\"view.php?id=$course->id&topic=all\" title=\"$strshowalltopics\">".
- "<img src=\"$pixpath/i/all.gif\" height=25 width=16 border=0></a><br />";
+ "<img src=\"$CFG->pixpath/i/all.gif\" height=25 width=16 border=0></a><br />";
} else {
$strshowonlytopic = get_string("showonlytopic", "", $section);
echo "<a href=\"view.php?id=$course->id&topic=$section\" title=\"$strshowonlytopic\">".
- "<img src=\"$pixpath/i/one.gif\" height=16 width=16 border=0></a><br />";
+ "<img src=\"$CFG->pixpath/i/one.gif\" height=16 width=16 border=0></a><br />";
}
if (isediting($course->id)) {
if ($course->marker == $section) { // Show the "light globe" on/off
echo "<a href=\"view.php?id=$course->id&marker=0\" title=\"$strmarkedthistopic\">".
- "<img src=\"$pixpath/i/marked.gif\" vspace=3 height=16 width=16 border=0></a><br />";
+ "<img src=\"$CFG->pixpath/i/marked.gif\" vspace=3 height=16 width=16 border=0></a><br />";
} else {
echo "<a href=\"view.php?id=$course->id&marker=$section\" title=\"$strmarkthistopic\">".
- "<img src=\"$pixpath/i/marker.gif\" vspace=3 height=16 width=16 border=0></a><br />";
+ "<img src=\"$CFG->pixpath/i/marker.gif\" vspace=3 height=16 width=16 border=0></a><br />";
}
if ($thissection->visible) { // Show the hide/show eye
echo "<a href=\"view.php?id=$course->id&hide=$section\" title=\"$strtopichide\">".
- "<img src=\"$pixpath/i/hide.gif\" vspace=3 height=16 width=16 border=0></a><br />";
+ "<img src=\"$CFG->pixpath/i/hide.gif\" vspace=3 height=16 width=16 border=0></a><br />";
} else {
echo "<a href=\"view.php?id=$course->id&show=$section\" title=\"$strtopicshow\">".
- "<img src=\"$pixpath/i/show.gif\" vspace=3 height=16 width=16 border=0></a><br />";
+ "<img src=\"$CFG->pixpath/i/show.gif\" vspace=3 height=16 width=16 border=0></a><br />";
}
if ($section > 1) { // Add a arrow to move section up
echo "<a href=\"view.php?id=$course->id§ion=$section&move=-1\" title=\"$strmoveup\">".
- "<img src=\"$pixpath/t/up.gif\" vspace=3 height=11 width=11 border=0></a><br />";
+ "<img src=\"$CFG->pixpath/t/up.gif\" vspace=3 height=11 width=11 border=0></a><br />";
}
if ($section < $course->numsections) { // Add a arrow to move section down
echo "<a href=\"view.php?id=$course->id§ion=$section&move=1\" title=\"$strmovedown\">".
- "<img src=\"$pixpath/t/down.gif\" vspace=3 height=11 width=11 border=0></a><br />";
+ "<img src=\"$CFG->pixpath/t/down.gif\" vspace=3 height=11 width=11 border=0></a><br />";
}
}
/// Links to people
$moddata[]="<a title=\"".get_string("listofallpeople")."\" href=\"../user/index.php?id=$course->id\">".get_string("participants")."</a>";
- $modicon[]="<img src=\"$pixpath/i/users.gif\" height=16 width=16 alt=\"\">";
+ $modicon[]="<img src=\"$CFG->pixpath/i/users.gif\" height=16 width=16 alt=\"\">";
$editmyprofile = "<a title=\"$USER->firstname $USER->lastname\" href=\"../user/edit.php?id=$USER->id&course=$course->id\">".get_string("editmyprofile")."</a>";
if ($USER->description) {
$moddata[]= $editmyprofile;
} else {
$moddata[]= $editmyprofile." <blink>*</blink>";
}
- $modicon[]="<img src=\"$pixpath/i/user.gif\" height=16 width=16 alt=\"\">";
+ $modicon[]="<img src=\"$CFG->pixpath/i/user.gif\" height=16 width=16 alt=\"\">";
print_side_block(get_string("people"), "", $moddata, $modicon);
$modicon = array();
if ($modnamesused) {
foreach ($modnamesused as $modname => $modfullname) {
- $moddata[] = "<a href=\"../mod/$modname/index.php?id=$course->id\">".$modnamesplural[$modname]."</a>";
- $modicon[] = "<img src=\"$modpixpath/$modname/icon.gif\" height=16 width=16 alt=\"\">";
+ if ($modname != "label") {
+ $moddata[] = "<a href=\"../mod/$modname/index.php?id=$course->id\">".$modnamesplural[$modname]."</a>";
+ $modicon[] = "<img src=\"$CFG->modpixpath/$modname/icon.gif\" height=16 width=16 alt=\"\">";
+ }
}
}
print_side_block($stractivities, "", $moddata, $modicon);
if (isediting($course->id)) {
$thissection->summary .= " <a title=\"$streditsummary\" ".
- "href=\"editsection.php?id=$thissection->id\"><img height=11 width=11 src=\"$pixpath/t/edit.gif\" ".
+ "href=\"editsection.php?id=$thissection->id\"><img height=11 width=11 src=\"$CFG->pixpath/t/edit.gif\" ".
"border=0 alt=\"$streditsummary\"></a></p>";
}
if (isediting($course->id)) {
$thissection->summary .= " <a title=\"$streditsummary\" href=\"editsection.php?id=$thissection->id\">".
- "<img src=\"$pixpath/t/edit.gif\" height=11 width=11 border=0></a></p>";
+ "<img src=\"$CFG->pixpath/t/edit.gif\" height=11 width=11 border=0></a></p>";
}
echo text_to_html($thissection->summary);
if ($displaysection == $section) {
echo "<a href=\"view.php?id=$course->id&week=all\" title=\"$strshowallweeks\">".
- "<img src=\"$pixpath/i/all.gif\" height=25 width=16 border=0></a><br />";
+ "<img src=\"$CFG->pixpath/i/all.gif\" height=25 width=16 border=0></a><br />";
} else {
$strshowonlyweek = get_string("showonlyweek", "", $section);
echo "<a href=\"view.php?id=$course->id&week=$section\" title=\"$strshowonlyweek\">".
- "<img src=\"$pixpath/i/one.gif\" height=16 width=16 border=0></a><br />";
+ "<img src=\"$CFG->pixpath/i/one.gif\" height=16 width=16 border=0></a><br />";
}
if (isediting($course->id)) {
if ($thissection->visible) { // Show the hide/show eye
echo "<a href=\"view.php?id=$course->id&hide=$section\" title=\"$strweekhide\">".
- "<img src=\"$pixpath/i/hide.gif\" vspace=3 height=16 width=16 border=0></a><br />";
+ "<img src=\"$CFG->pixpath/i/hide.gif\" vspace=3 height=16 width=16 border=0></a><br />";
} else {
echo "<a href=\"view.php?id=$course->id&show=$section\" title=\"$strweekshow\">".
- "<img src=\"$pixpath/i/show.gif\" vspace=3 height=16 width=16 border=0></a><br />";
+ "<img src=\"$CFG->pixpath/i/show.gif\" vspace=3 height=16 width=16 border=0></a><br />";
}
if ($section > 1) { // Add a arrow to move section up
echo "<a href=\"view.php?id=$course->id§ion=$section&move=-1\" title=\"$strmoveup\">".
- "<img src=\"$pixpath/t/up.gif\" vspace=3 height=11 width=11 border=0></a><br />";
+ "<img src=\"$CFG->pixpath/t/up.gif\" vspace=3 height=11 width=11 border=0></a><br />";
}
if ($section < $course->numsections) { // Add a arrow to move section down
echo "<a href=\"view.php?id=$course->id§ion=$section&move=1\" title=\"$strmovedown\">".
- "<img src=\"$pixpath/t/down.gif\" vspace=3 height=11 width=11 border=0></a><br />";
+ "<img src=\"$CFG->pixpath/t/down.gif\" vspace=3 height=11 width=11 border=0></a><br />";
}
}
if ($logs) {
foreach ($logs as $key => $log) {
$info = split(" ", $log->info);
+
+ if ($info[0] == "label") { // Labels are special activities
+ continue;
+ }
+
$modname = get_field($info[0], "name", "id", $info[1]);
//Create a temp valid module structure (course,id)
$tempmod->course = $log->course;
}
}
}
+ if ($mod[$seq]->mod == "label") {
+ if ($label = get_record("label", "id", $rawmods[$seq]->instance)) {
+ $mod[$seq]->extra = urlencode($label->content);
+ }
+ }
}
}
}
$strmovefull = get_string("movefull", "", "'$USER->activitycopyname'");
$stractivityclipboard = $USER->activitycopyname;
$strcancel= get_string("cancel");
- if (empty($THEME->custompix)) {
- $pixpath = "$CFG->wwwroot/pix";
- } else {
- $pixpath = "$CFG->wwwroot/theme/$CFG->theme/pix";
- }
- $modicon[] = " <img align=bottom src=\"$pixpath/t/move.gif\" height=\"11\" width=\"11\">";
+ $modicon[] = " <img align=bottom src=\"$CFG->pixpath/t/move.gif\" height=\"11\" width=\"11\">";
$moddata[] = "$USER->activitycopyname (<a href=\"$CFG->wwwroot/course/mod.php?cancelcopy=true\">$strcancel</a>)";
}
$extra = "";
}
- $modicon[] = "<img src=\"$CFG->wwwroot/mod/$mod->modname/icon.gif\"".
- " height=\"16\" width=\"16\" alt=\"$mod->modfullname\">";
- $moddata[] = "<a title=\"$mod->modfullname\" $linkcss $extra".
- "href=\"$CFG->wwwroot/mod/$mod->modname/view.php?id=$mod->id\">$instancename</a>".
- "$editbuttons";
+ if ($mod->modname == "label") {
+ $modicon[] = "";
+ $moddata[] = format_text($extra, FORMAT_HTML).$editbuttons;
+ } else {
+ $modicon[] = "<img src=\"$CFG->wwwroot/mod/$mod->modname/icon.gif\"".
+ " height=\"16\" width=\"16\" alt=\"$mod->modfullname\">";
+ $moddata[] = "<a title=\"$mod->modfullname\" $linkcss $extra".
+ "href=\"$CFG->wwwroot/mod/$mod->modname/view.php?id=$mod->id\">$instancename</a>".
+ "$editbuttons";
+ }
}
}
}
$modinfo = unserialize($course->modinfo);
- echo "<table width=\"$width\"><tr><td>\n";
+ echo "<table width=\"$width\" cellpadding=3 cellspacing=0>\n";
if (!empty($section->sequence)) {
$sectionmods = explode(",", $section->sequence);
continue;
}
$mod = $mods[$modnumber];
+
if ($mod->visible or $isteacher) {
+ echo "<tr><td class=\"activity$mod->modname\">";
if ($ismoving) {
if ($mod->id == $USER->activitycopy) {
continue;
" href=\"mod.php?moveto=$mod->id\">$strmovehere</a></font><br />\n";
}
$instancename = urldecode($modinfo[$modnumber]->name);
+
if (!empty($modinfo[$modnumber]->extra)) {
$extra = urldecode($modinfo[$modnumber]->extra);
} else {
$extra = "";
}
- $linkcss = $mod->visible ? "" : " class=\"dimmed\" ";
- echo "<img src=\"$CFG->wwwroot/mod/$mod->modname/icon.gif\"".
- " height=16 width=16 alt=\"$mod->modfullname\">".
- " <font size=2><a title=\"$mod->modfullname\" $linkcss $extra".
- " href=\"$CFG->wwwroot/mod/$mod->modname/view.php?id=$mod->id\">$instancename</a></font>";
- }
- if (isediting($course->id)) {
- echo " ";
- echo make_editing_buttons($mod->id, $absolute, $mod->visible);
- }
- if ($mod->visible or $isteacher) {
- echo "<br />\n";
+
+ if ($mod->modname == "label") {
+ echo format_text($extra, FORMAT_HTML);
+
+ } else { // Normal activity
+ $linkcss = $mod->visible ? "" : " class=\"dimmed\" ";
+ echo "<img src=\"$CFG->wwwroot/mod/$mod->modname/icon.gif\"".
+ " height=16 width=16 alt=\"$mod->modfullname\">".
+ " <font size=2><a title=\"$mod->modfullname\" $linkcss $extra".
+ " href=\"$CFG->wwwroot/mod/$mod->modname/view.php?id=$mod->id\">$instancename</a></font>";
+ }
+ echo "</td>";
+ if ($isediting) {
+ echo "<td align=\"right\" valign=\"top\" nowrap=\"nowrap\" class=\"activityeditbuttons\">";
+ echo make_editing_buttons($mod->id, $absolute, $mod->visible);
+ echo " </td>";
+ }
+ echo "</tr>";
}
}
}
if ($ismoving) {
- echo "<font size=\"2\"> -> <a title=\"$strmovefull\"".
- " href=\"mod.php?movetosection=$section->id\">$strmovehere</a></font><br />\n";
+ echo "<tr><td><font size=\"2\"> -> <a title=\"$strmovefull\"".
+ " href=\"mod.php?movetosection=$section->id\">$strmovehere</a></font></td></tr>\n";
}
- echo "</td></tr></table><br />\n\n";
+ echo "</table>\n\n";
}
function print_admin_links ($siteid, $width=180) {
global $CFG, $THEME;
- if (empty($THEME->custompix)) {
- $pixpath = "$CFG->wwwroot/pix";
- } else {
- $pixpath = "$CFG->wwwroot/theme/$CFG->theme/pix";
- }
-
if (isadmin()) {
$moddata[]="<a href=\"$CFG->wwwroot/$CFG->admin/configure.php\">".get_string("configuration")."</a>...";
- $modicon[]="<img src=\"$pixpath/i/admin.gif\" height=16 width=16 alt=\"\" />";
+ $modicon[]="<img src=\"$CFG->pixpath/i/admin.gif\" height=16 width=16 alt=\"\" />";
$moddata[]="<a href=\"$CFG->wwwroot/$CFG->admin/users.php\">".get_string("users")."</a>...";
- $modicon[]="<img src=\"$pixpath/i/users.gif\" height=16 width=16 alt=\"\" />";
+ $modicon[]="<img src=\"$CFG->pixpath/i/users.gif\" height=16 width=16 alt=\"\" />";
}
if (iscreator()) {
$moddata[]="<a href=\"$CFG->wwwroot/course/index.php?edit=on\">".get_string("courses")."</a>";
- $modicon[]="<img src=\"$pixpath/i/course.gif\" height=16 width=16 alt=\"\" />";
+ $modicon[]="<img src=\"$CFG->pixpath/i/course.gif\" height=16 width=16 alt=\"\" />";
$fulladmin = "";
}
if (isadmin()) {
$moddata[]="<a href=\"$CFG->wwwroot/course/log.php?id=$siteid\">".get_string("logs")."</a>";
- $modicon[]="<img src=\"$pixpath/i/log.gif\" height=16 width=16 alt=\"\" />";
+ $modicon[]="<img src=\"$CFG->pixpath/i/log.gif\" height=16 width=16 alt=\"\" />";
$moddata[]="<a href=\"$CFG->wwwroot/files/index.php?id=$siteid\">".get_string("sitefiles")."</a>";
- $modicon[]="<img src=\"$pixpath/i/files.gif\" height=16 width=16 alt=\"\" />";
+ $modicon[]="<img src=\"$CFG->pixpath/i/files.gif\" height=16 width=16 alt=\"\" />";
if (file_exists("$CFG->dirroot/$CFG->admin/$CFG->dbtype")) {
$moddata[]="<a href=\"$CFG->wwwroot/$CFG->admin/$CFG->dbtype/frame.php\">".
get_string("managedatabase")."</a>";
- $modicon[]="<img src=\"$pixpath/i/settings.gif\" height=16 width=16 alt=\"\" />";
+ $modicon[]="<img src=\"$CFG->pixpath/i/settings.gif\" height=16 width=16 alt=\"\" />";
}
$fulladmin = "<p><a href=\"$CFG->wwwroot/$CFG->admin/\">".get_string("admin")."</a>...";
}
if (isguest()) {
return true;
}
- if (empty($THEME->custompix)) {
- $pixpath = "$CFG->wwwroot/pix";
- $modpixpath = "$CFG->wwwroot/mod";
- } else {
- $pixpath = "$CFG->wwwroot/theme/$CFG->theme/pix";
- $modpixpath = "$CFG->wwwroot/theme/$CFG->theme/pix/mod";
- }
if (isteacher($course->id)) {
if (isteacheredit($course->id)) {
- $adminicon[]="<img src=\"$pixpath/i/edit.gif\" height=16 width=16 alt=\"\">";
+ $adminicon[]="<img src=\"$CFG->pixpath/i/edit.gif\" height=16 width=16 alt=\"\">";
if (isediting($course->id)) {
$admindata[]="<a href=\"view.php?id=$course->id&edit=off\">".get_string("turneditingoff")."</a>";
} else {
$admindata[]="<a href=\"view.php?id=$course->id&edit=on\">".get_string("turneditingon")."</a>";
}
$admindata[]="<a href=\"edit.php?id=$course->id\">".get_string("settings")."...</a>";
- $adminicon[]="<img src=\"$pixpath/i/settings.gif\" height=16 width=16 alt=\"\">";
+ $adminicon[]="<img src=\"$CFG->pixpath/i/settings.gif\" height=16 width=16 alt=\"\">";
if (iscreator() or !empty($CFG->teacherassignteachers)) {
if (!$course->teachers) {
$course->teachers = get_string("defaultcourseteachers");
}
$admindata[]="<a href=\"teacher.php?id=$course->id\">$course->teachers...</a>";
- $adminicon[]="<img src=\"$pixpath/i/users.gif\" height=16 width=16 alt=\"\">";
+ $adminicon[]="<img src=\"$CFG->pixpath/i/users.gif\" height=16 width=16 alt=\"\">";
}
}
$course->students = get_string("defaultcoursestudents");
}
$admindata[]="<a href=\"student.php?id=$course->id\">$course->students...</a>";
- $adminicon[]="<img src=\"$pixpath/i/users.gif\" height=16 width=16 alt=\"\">";
+ $adminicon[]="<img src=\"$CFG->pixpath/i/users.gif\" height=16 width=16 alt=\"\">";
if (isteacheredit($course->id)) {
$admindata[]="<a href=\"$CFG->wwwroot/backup/backup.php?id=$course->id\">".get_string("backup")."...</a>";
- $adminicon[]="<img src=\"$pixpath/i/backup.gif\" height=16 width=16 alt=\"\">";
+ $adminicon[]="<img src=\"$CFG->pixpath/i/backup.gif\" height=16 width=16 alt=\"\">";
$admindata[]="<a href=\"$CFG->wwwroot/files/index.php?id=$course->id&wdir=/backupdata\">".get_string("restore")."...</a>";
- $adminicon[]="<img src=\"$pixpath/i/restore.gif\" height=16 width=16 alt=\"\">";
+ $adminicon[]="<img src=\"$CFG->pixpath/i/restore.gif\" height=16 width=16 alt=\"\">";
$admindata[]="<a href=\"scales.php?id=$course->id\">".get_string("scales")."...</a>";
- $adminicon[]="<img src=\"$pixpath/i/scales.gif\" height=16 width=16 alt=\"\">";
+ $adminicon[]="<img src=\"$CFG->pixpath/i/scales.gif\" height=16 width=16 alt=\"\">";
}
$admindata[]="<a href=\"grades.php?id=$course->id\">".get_string("grades")."...</a>";
- $adminicon[]="<img src=\"$pixpath/i/grades.gif\" height=16 width=16 alt=\"\">";
+ $adminicon[]="<img src=\"$CFG->pixpath/i/grades.gif\" height=16 width=16 alt=\"\">";
$admindata[]="<a href=\"log.php?id=$course->id\">".get_string("logs")."...</a>";
- $adminicon[]="<img src=\"$pixpath/i/log.gif\" height=16 width=16 alt=\"\">";
+ $adminicon[]="<img src=\"$CFG->pixpath/i/log.gif\" height=16 width=16 alt=\"\">";
$admindata[]="<a href=\"$CFG->wwwroot/files/index.php?id=$course->id\">".get_string("files")."...</a>";
- $adminicon[]="<img src=\"$pixpath/i/files.gif\" height=16 width=16 alt=\"\">";
+ $adminicon[]="<img src=\"$CFG->pixpath/i/files.gif\" height=16 width=16 alt=\"\">";
$admindata[]="<a href=\"$CFG->wwwroot/doc/view.php?id=$course->id&file=teacher.html\">".get_string("help")."...</a>";
- $adminicon[]="<img src=\"$modpixpath/resource/icon.gif\" height=16 width=16 alt=\"\">";
+ $adminicon[]="<img src=\"$CFG->modpixpath/resource/icon.gif\" height=16 width=16 alt=\"\">";
if ($teacherforum = forum_get_course_forum($course->id, "teacher")) {
$admindata[]="<a href=\"$CFG->wwwroot/mod/forum/view.php?f=$teacherforum->id\">$teacherforum->name</a>";
- $adminicon[]="<img src=\"$modpixpath/forum/icon.gif\" height=16 width=16 alt=\"\">";
+ $adminicon[]="<img src=\"$CFG->modpixpath/forum/icon.gif\" height=16 width=16 alt=\"\">";
}
} else if (!isguest()) { // Students menu
if ($course->showgrades) {
$admindata[]="<a href=\"grade.php?id=$course->id\">".get_string("grades")."...</a>";
- $adminicon[]="<img src=\"$pixpath/i/grades.gif\" height=16 width=16 alt=\"\">";
+ $adminicon[]="<img src=\"$CFG->pixpath/i/grades.gif\" height=16 width=16 alt=\"\">";
}
if ($CFG->auth == "email" or $CFG->auth == "none" or $CFG->auth == "manual") {
$admindata[]="<a href=\"$CFG->wwwroot/login/change_password.php?id=$course->id\">".
get_string("changepassword")."...</a>";
- $adminicon[]="<img src=\"$pixpath/i/user.gif\" height=16 width=16 alt=\"\">";
+ $adminicon[]="<img src=\"$CFG->pixpath/i/user.gif\" height=16 width=16 alt=\"\">";
} else if ($CFG->changepassword) {
$admindata[]="<a href=\"$CFG->changepassword\">".get_string("changepassword")."...</a>";
- $adminicon[]="<img src=\"$pixpath/i/user.gif\" height=16 width=16 alt=\"\">";
+ $adminicon[]="<img src=\"$CFG->pixpath/i/user.gif\" height=16 width=16 alt=\"\">";
}
}
$strsummary = get_string("summary");
}
- if (empty($THEME->custompix)) {
- $pixpath = "$CFG->wwwroot/pix";
- } else {
- $pixpath = "$CFG->wwwroot/theme/$CFG->theme/pix";
- }
$catlinkcss = $category->visible ? "" : " class=\"dimmed\" ";
if ($CFG->frontpage == FRONTPAGECOURSELIST) {
- $catimage = "<img src=\"$pixpath/i/course.gif\" width=16 height=16 border=0>";
+ $catimage = "<img src=\"$CFG->pixpath/i/course.gif\" width=16 height=16 border=0>";
} else {
$catimage = " ";
}
echo "</td>\n<td align=\"right\" valign=\"top\" nowrap class=\"coursename\">";
if ($course->guest ) {
echo "<a title=\"$strallowguests\" href=\"$CFG->wwwroot/course/view.php?id=$course->id\">";
- echo "<img hspace=1 alt=\"\" height=16 width=16 border=0 src=\"$pixpath/i/user.gif\"></a>";
+ echo "<img hspace=1 alt=\"\" height=16 width=16 border=0 src=\"$CFG->pixpath/i/user.gif\"></a>";
} else {
- echo "<img alt=\"\" height=16 width=18 border=0 src=\"$pixpath/spacer.gif\">";
+ echo "<img alt=\"\" height=16 width=18 border=0 src=\"$CFG->pixpath/spacer.gif\">";
}
if ($course->password) {
echo "<a title=\"$strrequireskey\" href=\"$CFG->wwwroot/course/view.php?id=$course->id\">";
- echo "<img hspace=1 alt=\"\" height=16 width=16 border=0 src=\"$pixpath/i/key.gif\"></a>";
+ echo "<img hspace=1 alt=\"\" height=16 width=16 border=0 src=\"$CFG->pixpath/i/key.gif\"></a>";
} else {
- echo "<img alt=\"\" height=16 width=18 border=0 src=\"$pixpath/spacer.gif\">";
+ echo "<img alt=\"\" height=16 width=18 border=0 src=\"$CFG->pixpath/spacer.gif\">";
}
if ($course->summary) {
link_to_popup_window ("/course/info.php?id=$course->id", "courseinfo",
- "<img hspace=1 alt=\"info\" height=16 width=16 border=0 src=\"$pixpath/i/info.gif\">",
+ "<img hspace=1 alt=\"info\" height=16 width=16 border=0 src=\"$CFG->pixpath/i/info.gif\">",
400, 500, $strsummary);
} else {
- echo "<img alt=\"\" height=16 width=18 border=0 src=\"$pixpath/spacer.gif\">";
+ echo "<img alt=\"\" height=16 width=18 border=0 src=\"$CFG->pixpath/spacer.gif\">";
}
echo "</td></tr>\n";
}
error("Could not find a site!");
}
- if (empty($THEME->custompix)) {
- $pixpath = "$CFG->wwwroot/pix";
- } else {
- $pixpath = "$CFG->wwwroot/theme/$CFG->theme/pix";
- }
-
print_simple_box_start("center", "$width");
$linkcss = $course->visible ? "" : " class=\"dimmed\" ";
if ($course->guest) {
$strallowguests = get_string("allowguests");
echo "<a title=\"$strallowguests\" href=\"$CFG->wwwroot/course/view.php?id=$course->id\">";
- echo "<img vspace=4 alt=\"$strallowguests\" height=16 width=16 border=0 src=\"$pixpath/i/user.gif\"></a> ";
+ echo "<img vspace=4 alt=\"$strallowguests\" height=16 width=16 border=0 src=\"$CFG->pixpath/i/user.gif\"></a> ";
}
if ($course->password) {
$strrequireskey = get_string("requireskey");
echo "<a title=\"$strrequireskey\" href=\"$CFG->wwwroot/course/view.php?id=$course->id\">";
- echo "<img vspace=4 alt=\"$strrequireskey\" height=16 width=16 border=0 src=\"$pixpath/i/key.gif\"></a>";
+ echo "<img vspace=4 alt=\"$strrequireskey\" height=16 width=16 border=0 src=\"$CFG->pixpath/i/key.gif\"></a>";
}
if (file_exists($modform)) {
- print_heading_with_help($pageheading, "mods", $module->name);
+ $icon = "<img align=absmiddle height=16 width=16 src=\"$CFG->modpixpath/$module->name/icon.gif\"> ";
+
+ print_heading_with_help($pageheading, "mods", $module->name, $icon);
print_simple_box_start("center", "", "$THEME->cellheading");
include_once($modform);
print_simple_box_end();
add_to_log($course->id, "course", "recent", "recent.php?id=$course->id", "$course->id");
- if (empty($THEME->custompix)) {
- $pixpath = "../pix";
- $modpixpath = "../mod";
- } else {
- $pixpath = "../theme/$CFG->theme/pix";
- $modpixpath = "../theme/$CFG->theme/pix/mod";
- }
-
$strrecentactivity = get_string("recentactivity");
$loggedinas = "<p class=\"logininfo\">".user_login_string($course, $USER)."</p>";
require_once($libfile);
$print_recent_instance_activity = $mod->modname."_print_recent_instance_activity";
if (function_exists($print_recent_instance_activity)) {
- $image = "<img src=\"$modpixpath/$mod->modname/icon.gif\" ".
+ $image = "<img src=\"$CFG->modpixpath/$mod->modname/icon.gif\" ".
"height=16 width=16 alt=\"$mod->modfullname\">";
echo "<h4>$image $mod->modfullname: ".
"<a href=\"$CFG->wwwroot/mod/$mod->modname/view.php?id=$mod->id\">".
$site = get_site();
- if (empty($THEME->custompix)) {
- $pixpath = "$CFG->wwwroot/pix";
- } else {
- $pixpath = "$CFG->wwwroot/theme/$CFG->theme/pix";
- }
-
$displaylist = array();
$parentlist = array();
make_categories_list($displaylist, $parentlist, "");
redirect("$CFG->wwwroot/");
}
- if (empty($THEME->custompix)) {
- $pixpath = "../pix";
- $modpixpath = "../mod";
- } else {
- $pixpath = "../theme/$CFG->theme/pix";
- $modpixpath = "../theme/$CFG->theme/pix/mod";
- }
-
$courseword = get_string("course");
$loggedinas = "<p class=\"logininfo\">".user_login_string($course, $USER)."</p>";
$CFG->header = "$CFG->dirroot/theme/$CFG->theme/header.html";
$CFG->footer = "$CFG->dirroot/theme/$CFG->theme/footer.html";
+ if (empty($THEME->custompix)) {
+ $CFG->pixpath = "$CFG->wwwroot/pix";
+ $CFG->modpixpath = "$CFG->wwwroot/mod";
+ } else {
+ $CFG->pixpath = "$CFG->wwwroot/theme/$CFG->theme/pix";
+ $CFG->modpixpath = "$CFG->wwwroot/theme/$CFG->theme/pix/mod";
+ }
+
/// A hack to get around magic_quotes_gpc being turned off
if ($runonce == false){
foreach ($emoticons as $emoticon => $image){
$e[] = $emoticon;
- $img[] = "<img alt=\"$emoticon\" width=15 height=15 src=\"$CFG->wwwroot/pix/s/$image\">";
+ $img[] = "<img alt=\"$emoticon\" width=15 height=15 src=\"$CFG->pixpath/s/$image\">";
}
$runonce = true;
}
echo "<p align=\"$align\"><font size=\"$size\"><b>".stripslashes_safe($text)."</b></font></p>";
}
-function print_heading_with_help($text, $helppage, $module="moodle") {
+function print_heading_with_help($text, $helppage, $module="moodle", $icon="") {
// Centered heading with attached help button (same title text)
- echo "<p align=\"center\"><font size=\"3\"><b>".stripslashes_safe($text);
+// and optional icon attached
+ echo "<p align=\"center\"><font size=\"3\">$icon<b>".stripslashes_safe($text);
helpbutton($helppage, $text, $module);
echo "</b></font></p>";
}
" border=\"0\" width=\"$size\" height=\"$size\" alt=\"\">";
}
} else { // Print default user pictures (use theme version if available)
- if (empty($THEME->custompix)) {
- $output .= "<img align=\"absmiddle\" src=\"$CFG->wwwroot/pix/u/$file.png\"".
- " border=\"0\" width=\"$size\" height=\"$size\" alt=\"\">";
- } else {
- $output .= "<img align=\"absmiddle\" src=\"$CFG->wwwroot/theme/$CFG->theme/pix/u/$file.png\"".
- " border=\"0\" width=\"$size\" height=\"$size\" alt=\"\">";
- }
-
+ $output .= "<img align=\"absmiddle\" src=\"$CFG->pixpath/u/$file.png\"".
+ " border=\"0\" width=\"$size\" height=\"$size\" alt=\"\">";
}
if ($link) {
$output .= "</a>";
/// Prints a grade menu (as part of an existing form) with help
/// Showing all possible numerical grades and scales
- global $CFG, $THEME;
+ global $CFG;
$strscale = get_string("scale");
$strscales = get_string("scales");
}
choose_from_menu($grades, "$name", "$current", "");
- if (empty($THEME->custompix)) {
- $helpicon = "$CFG->wwwroot/pix/help.gif";
- } else {
- $helpicon = "$CFG->wwwroot/theme/$CFG->theme/pix/help.gif";
- }
+ $helpicon = "$CFG->pixpath/help.gif";
$linkobject = "<img align=\"absmiddle\" border=0 height=17 width=22 alt=\"$strscales\" src=\"$helpicon\">";
link_to_popup_window ("/course/scales.php?id=$courseid&list=true", "ratingscales",
$linkobject, 400, 500, $strscales);
/// Prints a scale menu (as part of an existing form) including help button
/// Just like print_grade_menu but without the numerical grades
- global $CFG, $THEME;
+ global $CFG;
$strscales = get_string("scales");
choose_from_menu(get_scales_menu($courseid), "$name", $current, "");
- if (empty($THEME->custompix)) {
- $helpicon = "$CFG->wwwroot/pix/help.gif";
- } else {
- $helpicon = "$CFG->wwwroot/theme/$CFG->theme/pix/help.gif";
- }
+ $helpicon = "$CFG->pixpath/help.gif";
$linkobject = "<img align=\"absmiddle\" border=0 height=17 width=22 alt=\"$strscales\" src=\"$helpicon\">";
link_to_popup_window ("/course/scales.php?id=$courseid&list=true", "ratingscales",
$linkobject, 400, 500, $strscales);
/// Prints a help button about a scale
/// scale is an object
- global $CFG, $THEME;
+ global $CFG;
$strscales = get_string("scales");
- if (empty($THEME->custompix)) {
- $helpicon = "$CFG->wwwroot/pix/help.gif";
- } else {
- $helpicon = "$CFG->wwwroot/theme/$CFG->theme/pix/help.gif";
- }
+ $helpicon = "$CFG->pixpath/help.gif";
$linkobject = "<img align=\"absmiddle\" border=0 height=17 width=22 alt=\"$scale->name\" src=\"$helpicon\">";
link_to_popup_window ("/course/scales.php?id=$courseid&list=true&scale=$scale->id", "ratingscale",
$linkobject, 400, 500, $scale->name);
$module = "moodle";
}
- if (empty($THEME->custompix)) {
- $icon = "$CFG->wwwroot/pix/help.gif";
- } else {
- $icon = "$CFG->wwwroot/theme/$CFG->theme/pix/help.gif";
- }
-
if ($image) {
+ $icon = "$CFG->pixpath/help.gif";
if ($linktext) {
$linkobject = "$title<img align=\"absmiddle\" border=0 height=17 width=22 alt=\"\" src=\"$icon\">";
} else {
$SESSION->inserttextform = $form;
$SESSION->inserttextfield = $field;
helpbutton("emoticons", get_string("helpemoticons"), "moodle", false, true);
- echo " <img src=\"$CFG->wwwroot/pix/s/smiley.gif\" align=\"absmiddle\" width=15 height=15></a>";
+ echo " ";
+ link_to_popup_window ("/help.php?module=moodle&file=emoticons.html", "popup",
+ "<img src=\"$CFG->pixpath/s/smiley.gif\" border=0 align=\"absmiddle\" width=15 height=15>",
+ 400, 500, get_string("helpemoticons"));
+ echo "<br />";
}
function notice ($message, $link="") {