Index: lams_tool_lamc/conf/language/lams/ApplicationResources.properties =================================================================== diff -u -r394f403c289f0fd7808c228840bead5c4e7d5d32 -r5ebec80ccc488d5c09da8e9f648b718b02d0dee2 --- lams_tool_lamc/conf/language/lams/ApplicationResources.properties (.../ApplicationResources.properties) (revision 394f403c289f0fd7808c228840bead5c4e7d5d32) +++ lams_tool_lamc/conf/language/lams/ApplicationResources.properties (.../ApplicationResources.properties) (revision 5ebec80ccc488d5c09da8e9f648b718b02d0dee2) @@ -1,247 +1,253 @@ -appName = mcq -#language code: en -#locale code: AU - - # Exported from the LAMS Community by Ernie Ghiglione on Thu Dec 27 22:45:28 CST 2018 - -#=================== labels for Multiple Choice Questions =================# - -activity.title =Multiple Choice -activity.description =Creates automated assessment questions. e.g. Multiple choice and true/false questions. Can provide feedback and scores. -activity.helptext =Learner answers a series of automated assessment questions. e.g. Multiple choice and true/false questions. Optional features include feedback on each question and scoring. Questions are weighted for scoring. -tool.display.name =Multiple Choice Tool -tool.description =Tool for learners to answer a series of automated assessment questions. -label.tool.shortname =MCQ -label.basic =Basic -label.advanced =Advanced -label.summary =Summary -label.stats =Stats -label.editActivity =Edit Activity -label.authoring =MCQ Authoring -label.learning =MCQ Learning -label.monitoring =MCQ Monitoring -label.authoring.title =Title -label.authoring.instructions =Instructions -label.Questions =Questions -label.addNewQuestion =Add new question -label.moveDown =Down -label.add.question =Add New -label.add.option =Add New -label.mc.options.col =Candidate answers: -label.learner.message =You can only proceed to the activity after you have reached the passing mark -label.viewAnswers =Summary of responses -label.topMark =Top mark: -label.avMark =Average mark: -label.loMark =Lowest mark: -count.total.user =Total users count: -label.mark =Mark: -label.redo.questions =Redo questions -label.view =View -label.finished =Next Activity -button.submit =Submit -button.continue =Continue -label.isCorrect =Correct? -label.question.only =Question -label.question =Question -radiobox.passmark =Pass mark -radiobox.onepq =One question per page -radiobox.retries =Allow retries -option.correct =Correct -label.outof =out of -label.save =Save -label.cancel =Cancel -feedback =Please address the following issues before submit.
-error.passMark.empty =Please correct this: Pass mark can not be empty. -options.count.zero =Please correct this: There must be at least one candidate answer. -error.passmark.notInteger =Please correct this: Pass mark can only be an integer. -error.file.notPersisted =An error occurred: The file is not viewable yet. Please save all the content first and check back. -error.fileName.empty =Please correct this: Under "Instructions", the file(name) to upload can not be empty. -error.questions.withNoOptions =Please note: The questions with no candidate answers have been automatically removed for you. Please check total question weight. -error.answers.empty =Please correct this: Candidate answers can not be empty. -error.passMark.greater100 =Please correct this: The passmark can not be greater than 100% -error.question.addNotAllowed.thisScreen =The question text can not be modified in this screen since it has options attached . Please use the "Options" button to edit the question text. -error.question.removeNotAllowed.thisScreen =The question can not be removed since one or more of the question texts has been modified. Please try again without any text modifications. -error.selectedIndex.empty =Can not continue. Please select the correct answer and click "Done". -error.content.locked =The content has been locked since it is being used by one mor more learners.
The modification of the content is not allowed. -error.content.inUse =modification of the content is not allowed since one or more learners has attempted the activity. -error.noLearnerActivity =Summary report is not available since no learners attempted the activity yet. -label.answers =Answers: -button.endLearning =Next Activity -label.learning.attemptTime =Attempt date -label.learning.response =Response -label.user =User -label.attemptTime =Attempt date -label.response =Response -label.learning.forceOfflineMessage =This activity is not being done on the computer. Please see your instructor for details. -error.defineLater =Please wait for the instructor to complete the contents of this activity. -group.label =Group -button.summary =Summary -button.editActivity =Edit Activity -button.stats =Stats -label.edit =Edit -label.update =Update -label.selectGroup =Select group: -label.stats.allGroups =All Groups: -label.stats.totalAllGroups =Total count of all learners: -authoring.msg.cancel.save =Do you want to close this window without saving? -label.learning.forceFinishMessage =Responses are no more allowed. Please finish. -label.correct =Correct -label.passingMark =Passing mark -label.mcqSummary =MCQ Summary -label.yourAnswers =Learner's answers: -label.learner =Learner -button.try.again =Try again -label.feedback =Question feedback -label.notEnoughMarks =As you have not achieved the passing mark, you have to try the questions again. -label.tip.moveQuestionDown =Down -label.tip.moveQuestionUp =Up -label.tip.editOptions =Enables editing of candidate answers -label.tip.removeQuestion =Removes question -label.tip.removeCandidate =Removes candidate answer -label.studentMarks =Learner marks -label.authoring.title.col =Title: -label.authoring.instructions.col =Instructions: -label.candidateAnswer =Candidate answer -label.total =Total -label.continue =Continue -label.reflect =Add a notebook at end of MCQ with the following instructions: -label.notebook.entries =Notebook entries -label.reflection =Notebook entry -label.view.reflection =View notebook entries -label.close =Close -label.question.marks =Marks -label.tip.editQuestion =Enables editing of question -candidates.none.correct =Please fix this: There must be 1 correct candidate answer out of at least 2 candidate answers. -count.finished.session =Finished Session Count: -label.add.candidates =Add answer -label.add.new.question =Add -label.marks =mark(s) -label.questions =Questions -label.questions.worth =This question is worth -label.save.question =Add question -label.tip.deleteQuestion =Deletes question -label.tip.editCandidate =Enables editing of candidate answers -label.tip.moveCandidateDown =Moves candidate answer down -label.tip.moveCandidateUp =Moves candidate answer up -question.blank =Question text can not be blank. -question.duplicate =There are duplicate question entries. -questions.none.submitted =No questions submitted. Please add at least one question. -label.edit.question =Edit question -label.feedback.simple =Feedback: -candidates.duplicate.correct =Please fix this: There must be one and only one correct candidate answer. -label.group.results =Group's top and average marks -candidates.groupSize.warning =Please fix this: There must be at least 2 candidate answers. -candidates.unremovable.groupSize =The candidate answer can not be removed since there must be at least 2 candidate answers. -candidates.setFirst =Please be informed that the first candidate answer has been selected for you. -candidates.blank =Please fix this: Candidate answer text can not be blank. -label.showMarks =Show top and average mark -label.randomize =Present answers in randomized order -message.no.reflection.available =No notebook available -label.attempt.count =Attempt count: -label.final.attempt =Final attempt: -output.desc.learner.mark =Total marks -output.desc.learner.all.correct =All answers correct -label.displayAnswers =Display correct answers, score and feedback after last question -label.monitoring.yesDisplayAnswers =Learners are able to see the answers for the questions. -label.monitoring.noDisplayAnswers1 =Learners are not able to see answers, scores or feedback for the questions -label.monitoring.noDisplayAnswers2 =Do you want to allow learners to see the answers now? -button.monitoring.yes =Yes -output.desc.learner.all.correct.true =All correct -output.desc.learner.all.correct.false =Not all correct -label.monitoring.downloadMarks.button =Export marks -label.monitoring.downloadMarks.question.mark =Question {0} (mark: {1}) -label.monitoring.downloadMarks.username =Username -error.monitoring.spreadsheet.download =An error occurred while preparing the marks spreadsheet for download. -label.on =On -label.off =Off -monitor.summary.th.advancedSettings =Advanced settings -monitor.summary.td.addNotebook =Add a notebook at the end of MCQ -monitor.summary.td.notebookInstructions =Notebook instructions -error.pedagogical.planner.empty.answer.selected =In question {0} correct answer cannot be blank. -monitor.summary.date.restriction =Deadline -monitor.summary.when.date.restriction.is.set =Learners will not be able to answer questions after the set date and time. -monitor.summary.after.date =Date/time: -monitor.summary.set.restriction =Set restriction -monitor.summary.unset.restriction =Remove restriction -authoring.info.teacher.set.restriction =The instructor has set a restriction to this activity from {0} onwards. -monitor.summary.notification =Notification -monitor.summary.date.restriction.set =Deadline has been set -monitor.summary.date.restriction.removed =Deadline has been removed -label.authoring.import.qti =Import IMS QTI -error.correct.answer.blank =Please correct this: Correct answer cannot be blank. -label.submit =Finish -label.report.by.question =Report by question -label.report.by.student =Report by learner -label.not.available =N/A -label.legend =Legend -label.denotes.correct.answer =*- Denotes the correct answer -label.correct.answer =Correct answer -label.ave =Average -label.class.mean =Class mean -label.median =Median -label.learning.draft.autosaved =Draft autosaved -label.monitoring.summary.user.name =Name -label.monitoring.summary.total =Total -label.monitoring.summary.learner.summary =Learner summary -label.monitoring.user.summary.response =Response -label.monitoring.user.summary.grade =Grade -label.waiting.for.leader =Please, wait while somebody will become a group leader. -label.users.from.group =Other learners participating in current group: -label.use.select.leader.tool.output =Use leaders from Select Leader tool -label.group.leader =Group leader: {0} -label.refresh =Refresh -label.prefix.sequential.letters.for.each.answer =Prefix sequential letters for each answer -label.info.use.select.leader.outputs =Group leader's option is enabled -label.monitoring.group.leader =Group leader -label.authoring.export.qti =Export IMS QTI -label.select.leader =Select leader -label.question.options =Question options -label.activity.completion =End of activity -label.tool.output =Tool output -label.tool.output.has.been.changed =Tool output has changed -label.operation.failed =Operation failed -answers.submitted.none =Select at least one answer for each of the questions. -label.summary.downloaded =Marks file downloaded. -label.number.learners =Learners -label.number.groups.finished =Number of groups finished -label.graph.help =In the graph(s) below, click on a bar in the graph and then use your mouse wheel to zoom in and out of the graph. Once you zoom in, the grey selection in the bottom graph can be dragged left or right to show a different set of marks. -label.lowest.mark =Lowest mark -label.highest.mark =Highest mark -label.number.learners.in.mark.range =Number of learners in mark range -label.number.groups.in.mark.range =Number of groups in mark range -label.average.mark =Average mark -label.error =Error -error.loaderror =There was an error loading the grid. If this problem persists, please contact your system administrator. -label.ok =OK -message.monitoring.edit.activity.warning =Warning: if you edit and modify a question or change an answer that a learner has already answered, then the mark attained for the modified question will be deleted as it is assumed that the question has changed. If the option for retries is available, then the learner can submit an answer for this question again. -label.enable.confidence.levels =Enable confidence level -label.confidence =How confident are you of your answer? -label.what.is.your.confidence.level =Confidence -label.ira.questions.marks =iRA Questions & Marks -label.attendance =Attendance -label.show.students.choices =Show students' choices -label.hide.students.choices =Hide students' choices -label.print =Print -label.excel.export =Excel export -label.displayFeedbackOnly =Display only the feedback and not the answers or score -label.displayNoAnswersOrFeedback =Do not display answers, score or feedback -label.monitoring.yesDisplayFeedbackOnly =Learners are able to see the feedback but no answers or scores for the questions. -label.monitoring.noDisplayFeedbackOnly1 =Learners are not able to see the feedback for the questions -label.monitoring.noDisplayFeedbackOnly2 =Do you want to allow learners to see the feedback now? -outcome.authoring.title =Learning outcomes -outcome.authoring.input =Search and select by outcome name or code -outcome.authoring.existing =Added outcomes -outcome.authoring.existing.none =none -outcome.authoring.remove.confirm =Are you sure you want to remove this learning outcome? -warn.tool.output.change.none =This will delete all existing marks for this activity. Are you sure? -output.desc.none =No score -label.edit.in.monitor.warning =Attention: while you edit this activity, students don't have access to it. You must save your changes, so students can re-attempt this activity again. -message.qb.modified.update =The question in Question Bank will be updated -message.qb.modified.version =A new version of the question will be created in Question Bank -message.qb.modified.new =A new question will be created in Question Bank -label.qb.stats =Question indexes -label.qb.participant.count =Test participant count -label.qb.difficulty.index =Difficulty index -label.qb.discrimination.index =Discrimination index -label.qb.point.biserial =Point biserial -#======= End labels: Exported 228 labels for en AU ===== +appName = mcq +#language code: en +#locale code: AU + + # Exported from the LAMS Community by Ernie Ghiglione on Thu Dec 27 22:45:28 CST 2018 + +#=================== labels for Multiple Choice Questions =================# + +activity.title =Multiple Choice +activity.description =Creates automated assessment questions. e.g. Multiple choice and true/false questions. Can provide feedback and scores. +activity.helptext =Learner answers a series of automated assessment questions. e.g. Multiple choice and true/false questions. Optional features include feedback on each question and scoring. Questions are weighted for scoring. +tool.display.name =Multiple Choice Tool +tool.description =Tool for learners to answer a series of automated assessment questions. +label.tool.shortname =MCQ +label.basic =Basic +label.advanced =Advanced +label.summary =Summary +label.stats =Stats +label.editActivity =Edit Activity +label.authoring =MCQ Authoring +label.learning =MCQ Learning +label.monitoring =MCQ Monitoring +label.authoring.title =Title +label.authoring.instructions =Instructions +label.Questions =Questions +label.addNewQuestion =Add new question +label.moveDown =Down +label.add.question =Add New +label.add.option =Add New +label.mc.options.col =Candidate answers: +label.learner.message =You can only proceed to the activity after you have reached the passing mark +label.viewAnswers =Summary of responses +label.topMark =Top mark: +label.avMark =Average mark: +label.loMark =Lowest mark: +count.total.user =Total users count: +label.mark =Mark: +label.redo.questions =Redo questions +label.view =View +label.finished =Next Activity +button.submit =Submit +button.continue =Continue +label.isCorrect =Correct? +label.question.only =Question +label.question =Question +radiobox.passmark =Pass mark +radiobox.onepq =One question per page +radiobox.retries =Allow retries +option.correct =Correct +label.outof =out of +label.save =Save +label.cancel =Cancel +feedback =Please address the following issues before submit.
+error.passMark.empty =Please correct this: Pass mark can not be empty. +options.count.zero =Please correct this: There must be at least one candidate answer. +error.passmark.notInteger =Please correct this: Pass mark can only be an integer. +error.file.notPersisted =An error occurred: The file is not viewable yet. Please save all the content first and check back. +error.fileName.empty =Please correct this: Under "Instructions", the file(name) to upload can not be empty. +error.questions.withNoOptions =Please note: The questions with no candidate answers have been automatically removed for you. Please check total question weight. +error.answers.empty =Please correct this: Candidate answers can not be empty. +error.passMark.greater100 =Please correct this: The passmark can not be greater than 100% +error.question.addNotAllowed.thisScreen =The question text can not be modified in this screen since it has options attached . Please use the "Options" button to edit the question text. +error.question.removeNotAllowed.thisScreen =The question can not be removed since one or more of the question texts has been modified. Please try again without any text modifications. +error.selectedIndex.empty =Can not continue. Please select the correct answer and click "Done". +error.content.locked =The content has been locked since it is being used by one mor more learners.
The modification of the content is not allowed. +error.content.inUse =modification of the content is not allowed since one or more learners has attempted the activity. +error.noLearnerActivity =Summary report is not available since no learners attempted the activity yet. +label.answers =Answers: +button.endLearning =Next Activity +label.learning.attemptTime =Attempt date +label.learning.response =Response +label.user =User +label.attemptTime =Attempt date +label.response =Response +label.learning.forceOfflineMessage =This activity is not being done on the computer. Please see your instructor for details. +error.defineLater =Please wait for the instructor to complete the contents of this activity. +group.label =Group +button.summary =Summary +button.editActivity =Edit Activity +button.stats =Stats +label.edit =Edit +label.update =Update +label.selectGroup =Select group: +label.stats.allGroups =All Groups: +label.stats.totalAllGroups =Total count of all learners: +authoring.msg.cancel.save =Do you want to close this window without saving? +label.learning.forceFinishMessage =Responses are no more allowed. Please finish. +label.correct =Correct +label.passingMark =Passing mark +label.mcqSummary =MCQ Summary +label.yourAnswers =Learner's answers: +label.learner =Learner +button.try.again =Try again +label.feedback =Question feedback +label.notEnoughMarks =As you have not achieved the passing mark, you have to try the questions again. +label.tip.moveQuestionDown =Down +label.tip.moveQuestionUp =Up +label.tip.editOptions =Enables editing of candidate answers +label.tip.removeQuestion =Removes question +label.tip.removeCandidate =Removes candidate answer +label.studentMarks =Learner marks +label.authoring.title.col =Title: +label.authoring.instructions.col =Instructions: +label.candidateAnswer =Candidate answer +label.total =Total +label.continue =Continue +label.reflect =Add a notebook at end of MCQ with the following instructions: +label.notebook.entries =Notebook entries +label.reflection =Notebook entry +label.view.reflection =View notebook entries +label.close =Close +label.question.marks =Marks +label.tip.editQuestion =Enables editing of question +candidates.none.correct =Please fix this: There must be 1 correct candidate answer out of at least 2 candidate answers. +count.finished.session =Finished Session Count: +label.add.candidates =Add answer +label.add.new.question =Add +label.marks =mark(s) +label.questions =Questions +label.questions.worth =This question is worth +label.save.question =Add question +label.tip.deleteQuestion =Deletes question +label.tip.editCandidate =Enables editing of candidate answers +label.tip.moveCandidateDown =Moves candidate answer down +label.tip.moveCandidateUp =Moves candidate answer up +question.blank =Question text can not be blank. +question.duplicate =There are duplicate question entries. +questions.none.submitted =No questions submitted. Please add at least one question. +label.edit.question =Edit question +label.feedback.simple =Feedback: +candidates.duplicate.correct =Please fix this: There must be one and only one correct candidate answer. +label.group.results =Group's top and average marks +candidates.groupSize.warning =Please fix this: There must be at least 2 candidate answers. +candidates.unremovable.groupSize =The candidate answer can not be removed since there must be at least 2 candidate answers. +candidates.setFirst =Please be informed that the first candidate answer has been selected for you. +candidates.blank =Please fix this: Candidate answer text can not be blank. +label.showMarks =Show top and average mark +label.randomize =Present answers in randomized order +message.no.reflection.available =No notebook available +label.attempt.count =Attempt count: +label.final.attempt =Final attempt: +output.desc.learner.mark =Total marks +output.desc.learner.all.correct =All answers correct +label.displayAnswers =Display correct answers, score and feedback after last question +label.monitoring.yesDisplayAnswers =Learners are able to see the answers for the questions. +label.monitoring.noDisplayAnswers1 =Learners are not able to see answers, scores or feedback for the questions +label.monitoring.noDisplayAnswers2 =Do you want to allow learners to see the answers now? +button.monitoring.yes =Yes +output.desc.learner.all.correct.true =All correct +output.desc.learner.all.correct.false =Not all correct +label.monitoring.downloadMarks.button =Export marks +label.monitoring.downloadMarks.question.mark =Question {0} (mark: {1}) +label.monitoring.downloadMarks.username =Username +error.monitoring.spreadsheet.download =An error occurred while preparing the marks spreadsheet for download. +label.on =On +label.off =Off +monitor.summary.th.advancedSettings =Advanced settings +monitor.summary.td.addNotebook =Add a notebook at the end of MCQ +monitor.summary.td.notebookInstructions =Notebook instructions +error.pedagogical.planner.empty.answer.selected =In question {0} correct answer cannot be blank. +monitor.summary.date.restriction =Deadline +monitor.summary.when.date.restriction.is.set =Learners will not be able to answer questions after the set date and time. +monitor.summary.after.date =Date/time: +monitor.summary.set.restriction =Set restriction +monitor.summary.unset.restriction =Remove restriction +authoring.info.teacher.set.restriction =The instructor has set a restriction to this activity from {0} onwards. +monitor.summary.notification =Notification +monitor.summary.date.restriction.set =Deadline has been set +monitor.summary.date.restriction.removed =Deadline has been removed +label.authoring.import.qti =Import IMS QTI +error.correct.answer.blank =Please correct this: Correct answer cannot be blank. +label.submit =Finish +label.report.by.question =Report by question +label.report.by.student =Report by learner +label.not.available =N/A +label.legend =Legend +label.denotes.correct.answer =*- Denotes the correct answer +label.correct.answer =Correct answer +label.ave =Average +label.class.mean =Class mean +label.median =Median +label.learning.draft.autosaved =Draft autosaved +label.monitoring.summary.user.name =Name +label.monitoring.summary.total =Total +label.monitoring.summary.learner.summary =Learner summary +label.monitoring.user.summary.response =Response +label.monitoring.user.summary.grade =Grade +label.waiting.for.leader =Please, wait while somebody will become a group leader. +label.users.from.group =Other learners participating in current group: +label.use.select.leader.tool.output =Use leaders from Select Leader tool +label.group.leader =Group leader: {0} +label.refresh =Refresh +label.prefix.sequential.letters.for.each.answer =Prefix sequential letters for each answer +label.info.use.select.leader.outputs =Group leader's option is enabled +label.monitoring.group.leader =Group leader +label.authoring.export.qti =Export IMS QTI +label.select.leader =Select leader +label.question.options =Question options +label.activity.completion =End of activity +label.tool.output =Tool output +label.tool.output.has.been.changed =Tool output has changed +label.operation.failed =Operation failed +answers.submitted.none =Select at least one answer for each of the questions. +label.summary.downloaded =Marks file downloaded. +label.number.learners =Learners +label.number.groups.finished =Number of groups finished +label.graph.help =In the graph(s) below, click on a bar in the graph and then use your mouse wheel to zoom in and out of the graph. Once you zoom in, the grey selection in the bottom graph can be dragged left or right to show a different set of marks. +label.lowest.mark =Lowest mark +label.highest.mark =Highest mark +label.number.learners.in.mark.range =Number of learners in mark range +label.number.groups.in.mark.range =Number of groups in mark range +label.average.mark =Average mark +label.error =Error +error.loaderror =There was an error loading the grid. If this problem persists, please contact your system administrator. +label.ok =OK +message.monitoring.edit.activity.warning =Warning: if you edit and modify a question or change an answer that a learner has already answered, then the mark attained for the modified question will be deleted as it is assumed that the question has changed. If the option for retries is available, then the learner can submit an answer for this question again. +label.enable.confidence.levels =Enable confidence level +label.confidence =How confident are you of your answer? +label.what.is.your.confidence.level =Confidence +label.ira.questions.marks =iRA Questions & Marks +label.attendance =Attendance +label.show.students.choices =Show students' choices +label.hide.students.choices =Hide students' choices +label.print =Print +label.excel.export =Excel export +label.displayFeedbackOnly =Display only the feedback and not the answers or score +label.displayNoAnswersOrFeedback =Do not display answers, score or feedback +label.monitoring.yesDisplayFeedbackOnly =Learners are able to see the feedback but no answers or scores for the questions. +label.monitoring.noDisplayFeedbackOnly1 =Learners are not able to see the feedback for the questions +label.monitoring.noDisplayFeedbackOnly2 =Do you want to allow learners to see the feedback now? +outcome.authoring.title =Learning outcomes +outcome.authoring.input =Search and select by outcome name or code +outcome.authoring.existing =Added outcomes +outcome.authoring.existing.none =none +outcome.authoring.remove.confirm =Are you sure you want to remove this learning outcome? +warn.tool.output.change.none =This will delete all existing marks for this activity. Are you sure? +output.desc.none =No score +label.edit.in.monitor.warning =Attention: while you edit this activity, students don't have access to it. You must save your changes, so students can re-attempt this activity again. +message.qb.modified.update =The question in Question Bank will be updated +message.qb.modified.version =A new version of the question will be created in Question Bank +message.qb.modified.new =A new question will be created in Question Bank +label.qb.stats =Question indexes +label.qb.participant.count =Test participant count +label.qb.difficulty.index =Difficulty index +label.qb.discrimination.index =Discrimination index +label.qb.point.biserial =Point biserial +admin.page.title =Scratchie Settings +admin.success =Configuration successfully saved. +admin.return =Return to maintain LAMS +admin.button.save =Save +admin.hide.titles =Hide question titles for learners + +#======= End labels: Exported 228 labels for en AU ===== Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/McAppConstants.java =================================================================== diff -u -r394f403c289f0fd7808c228840bead5c4e7d5d32 -r5ebec80ccc488d5c09da8e9f648b718b02d0dee2 --- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/McAppConstants.java (.../McAppConstants.java) (revision 394f403c289f0fd7808c228840bead5c4e7d5d32) +++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/McAppConstants.java (.../McAppConstants.java) (revision 5ebec80ccc488d5c09da8e9f648b718b02d0dee2) @@ -114,4 +114,7 @@ public static final String CANDIDATE_ANSWER_PREFIX = "candidateAnswer"; public static final int QUESTION_DEFAULT_MARK = 1; public static final int CANDIDATE_ANSWER_DEFAULT_COUNT = 3; + + // configuration keys + public static final String CONFIG_KEY_HIDE_TITLES = "hideTitles"; } Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/dao/IMcConfigDAO.java =================================================================== diff -u --- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/dao/IMcConfigDAO.java (revision 0) +++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/dao/IMcConfigDAO.java (revision 5ebec80ccc488d5c09da8e9f648b718b02d0dee2) @@ -0,0 +1,9 @@ +package org.lamsfoundation.lams.tool.mc.dao; + +import org.lamsfoundation.lams.dao.IBaseDAO; + +public interface IMcConfigDAO extends IBaseDAO { + void setConfigValue(String key, String value); + + String getConfigValue(String key); +} Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/dao/hibernate/McConfigDAO.java =================================================================== diff -u --- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/dao/hibernate/McConfigDAO.java (revision 0) +++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/dao/hibernate/McConfigDAO.java (revision 5ebec80ccc488d5c09da8e9f648b718b02d0dee2) @@ -0,0 +1,20 @@ +package org.lamsfoundation.lams.tool.mc.dao.hibernate; + +import org.lamsfoundation.lams.dao.hibernate.LAMSBaseDAO; +import org.lamsfoundation.lams.tool.mc.dao.IMcConfigDAO; + +public class McConfigDAO extends LAMSBaseDAO implements IMcConfigDAO { + @Override + public void setConfigValue(String key, String value) { + getSession() + .createNativeQuery("UPDATE tl_lamc11_configuration SET config_value = :value WHERE config_key = :key") + .setParameter("key", key).setParameter("value", value).executeUpdate(); + } + + @Override + public String getConfigValue(String key) { + return (String) getSession() + .createNativeQuery("SELECT config_value FROM tl_lamc11_configuration WHERE config_key = :key") + .setParameter("key", key).uniqueResult(); + } +} Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/dbupdates/patch20191205.sql =================================================================== diff -u --- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/dbupdates/patch20191205.sql (revision 0) +++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/dbupdates/patch20191205.sql (revision 5ebec80ccc488d5c09da8e9f648b718b02d0dee2) @@ -0,0 +1,23 @@ +-- Turn off autocommit, so nothing is committed if there is an error +SET AUTOCOMMIT = 0; +SET FOREIGN_KEY_CHECKS=0; +----------------------Put all sql statements below here------------------------- + +--LDEV-4921 Allow question title hiding in learner + + CREATE TABLE `tl_lamc11_configuration` ( + `config_key` varchar(30), + `config_value` varchar(255), + PRIMARY KEY (`config_key`) + ); + +INSERT INTO `tl_lamc11_configuration` (`config_key`, `config_value`) VALUES ('hideTitles', 'false'); + +UPDATE lams_tool SET admin_url = 'tool/lamc11/admin/start.do' WHERE tool_signature = 'lamc11'; + +----------------------Put all sql statements above here------------------------- + +-- If there were no errors, commit and restore autocommit to on +COMMIT; +SET AUTOCOMMIT = 1; +SET FOREIGN_KEY_CHECKS=1; Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/mcApplicationContext.xml =================================================================== diff -u -r2e9ee1c2451a05981f05e9edf89bb3356cf2b147 -r5ebec80ccc488d5c09da8e9f648b718b02d0dee2 --- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/mcApplicationContext.xml (.../mcApplicationContext.xml) (revision 2e9ee1c2451a05981f05e9edf89bb3356cf2b147) +++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/mcApplicationContext.xml (.../mcApplicationContext.xml) (revision 5ebec80ccc488d5c09da8e9f648b718b02d0dee2) @@ -43,6 +43,10 @@ + + + + @@ -80,6 +84,7 @@ + Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/service/IMcService.java =================================================================== diff -u -re7cbd533f52ac2a431c09e7272b1f31769258022 -r5ebec80ccc488d5c09da8e9f648b718b02d0dee2 --- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/service/IMcService.java (.../IMcService.java) (revision e7cbd533f52ac2a431c09e7272b1f31769258022) +++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/service/IMcService.java (.../IMcService.java) (revision 5ebec80ccc488d5c09da8e9f648b718b02d0dee2) @@ -275,4 +275,8 @@ * Returns one of statuses from IQbService.QUESTION_MODIFIED_* */ int isQbQuestionModified(McQuestionDTO questionDTO); + + void setConfigValue(String key, String value); + + String getConfigValue(String key); } \ No newline at end of file Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/service/McService.java =================================================================== diff -u -r6b89d0c84a5695fb1ad02d5525eb240a9f4d3134 -r5ebec80ccc488d5c09da8e9f648b718b02d0dee2 --- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/service/McService.java (.../McService.java) (revision 6b89d0c84a5695fb1ad02d5525eb240a9f4d3134) +++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/service/McService.java (.../McService.java) (revision 5ebec80ccc488d5c09da8e9f648b718b02d0dee2) @@ -79,6 +79,7 @@ import org.lamsfoundation.lams.tool.exception.DataMissingException; import org.lamsfoundation.lams.tool.exception.ToolException; import org.lamsfoundation.lams.tool.mc.McAppConstants; +import org.lamsfoundation.lams.tool.mc.dao.IMcConfigDAO; import org.lamsfoundation.lams.tool.mc.dao.IMcContentDAO; import org.lamsfoundation.lams.tool.mc.dao.IMcOptionsContentDAO; import org.lamsfoundation.lams.tool.mc.dao.IMcQueContentDAO; @@ -134,6 +135,7 @@ private IMcSessionDAO mcSessionDAO; private IMcUserDAO mcUserDAO; private IMcUsrAttemptDAO mcUsrAttemptDAO; + private IMcConfigDAO mcConfigDAO; private MCOutputFactory mcOutputFactory; private ILogEventService logEventService; @@ -1663,12 +1665,12 @@ return confidenceLevelDtos; } - + @Override public boolean isUserGroupLeader(Long userId, Long toolSessionId) { McSession session = getMcSessionById(toolSessionId); McQueUsr mcUser = getMcUserBySession(userId, session.getUid()); - + return (session != null) && (mcUser != null) && session.isUserGroupLeader(mcUser); } @@ -1690,7 +1692,7 @@ mcUser = new McQueUsr(userId, userName, fullName, session); mcUserDAO.saveMcUser(mcUser); } - + //finalize the latest result, if it's still active if (!mcUser.isResponseFinalised()) { @@ -1808,6 +1810,10 @@ this.mcUsrAttemptDAO = mcUsrAttemptDAO; } + public void setMcConfigDAO(IMcConfigDAO mcConfigDAO) { + this.mcConfigDAO = mcConfigDAO; + } + public void setUserManagementService(IUserManagementService userManagementService) { this.userManagementService = userManagementService; } @@ -2180,6 +2186,16 @@ : IQbService.QUESTION_MODIFIED_NONE; } + @Override + public void setConfigValue(String key, String value) { + mcConfigDAO.setConfigValue(key, value); + } + + @Override + public String getConfigValue(String key) { + return mcConfigDAO.getConfigValue(key); + } + private void releaseQbQuestionFromCache(QbQuestion qbQuestion) { mcQueContentDAO.releaseFromCache(qbQuestion); for (QbOption option : qbQuestion.getQbOptions()) { Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/controller/McAdminController.java =================================================================== diff -u --- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/controller/McAdminController.java (revision 0) +++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/controller/McAdminController.java (revision 5ebec80ccc488d5c09da8e9f648b718b02d0dee2) @@ -0,0 +1,61 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + +package org.lamsfoundation.lams.tool.mc.web.controller; + +import javax.servlet.http.HttpServletRequest; + +import org.lamsfoundation.lams.tool.mc.McAppConstants; +import org.lamsfoundation.lams.tool.mc.service.IMcService; +import org.lamsfoundation.lams.tool.mc.web.form.McAdminForm; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.ModelAttribute; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; + +/** + * @author Andrey Balan, Marcin Cieslak + */ +@Controller +@RequestMapping("/admin") +public class McAdminController { + + @Autowired + private IMcService mcService; + + @RequestMapping("/start") + public String start(@ModelAttribute("mcAdminForm") McAdminForm mcAdminForm, HttpServletRequest request) { + mcAdminForm.setHideTitles(Boolean.valueOf(mcService.getConfigValue(McAppConstants.CONFIG_KEY_HIDE_TITLES))); + + return "/admin/config"; + } + + @RequestMapping(value = "/saveContent", method = RequestMethod.POST) + public String saveContent(@ModelAttribute("mcAdminForm") McAdminForm mcAdminForm, HttpServletRequest request) { + mcService.setConfigValue(McAppConstants.CONFIG_KEY_HIDE_TITLES, String.valueOf(mcAdminForm.isHideTitles())); + + request.setAttribute("savedSuccess", true); + return "/admin/config"; + + } +} \ No newline at end of file Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/form/McAdminForm.java =================================================================== diff -u --- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/form/McAdminForm.java (revision 0) +++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/form/McAdminForm.java (revision 5ebec80ccc488d5c09da8e9f648b718b02d0dee2) @@ -0,0 +1,35 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + +package org.lamsfoundation.lams.tool.mc.web.form; + +public class McAdminForm { + private boolean hideTitles; + + public boolean isHideTitles() { + return hideTitles; + } + + public void setHideTitles(boolean hideTitles) { + this.hideTitles = hideTitles; + } +} \ No newline at end of file Index: lams_tool_lamc/web/admin/config.jsp =================================================================== diff -u --- lams_tool_lamc/web/admin/config.jsp (revision 0) +++ lams_tool_lamc/web/admin/config.jsp (revision 5ebec80ccc488d5c09da8e9f648b718b02d0dee2) @@ -0,0 +1,38 @@ + + +<%@ include file="/common/taglibs.jsp"%> + + + + <fmt:message key="admin.page.title" /> + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+ + +
+ + \ No newline at end of file