JI-3031 Fix replace submit button for submit button Question set (#87)

master
Ravi Majithia 2022-01-05 16:50:33 +01:00 committed by GitHub
parent dad9bbe937
commit 058a129a45
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
44 changed files with 355 additions and 2 deletions

View File

@ -35,6 +35,7 @@ H5P.QuestionSet = function (options, contentId, contentData) {
prevButton: 'Previous question',
nextButton: 'Next question',
finishButton: 'Finish',
submitButton: 'Submit',
textualProgress: 'Question: @current of @total questions',
jumpToQuestion: 'Question %d of %total',
questionLabel: 'Question',
@ -55,6 +56,7 @@ H5P.QuestionSet = function (options, contentId, contentData) {
},
overallFeedback: [],
finishButtonText: 'Finish',
submitButtonText: 'Submit',
solutionButtonText: 'Show solution',
retryButtonText: 'Retry',
showAnimations: false,
@ -65,6 +67,8 @@ H5P.QuestionSet = function (options, contentId, contentData) {
override: {},
disableBackwardsNavigation: false
};
this.isSubmitting = contentData
&& (contentData.isScoringEnabled || contentData.isReportingEnabled);
var params = $.extend(true, {}, defaults, options);
var texttemplate =
@ -750,7 +754,7 @@ H5P.QuestionSet = function (options, contentId, contentData) {
message: params.endGame.showResultPage ? params.endGame.message : params.endGame.noResultMessage,
comment: params.endGame.showResultPage ? (success ? params.endGame.oldFeedback.successGreeting : params.endGame.oldFeedback.failGreeting) : undefined,
resulttext: params.endGame.showResultPage ? (success ? params.endGame.oldFeedback.successComment : params.endGame.oldFeedback.failComment) : undefined,
finishButtonText: params.endGame.finishButtonText,
finishButtonText: (self.isSubmitting) ? params.endGame.submitButtonText : params.endGame.finishButtonText,
solutionButtonText: params.endGame.solutionButtonText,
retryButtonText: params.endGame.retryButtonText
};
@ -873,7 +877,8 @@ H5P.QuestionSet = function (options, contentId, contentData) {
registerImageLoadedListener(question);
// Add finish button
question.addButton('finish', params.texts.finishButton,
const finishButtonText = (self.isSubmitting) ? params.texts.submitButton : params.endGame.finishButton
question.addButton('finish', finishButtonText,
moveQuestion.bind(this, 1), false);
// Add next button

View File

@ -75,6 +75,10 @@
"label": "Finish button",
"default": "Finish"
},
{
"label": "Submit button",
"default": "Submit"
},
{
"label": "Progress text",
"description": "Text used if textual progress is selected.",
@ -204,6 +208,10 @@
"label": "Finish button text",
"default": "Finish"
},
{
"label": "Submit button text",
"default": "Submit"
},
{
"label": "Display video before quiz results"
},

View File

@ -75,6 +75,10 @@
"label": "Klaar knoppie",
"default": "Klaar"
},
{
"label": "Submit button",
"default": "Submit"
},
{
"label": "Vordering teks",
"description": "Teks gebruik indien tektuele vordering gekies is.",
@ -204,6 +208,10 @@
"label": "Klaar knoppieteks",
"default": "Klaar"
},
{
"label": "Submit button text",
"default": "Submit"
},
{
"label": "Vertoon video voor vasvra uitslae"
},

View File

@ -75,6 +75,10 @@
"label": "زر الانتهاء",
"default": "Finish"
},
{
"label": "Submit button",
"default": "Submit"
},
{
"label": "نص التقدم",
"description": "النص المستخدم إذا تم تحديد التقدم نصيا",
@ -204,6 +208,10 @@
"label": "نص زر الانتهاء",
"default": "Finish"
},
{
"label": "Submit button text",
"default": "Submit"
},
{
"label": "عرض الفيديو قبل نتائج المسابقة"
},

View File

@ -75,6 +75,10 @@
"label": "Бутон Край",
"default": "Край"
},
{
"label": "Submit button",
"default": "Submit"
},
{
"label": "Текст за напредък",
"description": "Текст, който се използва в случай, че е избран да се показва напредъка.",
@ -204,6 +208,10 @@
"label": "Текст за бутон Край",
"default": "Край"
},
{
"label": "Submit button text",
"default": "Submit"
},
{
"label": "Показване на видео преди резултатите от теста"
},

