MDL-64811 mod_assign: fix webservice return type
This commit is contained in:
@@ -2509,8 +2509,10 @@ class mod_assign_external extends external_api {
|
||||
'submissionsenabled' => new external_value(PARAM_BOOL, 'Whether submissions are enabled or not.'),
|
||||
'submissionssubmittedcount' => new external_value(PARAM_INT, 'Number of submissions in submitted status.'),
|
||||
'submissionsneedgradingcount' => new external_value(PARAM_INT, 'Number of submissions that need grading.'),
|
||||
'warnofungroupedusers' => new external_value(PARAM_BOOL, 'Whether we need to warn people that there
|
||||
are users without groups.'),
|
||||
'warnofungroupedusers' => new external_value(PARAM_ALPHA, 'Whether we need to warn people that there
|
||||
are users without groups (\'warningrequired\'), warn
|
||||
people there are users who will submit in the default
|
||||
group (\'warningoptional\') or no warning (\'\').'),
|
||||
), 'Grading information.', VALUE_OPTIONAL
|
||||
),
|
||||
'lastattempt' => new external_single_structure(
|
||||
|
||||
@@ -754,7 +754,7 @@ class assign_grading_summary implements renderable {
|
||||
public $isvisible = true;
|
||||
|
||||
/** @var string no warning needed about group submissions */
|
||||
const WARN_GROUPS_NO = 'nowarning';
|
||||
const WARN_GROUPS_NO = false;
|
||||
/** @var string warn about group submissions, as groups are required */
|
||||
const WARN_GROUPS_REQUIRED = 'warnrequired';
|
||||
/** @var string warn about group submissions, as some will submit as 'Default group' */
|
||||
|
||||
@@ -2029,7 +2029,7 @@ class mod_assign_external_testcase extends externallib_advanced_testcase {
|
||||
$this->assertEquals(0, $result['gradingsummary']['submissiondraftscount']);
|
||||
$this->assertEquals(1, $result['gradingsummary']['submissionssubmittedcount']); // One student from G1 submitted.
|
||||
$this->assertEquals(1, $result['gradingsummary']['submissionsneedgradingcount']); // One student from G1 submitted.
|
||||
$this->assertFalse($result['gradingsummary']['warnofungroupedusers']);
|
||||
$this->assertEmpty($result['gradingsummary']['warnofungroupedusers']);
|
||||
|
||||
// Second group.
|
||||
$result = mod_assign_external::get_submission_status($assign->get_instance()->id, 0, $g2->id);
|
||||
|
||||
Reference in New Issue
Block a user