mirror of
https://github.com/moodle/moodle.git
synced 2025-08-09 19:06:41 +02:00
MDL-44725 Availability: Replace groupmembersonly - assign (10)
Updated code to restrict list of users. Also includes changes to ensure that a cm_info object is available (required for availability checks). There is a tweak to upgradelib to reflect the different fields used. (Note that upgradelib is not used during upgrade, but only when converting assignments from the old assignment module.)
This commit is contained in:
parent
c234c34085
commit
c13ac85db8
4 changed files with 32 additions and 14 deletions
|
@ -33,8 +33,8 @@ $urlparams = array('id' => $id,
|
|||
'useridlistid' => optional_param('action', 0, PARAM_INT));
|
||||
|
||||
$url = new moodle_url('/mod/assign/view.php', $urlparams);
|
||||
$cm = get_coursemodule_from_id('assign', $id, 0, false, MUST_EXIST);
|
||||
$course = $DB->get_record('course', array('id' => $cm->course), '*', MUST_EXIST);
|
||||
|
||||
list ($course, $cm) = get_course_and_cm_from_cmid($id, 'assign');
|
||||
|
||||
require_login($course, true, $cm);
|
||||
$PAGE->set_url($url);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue