diff --git a/config.xml b/config.xml index 33e6375ec..8f99bd079 100644 --- a/config.xml +++ b/config.xml @@ -1,5 +1,5 @@ - + Moodle Moodle official app Moodle Mobile team @@ -122,7 +122,7 @@ - + diff --git a/src/addon/mod/quiz/pages/player/player.scss b/src/addon/mod/quiz/pages/player/player.scss index 0ee54c698..5766ea400 100644 --- a/src/addon/mod/quiz/pages/player/player.scss +++ b/src/addon/mod/quiz/pages/player/player.scss @@ -7,4 +7,8 @@ ion-app.app-root page-addon-mod-quiz-player { .core-has-fixed-timer form { padding-top: 56px; } + + .toolbar-ios .bar-buttons-ios .bar-button { + @include padding-horizontal($content-padding); + } } \ No newline at end of file diff --git a/src/addon/mod/quiz/providers/quiz-sync.ts b/src/addon/mod/quiz/providers/quiz-sync.ts index 67aca51a6..7e25e3891 100644 --- a/src/addon/mod/quiz/providers/quiz-sync.ts +++ b/src/addon/mod/quiz/providers/quiz-sync.ts @@ -285,7 +285,8 @@ export class AddonModQuizSyncProvider extends CoreSyncBaseProvider { // Attempt not found or it's finished in online. Discard it. warnings.push(this.translate.instant('addon.mod_quiz.warningattemptfinished')); - return this.finishSync(siteId, quiz, courseId, warnings, lastAttemptId, offlineAttempt, onlineAttempt, true); + return this.finishSync(siteId, quiz, courseId, warnings, offlineAttempt.id, offlineAttempt, onlineAttempt, + true); } // Get the data stored in offline. diff --git a/src/addon/qtype/multichoice/providers/handler.ts b/src/addon/qtype/multichoice/providers/handler.ts index 8eded4917..b543e3d97 100644 --- a/src/addon/qtype/multichoice/providers/handler.ts +++ b/src/addon/qtype/multichoice/providers/handler.ts @@ -151,4 +151,22 @@ export class AddonQtypeMultichoiceHandler implements CoreQuestionHandler { isSameResponseSingle(prevAnswers: any, newAnswers: any): boolean { return this.utils.sameAtKeyMissingIsBlank(prevAnswers, newAnswers, 'answer'); } + + /** + * Prepare and add to answers the data to send to server based in the input. Return promise if async. + * + * @param {any} question Question. + * @param {any} answers The answers retrieved from the form. Prepared answers must be stored in this object. + * @param {boolean} [offline] Whether the data should be saved in offline. + * @param {string} [siteId] Site ID. If not defined, current site. + * @return {void|Promise} Return a promise resolved when done if async, void if sync. + */ + prepareAnswers(question: any, answers: any, offline: boolean, siteId?: string): void | Promise { + if (question && !question.multi && typeof answers[question.optionsName] != 'undefined' && !answers[question.optionsName]) { + /* It's a single choice and the user hasn't answered. Delete the answer and its sequencecheck because + sending an empty string (default value) will mark the first option as selected. */ + delete answers[question.optionsName]; + delete answers[question.optionsName.replace('answer', ':sequencecheck')]; + } + } } diff --git a/src/app/app.scss b/src/app/app.scss index 3a4cf162f..04a8bb6cd 100644 --- a/src/app/app.scss +++ b/src/app/app.scss @@ -930,7 +930,7 @@ ion-app.app-root { } // Fix modals displayed over action sheet. - .disable-scroll ion-modal .ion-page { + &.disable-scroll ion-modal .ion-page { pointer-events: initial; } } diff --git a/src/components/local-file/core-local-file.html b/src/components/local-file/core-local-file.html index cad6c9347..fe68564d6 100644 --- a/src/components/local-file/core-local-file.html +++ b/src/components/local-file/core-local-file.html @@ -17,7 +17,7 @@