diff --git a/src/main/webapp/app/controller/PreparationQuestions.js b/src/main/webapp/app/controller/PreparationQuestions.js index c2863efea32483f204c53ea08587e35af1b00211..e65518fdc92ef23c7f6bfc79c543b72b639eae0b 100644 --- a/src/main/webapp/app/controller/PreparationQuestions.js +++ b/src/main/webapp/app/controller/PreparationQuestions.js @@ -34,6 +34,7 @@ Ext.define("ARSnova.controller.PreparationQuestions", { sTP.showcaseQuestionPanel.setController(this); sTP.showcaseQuestionPanel.setPreparationMode(); sTP.audienceQuestionPanel.prepareQuestionList(); + sTP.audienceQuestionPanel.setVariant('preparation'); sTP.audienceQuestionPanel.questionStatusButton.setPreparationQuestionsMode(); sTP.audienceQuestionPanel.toolbar.getTitle().setTitle(Messages.PREPARATION_QUESTIONS); sTP.audienceQuestionPanel.newQuestionButton.text = Messages.NEW_PREPARATION_QUESTION; diff --git a/src/main/webapp/app/controller/Questions.js b/src/main/webapp/app/controller/Questions.js index d25c0c358e8a21d16b3b5504fc077f905db3daf9..2e29c87548ed15a9aafc8908847d8ef5e0668ed2 100644 --- a/src/main/webapp/app/controller/Questions.js +++ b/src/main/webapp/app/controller/Questions.js @@ -57,6 +57,7 @@ Ext.define("ARSnova.controller.Questions", { sTP.showcaseQuestionPanel.setController(this); sTP.showcaseQuestionPanel.setLectureMode(); sTP.audienceQuestionPanel.prepareQuestionList(); + sTP.audienceQuestionPanel.setVariant('lecture'); sTP.audienceQuestionPanel.voteStatusButton.setLecturerQuestionsMode(); sTP.audienceQuestionPanel.questionStatusButton.setLecturerQuestionsMode(); sTP.audienceQuestionPanel.toolbar.getTitle().setTitle(Messages.LECTURE_QUESTIONS); diff --git a/src/main/webapp/app/internationalization.js b/src/main/webapp/app/internationalization.js index a9ad06950e25bb463c5178229e518ad58aeb71fd..d44c394a8975d53957e89027e7ccac5e4bfdc342 100755 --- a/src/main/webapp/app/internationalization.js +++ b/src/main/webapp/app/internationalization.js @@ -253,6 +253,10 @@ CONFIRM_CLOSE_VOTE_MESSAGE: "Wenn Sie die Abstimmung sperren, können Studierende die Frage nicht mehr beantworten.", CONFIRM_CLOSE_ALL_VOTES_MESSAGE: "Wenn Sie die Abstimmung für alle Fragen sperren, können Studierende die Fragen nicht mehr beantworten.", CONFIRM_CLOSE_ALL_QUESTIONS_MESSAGE: "Wenn Sie die Fragen sperren, können Studierende die Fragen weder sehen noch beantworten.", + CONFIRM_CLOSE_FLASHCARD: "Lernkarte wirklich sperren?", + CONFIRM_CLOSE_FLASHCARD_MESSAGE: "Wenn Sie die Lernkarte sperren, können Studierende sie nicht mehr sehen.", + CONFIRM_CLOSE_ALL_FLASHCARDS: "Lernkarten wirklich sperren?", + CONFIRM_CLOSE_ALL_FLASHCARDS_MESSAGE: "Wenn Sie die Lernkarten sperren, können Studierende sie nicht mehr sehen.", SAVE_AND_CONTINUE: "Speichern und weiter", SAVE_AND_ASK_NEW_QUESTION: "Speichern und neue Frage stellen", PICTURE_MAX_FILESIZE: "Dateiformat: JPEG oder PNG, max. ###", @@ -301,6 +305,8 @@ FLASHCARD_SHORT: "LK", FLASHCARDS: "Lernkarten", FLASHCARD: "Lernkarte", + FLASHCARD_VIEW: "Ansicht", + FLASHCARD_VIEWS: "Ansichten", MASK_ALREADY_ANSWERED: "Sie haben abgestimmt", MASK_IS_ABSTENTION_ANSWER: "Sie haben sich enthalten", MASK_CORRECT_ANSWER_IS: "Die richtige Antwort ist...", @@ -632,14 +638,11 @@ /* action buttons - <br/> forces line break for consistent look */ CREATE_NEW_SESSION: "Neue Session<br/>anlegen", NEW_QUESTION: "Neue Frage<br/>anlegen", - NEW_FLASHCARD: "Lernkarte<br/>anlegen", NEW_TASK: "Aufgabe<br/>erstellen", SHOWCASE_MODE: "Frage<br/>präsentieren", SHOWCASE_TASK: "Aufgabe<br/>präsentieren", SHOWCASE_MODE_PLURAL: "Fragen<br/>präsentieren", SHOWCASE_TASKS: "Aufgaben<br/>präsentieren", - SHOWCASE_FLASHCARD: "Lernkarte</br>präsentieren", - SHOWCASE_FLASHCARDS: "Lernkarten</br>präsentieren", SHOWCASE_LIVE_CLICKER: "A|B|C|D<br />Frage", SHOW_STATISTIC: "Statistik<br/>anzeigen", RELEASE_STATISTIC: "Statistik<br/>freigeben", @@ -686,6 +689,17 @@ EXPORT_CONTENT: "Inhalte<br/>exportieren", IMPORT_CONTENT: "Inhalte<br/>importieren", + NEW_FLASHCARD: "Lernkarte<br/>anlegen", + DELETE_FLASHCARD: "Lernkarte<br/>löschen", + DELETE_ALL_FLASHCARDS: "Lernkarten<br/>löschen", + SHOWCASE_FLASHCARD: "Lernkarte</br>präsentieren", + SHOWCASE_FLASHCARDS: "Lernkarten</br>präsentieren", + EXPORT_FLASHCARDS: "Lernkarten<br/>exportieren", + IMPORT_FLASHCARDS: "Lernkarten<br/>importieren", + DELETE_FLASHCARD_VIEWS: "Ansichten<br/>löschen", + RELEASE_FLASHCARD: "Lernkarte<br/>freigeben", + RELEASE_FLASHCARDS: "Lernkarten<br/>freigeben", + /* about */ MANUAL: "Anleitung", ABOUT: "Über", @@ -1087,6 +1101,10 @@ CONFIRM_CLOSE_VOTE_MESSAGE: "If you close the voting, students will not be able to answer this question.", CONFIRM_CLOSE_ALL_VOTES_MESSAGE: "If you close the voting for all questions, students will not be able to answer any questions.", CONFIRM_CLOSE_ALL_QUESTIONS_MESSAGE: "If you close all questions, students will not be able to view or answer any questions.", + CONFIRM_CLOSE_FLASHCARD: "Are you sure you want to close this flashcard", + CONFIRM_CLOSE_FLASHCARD_MESSAGE: "If you close this flashcard, students will not be able to view it.", + CONFIRM_CLOSE_ALL_FLASHCARDS: "Are you sure you want to close all flashcards?", + CONFIRM_CLOSE_ALL_FLASHCARDS_MESSAGE: "If you close all flashcards, students will not be able to view them.", CONFIRM_ANSWERS_CHANGED: "This will reset all current answers.", QUESTION_PREVIEW_BUTTON_TITLE: "Preview", QUESTION_PREVIEW_BUTTON_TITLE_DESKTOP: "Smartphone preview 360x640", @@ -1132,6 +1150,8 @@ FLASHCARD_SHORT: "FC", FLASHCARDS: "Flashcards", FLASHCARD: "Flashcard", + FLASHCARD_VIEW: "view", + FLASHCARD_VIEWS: "views", MASK_ALREADY_ANSWERED: "You have already voted", MASK_IS_ABSTENTION_ANSWER: "You´ve abstained from answering", MASK_CORRECT_ANSWER_IS: "The correct answer is...", @@ -1469,14 +1489,11 @@ /* action buttons - <br/> forces line break for consistent look */ CREATE_NEW_SESSION: "Create new<br/>session", NEW_QUESTION: "Create new<br/>question", - NEW_FLASHCARD: "Create new<br/>flashcard", NEW_TASK: "Create new<br/>task", SHOWCASE_MODE: "Present<br/>question", SHOWCASE_TASK: "Present<br/>task", SHOWCASE_MODE_PLURAL: "Present<br/>questions", SHOWCASE_TASKS: "Present<br/>tasks", - SHOWCASE_FLASHCARD: "Present</br>flashcard", - SHOWCASE_FLASHCARDS: "Present</br>flashcards", SHOWCASE_LIVE_CLICKER: "A|B|C|D</br>question", SHOW_STATISTIC: "Show<br/>statistics", RELEASE_STATISTIC: "Release<br/>statistics", @@ -1523,6 +1540,17 @@ EXPORT_CONTENT: "Export<br/>content", IMPORT_CONTENT: "Import<br/>content", + NEW_FLASHCARD: "Create new<br/>flashcard", + DELETE_FLASHCARD: "Delete<br/>flashcard", + DELETE_ALL_FLASHCARDS: "Delete<br/>flashcards", + SHOWCASE_FLASHCARD: "Present</br>flashcard", + SHOWCASE_FLASHCARDS: "Present</br>flashcards", + EXPORT_FLASHCARDS: "Export<br/>flashcards", + IMPORT_FLASHCARDS: "Import<br/>flashcards", + DELETE_FLASHCARD_VIEWS: "Delete<br/>views", + RELEASE_FLASHCARD: "Release<br/>flashcard", + RELEASE_FLASHCARDS: "Release<br/>flashcards", + /* about */ MANUAL: "Manual", ABOUT: "About", diff --git a/src/main/webapp/app/view/speaker/AudienceQuestionPanel.js b/src/main/webapp/app/view/speaker/AudienceQuestionPanel.js index 26549bc608ef0338b1ee95781c5eec3292a19175..7d5afaece0601bd89dbead3ac227fe86441cdd5f 100644 --- a/src/main/webapp/app/view/speaker/AudienceQuestionPanel.js +++ b/src/main/webapp/app/view/speaker/AudienceQuestionPanel.js @@ -38,7 +38,8 @@ Ext.define('ARSnova.view.speaker.AudienceQuestionPanel', { type: 'vbox', pack: 'center' }, - controller: null + controller: null, + variant: 'lecture' }, monitorOrientation: true, @@ -446,6 +447,7 @@ Ext.define('ARSnova.view.speaker.AudienceQuestionPanel', { this.getController().getQuestions(sessionStorage.getItem('keyword'), { success: Ext.bind(function (response, totalRange) { var questions = Ext.decode(response.responseText); + var showcaseButtonText = Messages.SHOWCASE_MODE_PLURAL; for (var i = 0; i < questions.length; i++) { questions[i].sequenceNo = i; } @@ -455,21 +457,29 @@ Ext.define('ARSnova.view.speaker.AudienceQuestionPanel', { this.handleAnswerCount(); if (questions.length === 1) { - this.showcaseActionButton.setButtonText( - features.flashcard ? Messages.SHOWCASE_FLASHCARD : Messages.SHOWCASE_MODE); this.questionStatusButton.setSingleQuestionMode(); this.voteStatusButton.setSingleQuestionMode(); + showcaseButtonText = this.getVariant() === 'flashcard' ? + Messages.SHOWCASE_FLASHCARD : + Messages.SHOWCASE_MODE; } else { - this.showcaseActionButton.setButtonText( - features.flashcard ? Messages.SHOWCASE_FLASHCARDS : Messages.SHOWCASE_MODE_PLURAL); this.questionStatusButton.setMultiQuestionMode(); this.voteStatusButton.setMultiQuestionMode(); + showcaseButtonText = this.getVariant() === 'flashcard' ? + Messages.SHOWCASE_FLASHCARDS : + Messages.SHOWCASE_MODE_PLURAL; } - if (features.slides) { - this.showcaseActionButton.setButtonText(Messages.SHOWCASE_KEYNOTE); + if (this.getVariant() !== 'flashcard') { + this.voteStatusButton.checkInitialStatus(); + this.voteStatusButton.show(); + + if (features.slides) { + showcaseButtonText = Messages.SHOWCASE_KEYNOTE; + } } + this.showcaseActionButton.setButtonText(showcaseButtonText); this.questionList.updatePagination(questions.length, totalRange); callback.apply(); @@ -477,9 +487,8 @@ Ext.define('ARSnova.view.speaker.AudienceQuestionPanel', { this.questionListContainer.show(); this.questionList.show(); this.questionStatusButton.checkInitialStatus(); - this.voteStatusButton.checkInitialStatus(); this.questionStatusButton.show(); - this.voteStatusButton.show(); + // this.sortQuestionsButton.show(); this.deleteQuestionsButton.show(); hideLoadIndicator.apply(); @@ -629,51 +638,79 @@ Ext.define('ARSnova.view.speaker.AudienceQuestionPanel', { applyUIChanges: function () { var features = ARSnova.app.getController('Feature').getActiveFeatures(); var lectureButtonText = Messages.NEW_QUESTION; + var questionListText = this.questionListContainer.config.title; + var deleteAnswersText = this.deleteAnswersButton.config.text; + var deleteQuestionsText = this.deleteQuestionsButton.config.text; + var exportText = this.exportCsvQuestionsButton.config.text; + var importText = this.questionsImport.config.text; + var toolbarTitle = this.toolbar.config.title; + var captionTranslation = this.caption.config.translation; + var badgeTranslation = this.caption.config.badgeTranslation; if (features.total || features.slides) { - this.toolbar.setTitle(Messages.SLIDE_LONG); - this.questionListContainer.setTitle(Messages.CONTENT_MANAGEMENT); - this.deleteAnswersButton.setButtonText(Messages.DELETE_COMMENTS); - this.deleteQuestionsButton.setButtonText(Messages.DELETE_CONTENT); - this.exportCsvQuestionsButton.setButtonText(Messages.EXPORT_CONTENT); - this.questionsImport.setButtonText(Messages.IMPORT_CONTENT); + toolbarTitle = Messages.SLIDE_LONG; + exportText = Messages.EXPORT_CONTENT; + importText = Messages.IMPORT_CONTENT; + questionListText = Messages.CONTENT_MANAGEMENT; + deleteAnswersText = Messages.DELETE_COMMENTS; + deleteQuestionsText = Messages.DELETE_CONTENT; + lectureButtonText = Messages.NEW_CONTENT; + this.questionStatusButton.setKeynoteWording(); this.voteStatusButton.setKeynoteWording(); - - lectureButtonText = Messages.NEW_CONTENT; this.newQuestionButton.element.down('.iconBtnImg').replaceCls('icon-question', 'icon-pencil'); - this.caption.setTranslation({ + captionTranslation = { active: Messages.OPEN_CONTENT, inactive: Messages.CLOSED_CONTENT, disabledVote: Messages.CLOSED_COMMENTATION - }); + }; - this.caption.setBadgeTranslation({ + badgeTranslation = { feedback: Messages.QUESTIONS_FROM_STUDENTS, unredFeedback: Messages.UNREAD_QUESTIONS_FROM_STUDENTS, questions: Messages.QUESTIONS, answers: Messages.COMMENTS - }); + }; } else { - this.toolbar.setTitle(this.toolbar.config.title); - this.questionListContainer.setTitle(this.questionListContainer.config.title); - this.deleteAnswersButton.setButtonText(this.deleteAnswersButton.config.text); - this.deleteQuestionsButton.setButtonText(this.deleteQuestionsButton.config.text); - this.exportCsvQuestionsButton.setButtonText(this.exportCsvQuestionsButton.config.text); - this.questionsImport.setButtonText(this.questionsImport.config.text); this.questionStatusButton.setDefaultWording(); this.voteStatusButton.setDefaultWording(); - - this.caption.setTranslation(this.caption.config.translation); - this.caption.setBadgeTranslation(this.caption.config.badgeTranslation); this.newQuestionButton.element.down('.iconBtnImg').replaceCls('icon-pencil', 'icon-question'); } - if (features.flashcard) { + if (this.getVariant() === 'flashcard') { lectureButtonText = Messages.NEW_FLASHCARD; + toolbarTitle = Messages.FLASHCARDS; + exportText = Messages.EXPORT_FLASHCARDS; + importText = Messages.IMPORT_FLASHCARDS; + questionListText = Messages.CONTENT_MANAGEMENT; + deleteAnswersText = Messages.DELETE_FLASHCARD_VIEWS; + deleteQuestionsText = Messages.DELETE_ALL_FLASHCARDS; + + this.questionStatusButton.setFlashcardsWording(); + + captionTranslation = { + active: Messages.OPEN_CONTENT, + inactive: Messages.CLOSED_CONTENT, + disabledVote: "" + }; + + badgeTranslation = { + feedback: "", + unredFeedback: "", + questions: "", + answers: Messages.FLASHCARD_VIEWS + }; } + this.toolbar.setTitle(toolbarTitle); + this.questionListContainer.setTitle(questionListText); this.newQuestionButton.setButtonText(lectureButtonText); + this.deleteAnswersButton.setButtonText(deleteAnswersText); + this.deleteQuestionsButton.setButtonText(deleteQuestionsText); + this.exportCsvQuestionsButton.setButtonText(exportText); + this.questionsImport.setButtonText(importText); + this.caption.setTranslation(captionTranslation); + this.caption.setBadgeTranslation(badgeTranslation); } }); diff --git a/src/main/webapp/app/view/speaker/MultiQuestionStatusButton.js b/src/main/webapp/app/view/speaker/MultiQuestionStatusButton.js index e00a15c25edc3d45684a2e4090859b4a74931034..4c481d0400e6d527e71e765bb63b011353289d49 100644 --- a/src/main/webapp/app/view/speaker/MultiQuestionStatusButton.js +++ b/src/main/webapp/app/view/speaker/MultiQuestionStatusButton.js @@ -34,12 +34,19 @@ Ext.define('ARSnova.view.speaker.MultiQuestionStatusButton', { releaseAll: Messages.RELEASE_CONTENT, confirm: Messages.CONFIRM_CLOSE_ALL_QUESTIONS, confirmMessage: Messages.CONFIRM_CLOSE_ALL_QUESTIONS_MESSAGE + }, + flashcardWording: { + release: Messages.RELEASE_FLASHCARD, + releaseAll: Messages.RELEASE_FLASHCARDS, + confirm: Messages.CONFIRM_CLOSE_ALL_FLASHCARDS, + confirmMessage: Messages.CONFIRM_CLOSE_ALL_FLASHCARDS_MESSAGE } }, constructor: function () { this.callParent(arguments); this.checkInitialStatus(); + this.wording = this.getWording(); }, checkInitialStatus: function () { @@ -48,7 +55,6 @@ Ext.define('ARSnova.view.speaker.MultiQuestionStatusButton', { this.getQuestionStore().each(function (item) { hasActiveQuestions = hasActiveQuestions || item.get("active"); }); - this.wording = this.getWording(); if (hasActiveQuestions) { this.isOpen = true; @@ -74,6 +80,16 @@ Ext.define('ARSnova.view.speaker.MultiQuestionStatusButton', { this.setSingleQuestionMode(); }, + setFlashcardsWording: function () { + this.wording = this.getFlashcardWording(); + + if (this.singleMode) { + this.setSingleQuestionMode(); + } else { + this.setMultiQuestionMode(); + } + }, + setDefaultWording: function () { this.wording = this.getWording(); @@ -114,7 +130,7 @@ Ext.define('ARSnova.view.speaker.MultiQuestionStatusButton', { }; if (this.isOpen) { - Ext.Msg.confirm(this.getWording().confirm, this.getWording().confirmMessage, function (buttonId) { + Ext.Msg.confirm(this.wording.confirm, this.wording.confirmMessage, function (buttonId) { if (buttonId !== "no") { /* close all questions */ ARSnova.app.getController('Questions').setAllActive({