MOBILE-3196 assign: Warn about falling into Default group

main
Pau Ferrer Ocaña 2019-10-21 16:41:35 +02:00
parent af25b287d4
commit 775dfbaee9
6 changed files with 24 additions and 3 deletions

View File

@ -405,6 +405,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",
@ -1565,7 +1566,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",

View File

@ -86,7 +86,7 @@
<!-- Ungrouped users. -->
<div *ngIf="assign.teamsubmission && summary && summary.warnofungroupedusers" class="core-info-card" icon-start>
<ion-icon name="information-circle"></ion-icon>
{{ 'addon.mod_assign.ungroupedusers' | translate }}
{{ 'addon.mod_assign.'+summary.warnofungroupedusers | translate }}
</div>
</ion-list>

View File

@ -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');

View File

@ -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}}",

View File

@ -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.
};
/**

View File

@ -404,6 +404,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}}",