View File

@ -75,6 +75,10 @@
"label": "Oznaka za dugme \"Završi\"",
"default": "Kraj"
},
{
"label": "Submit button",
"default": "Submit"
},
{
"label": "Početni tekst",
"description": "Koristi tekst ako je izabran za napredak u pisanom obliku.",
@ -204,6 +208,10 @@
"label": "Prikaži video prije rezultata kviza",
"default": "Kraj"
},
{
"label": "Submit button text",
"default": "Submit"
},
{
"label": "Aktiviraj dugme \"Preskoči vidio\""
},

View File

@ -75,6 +75,10 @@
"label": "Botó \"Finalitza\"",
"default": "Finalitza"
},
{
"label": "Submit button",
"default": "Submit"
},
{
"label": "Text del progrés",
"description": "Text que sutilitza si se selecciona el progrés textual.",
@ -204,6 +208,10 @@
"label": "Text del botó \"Finalitza\"",
"default": "Finalitza"
},
{
"label": "Submit button text",
"default": "Submit"
},
{
"label": "Mostra el vídeo abans dels resultats del qüestionari"
},

View File

@ -75,6 +75,10 @@
"label": "Tlačítko Dokončit",
"default": "Dokončit"
},
{
"label": "Submit button",
"default": "Submit"
},
{
"label": "Text průběhu",
"description": "Text použitý, pokud je vybrán textový průběh.",
@ -204,6 +208,10 @@
"label": "Popisek tlačítka dokončit",
"default": "Dokončit"
},
{
"label": "Submit button text",
"default": "Submit"
},
{
"label": "Zobrazit video před výsledky testu"
},

View File

@ -75,6 +75,10 @@
"label": "Finish button",
"default": "Finish"
},
{
"label": "Submit button",
"default": "Submit"
},
{
"label": "Progress text",
"description": "Text used if textual progress is selected.",
@ -204,6 +208,10 @@
"label": "Finish button text",
"default": "Finish"
},
{
"label": "Submit button text",
"default": "Submit"
},
{
"label": "Display video before quiz results"
},

View File

@ -75,6 +75,10 @@
"label": "Beschriftung des \"Beenden\"-Buttons",
"default": "Beenden"
},
{
"label": "Submit button",
"default": "Submit"
},
{
"label": "Text der Fortschrittsanzeige",
"description": "Verwendeter Text, wenn Fortschrittsanzeige in Textform gewählt wurde.",
@ -204,6 +208,10 @@
"label": "Beschriftung des \"Beenden\"-Buttons",
"default": "Beenden"
},
{
"label": "Submit button text",
"default": "Submit"
},
{
"label": "Zeige ein Video vor den Ergebnissen an"
},

View File

@ -75,6 +75,10 @@
"label": "Κουμπί ολοκλήρωσης",
"default": "Ολοκλήρωση"
},
{
"label": "Submit button",
"default": "Submit"
},
{
"label": "Κείμενο προόδου",
"description": "Κείμενο που χρησιμοποιείται, εάν έχει επιλεγεί το κειμενικό στυλ εμφάνισης της προόδου.",
@ -204,6 +208,10 @@
"label": "Ετικέτα κουμπιού ολοκλήρωσης",
"default": "Ολοκλήρωση"
},
{
"label": "Submit button text",
"default": "Submit"
},
{
"label": "Εμφάνιση βίντεο πριν τα αποτελέσματα του κουίζ"
},

View File

@ -75,6 +75,10 @@
"label": "Botón Terminar",
"default": "Terminar"
},
{
"label": "Submit button",
"default": "Submit"
},
{
"label": "Texto del Progreso",
"description": "Texto usado si progreso textual es seleccionado.",
@ -204,6 +208,10 @@
"label": "Texto botón Terminar",
"default": "Terminar"
},
{
"label": "Submit button text",
"default": "Submit"
},
{
"label": "Mostrar video antes de resultados del examen"
},

