diff --git a/src/addons/mod/choice/components/index/addon-mod-choice-index.html b/src/addons/mod/choice/components/index/addon-mod-choice-index.html index 6ef6a30cc..f5620647c 100644 --- a/src/addons/mod/choice/components/index/addon-mod-choice-index.html +++ b/src/addons/mod/choice/components/index/addon-mod-choice-index.html @@ -96,7 +96,11 @@ - + +

- - - - -

{{user.fullname}}

-
+ + + + +

{{user.fullname}}

+
+
+
diff --git a/src/addons/mod/choice/components/index/index.ts b/src/addons/mod/choice/components/index/index.ts index 2597bde19..a43fc8c58 100644 --- a/src/addons/mod/choice/components/index/index.ts +++ b/src/addons/mod/choice/components/index/index.ts @@ -446,6 +446,15 @@ export class AddonModChoiceIndexComponent extends CoreCourseModuleMainActivityCo } } + /** + * Toggle list of users in a result visible. + * + * @param result Result to expand. + */ + toggle(result: AddonModChoiceResultFormatted): void { + result.expanded = !result.expanded; + } + /** * Performs the sync of the activity. * @@ -472,4 +481,5 @@ export class AddonModChoiceIndexComponent extends CoreCourseModuleMainActivityCo */ export type AddonModChoiceResultFormatted = AddonModChoiceResult & { percentageamountfixed: string; // Percentage of users answers with fixed decimals. + expanded?: boolean; };