mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
Changes related to language support ... get_string()
Minor little interface cleanups along the way
This commit is contained in:
parent
70442fe3c4
commit
97c270e9a8
18 changed files with 139 additions and 110 deletions
|
@ -1,4 +1,5 @@
|
|||
<?PHP // $Id$
|
||||
// Admin-only code to delete a course utterly
|
||||
|
||||
require("../config.php");
|
||||
|
||||
|
@ -43,12 +44,12 @@
|
|||
|
||||
if (! $delete) {
|
||||
$strdeletecheck = get_string("deletecheck", "", $course->shortname);
|
||||
$strdeletecheckfull = get_string("deletecheckfull");
|
||||
$strdeletecoursecheck = get_string("deletecoursecheck");
|
||||
print_header("$site->fullname : $strdeletecheck", $site->fullname,
|
||||
"<A HREF=\"$CFG->wwwroot/admin\">$stradministration</A> ->
|
||||
<A HREF=\"delete.php\">$strdeletecourse</A> -> $strdeletecheck");
|
||||
|
||||
notice_yesno("$strdeletecheckfull<BR><BR>$course->fullname",
|
||||
notice_yesno("$strdeletecoursecheck<BR><BR>$course->fullname",
|
||||
"delete.php?id=$course->id&delete=".md5($course->timemodified),
|
||||
"delete.php");
|
||||
exit;
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
<tr valign=top>
|
||||
<td><P><? print_string("category") ?>:</td>
|
||||
<td><?
|
||||
choose_from_menu ($form->categories, "category", "$form->category");
|
||||
choose_from_menu ($form->categories, "category", "$form->category", "");
|
||||
formerr($err["category"]);
|
||||
?>
|
||||
</td>
|
||||
|
@ -43,7 +43,8 @@
|
|||
<tr valign=top>
|
||||
<td><P><? print_string("format") ?>:</td>
|
||||
<td><?
|
||||
choose_from_menu ($COURSE_FORMATS, "format", "$form->format");
|
||||
choose_from_menu ($form->courseformats, "format", "$form->format", "");
|
||||
helpbutton("courseformats", get_string("courseformats"));
|
||||
formerr($err["format"]);
|
||||
?>
|
||||
</td>
|
||||
|
@ -65,24 +66,11 @@
|
|||
"8" => "8 $newsitems",
|
||||
"9" => "9 $newsitems",
|
||||
"10" => "10 $newsitems");
|
||||
choose_from_menu ($options, "newsitems", "$form->newsitems");
|
||||
choose_from_menu ($options, "newsitems", "$form->newsitems", "");
|
||||
formerr($err["newsitems"]);
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr valign=top>
|
||||
<td><P><? print_string("wordforteacher") ?>:</td>
|
||||
<td><input type="text" name="teacher" size=25 value="<? p($form->teacher) ?>">
|
||||
(<? print_string("wordforteachereg") ?>) <? formerr($err["teacher"]) ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr valign=top>
|
||||
<td><P><? print_string("wordforstudent") ?>:</td>
|
||||
<td><input type="text" name="student" size=25 value="<? p($form->student) ?>">
|
||||
(<? print_string("wordforstudenteg") ?>) <? formerr($err["student"]) ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr valign=top>
|
||||
<td><P><? print_string("startdate") ?>:</td>
|
||||
<td><?
|
||||
|
@ -100,6 +88,18 @@
|
|||
formerr($err["numsections"]);
|
||||
?></td>
|
||||
</tr>
|
||||
<tr valign=top>
|
||||
<td><P><? print_string("wordforteacher") ?>:</td>
|
||||
<td><input type="text" name="teacher" size=25 value="<? p($form->teacher) ?>">
|
||||
(<? print_string("wordforteachereg") ?>) <? formerr($err["teacher"]) ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr valign=top>
|
||||
<td><P><? print_string("wordforstudent") ?>:</td>
|
||||
<td><input type="text" name="student" size=25 value="<? p($form->student) ?>">
|
||||
(<? print_string("wordforstudenteg") ?>) <? formerr($err["student"]) ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td><input type="submit" value="<? print_string("updatethiscourse") ?>"></td>
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<?PHP // $Id$
|
||||
// Edit course settings
|
||||
|
||||
require("../config.php");
|
||||
require("lib.php");
|
||||
|
@ -93,6 +94,12 @@
|
|||
}
|
||||
|
||||
$form->categories = get_records_sql_menu("SELECT id,name FROM course_categories");
|
||||
|
||||
$form->courseformats = array (
|
||||
"weeks" => get_string("formatweeks"),
|
||||
"social" => get_string("formatsocial"),
|
||||
"topics" => get_string("formattopics")
|
||||
);
|
||||
|
||||
$streditcoursesettings = get_string("editcoursesettings");
|
||||
$straddnewcourse = get_string("addnewcourse");
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<?PHP // $Id$
|
||||
// Edit the introduction of a section
|
||||
|
||||
require("../config.php");
|
||||
require("lib.php");
|
||||
|
@ -42,7 +43,7 @@
|
|||
$form = $section;
|
||||
}
|
||||
|
||||
$sectionname = $COURSE_SECTION[$course->format];
|
||||
$sectionname = get_string("name$course->format");
|
||||
$stredit = get_string("edit", "", " $sectionname $section->section");
|
||||
|
||||
print_header($stredit, $stredit, "", "form.summary");
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
<?PHP // $Id$
|
||||
|
||||
// Asks for a course pass key, once only
|
||||
// Asks for a course pass key, once only, and enrols that user
|
||||
|
||||
require("../config.php");
|
||||
require("lib.php");
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<?PHP // $Id$
|
||||
// Display list of all courses
|
||||
|
||||
require("../config.php");
|
||||
require("lib.php");
|
||||
|
|
|
@ -1,20 +1,12 @@
|
|||
<? // $Id$
|
||||
// Library of useful functions
|
||||
|
||||
$COURSE_FORMATS = array (
|
||||
"weeks" => "Weekly layout",
|
||||
"social" => "Social layout",
|
||||
"topics" => "Topics layout"
|
||||
);
|
||||
|
||||
$COURSE_SECTION = array (
|
||||
"weeks" => "week",
|
||||
"social" => "section",
|
||||
"topics" => "topic"
|
||||
);
|
||||
$COURSE_MAX_LOG_DISPLAY = 150; // days
|
||||
|
||||
$COURSE_MAX_LOG_DISPLAY = 150; // days
|
||||
$COURSE_TEACHER_COLOR = "#990000"; // To hilight certain items that are teacher-only
|
||||
|
||||
$COURSETEACHERCOLOR = "#990000"; // To hilight certain items
|
||||
$COURSE_LIVELOG_REFRESH = 60; // Seconds
|
||||
|
||||
|
||||
function print_log_selector_form($course, $selecteduser=0, $selecteddate="today") {
|
||||
|
@ -66,7 +58,7 @@ function print_log_selector_form($course, $selecteduser=0, $selecteddate="today"
|
|||
$timemidnight = $today = usergetmidnight($timenow);
|
||||
|
||||
// Put today up the top of the list
|
||||
$dates = array("$timemidnight" => "Today, ".userdate($timenow, "%e %B %Y") );
|
||||
$dates = array("$timemidnight" => get_string("today").", ".userdate($timenow, "%e %B %Y") );
|
||||
|
||||
if (! $course->startdate) {
|
||||
$course->startdate = $course->timecreated;
|
||||
|
@ -92,10 +84,10 @@ function print_log_selector_form($course, $selecteduser=0, $selecteddate="today"
|
|||
echo "<INPUT TYPE=hidden NAME=id VALUE=\"$course->id\">";
|
||||
}
|
||||
if ($course->category) {
|
||||
choose_from_menu ($users, "user", $selecteduser, "All participants");
|
||||
choose_from_menu ($users, "user", $selecteduser, get_string("allparticipants") );
|
||||
}
|
||||
choose_from_menu ($dates, "date", $selecteddate, "Any day");
|
||||
echo "<INPUT TYPE=submit VALUE=\"Show these logs\">";
|
||||
choose_from_menu ($dates, "date", $selecteddate, get_string("alldays"));
|
||||
echo "<INPUT TYPE=submit VALUE=\"".get_string("showtheselogs")."\">";
|
||||
echo "</FORM>";
|
||||
echo "</CENTER>";
|
||||
}
|
||||
|
@ -183,7 +175,7 @@ function print_all_courses($cat=1, $style="full", $maxcount=999) {
|
|||
if ($courses = get_records("course", "category", $cat, "fullname ASC")) {
|
||||
if ($style == "minimal") {
|
||||
$count = 0;
|
||||
$icon = "<IMG SRC=\"pix/i/course.gif\" HEIGHT=16 WIDTH=16 ALT=\"Course\">";
|
||||
$icon = "<IMG SRC=\"pix/i/course.gif\" HEIGHT=16 WIDTH=16 ALT=\"".get_string("course")."\">";
|
||||
foreach ($courses as $course) {
|
||||
$moddata[]="<A TITLE=\"$course->shortname\" HREF=\"$CFG->wwwroot/course/view.php?id=$course->id\">$course->fullname</A>";
|
||||
$modicon[]=$icon;
|
||||
|
@ -233,11 +225,11 @@ function print_course($course) {
|
|||
echo "</FONT></P>";
|
||||
}
|
||||
if ($course->guest or ($course->password == "")) {
|
||||
echo "<A TITLE=\"This course allows guest users\" HREF=\"$CFG->wwwroot/course/view.php?id=$course->id\">";
|
||||
echo "<A TITLE=\"".get_string("allowguests")."\" HREF=\"$CFG->wwwroot/course/view.php?id=$course->id\">";
|
||||
echo "<IMG VSPACE=4 ALT=\"\" HEIGHT=16 WIDTH=16 BORDER=0 SRC=\"$CFG->wwwroot/user/user.gif\"></A> ";
|
||||
}
|
||||
if ($course->password) {
|
||||
echo "<A TITLE=\"This course requires an enrolment key\" HREF=\"$CFG->wwwroot/course/view.php?id=$course->id\">";
|
||||
echo "<A TITLE=\"".get_string("requireskey")."\" HREF=\"$CFG->wwwroot/course/view.php?id=$course->id\">";
|
||||
echo "<IMG VSPACE=4 ALT=\"\" HEIGHT=16 WIDTH=16 BORDER=0 SRC=\"$CFG->wwwroot/pix/i/key.gif\"></A>";
|
||||
}
|
||||
|
||||
|
@ -259,7 +251,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, $COURSETEACHERCOLOR;
|
||||
global $CFG, $USER, $COURSE_TEACHER_COLOR;
|
||||
|
||||
if (! $USER->lastlogin ) {
|
||||
echo "<P ALIGN=CENTER><FONT SIZE=1>";
|
||||
|
@ -371,7 +363,7 @@ function print_recent_activity($course) {
|
|||
if (!isteacher($course->id)) {
|
||||
continue;
|
||||
} else {
|
||||
$teacherpost = "COLOR=$COURSETEACHERCOLOR";
|
||||
$teacherpost = "COLOR=$COURSE_TEACHER_COLOR";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -395,9 +387,8 @@ function print_recent_activity($course) {
|
|||
}
|
||||
|
||||
if (! $content) {
|
||||
echo "<FONT SIZE=2>Nothing new since your last login</FONT>";
|
||||
echo "<FONT SIZE=2>".get_string("nothingnew")."</FONT>";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -772,14 +763,14 @@ function make_editing_buttons($moduleid, $absolute=false) {
|
|||
$path = "";
|
||||
}
|
||||
return "
|
||||
<A HREF=\"".$path."mod.php?delete=$moduleid\"><IMG
|
||||
SRC=".$path."../pix/t/delete.gif BORDER=0 ALT=\"$delete\"></A>
|
||||
<A HREF=\"".$path."mod.php?id=$moduleid&move=-1\"><IMG
|
||||
SRC=".$path."../pix/t/up.gif BORDER=0 ALT=\"$moveup\"></A>
|
||||
<A HREF=\"".$path."mod.php?id=$moduleid&move=1\"><IMG
|
||||
SRC=".$path."../pix/t/down.gif BORDER=0 ALT=\"$movedown\"></A>
|
||||
<A HREF=\"".$path."mod.php?update=$moduleid\"><IMG
|
||||
SRC=".$path."../pix/t/edit.gif BORDER=0 ALT=\"$update\"></A>";
|
||||
<A TITLE=\"$delete\" HREF=\"".$path."mod.php?delete=$moduleid\"><IMG
|
||||
SRC=".$path."../pix/t/delete.gif BORDER=0></A>
|
||||
<A TITLE=\"$moveup\" HREF=\"".$path."mod.php?id=$moduleid&move=-1\"><IMG
|
||||
SRC=".$path."../pix/t/up.gif BORDER=0></A>
|
||||
<A TITLE=\"$movedown\" HREF=\"".$path."mod.php?id=$moduleid&move=1\"><IMG
|
||||
SRC=".$path."../pix/t/down.gif BORDER=0></A>
|
||||
<A TITLE=\"$update\" HREF=\"".$path."mod.php?update=$moduleid\"><IMG
|
||||
SRC=".$path."../pix/t/edit.gif BORDER=0></A>";
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
<?PHP // $Id$
|
||||
|
||||
// log.php - displays different views of the logs.
|
||||
// Displays different views of the logs.
|
||||
|
||||
require("../config.php");
|
||||
require("lib.php");
|
||||
|
@ -30,9 +29,8 @@
|
|||
|
||||
|
||||
if ($user || $date) {
|
||||
|
||||
$userinfo = "all users";
|
||||
$dateinfo = "any day";
|
||||
$userinfo = get_string("allparticipants");
|
||||
$dateinfo = get_string("alldays");
|
||||
|
||||
if ($user) {
|
||||
if (!$u = get_record("user", "id", $user) ) {
|
||||
|
@ -54,21 +52,20 @@
|
|||
|
||||
print_log($course, $user, $date, "ORDER BY l.time DESC");
|
||||
|
||||
|
||||
} else {
|
||||
print_header("$course->shortname: $strlogs", "$course->fullname",
|
||||
"<A HREF=\"view.php?id=$course->id\">$course->shortname</A> -> $strlogs", "");
|
||||
|
||||
print_heading("Choose which logs you want to look at");
|
||||
print_heading(get_string("chooselogs").":");
|
||||
|
||||
print_log_selector_form($course);
|
||||
|
||||
print_heading("Or see what is happening right now");
|
||||
echo "<BR>";
|
||||
print_heading(get_string("chooselivelogs").":");
|
||||
|
||||
echo "<CENTER><H3>";
|
||||
link_to_popup_window("/course/loglive.php?id=$course->id","livelog","Live logs", 500, 800);
|
||||
link_to_popup_window("/course/loglive.php?id=$course->id","livelog", get_string("livelogs"), 500, 800);
|
||||
echo "</H3></CENTER>";
|
||||
|
||||
}
|
||||
|
||||
print_footer($course);
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<?PHP // $Id$
|
||||
// Produces a graph of log accesses
|
||||
|
||||
require("../config.php");
|
||||
require("lib.php");
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<?PHP // $Id$
|
||||
// Allows a teacher/admin to login as another user (in stealth mode)
|
||||
|
||||
require("../config.php");
|
||||
require("lib.php");
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
<?PHP // $Id$
|
||||
|
||||
// loglive.php - displays different views of the logs.
|
||||
// Displays live view of recent logs
|
||||
|
||||
require("../config.php");
|
||||
require("lib.php");
|
||||
|
@ -15,9 +14,11 @@
|
|||
error("Only teachers can view logs");
|
||||
}
|
||||
|
||||
print_header("Activity within the last hour (updates every 60 secs)",
|
||||
"Activity within the last hour (updates every 60 secs)",
|
||||
"", "", "<META HTTP-EQUIV='Refresh' CONTENT='60; URL=loglive.php?id=$id'>");
|
||||
$strlivelogs = get_string("livelogs");
|
||||
$strupdatesevery = get_string("updatesevery", "moodle", $COURSE_LIVELOG_REFRESH);
|
||||
|
||||
print_header("$strlivelogs ($strupdatesevery)", "$strlivelogs", "", "",
|
||||
"<META HTTP-EQUIV='Refresh' CONTENT='$COURSE_LIVELOG_REFRESH; URL=loglive.php?id=$id'>");
|
||||
|
||||
$user=0;
|
||||
$date=time() - 3600;
|
||||
|
|
|
@ -153,7 +153,7 @@
|
|||
error("This module doesn't exist");
|
||||
}
|
||||
|
||||
$sectionname = $COURSE_SECTION[$course->format];
|
||||
$sectionname = get_string("name$course->format");
|
||||
|
||||
if (! $form = get_record($module->name, "id", $cm->instance)) {
|
||||
error("The required instance of this module doesn't exist");
|
||||
|
@ -189,7 +189,7 @@
|
|||
error("This course doesn't exist");
|
||||
}
|
||||
|
||||
$sectionname = $COURSE_SECTION[$course->format];
|
||||
$sectionname = get_string("name$course->format");
|
||||
|
||||
if (! $module = get_record("modules", "name", $add)) {
|
||||
error("This module type doesn't exist");
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
<CENTER>
|
||||
<FORM name="form" method="post" action="<?=$ME ?>">
|
||||
<? print_heading("Are you absolutely sure you want to delete the $form->fullmodulename '$form->instancename' ?") ?>
|
||||
<? print_heading(get_string("deletecheckfull", "", "$form->fullmodulename '$form->instancename'")); ?>
|
||||
<input type="hidden" name=mode value="delete">
|
||||
<input type="hidden" name=section value="<? echo $form->section; ?>">
|
||||
<input type="hidden" name=course value="<? p($form->course) ?>">
|
||||
|
|
|
@ -10,32 +10,34 @@
|
|||
<TR>
|
||||
<TD WIDTH="15%" VALIGN="TOP">
|
||||
<?
|
||||
//if ($news = forum_get_course_forum($course->id, "news")) {
|
||||
//forum_print_latest_discussions($news->id, 5, "minimal", "DESC", false);
|
||||
//}
|
||||
|
||||
//echo "<BR><BR>";
|
||||
print_simple_box("People", $align="CENTER", $width="100%", $color="$THEME->cellheading");
|
||||
$moddata[]="<A HREF=\"../user/index.php?id=$course->id\">List of all people</A>";
|
||||
$modicon[]="<IMG SRC=\"../user/users.gif\" HEIGHT=16 WIDTH=16 ALT=\"List of everyone\">";
|
||||
$moddata[]="<A HREF=\"../user/view.php?id=$USER->id&course=$course->id\">Edit my profile</A>";
|
||||
$modicon[]="<IMG SRC=\"../user/user.gif\" HEIGHT=16 WIDTH=16 ALT=\"Me\">";
|
||||
print_simple_box(get_string("people"), $align="CENTER", $width="100%", $color="$THEME->cellheading");
|
||||
$moddata[]="<A HREF=\"../user/index.php?id=$course->id\">".get_string("listofallpeople")."</A>";
|
||||
$modicon[]="<IMG SRC=\"../user/users.gif\" HEIGHT=16 WIDTH=16 ALT=\"\">";
|
||||
$editmyprofile = "<A HREF=\"../user/view.php?id=$USER->id&course=$course->id\">".
|
||||
get_string("editmyprofile")."</A>";
|
||||
if ($USER->description) {
|
||||
$moddata[]= $editmyprofile;
|
||||
} else {
|
||||
$moddata[]= $editmyprofile.$blinker;
|
||||
}
|
||||
$modicon[]="<IMG SRC=\"../user/user.gif\" HEIGHT=16 WIDTH=16 ALT=\"\">";
|
||||
print_side_block("", $moddata, "", $modicon);
|
||||
|
||||
|
||||
|
||||
// Then, print all the available resources (Section 0)
|
||||
print_simple_box("Resources", $align="CENTER", $width="100%", $color="$THEME->cellheading");
|
||||
print_simple_box(get_string("resources"), $align="CENTER", $width="100%", $color="$THEME->cellheading");
|
||||
print_section($site->id, $sections[0], $mods, $modnamesused, true);
|
||||
|
||||
if (isediting($site->id)) {
|
||||
echo "<DIV ALIGN=right>";
|
||||
popup_form("$CFG->wwwroot/course/mod.php?id=$course->id§ion=0&add=",
|
||||
$modnames, "section0", "", "Add...");
|
||||
$modnames, "section0", "", get_string("add")."...");
|
||||
echo "</DIV>";
|
||||
}
|
||||
|
||||
// Print all the recent activity
|
||||
print_simple_box("Recent Activity", $align="CENTER", $width="100%", $color="$THEME->cellheading");
|
||||
print_simple_box(get_string("recentactivity"), $align="CENTER", $width="100%", $color="$THEME->cellheading");
|
||||
echo "<TABLE CELLPADDING=4 CELLSPACING=0><TR><TD>";
|
||||
print_recent_activity($course);
|
||||
echo "</TD></TR></TABLE>";
|
||||
|
@ -48,22 +50,28 @@
|
|||
echo "</DIV>";
|
||||
|
||||
// Print Admin links for teachers and admin.
|
||||
if (isteacher($course->id) || isadmin()) {
|
||||
print_simple_box("Admin", $align="CENTER", $width="100%", $color="$THEME->cellheading");
|
||||
$adminicon[]="<IMG SRC=\"../pix/i/edit.gif\" HEIGHT=16 WIDTH=16 ALT=\"Edit\">";
|
||||
if (isediting($course->id)) {
|
||||
$admindata[]="<A HREF=\"view.php?id=$course->id&edit=off\">Turn editing off</A>";
|
||||
} else {
|
||||
$admindata[]="<A HREF=\"view.php?id=$course->id&edit=on\">Turn editing on</A>";
|
||||
if (isteacher($course->id)) {
|
||||
echo "<BR>";
|
||||
$admindata[]="<A HREF=\"edit.php?id=$course->id\">".get_string("settings")."...</A>";
|
||||
$adminicon[]="<IMG SRC=\"../pix/i/settings.gif\" HEIGHT=16 WIDTH=16 ALT=\"\">";
|
||||
$admindata[]="<A HREF=\"log.php?id=$course->id\">".get_string("logs")."...</A>";
|
||||
$adminicon[]="<IMG SRC=\"../pix/i/log.gif\" HEIGHT=16 WIDTH=16 ALT=\"\">";
|
||||
$admindata[]="<A HREF=\"../files/index.php?id=$course->id\">".get_string("files")."...</A>";
|
||||
$adminicon[]="<IMG SRC=\"../files/pix/files.gif\" HEIGHT=16 WIDTH=16 ALT=\"\">";
|
||||
|
||||
if ($teacherforum = forum_get_course_forum($course->id, "teacher")) {
|
||||
$admindata[]="<A HREF=\"../mod/forum/view.php?f=$teacherforum->id\">".get_string("teacherforum")."</A>";
|
||||
$adminicon[]="<IMG SRC=\"../mod/forum/icon.gif\" HEIGHT=16 WIDTH=16 ALT=\"\">";
|
||||
}
|
||||
|
||||
$admindata[]="<A HREF=\"edit.php?id=$course->id\">Course settings...</A>";
|
||||
$adminicon[]="<IMG SRC=\"../pix/i/settings.gif\" HEIGHT=16 WIDTH=16 ALT=\"Course\">";
|
||||
$admindata[]="<A HREF=\"log.php?id=$course->id\">Logs...</A>";
|
||||
$adminicon[]="<IMG SRC=\"../pix/i/log.gif\" HEIGHT=16 WIDTH=16 ALT=\"Log\">";
|
||||
$admindata[]="<A HREF=\"../files/index.php?id=$course->id\">Files...</A>";
|
||||
$adminicon[]="<IMG SRC=\"../files/pix/files.gif\" HEIGHT=16 WIDTH=16 ALT=\"Files\">";
|
||||
|
||||
|
||||
$adminicon[]="<IMG SRC=\"../pix/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>";
|
||||
}
|
||||
|
||||
print_simple_box(get_string("administration"),"CENTER", "100%", $THEME->cellheading);
|
||||
print_side_block("", $admindata, "", $adminicon);
|
||||
}
|
||||
|
||||
|
@ -72,11 +80,11 @@
|
|||
echo "<TD WIDTH=\"55%\" VALIGN=\"TOP\">";
|
||||
if ($social = forum_get_course_forum($course->id, "social")) {
|
||||
if (forum_is_subscribed($USER->id, $social->id)) {
|
||||
$subtext = "Unsubscribe";
|
||||
$subtext = get_string("unsubscribe", "forum");
|
||||
} else {
|
||||
$subtext = "Subscribe me by mail";
|
||||
$subtext = get_string("subscribe", "forum");
|
||||
}
|
||||
$headertext = "<TABLE BORDER=0 WIDTH=100% CELLPADDING=0 CELLSPACING=0><TR><TD>Social Forum - Current Topics<TD ALIGN=RIGHT><FONT SIZE=1><A HREF=\"../mod/forum/subscribe.php?id=$social->id\">$subtext</A></TD></TR></TABLE>";
|
||||
$headertext = "<TABLE BORDER=0 WIDTH=100% CELLPADDING=0 CELLSPACING=0><TR><TD>".get_string("socialheadline")."</TD><TD ALIGN=RIGHT><FONT SIZE=1><A HREF=\"../mod/forum/subscribe.php?id=$social->id\">$subtext</A></TD></TR></TABLE>";
|
||||
print_simple_box("$headertext", $align="CENTER", $width="100%", $color="$THEME->cellheading");
|
||||
echo "<IMG ALT=\"\" HEIGHT=7 SRC=\"../pix/spacer.gif\"><BR>";
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<?PHP // $Id$
|
||||
// Admin-only script to assign teachers to courses
|
||||
|
||||
require("../config.php");
|
||||
require("../user/lib.php");
|
||||
|
|
|
@ -45,17 +45,19 @@
|
|||
}
|
||||
|
||||
|
||||
print_header("Unenrol from $course->shortname", "$course->shortname", "<A HREF=\"$CFG->wwwroot/course/view.php?id=$course->id\">$course->shortname</A> -> Unenrol");
|
||||
$strunenrol = get_string("unenrol");
|
||||
|
||||
print_header("$course->shortname: $strunenrol", "$course->fullname",
|
||||
"<A HREF=\"$CFG->wwwroot/course/view.php?id=$course->id\">$course->shortname</A> -> $strunenrol");
|
||||
|
||||
if ($user->id == $USER->id) {
|
||||
notice_yesno ("Are you sure you want to remove yourself from this course?",
|
||||
"unenrol.php?id=$id&user=$user->id&confirm=yes", "$HTTP_REFERER");
|
||||
$strunenrolsure = get_string("unenrolsure", "", get_string("yourself"));
|
||||
} else {
|
||||
notice_yesno ("Are you sure you want to remove $user->firstname $user->lastname from this course?",
|
||||
"unenrol.php?id=$id&user=$user->id&confirm=yes", "$HTTP_REFERER");
|
||||
$strunenrolsure = get_string("unenrolsure", "", "$user->firstname $user->lastname");
|
||||
}
|
||||
|
||||
notice_yesno ($strunenrolsure, "unenrol.php?id=$id&user=$user->id&confirm=yes", "$HTTP_REFERER");
|
||||
|
||||
print_footer();
|
||||
|
||||
|
||||
?>
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
<?PHP // $Id$
|
||||
|
||||
// Display user activity reports for a course
|
||||
|
||||
require("../config.php");
|
||||
require("lib.php");
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue