mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 08:26: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$
|
<?PHP // $Id$
|
||||||
|
// Admin-only code to delete a course utterly
|
||||||
|
|
||||||
require("../config.php");
|
require("../config.php");
|
||||||
|
|
||||||
|
@ -43,12 +44,12 @@
|
||||||
|
|
||||||
if (! $delete) {
|
if (! $delete) {
|
||||||
$strdeletecheck = get_string("deletecheck", "", $course->shortname);
|
$strdeletecheck = get_string("deletecheck", "", $course->shortname);
|
||||||
$strdeletecheckfull = get_string("deletecheckfull");
|
$strdeletecoursecheck = get_string("deletecoursecheck");
|
||||||
print_header("$site->fullname : $strdeletecheck", $site->fullname,
|
print_header("$site->fullname : $strdeletecheck", $site->fullname,
|
||||||
"<A HREF=\"$CFG->wwwroot/admin\">$stradministration</A> ->
|
"<A HREF=\"$CFG->wwwroot/admin\">$stradministration</A> ->
|
||||||
<A HREF=\"delete.php\">$strdeletecourse</A> -> $strdeletecheck");
|
<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?id=$course->id&delete=".md5($course->timemodified),
|
||||||
"delete.php");
|
"delete.php");
|
||||||
exit;
|
exit;
|
||||||
|
|
|
@ -35,7 +35,7 @@
|
||||||
<tr valign=top>
|
<tr valign=top>
|
||||||
<td><P><? print_string("category") ?>:</td>
|
<td><P><? print_string("category") ?>:</td>
|
||||||
<td><?
|
<td><?
|
||||||
choose_from_menu ($form->categories, "category", "$form->category");
|
choose_from_menu ($form->categories, "category", "$form->category", "");
|
||||||
formerr($err["category"]);
|
formerr($err["category"]);
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
|
@ -43,7 +43,8 @@
|
||||||
<tr valign=top>
|
<tr valign=top>
|
||||||
<td><P><? print_string("format") ?>:</td>
|
<td><P><? print_string("format") ?>:</td>
|
||||||
<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"]);
|
formerr($err["format"]);
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
|
@ -65,24 +66,11 @@
|
||||||
"8" => "8 $newsitems",
|
"8" => "8 $newsitems",
|
||||||
"9" => "9 $newsitems",
|
"9" => "9 $newsitems",
|
||||||
"10" => "10 $newsitems");
|
"10" => "10 $newsitems");
|
||||||
choose_from_menu ($options, "newsitems", "$form->newsitems");
|
choose_from_menu ($options, "newsitems", "$form->newsitems", "");
|
||||||
formerr($err["newsitems"]);
|
formerr($err["newsitems"]);
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</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>
|
<tr valign=top>
|
||||||
<td><P><? print_string("startdate") ?>:</td>
|
<td><P><? print_string("startdate") ?>:</td>
|
||||||
<td><?
|
<td><?
|
||||||
|
@ -100,6 +88,18 @@
|
||||||
formerr($err["numsections"]);
|
formerr($err["numsections"]);
|
||||||
?></td>
|
?></td>
|
||||||
</tr>
|
</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>
|
<tr>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td><input type="submit" value="<? print_string("updatethiscourse") ?>"></td>
|
<td><input type="submit" value="<? print_string("updatethiscourse") ?>"></td>
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
<?PHP // $Id$
|
<?PHP // $Id$
|
||||||
|
// Edit course settings
|
||||||
|
|
||||||
require("../config.php");
|
require("../config.php");
|
||||||
require("lib.php");
|
require("lib.php");
|
||||||
|
@ -94,6 +95,12 @@
|
||||||
|
|
||||||
$form->categories = get_records_sql_menu("SELECT id,name FROM course_categories");
|
$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");
|
$streditcoursesettings = get_string("editcoursesettings");
|
||||||
$straddnewcourse = get_string("addnewcourse");
|
$straddnewcourse = get_string("addnewcourse");
|
||||||
$stradministration = get_string("administration");
|
$stradministration = get_string("administration");
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
<?PHP // $Id$
|
<?PHP // $Id$
|
||||||
|
// Edit the introduction of a section
|
||||||
|
|
||||||
require("../config.php");
|
require("../config.php");
|
||||||
require("lib.php");
|
require("lib.php");
|
||||||
|
@ -42,7 +43,7 @@
|
||||||
$form = $section;
|
$form = $section;
|
||||||
}
|
}
|
||||||
|
|
||||||
$sectionname = $COURSE_SECTION[$course->format];
|
$sectionname = get_string("name$course->format");
|
||||||
$stredit = get_string("edit", "", " $sectionname $section->section");
|
$stredit = get_string("edit", "", " $sectionname $section->section");
|
||||||
|
|
||||||
print_header($stredit, $stredit, "", "form.summary");
|
print_header($stredit, $stredit, "", "form.summary");
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
<?PHP // $Id$
|
<?PHP // $Id$
|
||||||
|
// Asks for a course pass key, once only, and enrols that user
|
||||||
// Asks for a course pass key, once only
|
|
||||||
|
|
||||||
require("../config.php");
|
require("../config.php");
|
||||||
require("lib.php");
|
require("lib.php");
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
<?PHP // $Id$
|
<?PHP // $Id$
|
||||||
|
// Display list of all courses
|
||||||
|
|
||||||
require("../config.php");
|
require("../config.php");
|
||||||
require("lib.php");
|
require("lib.php");
|
||||||
|
|
|
@ -1,20 +1,12 @@
|
||||||
<? // $Id$
|
<? // $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
|
||||||
|
|
||||||
$COURSETEACHERCOLOR = "#990000"; // To hilight certain items
|
$COURSE_TEACHER_COLOR = "#990000"; // To hilight certain items that are teacher-only
|
||||||
|
|
||||||
|
$COURSE_LIVELOG_REFRESH = 60; // Seconds
|
||||||
|
|
||||||
|
|
||||||
function print_log_selector_form($course, $selecteduser=0, $selecteddate="today") {
|
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);
|
$timemidnight = $today = usergetmidnight($timenow);
|
||||||
|
|
||||||
// Put today up the top of the list
|
// 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) {
|
if (! $course->startdate) {
|
||||||
$course->startdate = $course->timecreated;
|
$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\">";
|
echo "<INPUT TYPE=hidden NAME=id VALUE=\"$course->id\">";
|
||||||
}
|
}
|
||||||
if ($course->category) {
|
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");
|
choose_from_menu ($dates, "date", $selecteddate, get_string("alldays"));
|
||||||
echo "<INPUT TYPE=submit VALUE=\"Show these logs\">";
|
echo "<INPUT TYPE=submit VALUE=\"".get_string("showtheselogs")."\">";
|
||||||
echo "</FORM>";
|
echo "</FORM>";
|
||||||
echo "</CENTER>";
|
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 ($courses = get_records("course", "category", $cat, "fullname ASC")) {
|
||||||
if ($style == "minimal") {
|
if ($style == "minimal") {
|
||||||
$count = 0;
|
$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) {
|
foreach ($courses as $course) {
|
||||||
$moddata[]="<A TITLE=\"$course->shortname\" HREF=\"$CFG->wwwroot/course/view.php?id=$course->id\">$course->fullname</A>";
|
$moddata[]="<A TITLE=\"$course->shortname\" HREF=\"$CFG->wwwroot/course/view.php?id=$course->id\">$course->fullname</A>";
|
||||||
$modicon[]=$icon;
|
$modicon[]=$icon;
|
||||||
|
@ -233,11 +225,11 @@ function print_course($course) {
|
||||||
echo "</FONT></P>";
|
echo "</FONT></P>";
|
||||||
}
|
}
|
||||||
if ($course->guest or ($course->password == "")) {
|
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> ";
|
echo "<IMG VSPACE=4 ALT=\"\" HEIGHT=16 WIDTH=16 BORDER=0 SRC=\"$CFG->wwwroot/user/user.gif\"></A> ";
|
||||||
}
|
}
|
||||||
if ($course->password) {
|
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>";
|
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
|
// This function trawls through the logs looking for
|
||||||
// anything new since the user's last login
|
// anything new since the user's last login
|
||||||
|
|
||||||
global $CFG, $USER, $COURSETEACHERCOLOR;
|
global $CFG, $USER, $COURSE_TEACHER_COLOR;
|
||||||
|
|
||||||
if (! $USER->lastlogin ) {
|
if (! $USER->lastlogin ) {
|
||||||
echo "<P ALIGN=CENTER><FONT SIZE=1>";
|
echo "<P ALIGN=CENTER><FONT SIZE=1>";
|
||||||
|
@ -371,7 +363,7 @@ function print_recent_activity($course) {
|
||||||
if (!isteacher($course->id)) {
|
if (!isteacher($course->id)) {
|
||||||
continue;
|
continue;
|
||||||
} else {
|
} else {
|
||||||
$teacherpost = "COLOR=$COURSETEACHERCOLOR";
|
$teacherpost = "COLOR=$COURSE_TEACHER_COLOR";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -395,9 +387,8 @@ function print_recent_activity($course) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! $content) {
|
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 = "";
|
$path = "";
|
||||||
}
|
}
|
||||||
return "
|
return "
|
||||||
<A HREF=\"".$path."mod.php?delete=$moduleid\"><IMG
|
<A TITLE=\"$delete\" HREF=\"".$path."mod.php?delete=$moduleid\"><IMG
|
||||||
SRC=".$path."../pix/t/delete.gif BORDER=0 ALT=\"$delete\"></A>
|
SRC=".$path."../pix/t/delete.gif BORDER=0></A>
|
||||||
<A HREF=\"".$path."mod.php?id=$moduleid&move=-1\"><IMG
|
<A TITLE=\"$moveup\" HREF=\"".$path."mod.php?id=$moduleid&move=-1\"><IMG
|
||||||
SRC=".$path."../pix/t/up.gif BORDER=0 ALT=\"$moveup\"></A>
|
SRC=".$path."../pix/t/up.gif BORDER=0></A>
|
||||||
<A HREF=\"".$path."mod.php?id=$moduleid&move=1\"><IMG
|
<A TITLE=\"$movedown\" HREF=\"".$path."mod.php?id=$moduleid&move=1\"><IMG
|
||||||
SRC=".$path."../pix/t/down.gif BORDER=0 ALT=\"$movedown\"></A>
|
SRC=".$path."../pix/t/down.gif BORDER=0></A>
|
||||||
<A HREF=\"".$path."mod.php?update=$moduleid\"><IMG
|
<A TITLE=\"$update\" HREF=\"".$path."mod.php?update=$moduleid\"><IMG
|
||||||
SRC=".$path."../pix/t/edit.gif BORDER=0 ALT=\"$update\"></A>";
|
SRC=".$path."../pix/t/edit.gif BORDER=0></A>";
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
<?PHP // $Id$
|
<?PHP // $Id$
|
||||||
|
// Displays different views of the logs.
|
||||||
// log.php - displays different views of the logs.
|
|
||||||
|
|
||||||
require("../config.php");
|
require("../config.php");
|
||||||
require("lib.php");
|
require("lib.php");
|
||||||
|
@ -30,9 +29,8 @@
|
||||||
|
|
||||||
|
|
||||||
if ($user || $date) {
|
if ($user || $date) {
|
||||||
|
$userinfo = get_string("allparticipants");
|
||||||
$userinfo = "all users";
|
$dateinfo = get_string("alldays");
|
||||||
$dateinfo = "any day";
|
|
||||||
|
|
||||||
if ($user) {
|
if ($user) {
|
||||||
if (!$u = get_record("user", "id", $user) ) {
|
if (!$u = get_record("user", "id", $user) ) {
|
||||||
|
@ -54,21 +52,20 @@
|
||||||
|
|
||||||
print_log($course, $user, $date, "ORDER BY l.time DESC");
|
print_log($course, $user, $date, "ORDER BY l.time DESC");
|
||||||
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
print_header("$course->shortname: $strlogs", "$course->fullname",
|
print_header("$course->shortname: $strlogs", "$course->fullname",
|
||||||
"<A HREF=\"view.php?id=$course->id\">$course->shortname</A> -> $strlogs", "");
|
"<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_log_selector_form($course);
|
||||||
|
|
||||||
print_heading("Or see what is happening right now");
|
echo "<BR>";
|
||||||
|
print_heading(get_string("chooselivelogs").":");
|
||||||
|
|
||||||
echo "<CENTER><H3>";
|
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>";
|
echo "</H3></CENTER>";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
print_footer($course);
|
print_footer($course);
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
<?PHP // $Id$
|
<?PHP // $Id$
|
||||||
|
// Produces a graph of log accesses
|
||||||
|
|
||||||
require("../config.php");
|
require("../config.php");
|
||||||
require("lib.php");
|
require("lib.php");
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
<?PHP // $Id$
|
<?PHP // $Id$
|
||||||
|
// Allows a teacher/admin to login as another user (in stealth mode)
|
||||||
|
|
||||||
require("../config.php");
|
require("../config.php");
|
||||||
require("lib.php");
|
require("lib.php");
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
<?PHP // $Id$
|
<?PHP // $Id$
|
||||||
|
// Displays live view of recent logs
|
||||||
// loglive.php - displays different views of the logs.
|
|
||||||
|
|
||||||
require("../config.php");
|
require("../config.php");
|
||||||
require("lib.php");
|
require("lib.php");
|
||||||
|
@ -15,9 +14,11 @@
|
||||||
error("Only teachers can view logs");
|
error("Only teachers can view logs");
|
||||||
}
|
}
|
||||||
|
|
||||||
print_header("Activity within the last hour (updates every 60 secs)",
|
$strlivelogs = get_string("livelogs");
|
||||||
"Activity within the last hour (updates every 60 secs)",
|
$strupdatesevery = get_string("updatesevery", "moodle", $COURSE_LIVELOG_REFRESH);
|
||||||
"", "", "<META HTTP-EQUIV='Refresh' CONTENT='60; URL=loglive.php?id=$id'>");
|
|
||||||
|
print_header("$strlivelogs ($strupdatesevery)", "$strlivelogs", "", "",
|
||||||
|
"<META HTTP-EQUIV='Refresh' CONTENT='$COURSE_LIVELOG_REFRESH; URL=loglive.php?id=$id'>");
|
||||||
|
|
||||||
$user=0;
|
$user=0;
|
||||||
$date=time() - 3600;
|
$date=time() - 3600;
|
||||||
|
|
|
@ -153,7 +153,7 @@
|
||||||
error("This module doesn't exist");
|
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)) {
|
if (! $form = get_record($module->name, "id", $cm->instance)) {
|
||||||
error("The required instance of this module doesn't exist");
|
error("The required instance of this module doesn't exist");
|
||||||
|
@ -189,7 +189,7 @@
|
||||||
error("This course doesn't exist");
|
error("This course doesn't exist");
|
||||||
}
|
}
|
||||||
|
|
||||||
$sectionname = $COURSE_SECTION[$course->format];
|
$sectionname = get_string("name$course->format");
|
||||||
|
|
||||||
if (! $module = get_record("modules", "name", $add)) {
|
if (! $module = get_record("modules", "name", $add)) {
|
||||||
error("This module type doesn't exist");
|
error("This module type doesn't exist");
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
<CENTER>
|
<CENTER>
|
||||||
<FORM name="form" method="post" action="<?=$ME ?>">
|
<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=mode value="delete">
|
||||||
<input type="hidden" name=section value="<? echo $form->section; ?>">
|
<input type="hidden" name=section value="<? echo $form->section; ?>">
|
||||||
<input type="hidden" name=course value="<? p($form->course) ?>">
|
<input type="hidden" name=course value="<? p($form->course) ?>">
|
||||||
|
|
|
@ -10,32 +10,34 @@
|
||||||
<TR>
|
<TR>
|
||||||
<TD WIDTH="15%" VALIGN="TOP">
|
<TD WIDTH="15%" VALIGN="TOP">
|
||||||
<?
|
<?
|
||||||
//if ($news = forum_get_course_forum($course->id, "news")) {
|
print_simple_box(get_string("people"), $align="CENTER", $width="100%", $color="$THEME->cellheading");
|
||||||
//forum_print_latest_discussions($news->id, 5, "minimal", "DESC", false);
|
$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\">".
|
||||||
//echo "<BR><BR>";
|
get_string("editmyprofile")."</A>";
|
||||||
print_simple_box("People", $align="CENTER", $width="100%", $color="$THEME->cellheading");
|
if ($USER->description) {
|
||||||
$moddata[]="<A HREF=\"../user/index.php?id=$course->id\">List of all people</A>";
|
$moddata[]= $editmyprofile;
|
||||||
$modicon[]="<IMG SRC=\"../user/users.gif\" HEIGHT=16 WIDTH=16 ALT=\"List of everyone\">";
|
} else {
|
||||||
$moddata[]="<A HREF=\"../user/view.php?id=$USER->id&course=$course->id\">Edit my profile</A>";
|
$moddata[]= $editmyprofile.$blinker;
|
||||||
$modicon[]="<IMG SRC=\"../user/user.gif\" HEIGHT=16 WIDTH=16 ALT=\"Me\">";
|
}
|
||||||
|
$modicon[]="<IMG SRC=\"../user/user.gif\" HEIGHT=16 WIDTH=16 ALT=\"\">";
|
||||||
print_side_block("", $moddata, "", $modicon);
|
print_side_block("", $moddata, "", $modicon);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Then, print all the available resources (Section 0)
|
// 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);
|
print_section($site->id, $sections[0], $mods, $modnamesused, true);
|
||||||
|
|
||||||
if (isediting($site->id)) {
|
if (isediting($site->id)) {
|
||||||
echo "<DIV ALIGN=right>";
|
echo "<DIV ALIGN=right>";
|
||||||
popup_form("$CFG->wwwroot/course/mod.php?id=$course->id§ion=0&add=",
|
popup_form("$CFG->wwwroot/course/mod.php?id=$course->id§ion=0&add=",
|
||||||
$modnames, "section0", "", "Add...");
|
$modnames, "section0", "", get_string("add")."...");
|
||||||
echo "</DIV>";
|
echo "</DIV>";
|
||||||
}
|
}
|
||||||
|
|
||||||
// Print all the recent activity
|
// 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>";
|
echo "<TABLE CELLPADDING=4 CELLSPACING=0><TR><TD>";
|
||||||
print_recent_activity($course);
|
print_recent_activity($course);
|
||||||
echo "</TD></TR></TABLE>";
|
echo "</TD></TR></TABLE>";
|
||||||
|
@ -48,22 +50,28 @@
|
||||||
echo "</DIV>";
|
echo "</DIV>";
|
||||||
|
|
||||||
// Print Admin links for teachers and admin.
|
// Print Admin links for teachers and admin.
|
||||||
if (isteacher($course->id) || isadmin()) {
|
if (isteacher($course->id)) {
|
||||||
print_simple_box("Admin", $align="CENTER", $width="100%", $color="$THEME->cellheading");
|
echo "<BR>";
|
||||||
$adminicon[]="<IMG SRC=\"../pix/i/edit.gif\" HEIGHT=16 WIDTH=16 ALT=\"Edit\">";
|
$admindata[]="<A HREF=\"edit.php?id=$course->id\">".get_string("settings")."...</A>";
|
||||||
if (isediting($course->id)) {
|
$adminicon[]="<IMG SRC=\"../pix/i/settings.gif\" HEIGHT=16 WIDTH=16 ALT=\"\">";
|
||||||
$admindata[]="<A HREF=\"view.php?id=$course->id&edit=off\">Turn editing off</A>";
|
$admindata[]="<A HREF=\"log.php?id=$course->id\">".get_string("logs")."...</A>";
|
||||||
} else {
|
$adminicon[]="<IMG SRC=\"../pix/i/log.gif\" HEIGHT=16 WIDTH=16 ALT=\"\">";
|
||||||
$admindata[]="<A HREF=\"view.php?id=$course->id&edit=on\">Turn editing on</A>";
|
$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/edit.gif\" HEIGHT=16 WIDTH=16 ALT=\"\">";
|
||||||
$adminicon[]="<IMG SRC=\"../pix/i/settings.gif\" HEIGHT=16 WIDTH=16 ALT=\"Course\">";
|
if (isediting($course->id)) {
|
||||||
$admindata[]="<A HREF=\"log.php?id=$course->id\">Logs...</A>";
|
$admindata[]="<A HREF=\"view.php?id=$course->id&edit=off\">".get_string("turneditingoff")."</A>";
|
||||||
$adminicon[]="<IMG SRC=\"../pix/i/log.gif\" HEIGHT=16 WIDTH=16 ALT=\"Log\">";
|
} else {
|
||||||
$admindata[]="<A HREF=\"../files/index.php?id=$course->id\">Files...</A>";
|
$admindata[]="<A HREF=\"view.php?id=$course->id&edit=on\">".get_string("turneditingon")."</A>";
|
||||||
$adminicon[]="<IMG SRC=\"../files/pix/files.gif\" HEIGHT=16 WIDTH=16 ALT=\"Files\">";
|
}
|
||||||
|
|
||||||
|
print_simple_box(get_string("administration"),"CENTER", "100%", $THEME->cellheading);
|
||||||
print_side_block("", $admindata, "", $adminicon);
|
print_side_block("", $admindata, "", $adminicon);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -72,11 +80,11 @@
|
||||||
echo "<TD WIDTH=\"55%\" VALIGN=\"TOP\">";
|
echo "<TD WIDTH=\"55%\" VALIGN=\"TOP\">";
|
||||||
if ($social = forum_get_course_forum($course->id, "social")) {
|
if ($social = forum_get_course_forum($course->id, "social")) {
|
||||||
if (forum_is_subscribed($USER->id, $social->id)) {
|
if (forum_is_subscribed($USER->id, $social->id)) {
|
||||||
$subtext = "Unsubscribe";
|
$subtext = get_string("unsubscribe", "forum");
|
||||||
} else {
|
} 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");
|
print_simple_box("$headertext", $align="CENTER", $width="100%", $color="$THEME->cellheading");
|
||||||
echo "<IMG ALT=\"\" HEIGHT=7 SRC=\"../pix/spacer.gif\"><BR>";
|
echo "<IMG ALT=\"\" HEIGHT=7 SRC=\"../pix/spacer.gif\"><BR>";
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
<?PHP // $Id$
|
<?PHP // $Id$
|
||||||
|
// Admin-only script to assign teachers to courses
|
||||||
|
|
||||||
require("../config.php");
|
require("../config.php");
|
||||||
require("../user/lib.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) {
|
if ($user->id == $USER->id) {
|
||||||
notice_yesno ("Are you sure you want to remove yourself from this course?",
|
$strunenrolsure = get_string("unenrolsure", "", get_string("yourself"));
|
||||||
"unenrol.php?id=$id&user=$user->id&confirm=yes", "$HTTP_REFERER");
|
|
||||||
} else {
|
} else {
|
||||||
notice_yesno ("Are you sure you want to remove $user->firstname $user->lastname from this course?",
|
$strunenrolsure = get_string("unenrolsure", "", "$user->firstname $user->lastname");
|
||||||
"unenrol.php?id=$id&user=$user->id&confirm=yes", "$HTTP_REFERER");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
notice_yesno ($strunenrolsure, "unenrol.php?id=$id&user=$user->id&confirm=yes", "$HTTP_REFERER");
|
||||||
|
|
||||||
print_footer();
|
print_footer();
|
||||||
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?PHP // $Id$
|
<?PHP // $Id$
|
||||||
|
|
||||||
|
// Display user activity reports for a course
|
||||||
|
|
||||||
require("../config.php");
|
require("../config.php");
|
||||||
require("lib.php");
|
require("lib.php");
|
||||||
|
|
||||||
|
|
|
@ -11,8 +11,11 @@ $string[address] = "Address";
|
||||||
$string[admin] = "Admin";
|
$string[admin] = "Admin";
|
||||||
$string[administration] = "Administration";
|
$string[administration] = "Administration";
|
||||||
$string[again] = "again";
|
$string[again] = "again";
|
||||||
$string[alllogs] = "All logs";
|
$string[alldays] = "All days";
|
||||||
$string[allfieldsrequired] = "All fields are required";
|
$string[allfieldsrequired] = "All fields are required";
|
||||||
|
$string[alllogs] = "All logs";
|
||||||
|
$string[allowguests] = "This course allows guest users to enter";
|
||||||
|
$string[allparticipants] = "All participants";
|
||||||
$string[alphanumerical] = "Can only contain alphabetical letters or numbers";
|
$string[alphanumerical] = "Can only contain alphabetical letters or numbers";
|
||||||
$string[alreadyconfirmed] = "Registration has already been confirmed";
|
$string[alreadyconfirmed] = "Registration has already been confirmed";
|
||||||
$string[assignteachers] = "Assign teachers";
|
$string[assignteachers] = "Assign teachers";
|
||||||
|
@ -23,6 +26,8 @@ $string[changepassword] = "Change password";
|
||||||
$string[changedpassword] = "Changed password";
|
$string[changedpassword] = "Changed password";
|
||||||
$string[changessaved] = "Changes saved";
|
$string[changessaved] = "Changes saved";
|
||||||
$string[choosecourse] = "Choose a course";
|
$string[choosecourse] = "Choose a course";
|
||||||
|
$string[chooselivelogs] = "Or watch current activity";
|
||||||
|
$string[chooselogs] = "Choose which logs you want to see";
|
||||||
$string[chooseuser] = "Choose a user";
|
$string[chooseuser] = "Choose a user";
|
||||||
$string[city] = "City/town";
|
$string[city] = "City/town";
|
||||||
$string[confirmed] = "Your registration has been confirmed";
|
$string[confirmed] = "Your registration has been confirmed";
|
||||||
|
@ -43,7 +48,8 @@ $string[defaultcoursesummary] = "Write a concise and interesting paragraph here
|
||||||
$string[defaultcourseteacher] = "Facilitator";
|
$string[defaultcourseteacher] = "Facilitator";
|
||||||
$string[delete] = "Delete";
|
$string[delete] = "Delete";
|
||||||
$string[deletecheck] = "Delete \$a ?";
|
$string[deletecheck] = "Delete \$a ?";
|
||||||
$string[deletecheckfull] = "Are you absolutely sure you want to completely delete this course and all the data it contains?";
|
$string[deletecheckfull] = "Are you absolutely sure you want to completely delete \$a ?";
|
||||||
|
$string[deletecoursecheck] = "Are you absolutely sure you want to completely delete this course and all the data it contains?";
|
||||||
$string[deletecourse] = "Delete a course";
|
$string[deletecourse] = "Delete a course";
|
||||||
$string[deleted] = "Deleted";
|
$string[deleted] = "Deleted";
|
||||||
$string[deletedactivity] = "Deleted \$a";
|
$string[deletedactivity] = "Deleted \$a";
|
||||||
|
@ -120,6 +126,7 @@ $string[lastmodified] = "Last modified";
|
||||||
$string[lastname] = "Last name";
|
$string[lastname] = "Last name";
|
||||||
$string[latestnews] = "Latest news";
|
$string[latestnews] = "Latest news";
|
||||||
$string[listofallpeople] = "List of all people";
|
$string[listofallpeople] = "List of all people";
|
||||||
|
$string[livelogs] = "Live logs from the past hour";
|
||||||
$string[location] = "Location";
|
$string[location] = "Location";
|
||||||
$string[loggedinas] = "You are logged in as \$a.";
|
$string[loggedinas] = "You are logged in as \$a.";
|
||||||
$string[loggedinnot] = "You are not logged in.";
|
$string[loggedinnot] = "You are not logged in.";
|
||||||
|
@ -209,6 +216,7 @@ $string[nostudentsyet] = "No students enrolled in this course yet";
|
||||||
$string[nosuchemail] = "No such email address";
|
$string[nosuchemail] = "No such email address";
|
||||||
$string[noteachersyet] = "No teachers in this course yet";
|
$string[noteachersyet] = "No teachers in this course yet";
|
||||||
$string[notenrolled] = "\$a is not enrolled in this course.";
|
$string[notenrolled] = "\$a is not enrolled in this course.";
|
||||||
|
$string[nothingnew] = "Nothing new since your last login";
|
||||||
$string[now] = "now";
|
$string[now] = "now";
|
||||||
$string[numberweeks] = "Number of weeks/topics";
|
$string[numberweeks] = "Number of weeks/topics";
|
||||||
$string[ok] = "OK";
|
$string[ok] = "OK";
|
||||||
|
@ -228,8 +236,10 @@ $string[passwordsenttext] = "
|
||||||
$string[people] = "People";
|
$string[people] = "People";
|
||||||
$string[personalprofile] = "Personal profile";
|
$string[personalprofile] = "Personal profile";
|
||||||
$string[phone] = "Phone";
|
$string[phone] = "Phone";
|
||||||
$string[returningtosite] = "Returning to this web site?";
|
|
||||||
$string[recentactivity] = "Recent activity";
|
$string[recentactivity] = "Recent activity";
|
||||||
|
$string[resources] = "Resources";
|
||||||
|
$string[returningtosite] = "Returning to this web site?";
|
||||||
|
$string[requireskey] = "This course requires an enrolment key";
|
||||||
$string[revert] = "Revert";
|
$string[revert] = "Revert";
|
||||||
$string[savechanges] = "Save changes";
|
$string[savechanges] = "Save changes";
|
||||||
$string[section] = "Section";
|
$string[section] = "Section";
|
||||||
|
@ -242,6 +252,8 @@ $string[showalltopics] = "Show all topics";
|
||||||
$string[showallweeks] = "Show all weeks";
|
$string[showallweeks] = "Show all weeks";
|
||||||
$string[showonlytopic] = "Show only topic \$a";
|
$string[showonlytopic] = "Show only topic \$a";
|
||||||
$string[showonlyweek] = "Show only week \$a";
|
$string[showonlyweek] = "Show only week \$a";
|
||||||
|
$string[showtheselogs] = "Show these logs";
|
||||||
|
$string[socialheadline] = "Social forum - latest topics";
|
||||||
$string[yourlastlogin] = "Your last login was";
|
$string[yourlastlogin] = "Your last login was";
|
||||||
$string[site] = "Site";
|
$string[site] = "Site";
|
||||||
$string[sites] = "Sites";
|
$string[sites] = "Sites";
|
||||||
|
@ -259,6 +271,7 @@ $string[teacheronly] = "for the \$a only";
|
||||||
$string[textformat] = "Plain text format";
|
$string[textformat] = "Plain text format";
|
||||||
$string[timezone] = "Timezone";
|
$string[timezone] = "Timezone";
|
||||||
$string[thanks] = "Thanks";
|
$string[thanks] = "Thanks";
|
||||||
|
$string[today] = "Today";
|
||||||
$string[todaylogs] = "Today's logs";
|
$string[todaylogs] = "Today's logs";
|
||||||
$string[topic] = "Topic";
|
$string[topic] = "Topic";
|
||||||
$string[topicoutline] = "Topic outline";
|
$string[topicoutline] = "Topic outline";
|
||||||
|
@ -266,9 +279,11 @@ $string[turneditingoff] = "Turn editing off";
|
||||||
$string[turneditingon] = "Turn editing on";
|
$string[turneditingon] = "Turn editing on";
|
||||||
$string[unenrol] = "Unenrol";
|
$string[unenrol] = "Unenrol";
|
||||||
$string[unenrolme] = "Unenrol me from \$a";
|
$string[unenrolme] = "Unenrol me from \$a";
|
||||||
|
$string[unenrolsure] = "Are you sure you want to unenrol \$a from this course?";
|
||||||
$string[update] = "Update";
|
$string[update] = "Update";
|
||||||
$string[updated] = "Updated \$a";
|
$string[updated] = "Updated \$a";
|
||||||
$string[updatemyprofile] = "Update profile";
|
$string[updatemyprofile] = "Update profile";
|
||||||
|
$string[updatesevery] = "Updates every \$a seconds";
|
||||||
$string[updatethiscourse] = "Update this course";
|
$string[updatethiscourse] = "Update this course";
|
||||||
$string[upload] = "Upload";
|
$string[upload] = "Upload";
|
||||||
$string[uploadthisfile] = "Upload this file";
|
$string[uploadthisfile] = "Upload this file";
|
||||||
|
@ -294,5 +309,6 @@ $string[wordforstudenteg] = "eg Student, Participant etc";
|
||||||
$string[wrongpassword] = "Incorrect password for this username";
|
$string[wrongpassword] = "Incorrect password for this username";
|
||||||
$string[yes] = "Yes";
|
$string[yes] = "Yes";
|
||||||
$string[yourteacher] = "your \$a";
|
$string[yourteacher] = "your \$a";
|
||||||
|
$string[yourself] = "yourself";
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue