Skip to content

Commit

Permalink
Show course access (guest, password etc) on non-editing screens
Browse files Browse the repository at this point in the history
  • Loading branch information
moodler committed Aug 11, 2003
1 parent 49d3bab commit 3d95bdb
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 5 deletions.
23 changes: 18 additions & 5 deletions course/category.php
Expand Up @@ -204,7 +204,7 @@
} else {

$strcourses = get_string("courses");
$strmove = get_string("move");
$strselect = get_string("select");
$stredit = get_string("edit");
$strdelete = get_string("delete");
$strbackup = get_string("backup");
Expand All @@ -214,6 +214,8 @@
$strhide = get_string("hide");
$strshow = get_string("show");
$strassignteachers = get_string("assignteachers");
$strallowguests = get_string("allowguests");
$strrequireskey = get_string("requireskey");

if (empty($THEME->custompix)) {
$pixpath = "$CFG->wwwroot/pix";
Expand All @@ -228,8 +230,10 @@
if ($creatorediting) {
echo "<th>$stredit</th>";
if ($adminediting) {
echo "<th>$strmove</th>";
echo "<th>$strselect</th>";
}
} else {
echo "<th>&nbsp;</th>";
}
echo "</tr>";

Expand Down Expand Up @@ -280,12 +284,21 @@
echo "<input type=\"checkbox\" name=\"c$course->id\">";
$abletomovecourses = true;

} else if (isteacher($course->id)) {
} else if (isteacher($course->id)) {
echo "<td>";
echo "<a title=\"$strassignteachers\" href=\"$CFG->wwwroot/$CFG->admin/teacher.php?id=$course->id\"><img".
" src=\"$pixpath/t/user.gif\" height=11 width=11 border=0></a> ";
}
echo "</td>";
}
echo "</td>";
} else {
echo "<td>";
if ($course->guest ) {
echo "<img title=\"$strallowguests\" alt=\"\" height=16 width=16 border=0 src=\"$pixpath/i/user.gif\">";
}
if ($course->password) {
echo "<img title=\"$strrequireskey\" alt=\"\" height=16 width=16 border=0 src=\"$pixpath/i/key.gif\">";
}
echo "</td>";
}
echo "</tr>";
}
Expand Down
1 change: 1 addition & 0 deletions lang/en/moodle.php
Expand Up @@ -632,6 +632,7 @@
$string['secs'] = "secs";
$string['section'] = "Section";
$string['sections'] = "Sections";
$string['select'] = "Select";
$string['selectacountry'] = "Select a country";
$string['selectednowmove'] = "\$a files selected for moving. Now go to the destination and press 'Move files to here'";
$string['senddetails'] = "Send my details via email";
Expand Down

0 comments on commit 3d95bdb

Please sign in to comment.