diff --git a/src/addons/mod/quiz/components/attempt-info/attempt-info.ts b/src/addons/mod/quiz/components/attempt-info/attempt-info.ts index ebb7be876..25c0498ac 100644 --- a/src/addons/mod/quiz/components/attempt-info/attempt-info.ts +++ b/src/addons/mod/quiz/components/attempt-info/attempt-info.ts @@ -49,7 +49,7 @@ export class AddonModQuizAttemptInfoComponent implements OnChanges { if (changes.additionalData) { this.additionalData?.forEach((data) => { // Remove help links from additional data. - data.content = CoreDomUtils.removeElementFromHtml(data.content, '.helptooltip'); + data.content = CoreDomUtils.removeElementFromHtml(data.content, '.helptooltip, [data-toggle="popover"]'); }); } diff --git a/src/addons/mod/quiz/components/index/index.scss b/src/addons/mod/quiz/components/index/index.scss index 647124ebb..b10c69da8 100644 --- a/src/addons/mod/quiz/components/index/index.scss +++ b/src/addons/mod/quiz/components/index/index.scss @@ -10,6 +10,9 @@ .addon-mod_quiz-grade-result { margin-top: var(--mdl-spacing-2); + ion-label { + @include margin-horizontal(0px, 0px); + } .addon-mod_quiz-grade-overridden-notice { margin-top: var(--mdl-spacing-2); diff --git a/src/addons/mod/quiz/services/quiz.ts b/src/addons/mod/quiz/services/quiz.ts index e360df44c..44a948489 100644 --- a/src/addons/mod/quiz/services/quiz.ts +++ b/src/addons/mod/quiz/services/quiz.ts @@ -30,7 +30,6 @@ import { import { CoreQuestionDelegate } from '@features/question/services/question-delegate'; import { CoreSites, CoreSitesCommonWSOptions, CoreSitesReadingStrategy } from '@services/sites'; import { CoreDomUtils } from '@services/utils/dom'; -import { CoreTextUtils } from '@services/utils/text'; import { CoreTimeUtils } from '@services/utils/time'; import { CoreUtils } from '@services/utils/utils'; import { CoreStatusWithWarningsWSResponse, CoreWSExternalFile, CoreWSExternalWarning } from '@services/ws'; @@ -96,7 +95,7 @@ export class AddonModQuizProvider { return Translate.instant('addon.mod_quiz.notyetgraded'); } - return CoreUtils.formatFloat(CoreTextUtils.roundToDecimals(grade, decimals)); + return CoreUtils.formatFloat(grade.toFixed(decimals ?? 2)); } /** diff --git a/src/addons/mod/quiz/tests/behat/attempts_list.feature b/src/addons/mod/quiz/tests/behat/attempts_list.feature index dea9c5de4..6d8e70a8f 100644 --- a/src/addons/mod/quiz/tests/behat/attempts_list.feature +++ b/src/addons/mod/quiz/tests/behat/attempts_list.feature @@ -33,8 +33,8 @@ Feature: View list of attempts in the app Given I entered the quiz activity "Quiz 1" on course "Course 1" as "student1" in the app Then I should find "In progress" within "Attempt 2" "ion-item" in the app And I should find "Finished" within "Attempt 1" "ion-item" in the app - And I should find "100 / 100" within "Attempt 1" "ion-item" in the app - But I should not find "100" within "Attempt 2" "ion-item" in the app + And I should find "100.00 / 100.00" within "Attempt 1" "ion-item" in the app + But I should not find "100.00" within "Attempt 2" "ion-item" in the app And I should not find "Started" within "Your attempts" "ion-card" in the app And I should not find "Completed" within "Your attempts" "ion-card" in the app And I should not find "Marks" within "Your attempts" "ion-card" in the app @@ -43,7 +43,7 @@ Feature: View list of attempts in the app When I press "Attempt 1" in the app Then I should find "Started" within "Your attempts" "ion-card" in the app And I should find "Completed" in the app - And I should find "1/1" within "Marks" "ion-item" in the app + And I should find "1.00/1.00" within "Marks" "ion-item" in the app And I should be able to press "Review" in the app @lms_from4.2 @@ -51,7 +51,7 @@ Feature: View list of attempts in the app Given the attempt at "Quiz 1" by "student1" was never submitted And I entered the quiz activity "Quiz 1" on course "Course 1" as "student1" in the app Then I should find "Never submitted" within "Attempt 2" "ion-item" in the app - But I should not find "100" within "Attempt 2" "ion-item" in the app + But I should not find "100.00" within "Attempt 2" "ion-item" in the app When I press "Attempt 2" in the app Then I should find "Started" within "Your attempts" "ion-card" in the app diff --git a/src/addons/mod/quiz/tests/behat/snapshots/attempt-a-quiz-in-app-submit-a-quiz--review-a-quiz-attempt_40.png b/src/addons/mod/quiz/tests/behat/snapshots/attempt-a-quiz-in-app-submit-a-quiz--review-a-quiz-attempt_40.png index 679b91517..74d4c6b57 100644 Binary files a/src/addons/mod/quiz/tests/behat/snapshots/attempt-a-quiz-in-app-submit-a-quiz--review-a-quiz-attempt_40.png and b/src/addons/mod/quiz/tests/behat/snapshots/attempt-a-quiz-in-app-submit-a-quiz--review-a-quiz-attempt_40.png differ diff --git a/src/core/features/question/question.scss b/src/core/features/question/question.scss index b4f39d6ad..369bf2ea9 100644 --- a/src/core/features/question/question.scss +++ b/src/core/features/question/question.scss @@ -38,10 +38,10 @@ .specificfeedback, .rightanswer, .im-feedback, .feedback, .generalfeedback { margin: 0 0 .5em; - } - p { - --color: var(--core-question-feedback-color); + p { + --color: var(--core-question-feedback-color); + } } .correctness {