mirror of
https://github.com/moodle/moodle.git
synced 2025-04-22 08:55:15 +02:00
Removed obsolete function from pre-OO days.
This commit is contained in:
parent
6673d7bdf6
commit
381b379798
@ -107,100 +107,4 @@ class CourseBlock_admin extends MoodleBlock {
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
function block_admin(&$course) {
|
||||
|
||||
global $USER, $CFG, $THEME;
|
||||
|
||||
$block = New object;
|
||||
|
||||
$block->title = get_string('administration');
|
||||
$block->type = BLOCK_TYPE_LIST;
|
||||
|
||||
if (isguest()) {
|
||||
return $block;
|
||||
}
|
||||
|
||||
if (isteacher($course->id)) {
|
||||
|
||||
$isteacheredit = isteacheredit($course->id);
|
||||
|
||||
if ($isteacheredit) {
|
||||
$block->icons[]="<img src=\"$CFG->pixpath/i/edit.gif\" height=16 width=16 alt=\"\">";
|
||||
if (isediting($course->id)) {
|
||||
$block->items[]="<a href=\"view.php?id=$course->id&edit=off\">".get_string("turneditingoff")."</a>";
|
||||
} else {
|
||||
$block->items[]="<a href=\"view.php?id=$course->id&edit=on\">".get_string("turneditingon")."</a>";
|
||||
}
|
||||
$block->items[]="<a href=\"edit.php?id=$course->id\">".get_string("settings")."...</a>";
|
||||
$block->icons[]="<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");
|
||||
}
|
||||
$block->items[]="<a href=\"teacher.php?id=$course->id\">$course->teachers...</a>";
|
||||
$block->icons[]="<img src=\"$CFG->pixpath/i/users.gif\" height=16 width=16 alt=\"\">";
|
||||
}
|
||||
|
||||
if (!$course->students) {
|
||||
$course->students = get_string("defaultcoursestudents");
|
||||
}
|
||||
$block->items[]="<a href=\"student.php?id=$course->id\">$course->students...</a>";
|
||||
$block->icons[]="<img src=\"$CFG->pixpath/i/users.gif\" height=16 width=16 alt=\"\">";
|
||||
|
||||
$block->items[]="<a href=\"$CFG->wwwroot/backup/backup.php?id=$course->id\">".get_string("backup")."...</a>";
|
||||
$block->icons[]="<img src=\"$CFG->pixpath/i/backup.gif\" height=16 width=16 alt=\"\">";
|
||||
|
||||
$block->items[]="<a href=\"$CFG->wwwroot/files/index.php?id=$course->id&wdir=/backupdata\">".get_string("restore")."...</a>";
|
||||
$block->icons[]="<img src=\"$CFG->pixpath/i/restore.gif\" height=16 width=16 alt=\"\">";
|
||||
$block->items[]="<a href=\"scales.php?id=$course->id\">".get_string("scales")."...</a>";
|
||||
$block->icons[]="<img src=\"$CFG->pixpath/i/scales.gif\" height=16 width=16 alt=\"\">";
|
||||
}
|
||||
|
||||
$block->items[]="<a href=\"grades.php?id=$course->id\">".get_string("grades")."...</a>";
|
||||
$block->icons[]="<img src=\"$CFG->pixpath/i/grades.gif\" height=16 width=16 alt=\"\">";
|
||||
|
||||
$block->items[]="<a href=\"log.php?id=$course->id\">".get_string("logs")."...</a>";
|
||||
$block->icons[]="<img src=\"$CFG->pixpath/i/log.gif\" height=16 width=16 alt=\"\">";
|
||||
|
||||
if ($isteacheredit) {
|
||||
$block->items[]="<a href=\"$CFG->wwwroot/files/index.php?id=$course->id\">".get_string("files")."...</a>";
|
||||
$block->icons[]="<img src=\"$CFG->pixpath/i/files.gif\" height=16 width=16 alt=\"\">";
|
||||
}
|
||||
|
||||
$block->items[]="<a href=\"$CFG->wwwroot/doc/view.php?id=$course->id&file=teacher.html\">".get_string("help")."...</a>";
|
||||
$block->icons[]="<img src=\"$CFG->modpixpath/resource/icon.gif\" height=16 width=16 alt=\"\">";
|
||||
|
||||
if ($teacherforum = forum_get_course_forum($course->id, "teacher")) {
|
||||
$block->items[]="<a href=\"$CFG->wwwroot/mod/forum/view.php?f=$teacherforum->id\">$teacherforum->name</a>";
|
||||
$block->icons[]="<img src=\"$CFG->modpixpath/forum/icon.gif\" height=16 width=16 alt=\"\">";
|
||||
}
|
||||
|
||||
} else if (!isguest()) { // Students menu
|
||||
if ($course->showgrades) {
|
||||
$block->items[]="<a href=\"grade.php?id=$course->id\">".get_string("grades")."...</a>";
|
||||
$block->icons[]="<img src=\"$CFG->pixpath/i/grades.gif\" height=16 width=16 alt=\"\">";
|
||||
}
|
||||
if ($course->showreports) {
|
||||
$block->items[]="<a href=\"user.php?id=$course->id&user=$USER->id\">".get_string("activityreport")."...</a>";
|
||||
$block->icons[]="<img src=\"$CFG->pixpath/i/report.gif\" height=16 width=16 alt=\"\">";
|
||||
}
|
||||
if (is_internal_auth()) {
|
||||
$block->items[]="<a href=\"$CFG->wwwroot/login/change_password.php?id=$course->id\">".
|
||||
get_string("changepassword")."...</a>";
|
||||
$block->icons[]="<img src=\"$CFG->pixpath/i/user.gif\" height=16 width=16 alt=\"\">";
|
||||
} else if ($CFG->changepassword) {
|
||||
$block->items[]="<a href=\"$CFG->changepassword\">".get_string("changepassword")."...</a>";
|
||||
$block->icons[]="<img src=\"$CFG->pixpath/i/user.gif\" height=16 width=16 alt=\"\">";
|
||||
}
|
||||
if ($CFG->allowunenroll) {
|
||||
$block->items[]="<a href=\"unenrol.php?id=$course->id\">".get_string("unenrolme", "", $course->shortname)."...</a>";
|
||||
$block->icons[]="<img src=\"$CFG->pixpath/i/user.gif\" height=16 width=16 alt=\"\">";
|
||||
}
|
||||
}
|
||||
|
||||
return $block;
|
||||
}
|
||||
*/
|
||||
?>
|
||||
|
Loading…
x
Reference in New Issue
Block a user