Files
moodle/group/groupui/index.php
T
nicolasconnault 7c08ef3653 Fixed MDL-8582
Not sure if the hotpot module is converting ampersands correctly. $heading and $title are set up differently than in other modules: instead of outputting $course->title, a temporary $title variable is created and assigned that value. That made it difficult for me to decide whether it was already formatted elsewhere or not.

Also I didn't format_string() any of the variables included in $navigation rings, because I assume these strings get processed by print_navigation(), which includes format_string().
2007-02-28 05:36:13 +00:00

64 lines
1.8 KiB
PHP

<?php // $Id$
/**
* The main group management user interface.
*
* @copyright &copy; 2006 The Open University
* @author J.White AT open.ac.uk
* @license http://www.gnu.org/copyleft/gpl.html GNU Public License
* @package groups
*/
require_once('../../config.php');
require_once('../lib/lib.php');
//require_once('../../course/lib.php');
require_once($CFG->libdir.'/moodlelib.php');
require_once($CFG->libdir.'/uploadlib.php');
$error = false;
$courseid = required_param('id', PARAM_INTEGER);
// Get the course information so we can print the header and check the course id
// is valid
$course = groups_get_course_info($courseid);
if (!$course) {
$error = true;
print_error('The course id is invalid');
}
if (!$error) {
// Make sure that the user is a teacher with edit permission for this course
require_login($courseid);
if (!isteacheredit($courseid)) {
redirect();
}
// Set the session key so we can check this later
$sesskey = !empty($USER->id) ? $USER->sesskey : '';
if (!empty($CFG->gdversion)) { //TODO: and $maxbytes)
$printuploadpicture = true;
} else {
$printuploadpicture = false;
}
$maxbytes = get_max_upload_file_size($CFG->maxbytes, $course->maxbytes);
$strgroups = get_string('groups');
$strparticipants = get_string('participants');
// Print the page and form
print_header("$course->shortname: $strgroups",
$course->fullname,
"<a href=\"$CFG->wwwroot/course/view.php?id=$courseid\">$course->shortname</a> ".
"-> <a href=\"$CFG->wwwroot/user/index.php?id=$courseid\">$strparticipants</a> ".
"-> $strgroups", "", "", true, '', user_login_string($course, $USER));
//TODO: set to false in /course/group.php
$usehtmleditor = false;
require_once('form.html');
print_footer($course);
}
?>