private void addQuestion(ims.framework.Control sender) { if(sender.equals(form.lyrTabs().tabListQuestions().grdListQuestions())) { //Add Primary Questions clearQuestionControls(); initialiseNewQuestion(); enableTabNewQuestion(true); enableTabListQuestion(false); showClassificationTree(true); form.getGlobalContext().Core.setQuestionType(QuestionType.PRIMARY); form.lyrTabs().tabNewQuestion().setCaption(ADD_QUESTION); } else { clearQuestionControls(); initialiseNewQuestion(); enableTabNewQuestion(true); enableTabSearchQuestion(false); } }
private void editQuestion(QuestionInformationShortVo voQInfoShort) { QuestionInformationVo voQInfo = null; if (voQInfoShort != null && voQInfoShort.getID_QuestionInformationIsNotNull()) { voQInfo = domain.getQuestion(voQInfoShort.getID_QuestionInformation()); form.getLocalContext().setVoQuestionInformation(voQInfo); } clearQuestionControls(); populateControlsFromData(voQInfo); setIsNewQuestion(new Boolean(false)); enableTabNewQuestion(true); boolean isPrimaryQuestion = voQInfo != null && voQInfo .getQuestionTypeIsNotNull() && voQInfo .getQuestionType().equals(QuestionType.PRIMARY)?true:false; if(isDialog()) enableTabSearchQuestion(false); else { enableTabListQuestion(false); showClassificationTree(isPrimaryQuestion); } showTabNewQuestion(); form.setMode(FormMode.EDIT); }
private void hideColourColumn() { QuestionType qType = form.getGlobalContext().Core.getQuestionType(); if (qType != null) { QuestionAnswerType type = form.cmbAnswerType().getValue(); if (type != null && isSingleOrMultiSelect(type)) { form.grdAnswerOption().setcolColourCaption("Colour"); setReadonlyColColour(false); } else { form.grdAnswerOption().setcolColourCaption(" "); setReadonlyColColour(true); } } }
private void viewQuestion(QuestionInformationShortVo voQInfoShort) { QuestionInformationVo voQInfo = null; if (voQInfoShort != null && voQInfoShort.getID_QuestionInformationIsNotNull()) { voQInfo = domain.getQuestion(voQInfoShort.getID_QuestionInformation()); form.getLocalContext().setVoQuestionInformation(voQInfo); } clearQuestionControls(); populateControlsFromData(voQInfo); setIsNewQuestion(new Boolean(false)); enableTabNewQuestion(true); boolean isPrimaryQuestion = voQInfo != null && voQInfo .getQuestionTypeIsNotNull() && voQInfo .getQuestionType().equals(QuestionType.PRIMARY)?true:false; if(isDialog()) enableTabSearchQuestion(false); else { enableTabListQuestion(false); showClassificationTree(isPrimaryQuestion); } showTabNewQuestion(); form.setMode(FormMode.VIEW); if(isPrimaryQuestion) form.lyrTabs().tabNewQuestion().lyrDetails().tabClasification().treClassification().setEnabled(false); form.lyrTabs().tabNewQuestion().setCaption(VIEW_QUESTION); }
private boolean isScoringAssessmentQuestion() { QuestionType questionType = form.getGlobalContext().Core.getQuestionType(); if (questionType != null) return isUserAssessmentQuestion() && questionType.equals(QuestionType.SCORINGASSESSEMNTQUESTION); return false; }
private boolean isNonScoringAssessmentQuestion() { QuestionType questionType = form.getGlobalContext().Core.getQuestionType(); if (questionType != null) return isUserAssessmentQuestion() && questionType.equals(QuestionType.PRIMARY); return false; }
private boolean isPrimaryQuestion() { QuestionType questionType = form.getGlobalContext().Core.getQuestionType(); if (questionType != null) { QuestionType parentQType = questionType.getParent() != null ? questionType.getParent() : questionType; if (parentQType.equals(QuestionType.PRIMARY)) return true; } return false; }
private void editQuestion() { if (getSelectedQuestion() == false) return; setQuestionType(QuestionType.FINDING); form.getGlobalContext().Core.setQuestionFormMode(FormMode.EDIT); engine.open(form.getForms().Core.QuestionSelectNew, "Finding Questions - Edit Question"); }
private void viewQuestion() { if (getSelectedQuestion() == false) return; setQuestionType(QuestionType.FINDING); form.getGlobalContext().Core.setQuestionFormMode(FormMode.VIEW); engine.open(form.getForms().Core.QuestionSelectNew); }
private void addQuestion(String title, QuestionType questionType, Integer questionMode) { form.getLocalContext().setQuestionMode(questionMode); form.getGlobalContext().Core.setQuestionType(questionType); form.getGlobalContext().Core.setQuestionFormMode(null); form.getGlobalContext().Core.setSelectedQuestion(null); engine.open(form.getForms().Core.QuestionSelectNew, title); }
private void addQuestion() { if (form.cmbCategory().getValue() == null) { engine.showMessage("Please select a Category"); form.cmbCategory().setFocus(); return; } form.getGlobalContext().Core.setQuestionType(QuestionType.PRIMARY); form.getGlobalContext().Core.setQuestionFormMode(null); engine.open(form.getForms().Core.QuestionSelectNew); form.setMode(FormMode.EDIT); }
private void addQuestion() { if (form.qmbService().getValue() == null) { engine.showMessage("Please select a Service"); form.qmbService().setFocus(); return; } form.getGlobalContext().Core.setQuestionType(QuestionType.PRIMARY); form.getGlobalContext().Core.setQuestionFormMode(null); engine.open(form.getForms().Core.QuestionSelectNew); form.setMode(FormMode.EDIT); }
@Override protected void onImbAddQuestionClick() throws ims.framework.exceptions.PresentationLogicException { // form.getGlobalContext().Core.setQuestionFormMode(null); form.getGlobalContext().Core.setQuestionType(QuestionType.PRIMARY); // form.getGlobalContext().Core.setSelectedAssessmentQuestion(null); // form.getGlobalContext().Core.setUserDefinedAssessmentType(UserDefinedAssessmentType.QUESTIONBASEDASSESSMENT); // form.getGlobalContext().Core.setUserAssessmentAction("A"); engine.open(form.getForms().Core.QuestionSelectNew); }