]> git.mjollnir.org Git - moodle.git/commitdiff
Changes related to language support ... get_string()
authormartin <martin>
Sun, 11 Aug 2002 15:41:54 +0000 (15:41 +0000)
committermartin <martin>
Sun, 11 Aug 2002 15:41:54 +0000 (15:41 +0000)
Minor little interface cleanups along the way

18 files changed:
course/delete.php
course/edit.html
course/edit.php
course/editsection.php
course/enrol.php
course/index.php
course/lib.php
course/log.php
course/loggraph.php
course/loginas.php
course/loglive.php
course/mod.php
course/mod_delete.html
course/social.php
course/teacher.php
course/unenrol.php
course/user.php
lang/en/moodle.php

index 6eed9b9107c73c3939352d6b5c7b2bde7c9ea179..1df4f60d7d3e0a43dfe949e97897ccb6084b1ed1 100644 (file)
@@ -1,4 +1,5 @@
 <?PHP // $Id$
+      // Admin-only code to delete a course utterly
 
        require("../config.php");
 
 
     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;
index 9ed0f07e58cb2340fff048a65f6013213a885b30..4e053c6d030a0c312554fee7730471e7cabcde54 100644 (file)
@@ -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>
                         "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><?
               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>
index e9b375899fed266954e367a202f264981d8043ec..cea61961025d2d2826fc1bf438870523fabdf4b9 100644 (file)
@@ -1,4 +1,5 @@
 <?PHP // $Id$
+      // Edit course settings
 
        require("../config.php");
        require("lib.php");
     }
 
     $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");
index 64437d7c9e792f13cafe0b910426f2138c3a5adb..beae84dcb3c11ecfe698456c1109d61f01335179 100644 (file)
@@ -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");
index 1c74a3131d6ad75106035522be75d17a5b9946f6..d39136b24e9fbefa48c610ce154d9e5c5ae3d30c 100644 (file)
@@ -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");
index 7c3bd4b7f138065a3e01c3e8aeb586e5b3fbbdac..5b3cdb3bd2cef16ca957f3e3b3a6454d6e60a578 100644 (file)
@@ -1,4 +1,5 @@
 <?PHP // $Id$
+      // Display list of all courses
 
     require("../config.php");
     require("lib.php");
index 52c8546e7e3ad3422276233ee432246f706b839b..487f241e763e4e87962ac1ad843569d0f17d0053 100644 (file)
@@ -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>&nbsp;&nbsp;";
     }
     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 "&nbsp; &nbsp; 
-          <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>";
 }
 
 ?>
index 9a5904b0037bf1f38092f1829dda7a9b451c0520..c925f164eb7f768dc36621748bef22f9d47ac83b 100644 (file)
@@ -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) ) {
 
         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);
index b47d980e4bde7a622a813b39f5e8e4b8daead9b8..73ded0d84f65ca61b05ff71454b0368ea9fad03d 100644 (file)
@@ -1,4 +1,5 @@
 <?PHP // $Id$
+      // Produces a graph of log accesses
 
     require("../config.php");
     require("lib.php");
index 2cc330a8c2134b86bff3505f67dd9db4efb3004c..98baf4fe78bb3f72dd8a2d20180c215013db234c 100644 (file)
@@ -1,4 +1,5 @@
 <?PHP // $Id$
+      // Allows a teacher/admin to login as another user (in stealth mode)
 
     require("../config.php");
     require("lib.php");
index 71d09bd65ffa65c856afcf1693f70e0dfe1c23ba..9a10cebb8a05c3d751e68edd74206e7f0b111bd6 100644 (file)
@@ -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");
         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;
index 2b5512a350f218a3e2cbaceb0e277a110251b0d4..2acd839d314e7edd53ac9f840f71d4545b1fcb64 100644 (file)
             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");
             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");
index 3512f44fdae28cec2663243043bcd92778e6528c..f904b0577d2ff142b5faaa3cfc06790f3913b9a0 100644 (file)
@@ -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) ?>">
index 979036a98b804fe81acb4fe91837024b6eea8b37..8207626c97502ded5145e167c9f9c4a302c82d6e 100644 (file)
   <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&section=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>";
       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 (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=\"\">";
+          }
+  
+          $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\">Turn editing off</A>";
+              $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\">Turn editing on</A>";
+              $admindata[]="<A HREF=\"view.php?id=$course->id&edit=on\">".get_string("turneditingon")."</A>";
           }
-
-          $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\">";
-
+  
+          print_simple_box(get_string("administration"),"CENTER", "100%", $THEME->cellheading);
           print_side_block("", $admindata, "", $adminicon);
       }
 
       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>";
     
