Skip to content

Commit

Permalink
Tweaks and cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
martin committed Aug 8, 2002
1 parent 4606d9b commit adecd14
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions course/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -497,12 +497,12 @@ function print_side_block($heading="", $list=NULL, $footer="", $icons=NULL) {
echo "</TABLE><BR>\n\n";
}

function print_admin_links () {
function print_admin_links ($siteid) {
global $THEME, $CFG;

print_simple_box(get_string("administration"), $align="CENTER", $width="100%", $color="$THEME->cellheading");
$icon = "<IMG SRC=\"$CFG->wwwroot/pix/i/settings.gif\" HEIGHT=16 WIDTH=16 ALT=\"\">";
$moddata[]="<A HREF=\"$CFG->wwwroot/course/log.php?id=$site->id\">".get_string("sitelogs")."</A>";
$moddata[]="<A HREF=\"$CFG->wwwroot/course/log.php?id=$siteid\">".get_string("sitelogs")."</A>";
$modicon[]=$icon;
$moddata[]="<A HREF=\"$CFG->wwwroot/admin/site.php\">".get_string("sitesettings")."</A>";
$modicon[]=$icon;
Expand Down
2 changes: 1 addition & 1 deletion course/loggraph.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
require_variable($id); // Course ID
require_variable($type); // Graph Type
optional_variable($user); // Student ID
optional_variable($date); // Midnight of a date
optional_variable($date); // A time of a day (in GMT)

if (! $course = get_record("course", "id", $id)) {
error("Course is misconfigured");
Expand Down
2 changes: 1 addition & 1 deletion course/loginas.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
error("Only teachers can use this page!");
}

if (!isstudent($course->id, $user)) {
if ($course->category and !isstudent($course->id, $user)) {
error("This student is not in this course!");
}

Expand Down
2 changes: 1 addition & 1 deletion course/user.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
switch ($mode) {
case "todaylogs" :
echo "<HR><CENTER>";
print_log_graph($course, $user->id, "userday.png", time() );
print_log_graph($course, $user->id, "userday.png");
echo "</CENTER>";
print_log($course, $user->id, usergetmidnight(time()), "ORDER BY l.time DESC");
break;
Expand Down

0 comments on commit adecd14

Please sign in to comment.