From 13b4d01de691d023b486785772dd5de5071d1e8c Mon Sep 17 00:00:00 2001 From: Dani Palou Date: Fri, 7 Aug 2020 11:43:09 +0200 Subject: [PATCH] MOBILE-3514 choice: Show available spaces if enabled --- scripts/langindex.json | 2 ++ .../index/addon-mod-choice-index.html | 20 +++++++++++++++++-- src/addon/mod/choice/lang/en.json | 2 ++ src/assets/lang/en.json | 2 ++ 4 files changed, 24 insertions(+), 2 deletions(-) diff --git a/scripts/langindex.json b/scripts/langindex.json index 8bd92d9cc..e81fe2ab9 100644 --- a/scripts/langindex.json +++ b/scripts/langindex.json @@ -463,6 +463,7 @@ "addon.mod_choice.errorgetchoice": "local_moodlemobileapp", "addon.mod_choice.expired": "choice", "addon.mod_choice.full": "choice", + "addon.mod_choice.limita": "choice", "addon.mod_choice.modulenameplural": "choice", "addon.mod_choice.noresultsviewable": "choice", "addon.mod_choice.notopenyet": "choice", @@ -476,6 +477,7 @@ "addon.mod_choice.publishinfonever": "choice", "addon.mod_choice.removemychoice": "choice", "addon.mod_choice.responses": "choice", + "addon.mod_choice.responsesa": "choice", "addon.mod_choice.responsesresultgraphdescription": "local_moodlemobileapp", "addon.mod_choice.responsesresultgraphheader": "choice", "addon.mod_choice.resultsnotsynced": "local_moodlemobileapp", diff --git a/src/addon/mod/choice/components/index/addon-mod-choice-index.html b/src/addon/mod/choice/components/index/addon-mod-choice-index.html index bc5de5829..5cc0b88b7 100644 --- a/src/addon/mod/choice/components/index/addon-mod-choice-index.html +++ b/src/addon/mod/choice/components/index/addon-mod-choice-index.html @@ -43,13 +43,17 @@ - {{ 'addon.mod_choice.full' | translate }} + + + - {{ 'addon.mod_choice.full' | translate }} + + + @@ -81,6 +85,7 @@

{{ 'addon.mod_choice.numberofuser' | translate }}: {{ result.numberofuser }} ({{ 'core.percentagenumber' | translate: {$a: result.percentageamountfixed} }})

+

{{ 'addon.mod_choice.limita' | translate:{$a: result.maxanswer} }}

@@ -95,3 +100,14 @@

{{ 'addon.mod_choice.noresultsviewable' | translate }}

+ + + +

+ {{ 'addon.mod_choice.full' | translate }} +

+ +

{{ 'addon.mod_choice.responsesa' | translate:{$a: option.countanswers} }}

+

{{ 'addon.mod_choice.limita' | translate:{$a: option.maxanswers} }}

+
+
diff --git a/src/addon/mod/choice/lang/en.json b/src/addon/mod/choice/lang/en.json index e5c48508f..7adee8f2e 100644 --- a/src/addon/mod/choice/lang/en.json +++ b/src/addon/mod/choice/lang/en.json @@ -4,6 +4,7 @@ "errorgetchoice": "Error getting choice data.", "expired": "This activity closed on {{$a}}.", "full": "(Full)", + "limita": "Limit: {{$a}}", "modulenameplural": "Choices", "noresultsviewable": "The results are not currently viewable.", "notopenyet": "This activity is not available until {{$a}}.", @@ -17,6 +18,7 @@ "publishinfonever": "The results of this activity will not be published after you answer.", "removemychoice": "Remove my choice", "responses": "Responses", + "responsesa": "Responses: {{$a}}", "responsesresultgraphdescription": "{{number}}% of the users chose the option: {{text}}.", "responsesresultgraphheader": "Graph display", "resultsnotsynced": "Your last response must be synchronised before it is included in the results.", diff --git a/src/assets/lang/en.json b/src/assets/lang/en.json index ddd310e2a..de2c07ce6 100644 --- a/src/assets/lang/en.json +++ b/src/assets/lang/en.json @@ -463,6 +463,7 @@ "addon.mod_choice.errorgetchoice": "Error getting choice data.", "addon.mod_choice.expired": "This activity closed on {{$a}}.", "addon.mod_choice.full": "(Full)", + "addon.mod_choice.limita": "Limit: {{$a}}", "addon.mod_choice.modulenameplural": "Choices", "addon.mod_choice.noresultsviewable": "The results are not currently viewable.", "addon.mod_choice.notopenyet": "This activity is not available until {{$a}}.", @@ -476,6 +477,7 @@ "addon.mod_choice.publishinfonever": "The results of this activity will not be published after you answer.", "addon.mod_choice.removemychoice": "Remove my choice", "addon.mod_choice.responses": "Responses", + "addon.mod_choice.responsesa": "Responses: {{$a}}", "addon.mod_choice.responsesresultgraphdescription": "{{number}}% of the users chose the option: {{text}}.", "addon.mod_choice.responsesresultgraphheader": "Graph display", "addon.mod_choice.resultsnotsynced": "Your last response must be synchronised before it is included in the results.",