View File

@ -75,6 +75,10 @@
"label": "Botón Terminar",
"default": "Terminar"
},
{
"label": "Submit button",
"default": "Submit"
},
{
"label": "Texto del progreso",
"description": "Texto usado si progreso textual es seleccionado.",
@ -204,6 +208,10 @@
"label": "Texto botón Terminar",
"default": "Terminar"
},
{
"label": "Submit button text",
"default": "Submit"
},
{
"label": "Mostrar video antes de resultados del examen"
},

View File

@ -75,6 +75,10 @@
"label": "Lõpeta nupp",
"default": "Valmis"
},
{
"label": "Submit button",
"default": "Submit"
},
{
"label": "Edenemise tekst",
"description": "Test, mida kasutatakse, kui valitud on tekstiline edenemisosuti.",
@ -204,6 +208,10 @@
"label": "Valmis nupu tekst",
"default": "Valmis"
},
{
"label": "Submit button text",
"default": "Submit"
},
{
"label": "Kuva videot enne viktoriini tulemusi"
},

View File

@ -75,6 +75,10 @@
"label": "Bukatu botoia",
"default": "Bukatu"
},
{
"label": "Submit button",
"default": "Submit"
},
{
"label": "Aurrerapenaren testua",
"description": "Testu-aurrerapena hautatuta badago erabiltzen den testua.",
@ -204,6 +208,10 @@
"label": "Bukatu botoiaren testua",
"default": "Bukatu"
},
{
"label": "Submit button text",
"default": "Submit"
},
{
"label": "Bistaratu bideoa galdetegiaren emaitzen aurretik"
},

View File

@ -75,6 +75,10 @@
"label": "دکمه پایان",
"default": "پایان"
},
{
"label": "Submit button",
"default": "Submit"
},
{
"label": "متن پیشرفت",
"description": "متن مورد استفاده در صورتی که پیشرفت متنی انتخاب شده باشد.",
@ -204,6 +208,10 @@
"label": "متن دکمه پایان",
"default": "پایان"
},
{
"label": "Submit button text",
"default": "Submit"
},
{
"label": "ویدئو را پیش از نتایج آزمون نمایش بده"
},

View File

@ -75,6 +75,10 @@
"label": "Painikkeen Lopeta teksti",
"default": "Lopeta"
},
{
"label": "Submit button",
"default": "Submit"
},
{
"label": "Edistyminen",
"description": "Tekstiä käytetään mikäli tekstimuotoinen edistymisen näyttäminen on valittuna.",
@ -204,6 +208,10 @@
"label": "Painikkeen \"Lopeta\" teksti",
"default": "Lopeta"
},
{
"label": "Submit button text",
"default": "Submit"
},
{
"label": "Näytä video ennen tuloksia"
},

View File

@ -75,6 +75,10 @@
"label": "Bouton Fin",
"default": "Terminer"
},
{
"label": "Submit button",
"default": "Submit"
},
{
"label": "Texte de progression",
"description": "Texte utilisé si la progression textuelle a été sélectionnée.",
@ -204,6 +208,10 @@
"label": "Texte pour le bouton de fin",
"default": "Terminer"
},
{
"label": "Submit button text",
"default": "Submit"
},
{
"label": "Afficher une vidéo avant l'affichage des résultats du quiz"
},

View File

@ -75,6 +75,10 @@
"label": "Finish button",
"default": "Críochnaigh"
},
{
"label": "Submit button",
"default": "Submit"
},
{
"label": "Progress text",
"description": "Text used if textual progress is selected.",
@ -204,6 +208,10 @@
"label": "Finish button text",
"default": "Críochnaigh"
},
{
"label": "Submit button text",
"default": "Submit"
},
{
"label": "Display video before quiz results"
},

View File

@ -75,6 +75,10 @@
"label": "Botón rematar",
"default": "Rematar"
},
{
"label": "Submit button",
"default": "Submit"
},
{
"label": "Texto de progreso",
"description": "Texto usado ao seleccionar progreso textual.",
@ -204,6 +208,10 @@
"label": "Texto para o botón rematar",
"default": "Rematar"
},
{
"label": "Submit button text",
"default": "Submit"
},
{
"label": "Amosar vídeo antes dos resultados do cuestionario"
},

View File

@ -75,6 +75,10 @@
"label": "כפתור סיום",
"default": "סיום"
},
{
"label": "Submit button",
"default": "Submit"
},
{
"label": "תוכן מתקדם",
"description": "תוכן שבו נעשה שימוש אם תוכן מתקדם נבחר.",
@ -204,6 +208,10 @@
"label": "\"תוכן כפתור \"סיום",
"default": "סיום"
},
{
"label": "Submit button text",
"default": "Submit"
},
{
"label": "יש להציג וידאו לפני תוצאות החידון"
},

View File

@ -75,6 +75,10 @@
"label": "Finish button",
"default": "Finish"
},
{
"label": "Submit button",
"default": "Submit"
},
{
"label": "Progress text",
"description": "Text used if textual progress is selected.",
@ -204,6 +208,10 @@
"label": "Finish button text",
"default": "Finish"
},
{
"label": "Submit button text",
"default": "Submit"
},
{
"label": "Display video before quiz results"
},

View File

@ -75,6 +75,10 @@
"label": "Pulsante fine",
"default": "Finito"
},
{
"label": "Submit button",
"default": "Submit"
},
{
"label": "Testo di avanzamento",
"description": "Testo usato se è selezionato l'avanzamento testuale",
@ -204,6 +208,10 @@
"label": "Testo del pulsante di fine prova",
"default": "Finito"
},
{
"label": "Submit button text",
"default": "Submit"
},
{
"label": "Mostra il video prima dei risultati della prova"
},

View File

@ -75,6 +75,10 @@
"label": "完了ボタン",
"default": "完了"
},
{
"label": "Submit button",
"default": "Submit"
},
{
"label": "進行状況のテキスト",
"description": "テキストによる進行状況を選択した場合に使用するテキスト。",
@ -204,6 +208,10 @@
"label": "完了ボタンのテキスト",
"default": "完了"
},
{
"label": "Submit button text",
"default": "Submit"
},
{
"label": "クイズの結果の前にビデオを表示"
},

View File

@ -75,6 +75,10 @@
"label": "Finish button",
"default": "បញ្ចប់"
},
{
"label": "Submit button",
"default": "Submit"
},
{
"label": "Progress text",
"description": "Text used if textual progress is selected.",
@ -204,6 +208,10 @@
"label": "Finish button text",
"default": "បញ្ចប់"
},
{
"label": "Submit button text",
"default": "Submit"
},
{
"label": "Display video before quiz results"
},

View File

@ -75,6 +75,10 @@
"label": "완료 단추",
"default": "완료"
},
{
"label": "Submit button",
"default": "Submit"
},
{
"label": "진행률 텍스트",
"description": "텍스트형 진행률을 선택한 경우 사용되는 글자.",
@ -204,6 +208,10 @@
"label": "완료 버튼 텍스트",
"default": "완료"
},
{
"label": "Submit button text",
"default": "Submit"
},
{
"label": "퀴즈 결과 전에 비디오 표시"
},

View File

@ -75,6 +75,10 @@
"label": "Avslutt-knappen",
"default": "Avslutt"
},
{
"label": "Submit button",
"default": "Submit"
},
{
"label": "Fremgangstekst",
"description": "Tekst brukt hvis tekstlig angivelse av fremdrift er valgt. Variabler: @current og @total.",
@ -204,6 +208,10 @@
"label": "Avslutt knappetekst",
"default": "Bekreft"
},
{
"label": "Submit button text",
"default": "Submit"
},
{
"label": "Vis video før resultatene"
},

View File

@ -75,6 +75,10 @@
"label": "Beëindigings-knop",
"default": "Klaar"
},
{
"label": "Submit button",
"default": "Submit"
},
{
"label": "Tekst bij voortgang",
"description": "Deze tekst wordt gebruikt als 'Tekst' als voortgangsindicator is geselecteerd.",
@ -204,6 +208,10 @@
"label": "Tekst voor de beëindigings-knop",
"default": "Klaar"
},
{
"label": "Submit button text",
"default": "Submit"
},
{
"label": "Toon video voor de quizresultaten"
},

