diff --git a/scripts/langindex.json b/scripts/langindex.json index 0cbf1d82e..daac220eb 100644 --- a/scripts/langindex.json +++ b/scripts/langindex.json @@ -410,6 +410,7 @@ "addon.mod_assign.timemodified": "assign", "addon.mod_assign.timeremaining": "assign", "addon.mod_assign.ungroupedusers": "assign", + "addon.mod_assign.ungroupedusersoptional": "assign", "addon.mod_assign.unlimitedattempts": "assign", "addon.mod_assign.userswhoneedtosubmit": "assign", "addon.mod_assign.userwithid": "local_moodlemobileapp", @@ -1571,7 +1572,6 @@ "core.login.auth_email": "auth_email/pluginname", "core.login.authenticating": "local_moodlemobileapp", "core.login.cancel": "moodle", - "core.login.changepassowrdinstructions": "local_moodlemobileapp", "core.login.changepassword": "moodle", "core.login.changepasswordbutton": "local_moodlemobileapp", "core.login.changepasswordhelp": "local_moodlemobileapp", diff --git a/src/addon/mod/assign/components/index/addon-mod-assign-index.html b/src/addon/mod/assign/components/index/addon-mod-assign-index.html index 3e118e578..4ccbf69c2 100644 --- a/src/addon/mod/assign/components/index/addon-mod-assign-index.html +++ b/src/addon/mod/assign/components/index/addon-mod-assign-index.html @@ -86,7 +86,7 @@
- {{ 'addon.mod_assign.ungroupedusers' | translate }} + {{ 'addon.mod_assign.'+summary.warnofungroupedusers | translate }}
diff --git a/src/addon/mod/assign/components/index/index.ts b/src/addon/mod/assign/components/index/index.ts index 1d37fe6ac..b392abef3 100644 --- a/src/addon/mod/assign/components/index/index.ts +++ b/src/addon/mod/assign/components/index/index.ts @@ -235,6 +235,21 @@ export class AddonModAssignIndexComponent extends CoreCourseModuleMainActivityCo return this.assignProvider.getSubmissionStatus(this.assign.id, undefined, this.group).then((response) => { this.summary = response.gradingsummary; + if (typeof this.summary.warnofungroupedusers == 'boolean' && this.summary.warnofungroupedusers) { + this.summary.warnofungroupedusers = 'ungroupedusers'; + } else { + switch (this.summary.warnofungroupedusers) { + case AddonModAssignProvider.WARN_GROUPS_REQUIRED: + this.summary.warnofungroupedusers = 'ungroupedusers'; + break; + case AddonModAssignProvider.WARN_GROUPS_OPTIONAL: + this.summary.warnofungroupedusers = 'ungroupedusersoptional'; + break; + default: + this.summary.warnofungroupedusers = ''; + break; + } + } this.needsGradingAvalaible = response.gradingsummary && response.gradingsummary.submissionsneedgradingcount > 0 && this.sitesProvider.getCurrentSite().isVersionGreaterEqualThan('3.2'); diff --git a/src/addon/mod/assign/lang/en.json b/src/addon/mod/assign/lang/en.json index 9436ddd36..fb0908c5d 100644 --- a/src/addon/mod/assign/lang/en.json +++ b/src/addon/mod/assign/lang/en.json @@ -93,6 +93,7 @@ "timemodified": "Last modified", "timeremaining": "Time remaining", "ungroupedusers": "The setting 'Require group to make submission' is enabled and some users are either not a member of any group, or are a member of more than one group, so are unable to make submissions.", + "ungroupedusersoptional": "The setting 'Students submit in groups' is enabled and some users are either not a member of any group, or are a member of more than one group. Please be aware that these students will submit as members of the 'Default group'.", "unlimitedattempts": "Unlimited", "userwithid": "User with ID {{id}}", "userswhoneedtosubmit": "Users who need to submit: {{$a}}", diff --git a/src/addon/mod/assign/providers/assign.ts b/src/addon/mod/assign/providers/assign.ts index 44465a59f..34c02701d 100644 --- a/src/addon/mod/assign/providers/assign.ts +++ b/src/addon/mod/assign/providers/assign.ts @@ -55,6 +55,10 @@ export class AddonModAssignProvider { static NEED_GRADING = 'needgrading'; static GRADED_FOLLOWUP_SUBMIT = 'gradedfollowupsubmit'; + // Group submissions warnings. + static WARN_GROUPS_REQUIRED = 'warnrequired'; + static WARN_GROUPS_OPTIONAL = 'warnoptional'; + // Events. static SUBMISSION_SAVED_EVENT = 'addon_mod_assign_submission_saved'; static SUBMITTED_FOR_GRADING_EVENT = 'addon_mod_assign_submitted_for_grading'; @@ -1396,7 +1400,7 @@ export type AddonModAssignSubmissionGradingSummary = { submissionsenabled: boolean; // Whether submissions are enabled or not. submissionssubmittedcount: number; // Number of submissions in submitted status. submissionsneedgradingcount: number; // Number of submissions that need grading. - warnofungroupedusers: string; // Whether we need to warn people about groups. + warnofungroupedusers: string | boolean; // Whether we need to warn people about groups. }; /** diff --git a/src/assets/lang/en.json b/src/assets/lang/en.json index 885e7adab..b7de06e75 100644 --- a/src/assets/lang/en.json +++ b/src/assets/lang/en.json @@ -409,6 +409,7 @@ "addon.mod_assign.timemodified": "Last modified", "addon.mod_assign.timeremaining": "Time remaining", "addon.mod_assign.ungroupedusers": "The setting 'Require group to make submission' is enabled and some users are either not a member of any group, or are a member of more than one group, so are unable to make submissions.", + "addon.mod_assign.ungroupedusersoptional": "The setting 'Students submit in groups' is enabled and some users are either not a member of any group, or are a member of more than one group. Please be aware that these students will submit as members of the 'Default group'.", "addon.mod_assign.unlimitedattempts": "Unlimited", "addon.mod_assign.userswhoneedtosubmit": "Users who need to submit: {{$a}}", "addon.mod_assign.userwithid": "User with ID {{id}}",