index c9e32bfd20a0d2fd146683d06ac279829010bd3d..89939ced95833aaa089a463f1235d0c5ffa2bd19 100644 (file)
@@ -1,4 +1,5 @@
 <?PHP // $Id$
+      // Admin-only script to assign teachers to courses
 
        require("../config.php");
        require("../user/lib.php");
index ab538c702ee624dea958baca224adad3122a93c6..65277329c9407c184696f1e261506c678056e4cf 100644 (file)
     }
 
 
-    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");
     }
 
-    print_footer();
+    notice_yesno ($strunenrolsure, "unenrol.php?id=$id&user=$user->id&confirm=yes", "$HTTP_REFERER");
 
+    print_footer();
 
 ?>
index 0770c76b6733662ffe4d54e8b776ae48753e021e..726eacd9f9d7f8d04602b574306af8f5d85bdec7 100644 (file)
@@ -1,5 +1,7 @@
 <?PHP // $Id$
 
+// Display user activity reports for a course
+
     require("../config.php");
     require("lib.php");
 
index 17ca400f5f0faa4f8d798701a70a9311b9470024..02e9d715f1171375d1569d774f04a2a506f2eb42 100644 (file)
@@ -11,8 +11,11 @@ $string[address] = "Address";
 $string[admin] = "Admin";
 $string[administration] = "Administration";
 $string[again] = "again";
-$string[alllogs] = "All logs";
+$string[alldays] = "All days";
 $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[alreadyconfirmed] = "Registration has already been confirmed";
 $string[assignteachers] = "Assign teachers";
@@ -23,6 +26,8 @@ $string[changepassword] = "Change password";
 $string[changedpassword] = "Changed password";
 $string[changessaved] = "Changes saved";
 $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[city] = "City/town";
 $string[confirmed] = "Your registration has been confirmed";
@@ -43,7 +48,8 @@ $string[defaultcoursesummary] = "Write a concise and interesting paragraph here
 $string[defaultcourseteacher] = "Facilitator";
 $string[delete] = "Delete";
 $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[deleted] = "Deleted";
 $string[deletedactivity] = "Deleted \$a";
@@ -120,6 +126,7 @@ $string[lastmodified] = "Last modified";
 $string[lastname] = "Last name";
 $string[latestnews] = "Latest news";
 $string[listofallpeople] = "List of all people";
+$string[livelogs] = "Live logs from the past hour";
 $string[location] = "Location";
 $string[loggedinas] = "You are logged in as \$a.";
 $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[noteachersyet] = "No teachers in this course yet";
 $string[notenrolled] = "\$a is not enrolled in this course.";
+$string[nothingnew] = "Nothing new since your last login";
 $string[now] = "now";
 $string[numberweeks] = "Number of weeks/topics";
 $string[ok] = "OK";
@@ -228,8 +236,10 @@ $string[passwordsenttext] = "
 $string[people] = "People";
 $string[personalprofile] = "Personal profile";
 $string[phone] = "Phone";
-$string[returningtosite] = "Returning to this web site?";
 $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[savechanges] = "Save changes";
 $string[section] = "Section";
@@ -242,6 +252,8 @@ $string[showalltopics] = "Show all topics";
 $string[showallweeks] = "Show all weeks";
 $string[showonlytopic] = "Show only topic \$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[site] = "Site";
 $string[sites] = "Sites";
@@ -259,6 +271,7 @@ $string[teacheronly] = "for the \$a only";
 $string[textformat] = "Plain text format";
 $string[timezone] = "Timezone";
 $string[thanks] = "Thanks";
+$string[today] = "Today";
 $string[todaylogs] = "Today's logs";
 $string[topic] = "Topic";
 $string[topicoutline] = "Topic outline";
@@ -266,9 +279,11 @@ $string[turneditingoff] = "Turn editing off";
 $string[turneditingon] = "Turn editing on";
 $string[unenrol] = "Unenrol";
 $string[unenrolme] = "Unenrol me from \$a";
+$string[unenrolsure] = "Are you sure you want to unenrol \$a from this course?";
 $string[update] = "Update";
 $string[updated] = "Updated \$a";
 $string[updatemyprofile] = "Update profile";
+$string[updatesevery] = "Updates every \$a seconds";
 $string[updatethiscourse] = "Update this course";
 $string[upload] = "Upload";
 $string[uploadthisfile] = "Upload this file";
@@ -294,5 +309,6 @@ $string[wordforstudenteg] = "eg Student, Participant etc";
 $string[wrongpassword] = "Incorrect password for this username";
 $string[yes] = "Yes";
 $string[yourteacher] = "your \$a";
+$string[yourself] = "yourself";
 
 ?>