MDL-50524 mod_assign: preventsubmissionnotingroup for multiple groups
When preventsubmissionnotingroup and a user is in multiple groups, display relevant error messages to the user and teacher
This commit is contained in:
@@ -388,6 +388,8 @@ class assign_submission_status implements renderable {
|
||||
public $gradingstatus = '';
|
||||
/** @var bool preventsubmissionnotingroup */
|
||||
public $preventsubmissionnotingroup = 0;
|
||||
/** @var array usergroups */
|
||||
public $usergroups = array();
|
||||
|
||||
|
||||
/**
|
||||
@@ -422,6 +424,7 @@ class assign_submission_status implements renderable {
|
||||
* @param int $maxattempts - How many attempts can a student make?
|
||||
* @param string $gradingstatus - The submission status (ie. Graded, Not Released etc).
|
||||
* @param bool $preventsubmissionnotingroup - Prevent submission if user is not in a group
|
||||
* @param array $usergroups - Array containing all groups the user is assigned to
|
||||
*/
|
||||
public function __construct($allowsubmissionsfromdate,
|
||||
$alwaysshowdescription,
|
||||
@@ -451,7 +454,8 @@ class assign_submission_status implements renderable {
|
||||
$attemptreopenmethod,
|
||||
$maxattempts,
|
||||
$gradingstatus,
|
||||
$preventsubmissionnotingroup) {
|
||||
$preventsubmissionnotingroup,
|
||||
$usergroups) {
|
||||
$this->allowsubmissionsfromdate = $allowsubmissionsfromdate;
|
||||
$this->alwaysshowdescription = $alwaysshowdescription;
|
||||
$this->submission = $submission;
|
||||
@@ -481,6 +485,7 @@ class assign_submission_status implements renderable {
|
||||
$this->maxattempts = $maxattempts;
|
||||
$this->gradingstatus = $gradingstatus;
|
||||
$this->preventsubmissionnotingroup = $preventsubmissionnotingroup;
|
||||
$this->usergroups = $usergroups;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user