View File

@ -75,6 +75,10 @@
"label": "Avslutt-knappen",
"default": "Bekreft"
},
{
"label": "Submit button",
"default": "Submit"
},
{
"label": "Fremgangstekst",
"description": "Tekst brukt hvis tekstlig angivelse av fremdrift er valgt. Variabler: @current og @total",
@ -204,6 +208,10 @@
"label": "Tekst til \"Avslutt\" knapp",
"default": "Bekreft"
},
{
"label": "Submit button text",
"default": "Submit"
},
{
"label": "Vis video før resultata"
},

View File

@ -75,6 +75,10 @@
"label": "Przycisk zakończenia",
"default": "Zakończ"
},
{
"label": "Submit button",
"default": "Submit"
},
{
"label": "Tekst postępu",
"description": "Ten tekst zostanie wyświetlony, jeśli wybrana zostanie opcja wyświetlania postępu tekstowo.",
@ -204,6 +208,10 @@
"label": "Etykieta przycisku zakończenia",
"default": "Zakończ"
},
{
"label": "Submit button text",
"default": "Submit"
},
{
"label": "Odtwórz wideo przed ekranem wyników"
},

View File

@ -75,6 +75,10 @@
"label": "Botão para terminar",
"default": "Terminar"
},
{
"label": "Submit button",
"default": "Submit"
},
{
"label": "Texto do progresso",
"description": "Texto a utilizar se o progresso textual estiver ativo.",
@ -204,6 +208,10 @@
"label": "Texto para o botão terminar",
"default": "Terminar"
},
{
"label": "Submit button text",
"default": "Submit"
},
{
"label": "Mostrar video antes dos resultados do questionário"
},

View File

@ -75,6 +75,10 @@
"label": "Finish button",
"default": "Finish"
},
{
"label": "Submit button",
"default": "Submit"
},
{
"label": "Progress text",
"description": "Text used if textual progress is selected.",
@ -204,6 +208,10 @@
"label": "Finish button text",
"default": "Finish"
},
{
"label": "Submit button text",
"default": "Submit"
},
{
"label": "Display video before quiz results"
},

View File

@ -75,6 +75,10 @@
"label": "Кнопка Завершить",
"default": "Завершить"
},
{
"label": "Submit button",
"default": "Submit"
},
{
"label": "Текст прогресса",
"description": "Текст, используемый, если выбран текстовый прогресс.",
@ -204,6 +208,10 @@
"label": "Текст кнопки завершения",
"default": "Завершить"
},
{
"label": "Submit button text",
"default": "Submit"
},
{
"label": "Показать видео до результатов теста"
},

View File

@ -75,6 +75,10 @@
"label": "Besedilo gumba \"Potrdi\"",
"default": "Potrdi"
},
{
"label": "Submit button",
"default": "Submit"
},
{
"label": "Besedilo o napredku",
"description": "Besedilo v primeru izbire tekstovnega indikatorja napredka.",
@ -204,6 +208,10 @@
"label": "Besedilo gumba \"Potrdi\"",
"default": "Potrdi"
},
{
"label": "Submit button text",
"default": "Submit"
},
{
"label": "Predvajaj videoposnetek ob zaključku kviza"
},

View File

@ -75,6 +75,10 @@
"label": "Finish button",
"default": "Finish"
},
{
"label": "Submit button",
"default": "Submit"
},
{
"label": "Progress text",
"description": "Text used if textual progress is selected.",
@ -204,6 +208,10 @@
"label": "Finish button text",
"default": "Finish"
},
{
"label": "Submit button text",
"default": "Submit"
},
{
"label": "Display video before quiz results"
},

View File

@ -75,6 +75,10 @@
"label": "Finish button",
"default": "Finish"
},
{
"label": "Submit button",
"default": "Submit"
},
{
"label": "Progress text",
"description": "Text used if textual progress is selected.",
@ -204,6 +208,10 @@
"label": "Finish button text",
"default": "Finish"
},
{
"label": "Submit button text",
"default": "Submit"
},
{
"label": "Display video before quiz results"
},

