MOBILE-2656 question: Move unknown string to cannotdeterminestatus

main
Pau Ferrer Ocaña 2018-10-08 12:21:30 +02:00
parent 1db6326908
commit 451312c9fa
6 changed files with 11 additions and 11 deletions

View File

@ -1435,6 +1435,7 @@
"core.pulltorefresh": "local_moodlemobileapp", "core.pulltorefresh": "local_moodlemobileapp",
"core.question.answer": "question", "core.question.answer": "question",
"core.question.answersaved": "question", "core.question.answersaved": "question",
"core.question.cannotdeterminestatus": "local_moodlemobileapp",
"core.question.certainty": "qbehaviour_deferredcbm", "core.question.certainty": "qbehaviour_deferredcbm",
"core.question.complete": "question", "core.question.complete": "question",
"core.question.correct": "question", "core.question.correct": "question",
@ -1452,7 +1453,6 @@
"core.question.questionmessage": "local_moodlemobileapp", "core.question.questionmessage": "local_moodlemobileapp",
"core.question.questionno": "question", "core.question.questionno": "question",
"core.question.requiresgrading": "question", "core.question.requiresgrading": "question",
"core.question.unknown": "question",
"core.quotausage": "moodle", "core.quotausage": "moodle",
"core.redirectingtosite": "local_moodlemobileapp", "core.redirectingtosite": "local_moodlemobileapp",
"core.refresh": "moodle", "core.refresh": "moodle",

View File

@ -124,13 +124,13 @@ export class AddonQbehaviourDeferredFeedbackHandler implements CoreQuestionBehav
} }
if (complete < 0) { if (complete < 0) {
newState = 'unknown'; newState = 'cannotdeterminestatus';
} else if (complete > 0) { } else if (complete > 0) {
newState = 'complete'; newState = 'complete';
} else { } else {
const gradable = this.questionDelegate.isGradableResponse(question, newBasicAnswers); const gradable = this.questionDelegate.isGradableResponse(question, newBasicAnswers);
if (gradable < 0) { if (gradable < 0) {
newState = 'unknown'; newState = 'cannotdeterminestatus';
} else if (gradable > 0) { } else if (gradable > 0) {
newState = 'invalid'; newState = 'invalid';
} else { } else {

View File

@ -124,7 +124,7 @@ export class AddonQbehaviourManualGradedHandler implements CoreQuestionBehaviour
} }
if (complete < 0) { if (complete < 0) {
newState = 'unknown'; newState = 'cannotdeterminestatus';
} else if (complete > 0) { } else if (complete > 0) {
newState = 'complete'; newState = 'complete';
} else { } else {

View File

@ -1435,6 +1435,7 @@
"core.pulltorefresh": "Pull to refresh", "core.pulltorefresh": "Pull to refresh",
"core.question.answer": "Answer", "core.question.answer": "Answer",
"core.question.answersaved": "Answer saved", "core.question.answersaved": "Answer saved",
"core.question.cannotdeterminestatus": "Cannot determine status",
"core.question.certainty": "Certainty", "core.question.certainty": "Certainty",
"core.question.complete": "Complete", "core.question.complete": "Complete",
"core.question.correct": "Correct", "core.question.correct": "Correct",
@ -1452,7 +1453,6 @@
"core.question.questionmessage": "Question {{$a}}: {{$b}}", "core.question.questionmessage": "Question {{$a}}: {{$b}}",
"core.question.questionno": "Question {{$a}}", "core.question.questionno": "Question {{$a}}",
"core.question.requiresgrading": "Requires grading", "core.question.requiresgrading": "Requires grading",
"core.question.unknown": "Unknown",
"core.quotausage": "You have currently used {{$a.used}} of your {{$a.total}} limit.", "core.quotausage": "You have currently used {{$a.used}} of your {{$a.total}} limit.",
"core.redirectingtosite": "You will be redirected to the site.", "core.redirectingtosite": "You will be redirected to the site.",
"core.refresh": "Refresh", "core.refresh": "Refresh",

View File

@ -1,6 +1,7 @@
{ {
"answer": "Answer", "answer": "Answer",
"answersaved": "Answer saved", "answersaved": "Answer saved",
"cannotdeterminestatus": "Cannot determine status",
"certainty": "Certainty", "certainty": "Certainty",
"complete": "Complete", "complete": "Complete",
"correct": "Correct", "correct": "Correct",
@ -17,6 +18,5 @@
"partiallycorrect": "Partially correct", "partiallycorrect": "Partially correct",
"questionmessage": "Question {{$a}}: {{$b}}", "questionmessage": "Question {{$a}}: {{$b}}",
"questionno": "Question {{$a}}", "questionno": "Question {{$a}}",
"requiresgrading": "Requires grading", "requiresgrading": "Requires grading"
"unknown": "Unknown"
} }

View File

@ -230,10 +230,10 @@ export class CoreQuestionProvider {
active: false, active: false,
finished: true finished: true
}, },
unknown: { // Special state for Mobile, sometimes we won't have enough data to detemrine the state. cannotdeterminestatus: { // Special state for Mobile, sometimes we won't have enough data to detemrine the state.
name: 'unknown', name: 'cannotdeterminestatus',
class: 'core-question-unknown', class: 'core-question-unknown',
status: 'unknown', status: 'cannotdeterminestatus',
active: true, active: true,
finished: false finished: false
} }
@ -438,7 +438,7 @@ export class CoreQuestionProvider {
* @return {CoreQuestionState} State. * @return {CoreQuestionState} State.
*/ */
getState(name: string): CoreQuestionState { getState(name: string): CoreQuestionState {
return this.STATES[name || 'unknown']; return this.STATES[name || 'cannotdeterminestatus'];
} }
/** /**