View File

@ -75,6 +75,10 @@
"label": "Finish button",
"default": "Finish"
},
{
"label": "Submit button",
"default": "Submit"
},
{
"label": "Progress text",
"description": "Text used if textual progress is selected.",
@ -204,6 +208,10 @@
"label": "Finish button text",
"default": "Finish"
},
{
"label": "Submit button text",
"default": "Submit"
},
{
"label": "Display video before quiz results"
},

View File

@ -75,6 +75,10 @@
"label": "Дугме Заврши",
"default": "Заврши"
},
{
"label": "Submit button",
"default": "Submit"
},
{
"label": "Текст напретка",
"description": "Текст који се користи ако је одабран текстуални напредак.",
@ -204,6 +208,10 @@
"label": "Текст дугмета - Заврши",
"default": "Заврши"
},
{
"label": "Submit button text",
"default": "Submit"
},
{
"label": "Прикажите видео пре резултата квиза"
},

View File

@ -75,6 +75,10 @@
"label": "Avsluta-knapp",
"default": "Avsluta"
},
{
"label": "Submit button",
"default": "Submit"
},
{
"label": "Text för framsteg",
"description": "Text som används om textuella framsteg är valt.",
@ -204,6 +208,10 @@
"label": "Text för knappen Avsluta",
"default": "Avsluta"
},
{
"label": "Submit button text",
"default": "Submit"
},
{
"label": "Visa video före resultat från denna quiz"
},

View File

@ -75,6 +75,10 @@
"label": "Bitir butonu",
"default": "Bitir"
},
{
"label": "Submit button",
"default": "Submit"
},
{
"label": "İlerleme metni",
"description": "İlerleme göstergesi olarak metin seçildiyse kullanılacak metin.",
@ -205,6 +209,10 @@
"label": "Bitir butonu için etiket",
"default": "Bitir"
},
{
"label": "Submit button text",
"default": "Submit"
},
{
"label": "Sınav sonuçlarından önce videoyu göster"
},

View File

@ -75,6 +75,10 @@
"label": "Кнопка Завершити",
"default": "Завершити"
},
{
"label": "Submit button",
"default": "Submit"
},
{
"label": "Текст прогресу",
"description": "Текст, який використовується якщо обрано текстовий прогрес.",
@ -204,6 +208,10 @@
"label": "Текст кнопки завершення",
"default": "Завершити"
},
{
"label": "Submit button text",
"default": "Submit"
},
{
"label": "Показати відео до результатів тесту"
},

View File

@ -75,6 +75,10 @@
"label": "Finish button",
"default": "Finish"
},
{
"label": "Submit button",
"default": "Submit"
},
{
"label": "Progress text",
"description": "Text used if textual progress is selected.",
@ -204,6 +208,14 @@
"label": "Finish button text",
"default": "Finish"
},
{
"label": "Submit button",
"default": "Submit"
},
{
"label": "Submit button text",
"default": "Submit"
},
{
"label": "Display video before quiz results"
},

View File

@ -75,6 +75,10 @@
"label": "完成功能鈕名稱",
"default": "完成"
},
{
"label": "Submit button",
"default": "Submit"
},
{
"label": "進度",
"description": "若進度指示選擇以文字方式呈現,則以文字方式顯示.",
@ -204,6 +208,10 @@
"label": "完成功能鈕名稱",
"default": "完成"
},
{
"label": "Submit button text",
"default": "Submit"
},
{
"label": "在測驗結果前撥放影片"
},

View File

@ -75,6 +75,10 @@
"label": "完成按鈕顯示文字",
"default": "完成"
},
{
"label": "Submit button",
"default": "Submit"
},
{
"label": "進度顯示文字",
"description": "若進度指示選擇文字式時顯示的文字。",
@ -204,6 +208,10 @@
"label": "完成按鈕的顯示文字",
"default": "完成"
},
{
"label": "Submit button text",
"default": "Submit"
},
{
"label": "在測驗結果出現前顯示影片"
},