Index: lams_tool_laqa/build.xml =================================================================== diff -u -r558ead6c7d0ae923be08b6e6cd60ea44839ecfdc -r80a367726b9e7607851be28429bda54d9b306159 --- lams_tool_laqa/build.xml (.../build.xml) (revision 558ead6c7d0ae923be08b6e6cd60ea44839ecfdc) +++ lams_tool_laqa/build.xml (.../build.xml) (revision 80a367726b9e7607851be28429bda54d9b306159) @@ -4,37 +4,42 @@ - - + + - + - - - - - - + + + + + + - + + + + + + - + - + - + - - - - - - + + + + + + - + - + @@ -51,102 +56,89 @@ It's also possible to download the jars manually. - + - - - - - + + + + + The JDBC driver you have specified by including one of the files in ${basedir}/config/database doesn't exist. You have to download this driver separately and put it in ${db.driver.jar} Please make sure you're using a version that is equal or superior to the one we looked for. If you name the driver jar file differently, please update the db.driver.jar property in the ${basedir}/config/database/xxx.xml file accordingly. - + - - - - + + - - - -
-
-
- + - + - - - - - - - - - - - - - - +
+
+
+
+ - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - + + + + + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - + + + + + + + + - - - - - + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + - - - - - + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - + + + + - + + + + - lamsEarPath="${jboss.deploy}" - toolContext="${toolContext}" - toolWebUri="${product}.war" - languageFilesPackage="org.lamsfoundation.lams.tool.qa"> + + + + - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + - + + + + + + + + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Deploying the QA tool + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + - Deploying the QA tool - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + - - - - - - - - - - - - - - - - - - - + - - - - - - - - + + + + + + - - - - - - - - - - + + + + + + + + + @@ -529,4 +479,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file Index: lams_tool_laqa/conf/hibernate/mappings/org/lamsfoundation/lams/tool/qa/QaConfigItem.hbm.xml =================================================================== diff -u --- lams_tool_laqa/conf/hibernate/mappings/org/lamsfoundation/lams/tool/qa/QaConfigItem.hbm.xml (revision 0) +++ lams_tool_laqa/conf/hibernate/mappings/org/lamsfoundation/lams/tool/qa/QaConfigItem.hbm.xml (revision 80a367726b9e7607851be28429bda54d9b306159) @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + + + + + + Index: lams_tool_laqa/conf/hibernate/mappings/org/lamsfoundation/lams/tool/qa/QaWizardCategory.hbm.xml =================================================================== diff -u --- lams_tool_laqa/conf/hibernate/mappings/org/lamsfoundation/lams/tool/qa/QaWizardCategory.hbm.xml (revision 0) +++ lams_tool_laqa/conf/hibernate/mappings/org/lamsfoundation/lams/tool/qa/QaWizardCategory.hbm.xml (revision 80a367726b9e7607851be28429bda54d9b306159) @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: lams_tool_laqa/conf/hibernate/mappings/org/lamsfoundation/lams/tool/qa/QaWizardCognitiveSkill.hbm.xml =================================================================== diff -u --- lams_tool_laqa/conf/hibernate/mappings/org/lamsfoundation/lams/tool/qa/QaWizardCognitiveSkill.hbm.xml (revision 0) +++ lams_tool_laqa/conf/hibernate/mappings/org/lamsfoundation/lams/tool/qa/QaWizardCognitiveSkill.hbm.xml (revision 80a367726b9e7607851be28429bda54d9b306159) @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: lams_tool_laqa/conf/hibernate/mappings/org/lamsfoundation/lams/tool/qa/QaWizardQuestion.hbm.xml =================================================================== diff -u --- lams_tool_laqa/conf/hibernate/mappings/org/lamsfoundation/lams/tool/qa/QaWizardQuestion.hbm.xml (revision 0) +++ lams_tool_laqa/conf/hibernate/mappings/org/lamsfoundation/lams/tool/qa/QaWizardQuestion.hbm.xml (revision 80a367726b9e7607851be28429bda54d9b306159) @@ -0,0 +1,56 @@ + + + + + + + + + + + + + + + + + + + + + + Index: lams_tool_laqa/conf/language/lams/ApplicationResources.properties =================================================================== diff -u -rf34556c36d04199043d3fd6beec4034208951c2f -r80a367726b9e7607851be28429bda54d9b306159 --- lams_tool_laqa/conf/language/lams/ApplicationResources.properties (.../ApplicationResources.properties) (revision f34556c36d04199043d3fd6beec4034208951c2f) +++ lams_tool_laqa/conf/language/lams/ApplicationResources.properties (.../ApplicationResources.properties) (revision 80a367726b9e7607851be28429bda54d9b306159) @@ -199,6 +199,38 @@ textsearch.any.words =have one or more of these words: textsearch.excluded.words =have none of these unwanted words: textsearch.questions =Search in these questions: +pageTitle.admin =Q&A Configuration +admin.formError =Missing values, please make sure all required fields are entered. +admin.enableWizard =Enable the Q&A question wizard +admin.success =Configuration successfully saved. +admin.return =Return to maintain LAMS +wizard.ok =OK +wizard.wizardTitle =Cognitive Skills Wizard +wizard.selectCategory =Select category +wizard.selectSkill =Select cognitive skill +wizard.selectQuestion =Select question +wizard.add =Add +wizard.addCategory =Add Category +wizard.addSkill =Add Cognitive Skill +wizard.addQuestion =Add Question +wizard.add.mustSelectCategory =You must select a category before adding a cognitive skill. +wizard.add.mustSelectSkill =You must select a cognitive skill and a category before adding a question. +wizard.edit =Edit +wizard.editCategory =Edit Category +wizard.edit.notSelected =Please select the corresponding category, cognitive skill or question before clicking edit. +wizard.delete =Delete +wizard.delete.warnDeleteCategory =Deleting this category will delete also all its cognitive skills and questions, this cannot be undone. Do you wish to continue? +wizard.delete.warnDeleteSkill =Deleting this cognitive skill will also delete all its questions, this cannot be undone. Do you wish to continue? +wizard.delete.warnDeleteQuestion =Are you sure you want to delete this question? This cannot be undone. +wizard.delete.category =Category successfully deleted. +wizard.delete.skill =Cognitive skill successfully deleted. +wizard.delete.question =Question successfully deleted. +wizard.delete.notselected =Please select an item to delete first. +wizard.author.wizardTitle =Cognitive Skills Wizard +wizard.author.info1 = This wizard helps you choose the right type of question you might want to ask your learners. +wizard.author.info2 = Choose a category and then the second menu will display the cognitive skill. +wizard.author.info3 = After you select a cognitive skill, you'll be presented with a question template you can use. + #======= End labels: Exported 193 labels for en AU ===== Index: lams_tool_laqa/conf/language/lams/ApplicationResources_en_AU.properties =================================================================== diff -u -rf34556c36d04199043d3fd6beec4034208951c2f -r80a367726b9e7607851be28429bda54d9b306159 --- lams_tool_laqa/conf/language/lams/ApplicationResources_en_AU.properties (.../ApplicationResources_en_AU.properties) (revision f34556c36d04199043d3fd6beec4034208951c2f) +++ lams_tool_laqa/conf/language/lams/ApplicationResources_en_AU.properties (.../ApplicationResources_en_AU.properties) (revision 80a367726b9e7607851be28429bda54d9b306159) @@ -201,4 +201,43 @@ textsearch.questions =Search in these questions: -#======= End labels: Exported 193 labels for en AU ===== +textsearch.heading =Answers that... +textsearch.all.words =have all these words: +textsearch.phrase =have this exact wording or phrase: +textsearch.any.words =have one or more of these words: +textsearch.excluded.words =have none of these unwanted words: +textsearch.questions =Search in these questions: + +pageTitle.admin =Q&A Configuration +admin.formError =Missing values, please make sure all required fields are entered. +admin.enableWizard =Enable the Q&A question wizard +admin.success =Configuration successfully saved. +admin.return =Return to maintain LAMS +wizard.ok =OK +wizard.wizardTitle =Cognitive Skills Wizard +wizard.selectCategory =Select category +wizard.selectSkill =Select cognitive skill +wizard.selectQuestion =Select question +wizard.add =Add +wizard.addCategory =Add Category +wizard.addSkill =Add Cognitive Skill +wizard.addQuestion =Add Question +wizard.add.mustSelectCategory =You must select a category before adding a cognitive skill. +wizard.add.mustSelectSkill =You must select a cognitive skill and a category before adding a question. +wizard.edit =Edit +wizard.editCategory =Edit Category +wizard.edit.notSelected =Please select the corresponding category, cognitive skill or question before clicking edit. +wizard.delete =Delete +wizard.delete.warnDeleteCategory =Deleting this category will delete also all its cognitive skills and questions, this cannot be undone. Do you wish to continue? +wizard.delete.warnDeleteSkill =Deleting this cognitive skill will also delete all its questions, this cannot be undone. Do you wish to continue? +wizard.delete.warnDeleteQuestion =Are you sure you want to delete this question? This cannot be undone. +wizard.delete.category =Category successfully deleted. +wizard.delete.skill =Cognitive skill successfully deleted. +wizard.delete.question =Question successfully deleted. +wizard.delete.notselected =Please select an item to delete first. +wizard.author.wizardTitle =Cognitive Skills Wizard +wizard.author.info1 = This wizard helps you choose the right type of question you might want to ask your learners. +wizard.author.info2 = Choose a category and then the second menu will display the cognitive skill. +wizard.author.info3 = After you select a cognitive skill, you'll be presented with a question template you can use. + +#======= End labels: Exported 168 labels for en AU ===== Index: lams_tool_laqa/conf/language/rams/ApplicationResources.properties =================================================================== diff -u -re58357098773303e96bea0f5f82f9b03c2bcc770 -r80a367726b9e7607851be28429bda54d9b306159 --- lams_tool_laqa/conf/language/rams/ApplicationResources.properties (.../ApplicationResources.properties) (revision e58357098773303e96bea0f5f82f9b03c2bcc770) +++ lams_tool_laqa/conf/language/rams/ApplicationResources.properties (.../ApplicationResources.properties) (revision 80a367726b9e7607851be28429bda54d9b306159) @@ -171,5 +171,38 @@ errors.maxfilesize =The uploaded file has exceeded the maximum file size limit of {0} bytes warning.empty.answers =One or more question(s) are not answered. Do you want to continue anyway? +pageTitle.admin =Q&A Configuration +admin.formError =Missing values, please make sure all required fields are entered. +admin.enableWizard =Enable the Q&A question wizard +admin.success =Configuration successfully saved. +admin.return =Return to maintain LAMS +wizard.ok =OK +wizard.wizardTitle =Cognitive Skills Wizard +wizard.selectCategory =Select category +wizard.selectSkill =Select cognitive skill +wizard.selectQuestion =Select question +wizard.add =Add +wizard.addCategory =Add Category +wizard.addSkill =Add Cognitive Skill +wizard.addQuestion =Add Question +wizard.add.mustSelectCategory =You must select a category before adding a cognitive skill. +wizard.add.mustSelectSkill =You must select a cognitive skill and a category before adding a question. +wizard.edit =Edit +wizard.editCategory =Edit Category +wizard.edit.notSelected =Please select the corresponding category, cognitive skill or question before clicking edit. +wizard.delete =Delete +wizard.delete.warnDeleteCategory =Deleting this category will delete also all its cognitive skills and questions, this cannot be undone. Do you wish to continue? +wizard.delete.warnDeleteSkill =Deleting this cognitive skill will also delete all its questions, this cannot be undone. Do you wish to continue? +wizard.delete.warnDeleteQuestion =Are you sure you want to delete this question? This cannot be undone. +wizard.delete.category =Category successfully deleted. +wizard.delete.skill =Cognitive skill successfully deleted. +wizard.delete.question =Question successfully deleted. +wizard.delete.notselected =Please select an item to delete first. +wizard.author.wizardTitle =Cognitive Skills Wizard +wizard.author.info1 = This wizard helps you choose the right type of question you might want to ask your learners. +wizard.author.info2 = Choose a category and then the second menu will display the cognitive skill. +wizard.author.info3 = After you select a cognitive skill, you'll be presented with a question template you can use. + + #======= End labels: Exported 164 labels for en AU ===== Index: lams_tool_laqa/conf/language/rams/ApplicationResources_en_AU.properties =================================================================== diff -u -re58357098773303e96bea0f5f82f9b03c2bcc770 -r80a367726b9e7607851be28429bda54d9b306159 --- lams_tool_laqa/conf/language/rams/ApplicationResources_en_AU.properties (.../ApplicationResources_en_AU.properties) (revision e58357098773303e96bea0f5f82f9b03c2bcc770) +++ lams_tool_laqa/conf/language/rams/ApplicationResources_en_AU.properties (.../ApplicationResources_en_AU.properties) (revision 80a367726b9e7607851be28429bda54d9b306159) @@ -171,5 +171,38 @@ errors.maxfilesize =The uploaded file has exceeded the maximum file size limit of {0} bytes warning.empty.answers =One or more question(s) are not answered. Do you want to continue anyway? +pageTitle.admin =Q&A Configuration +admin.formError =Missing values, please make sure all required fields are entered. +admin.enableWizard =Enable the Q&A question wizard +admin.success =Configuration successfully saved. +admin.return =Return to maintain LAMS +wizard.ok =OK +wizard.wizardTitle =Cognitive Skills Wizard +wizard.selectCategory =Select category +wizard.selectSkill =Select cognitive skill +wizard.selectQuestion =Select question +wizard.add =Add +wizard.addCategory =Add Category +wizard.addSkill =Add Cognitive Skill +wizard.addQuestion =Add Question +wizard.add.mustSelectCategory =You must select a category before adding a cognitive skill. +wizard.add.mustSelectSkill =You must select a cognitive skill and a category before adding a question. +wizard.edit =Edit +wizard.editCategory =Edit Category +wizard.edit.notSelected =Please select the corresponding category, cognitive skill or question before clicking edit. +wizard.delete =Delete +wizard.delete.warnDeleteCategory =Deleting this category will delete also all its cognitive skills and questions, this cannot be undone. Do you wish to continue? +wizard.delete.warnDeleteSkill =Deleting this cognitive skill will also delete all its questions, this cannot be undone. Do you wish to continue? +wizard.delete.warnDeleteQuestion =Are you sure you want to delete this question? This cannot be undone. +wizard.delete.category =Category successfully deleted. +wizard.delete.skill =Cognitive skill successfully deleted. +wizard.delete.question =Question successfully deleted. +wizard.delete.notselected =Please select an item to delete first. +wizard.author.wizardTitle =Cognitive Skills Wizard +wizard.author.info1 = This wizard helps you choose the right type of question you might want to ask your learners. +wizard.author.info2 = Choose a category and then the second menu will display the cognitive skill. +wizard.author.info3 = After you select a cognitive skill, you'll be presented with a question template you can use. + + #======= End labels: Exported 164 labels for en AU ===== Index: lams_tool_laqa/db/sql/create_lams_tool_qa.sql =================================================================== diff -u -r33f9171c071c179459972380a9b732f1aeec87bf -r80a367726b9e7607851be28429bda54d9b306159 --- lams_tool_laqa/db/sql/create_lams_tool_qa.sql (.../create_lams_tool_qa.sql) (revision 33f9171c071c179459972380a9b732f1aeec87bf) +++ lams_tool_laqa/db/sql/create_lams_tool_qa.sql (.../create_lams_tool_qa.sql) (revision 80a367726b9e7607851be28429bda54d9b306159) @@ -116,3 +116,29 @@ -- data for content questions table INSERT INTO tl_laqa11_que_content (question, display_order, qa_content_id) VALUES ('Sample Question 1?',1,1); + +SET FOREIGN_KEY_CHECKS=0; +-- insert scripts for the wizard tables +drop table if exists tl_laqa11_configuration; +drop table if exists tl_laqa11_wizard_category; +drop table if exists tl_laqa11_wizard_cognitive_skill; +drop table if exists tl_laqa11_wizard_question; +create table tl_laqa11_configuration (uid bigint not null auto_increment, config_key varchar(30) unique, config_value varchar(255), primary key (uid))TYPE=InnoDB; +create table tl_laqa11_wizard_category (uid bigint not null auto_increment, title varchar(255) not null, primary key (uid))TYPE=InnoDB; +create table tl_laqa11_wizard_cognitive_skill (uid bigint not null auto_increment, title varchar(255) not null, category_uid bigint, primary key (uid))TYPE=InnoDB; +create table tl_laqa11_wizard_question (uid bigint not null auto_increment, cognitive_skill_uid bigint, title text not null, primary key (uid))TYPE=InnoDB; +alter table tl_laqa11_wizard_cognitive_skill add index FK3BA4132BCBB0DC8D (category_uid), add constraint FK3BA4132BCBB0DC8D foreign key (category_uid) references tl_laqa11_wizard_category (uid); +alter table tl_laqa11_wizard_question add index FKAF08A0C7EFF77FD4 (cognitive_skill_uid), add constraint FKAF08A0C7EFF77FD4 foreign key (cognitive_skill_uid) references tl_laqa11_wizard_cognitive_skill (uid); + +-- Inserting the required config item into the config table +-- Gmap API key is added here for shaun so the Gmap works there automatically for each build +INSERT INTO tl_laqa11_configuration ( + config_key, + config_value +) +VALUES( + "enableQaWizard", + "false" +); +SET FOREIGN_KEY_CHECKS=1; + Index: lams_tool_laqa/db/sql/tool_insert.sql =================================================================== diff -u -r0af4ed13b963a588f3499b080801863d57f8ad95 -r80a367726b9e7607851be28429bda54d9b306159 --- lams_tool_laqa/db/sql/tool_insert.sql (.../tool_insert.sql) (revision 0af4ed13b963a588f3499b080801863d57f8ad95) +++ lams_tool_laqa/db/sql/tool_insert.sql (.../tool_insert.sql) (revision 80a367726b9e7607851be28429bda54d9b306159) @@ -50,7 +50,8 @@ context_file, create_date_time, modified_date_time, -supports_outputs +supports_outputs, +admin_url ) VALUES ( @@ -81,5 +82,6 @@ '/org/lamsfoundation/lams/tool/qa/qaApplicationContext.xml', NOW(), NOW(), -1 +1, +'tool/laqa11/laqa11admin.do' ) Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaAppConstants.java =================================================================== diff -u -r33f9171c071c179459972380a9b732f1aeec87bf -r80a367726b9e7607851be28429bda54d9b306159 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaAppConstants.java (.../QaAppConstants.java) (revision 33f9171c071c179459972380a9b732f1aeec87bf) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaAppConstants.java (.../QaAppConstants.java) (revision 80a367726b9e7607851be28429bda54d9b306159) @@ -281,4 +281,6 @@ public static final int QUESTION_CUTOFF_INDEX = 40; public static final String TEXT_SEARCH_DEFINITION_NAME = "text.search.output.definition.qa"; public static final String TEXT_SEARCH_DEFAULT_CONDITION_DISPLAY_NAME_KEY = "text.search.output.definition.qa.default.condition"; + public static final String ATTR_WIZARD_CATEGORIES = "wizardCategories"; + public static final String ATTR_WIZARD_ENABLED = "wizardEnabled"; } Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaConfigItem.java =================================================================== diff -u --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaConfigItem.java (revision 0) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaConfigItem.java (revision 80a367726b9e7607851be28429bda54d9b306159) @@ -0,0 +1,81 @@ +/**************************************************************** + * Copyright (C) 2008 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 + * **************************************************************** + */ + +/* $Id$ */ +package org.lamsfoundation.lams.tool.qa; + +/** + * @hibernate.class table="tl_laqa11_configuration" + */ +public class QaConfigItem { + + public static final String KEY_ENABLE_QAWIZARD = "enableQaWizard"; + + private Long uid; + private String configKey; + private String configValue; + + public QaConfigItem() { + } + + public QaConfigItem(Long uid, String configKey, String configValue) { + super(); + this.uid = uid; + this.configKey = configKey; + this.configValue = configValue; + } + + /** + * @hibernate.id generator-class="native" type="java.lang.Long" column="uid" + * + */ + public Long getUid() { + return uid; + } + + public void setUid(Long uid) { + this.uid = uid; + } + + /** + * @hibernate.property column="config_key" length="30" not-null="false" + * unique="true" + */ + public String getConfigKey() { + return configKey; + } + + public void setConfigKey(String configKey) { + this.configKey = configKey; + } + + /** + * @hibernate.property column="config_value" length="255" not-null="false" + */ + public String getConfigValue() { + return configValue; + } + + public void setConfigValue(String configValue) { + this.configValue = configValue; + } +} Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaWizardCategory.java =================================================================== diff -u --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaWizardCategory.java (revision 0) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaWizardCategory.java (revision 80a367726b9e7607851be28429bda54d9b306159) @@ -0,0 +1,101 @@ +/**************************************************************** + * Copyright (C) 2008 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 + * **************************************************************** + */ + +/* $Id$ */ +package org.lamsfoundation.lams.tool.qa; + +import java.io.Serializable; +import java.util.Set; + +/** + * This class maps to a single category in the q&a wizard, it + * contains a set of cognitive skills + * + * @hibernate.class table="tl_laqa11_wizard_category" + */ +public class QaWizardCategory implements Serializable, Comparable { + + public static final long serialVersionUID = 1234165196523665452L; + + private Long uid; + private String title; + private Set cognitiveSkills; + + public QaWizardCategory() { + } + + public QaWizardCategory(Long uid, String title, Set cognitiveSkills) { + super(); + this.uid = uid; + this.title = title; + this.cognitiveSkills = cognitiveSkills; + } + + /** + * @hibernate.id generator-class="native" type="java.lang.Long" column="uid" + * + */ + public Long getUid() { + return uid; + } + + public void setUid(Long uid) { + this.uid = uid; + } + + /** + * @hibernate.property column="title" length="255" not-null="true" + */ + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + + /** + * @hibernate.set lazy="true" inverse="false" cascade="all-delete-orphan" + * @hibernate.collection-key column="category_uid" + * @hibernate.collection-one-to-many class="org.lamsfoundation.lams.tool.qa.QaWizardCognitiveSkill" + * + */ + public Set getCognitiveSkills() { + return cognitiveSkills; + } + + public void setCognitiveSkills(Set cognitiveSkills) { + this.cognitiveSkills = cognitiveSkills; + } + + public int compareTo(QaWizardCategory category) { + if (category.getUid()!=null && uid != null) + { + return category.getUid().compareTo(uid) * -1; + } + else + { + return 1; + } + } +} + \ No newline at end of file Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaWizardCognitiveSkill.java =================================================================== diff -u --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaWizardCognitiveSkill.java (revision 0) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaWizardCognitiveSkill.java (revision 80a367726b9e7607851be28429bda54d9b306159) @@ -0,0 +1,120 @@ +/**************************************************************** + * Copyright (C) 2008 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 + * **************************************************************** + */ + +/* $Id$ */ +package org.lamsfoundation.lams.tool.qa; + +import java.io.Serializable; +import java.util.Set; +import java.util.SortedSet; + +/** + * This class maps to a single cognitive skill in the q&a wizard, it + * contains a set of questions + * + * @hibernate.class table="tl_laqa11_wizard_cognitive_skill" + */ +public class QaWizardCognitiveSkill implements Serializable, Comparable { + + public static final long serialVersionUID = 6732784345784895744L; + + private Long uid; + private String title; + private QaWizardCategory category; + private Set questions; + + public QaWizardCognitiveSkill() { + } + + public QaWizardCognitiveSkill(Long uid, String title, QaWizardCategory category, SortedSet questions) { + super(); + this.uid = uid; + this.title = title; + this.category = category; + this.questions = questions; + } + + /** + * @hibernate.id generator-class="native" type="java.lang.Long" column="uid" + * + */ + public Long getUid() { + return uid; + } + + public void setUid(Long uid) { + this.uid = uid; + } + + /** + * @hibernate.property column="title" length="255" not-null="true" + */ + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + + /** + * + * @hibernate.many-to-one cascade="none" + * class="org.lamsfoundation.lams.tool.qa.QaWizardCategory" + * column="category_uid" + * + */ + public QaWizardCategory getCategory() { + return category; + } + + public void setCategory(QaWizardCategory category) { + this.category = category; + } + + /** + * @hibernate.set lazy="true" inverse="false" cascade="all-delete-orphan" + * order-by="uid asc" + * @hibernate.collection-key column="cognitive_skill_uid" + * @hibernate.collection-one-to-many class="org.lamsfoundation.lams.tool.qa.QaWizardQuestion" + * + */ + public Set getQuestions() { + return questions; + } + + public void setQuestions(Set questions) { + this.questions = questions; + } + + public int compareTo(QaWizardCognitiveSkill skill) { + if (skill.getUid()!=null && uid != null) + { + return skill.getUid().compareTo(uid) * -1; + } + else + { + return 1; + } + } +} + \ No newline at end of file Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaWizardQuestion.java =================================================================== diff -u --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaWizardQuestion.java (revision 0) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaWizardQuestion.java (revision 80a367726b9e7607851be28429bda54d9b306159) @@ -0,0 +1,102 @@ +/**************************************************************** + * Copyright (C) 2008 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 + * **************************************************************** + */ + +/* $Id$ */ +package org.lamsfoundation.lams.tool.qa; + +import java.io.Serializable; + +/** + * This class maps to a sample question in the q&a wizard, it has a parent + * cognitive skill which in turn has a parent category + * + * @hibernate.class table="tl_laqa11_wizard_question" + */ +public class QaWizardQuestion implements Serializable, Comparable{ + + public static final long serialVersionUID = 4353787904539453783L; + + private Long uid; + private QaWizardCognitiveSkill cognitiveSkill; + private String question; + + public QaWizardQuestion() { + } + + public QaWizardQuestion(Long uid, QaWizardCognitiveSkill cognitiveSkill, String question) { + super(); + this.uid = uid; + this.cognitiveSkill = cognitiveSkill; + this.question = question; + } + + /** + * @hibernate.id generator-class="native" type="java.lang.Long" column="uid" + * + */ + public Long getUid() { + return uid; + } + + public void setUid(Long uid) { + this.uid = uid; + } + + /** + * + * @hibernate.many-to-one cascade="none" + * class="org.lamsfoundation.lams.tool.qa.QaWizardCognitiveSkill" + * column="cognitive_skill_uid" + * + */ + public QaWizardCognitiveSkill getCognitiveSkill() { + return cognitiveSkill; + } + + public void setCognitiveSkill(QaWizardCognitiveSkill cognitiveSkill) { + this.cognitiveSkill = cognitiveSkill; + } + + /** + * @hibernate.property column="title" length="1027" not-null="true" + */ + public String getQuestion() { + return question; + } + + public void setQuestion(String question) { + this.question = question; + } + + public int compareTo(QaWizardQuestion question) { + if (question.getUid() != null && uid != null) + { + return question.getUid().compareTo(uid) * -1; + } + else + { + return 1; + } + } + +} + \ No newline at end of file Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dao/IQaConfigItemDAO.java =================================================================== diff -u --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dao/IQaConfigItemDAO.java (revision 0) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dao/IQaConfigItemDAO.java (revision 80a367726b9e7607851be28429bda54d9b306159) @@ -0,0 +1,34 @@ +/**************************************************************** + * Copyright (C) 2008 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 + * **************************************************************** + */ + +/* $Id$ */ +package org.lamsfoundation.lams.tool.qa.dao; + +import org.lamsfoundation.lams.dao.IBaseDAO; +import org.lamsfoundation.lams.tool.qa.QaConfigItem; + +public interface IQaConfigItemDAO extends IBaseDAO { + + public void saveOrUpdate(QaConfigItem toConfig); + + public QaConfigItem getConfigItemByKey(final String configKey); +} Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dao/IQaWizardDAO.java =================================================================== diff -u --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dao/IQaWizardDAO.java (revision 0) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dao/IQaWizardDAO.java (revision 80a367726b9e7607851be28429bda54d9b306159) @@ -0,0 +1,39 @@ +/**************************************************************** + * Copyright (C) 2008 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 + * **************************************************************** + */ + +/* $Id$ */ +package org.lamsfoundation.lams.tool.qa.dao; + +import java.util.SortedSet; + +import org.lamsfoundation.lams.dao.IBaseDAO; +import org.lamsfoundation.lams.tool.qa.QaWizardCategory; +import org.lamsfoundation.lams.tool.qa.QaWizardCognitiveSkill; +import org.lamsfoundation.lams.tool.qa.QaWizardQuestion; +public interface IQaWizardDAO extends IBaseDAO{ + void saveOrUpdateCategories(SortedSet categories); + SortedSet getWizardCategories(); + void deleteWizardCategoryByUID(Long uid); + void deleteWizardSkillByUID(Long uid); + void deleteWizardQuestionByUID(Long uid); +} + \ No newline at end of file Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dao/hibernate/QaConfigItemDAO.java =================================================================== diff -u --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dao/hibernate/QaConfigItemDAO.java (revision 0) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dao/hibernate/QaConfigItemDAO.java (revision 80a367726b9e7607851be28429bda54d9b306159) @@ -0,0 +1,52 @@ +/**************************************************************** + * Copyright (C) 2008 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 + * **************************************************************** + */ + +/* $Id$ */ +package org.lamsfoundation.lams.tool.qa.dao.hibernate; + +import org.hibernate.HibernateException; +import org.hibernate.Session; +import org.lamsfoundation.lams.dao.hibernate.BaseDAO; +import org.lamsfoundation.lams.tool.qa.dao.IQaConfigItemDAO; +import org.lamsfoundation.lams.tool.qa.QaConfigItem; +import org.springframework.orm.hibernate3.HibernateCallback; + +public class QaConfigItemDAO extends BaseDAO implements IQaConfigItemDAO { + + private static final String LOAD_CONFIG_ITEM_BY_KEY = "from QaConfigItem configuration" + + " where configuration.configKey=:key"; + + public QaConfigItem getConfigItemByKey(final String configKey) { + return (QaConfigItem) getHibernateTemplate().execute(new HibernateCallback() { + public Object doInHibernate(Session session) throws HibernateException { + return session.createQuery(LOAD_CONFIG_ITEM_BY_KEY).setString("key", configKey).uniqueResult(); + } + }); + + } + + public void saveOrUpdate(QaConfigItem qaConfigItem) { + this.getHibernateTemplate().saveOrUpdate(qaConfigItem); + this.getHibernateTemplate().flush(); + } + +} Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dao/hibernate/QaWizardDAO.java =================================================================== diff -u --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dao/hibernate/QaWizardDAO.java (revision 0) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dao/hibernate/QaWizardDAO.java (revision 80a367726b9e7607851be28429bda54d9b306159) @@ -0,0 +1,127 @@ +/**************************************************************** + * Copyright (C) 2008 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 + * **************************************************************** + */ + +/* $Id$ */ +package org.lamsfoundation.lams.tool.qa.dao.hibernate; + +import java.util.List; +import java.util.SortedSet; +import java.util.TreeSet; + +import org.lamsfoundation.lams.dao.hibernate.BaseDAO; +import org.lamsfoundation.lams.tool.qa.QaWizardCategory; +import org.lamsfoundation.lams.tool.qa.QaWizardCognitiveSkill; +import org.lamsfoundation.lams.tool.qa.QaWizardQuestion; +import org.lamsfoundation.lams.tool.qa.dao.IQaWizardDAO; + +/** + * + * @author lfoxton + * + */ +public class QaWizardDAO extends BaseDAO implements IQaWizardDAO { + + private static final String QUERY_FIND_ALL_CATEGORIES = "from " + QaWizardCategory.class.getName(); + + private static final String QUERY_GET_CATEGORY = "from " + QaWizardCategory.class.getName() + " c where c.uid=?"; + private static final String QUERY_GET_SKILL = "from " + QaWizardCognitiveSkill.class.getName() + " c where c.uid=?"; + private static final String QUERY_GET_QUESTION = "from " + QaWizardQuestion.class.getName() + " q where q.uid=?"; + + public void saveOrUpdateCategories(SortedSet categories) { + getHibernateTemplate().saveOrUpdateAll(categories); + } + + @SuppressWarnings("unchecked") + public SortedSet getWizardCategories() { + SortedSet ret = new TreeSet(); + List list = getHibernateTemplate().find(QUERY_FIND_ALL_CATEGORIES); + for (QaWizardCategory category : list) { + ret.add(category); + } + return ret; + } + + public void deleteWizardCategoryByUID(Long uid) { + QaWizardCategory cat = getWizardCategoryByUID(uid); + if (cat != null) + { + getHibernateTemplate().delete(cat); + } + } + + public void deleteWizardSkillByUID(Long uid){ + QaWizardCognitiveSkill skill = getWizardSkillByUID(uid); + if (skill != null) + { + getHibernateTemplate().delete(skill); + } + } + + public void deleteWizardQuestionByUID(Long uid){ + QaWizardQuestion question = getWizardQuestionByUID(uid); + if (question != null) + { + getHibernateTemplate().delete(question); + } + } + + @SuppressWarnings("unchecked") + public QaWizardCategory getWizardCategoryByUID(Long uid) { + List result = getHibernateTemplate().find(QUERY_GET_CATEGORY, uid); + if (result.size() > 0) + { + return (QaWizardCategory)result.get(0); + } + else + { + return null; + } + } + + @SuppressWarnings("unchecked") + public QaWizardCognitiveSkill getWizardSkillByUID(Long uid){ + List result = getHibernateTemplate().find(QUERY_GET_SKILL, uid); + if (result.size() > 0) + { + return (QaWizardCognitiveSkill)result.get(0); + } + else + { + return null; + } + } + + @SuppressWarnings("unchecked") + public QaWizardQuestion getWizardQuestionByUID(Long uid){ + + List result = getHibernateTemplate().find(QUERY_GET_QUESTION, uid); + if (result.size() > 0) + { + return (QaWizardQuestion)result.get(0); + } + else + { + return null; + } + } + +} Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/qaApplicationContext.xml =================================================================== diff -u -r0af4ed13b963a588f3499b080801863d57f8ad95 -r80a367726b9e7607851be28429bda54d9b306159 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/qaApplicationContext.xml (.../qaApplicationContext.xml) (revision 0af4ed13b963a588f3499b080801863d57f8ad95) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/qaApplicationContext.xml (.../qaApplicationContext.xml) (revision 80a367726b9e7607851be28429bda54d9b306159) @@ -32,6 +32,10 @@ /org/lamsfoundation/lams/tool/qa/QaUsrResp.hbm.xml /org/lamsfoundation/lams/tool/qa/QaUploadedFile.hbm.xml /org/lamsfoundation/lams/tool/qa/QaCondition.hbm.xml + /org/lamsfoundation/lams/tool/qa/QaConfigItem.hbm.xml + /org/lamsfoundation/lams/tool/qa/QaWizardCognitiveSkill.hbm.xml + /org/lamsfoundation/lams/tool/qa/QaWizardQuestion.hbm.xml + /org/lamsfoundation/lams/tool/qa/QaWizardCategory.hbm.xml @@ -69,8 +73,15 @@ - + + + + + + + + @@ -88,7 +99,9 @@ - + + + Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/service/IQaService.java =================================================================== diff -u -rc4dfe712e2f4adc4d448e5653df6430eb2949002 -r80a367726b9e7607851be28429bda54d9b306159 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/service/IQaService.java (.../IQaService.java) (revision c4dfe712e2f4adc4d448e5653df6430eb2949002) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/service/IQaService.java (.../IQaService.java) (revision 80a367726b9e7607851be28429bda54d9b306159) @@ -26,6 +26,7 @@ import java.io.InputStream; import java.util.Collection; import java.util.List; +import java.util.SortedSet; import org.lamsfoundation.lams.contentrepository.ITicket; import org.lamsfoundation.lams.notebook.model.NotebookEntry; @@ -34,12 +35,14 @@ import org.lamsfoundation.lams.tool.exception.ToolException; import org.lamsfoundation.lams.tool.qa.QaApplicationException; import org.lamsfoundation.lams.tool.qa.QaCondition; +import org.lamsfoundation.lams.tool.qa.QaConfigItem; import org.lamsfoundation.lams.tool.qa.QaContent; import org.lamsfoundation.lams.tool.qa.QaQueContent; import org.lamsfoundation.lams.tool.qa.QaQueUsr; import org.lamsfoundation.lams.tool.qa.QaSession; import org.lamsfoundation.lams.tool.qa.QaUploadedFile; import org.lamsfoundation.lams.tool.qa.QaUsrResp; +import org.lamsfoundation.lams.tool.qa.QaWizardCategory; import org.lamsfoundation.lams.usermanagement.User; import org.lamsfoundation.lams.util.audit.IAuditService; @@ -294,6 +297,49 @@ public String createConditionName(Collection existingConditions); public void deleteCondition(QaCondition condition); - + public QaCondition createDefaultComplexCondition(QaContent qaContent); + + /** + * Gets the qa config item with the given key + * @param configKey + * @return + */ + public QaConfigItem getConfigItem(String configKey); + + /** + * Saves or updates a qa config item + * @param configItem + */ + public void saveOrUpdateConfigItem(QaConfigItem configItem); + + /** + * Gets the set of wizard categories from the database + * @return + */ + public SortedSet getWizardCategories(); + + /** + * Saves the entire set of QaWizardCategories (including the child cognitive skills and questions) + * @param categories + */ + public void saveOrUpdateQaWizardCategories(SortedSet categories); + + /** + * Deletes a wizard category from the db + * @param uid + */ + public void deleteWizardCategoryByUID(Long uid); + + /** + * Deletes a wizard cognitive skill from the db + * @param uid + */ + public void deleteWizardSkillByUID(Long uid); + + /** + * Deletes a wizard question from the db + * @param uid + */ + public void deleteWizardQuestionByUID(Long uid); } Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/service/QaServicePOJO.java =================================================================== diff -u -rc4dfe712e2f4adc4d448e5653df6430eb2949002 -r80a367726b9e7607851be28429bda54d9b306159 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/service/QaServicePOJO.java (.../QaServicePOJO.java) (revision c4dfe712e2f4adc4d448e5653df6430eb2949002) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/service/QaServicePOJO.java (.../QaServicePOJO.java) (revision 80a367726b9e7607851be28429bda54d9b306159) @@ -33,6 +33,7 @@ import java.util.Random; import java.util.Set; import java.util.SortedMap; +import java.util.SortedSet; import java.util.TreeSet; import org.apache.log4j.Logger; @@ -69,18 +70,22 @@ import org.lamsfoundation.lams.tool.qa.QaAppConstants; import org.lamsfoundation.lams.tool.qa.QaApplicationException; import org.lamsfoundation.lams.tool.qa.QaCondition; +import org.lamsfoundation.lams.tool.qa.QaConfigItem; import org.lamsfoundation.lams.tool.qa.QaContent; import org.lamsfoundation.lams.tool.qa.QaQueContent; import org.lamsfoundation.lams.tool.qa.QaQueUsr; import org.lamsfoundation.lams.tool.qa.QaSession; import org.lamsfoundation.lams.tool.qa.QaUploadedFile; import org.lamsfoundation.lams.tool.qa.QaUsrResp; +import org.lamsfoundation.lams.tool.qa.QaWizardCategory; +import org.lamsfoundation.lams.tool.qa.dao.IQaConfigItemDAO; import org.lamsfoundation.lams.tool.qa.dao.IQaContentDAO; import org.lamsfoundation.lams.tool.qa.dao.IQaQueContentDAO; import org.lamsfoundation.lams.tool.qa.dao.IQaQueUsrDAO; import org.lamsfoundation.lams.tool.qa.dao.IQaSessionDAO; import org.lamsfoundation.lams.tool.qa.dao.IQaUploadedFileDAO; import org.lamsfoundation.lams.tool.qa.dao.IQaUsrRespDAO; +import org.lamsfoundation.lams.tool.qa.dao.IQaWizardDAO; import org.lamsfoundation.lams.tool.service.ILamsToolService; import org.lamsfoundation.lams.usermanagement.User; import org.lamsfoundation.lams.usermanagement.dto.UserDTO; @@ -133,6 +138,8 @@ private IAuditService auditService; private IExportToolContentService exportContentService; private QaOutputFactory qaOutputFactory; + private IQaConfigItemDAO qaConfigItemDAO; + private IQaWizardDAO qaWizardDAO; private ICoreNotebookService coreNotebookService; @@ -1824,7 +1831,25 @@ public void setQaOutputFactory(QaOutputFactory qaOutputFactory) { this.qaOutputFactory = qaOutputFactory; } + + + public IQaConfigItemDAO getQaConfigItemDAO() { + return qaConfigItemDAO; + } + + public void setQaConfigItemDAO(IQaConfigItemDAO qaConfigItemDAO) { + this.qaConfigItemDAO = qaConfigItemDAO; + } + + public IQaWizardDAO getQaWizardDAO() { + return qaWizardDAO; + } + + public void setQaWizardDAO(IQaWizardDAO qaWizardDAO) { + this.qaWizardDAO = qaWizardDAO; + } + public QaContent getQaContentBySessionId(Long sessionId) { QaSession session = qaSessionDAO.getQaSessionOrNullById(sessionId); // to skip CGLib problem @@ -1855,8 +1880,71 @@ qaDAO.deleteCondition(condition); } } - + public QaCondition createDefaultComplexCondition(QaContent qaContent) { return getQaOutputFactory().createDefaultComplexCondition(qaContent); } + + /** + * Gets the qa config item with the given key + * @param configKey + * @return + */ + public QaConfigItem getConfigItem(String configKey) + { + return qaConfigItemDAO.getConfigItemByKey(configKey); + } + + /** + * Saves or updates a qa config item + * @param configItem + */ + public void saveOrUpdateConfigItem(QaConfigItem configItem) + { + qaConfigItemDAO.saveOrUpdate(configItem); + } + + /** + * Gets the set of wizard categories from the database + * @return + */ + public SortedSet getWizardCategories() + { + return qaWizardDAO.getWizardCategories(); + } + + /** + * Saves the entire set of QaWizardCategories (including the child cognitive skills and questions) + * @param categories + */ + public void saveOrUpdateQaWizardCategories(SortedSet categories) + { + qaWizardDAO.saveOrUpdateCategories(categories); + } + + /** + * Deletes a wizard category from the db + * @param uid + */ + public void deleteWizardCategoryByUID(Long uid) + { + qaWizardDAO.deleteWizardCategoryByUID(uid); + } + + /** + * Deletes a wizard cognitive skill from the db + * @param uid + */ + public void deleteWizardSkillByUID(Long uid) + { + qaWizardDAO.deleteWizardSkillByUID(uid); + } + + /** + * Deletes a wizard question from the db + * @param uid + */ + public void deleteWizardQuestionByUID(Long uid){ + qaWizardDAO.deleteWizardQuestionByUID(uid); + } } \ No newline at end of file Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaAction.java =================================================================== diff -u -r97aceb8f087c5d2613e004dc2be171ac8acae574 -r80a367726b9e7607851be28429bda54d9b306159 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaAction.java (.../QaAction.java) (revision 97aceb8f087c5d2613e004dc2be171ac8acae574) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaAction.java (.../QaAction.java) (revision 80a367726b9e7607851be28429bda54d9b306159) @@ -54,6 +54,7 @@ import org.lamsfoundation.lams.tool.qa.QaAppConstants; import org.lamsfoundation.lams.tool.qa.QaApplicationException; import org.lamsfoundation.lams.tool.qa.QaCondition; +import org.lamsfoundation.lams.tool.qa.QaConfigItem; import org.lamsfoundation.lams.tool.qa.QaContent; import org.lamsfoundation.lams.tool.qa.QaGeneralAuthoringDTO; import org.lamsfoundation.lams.tool.qa.QaQueContent; @@ -915,6 +916,13 @@ request.setAttribute(QaAppConstants.TOTAL_QUESTION_COUNT, new Integer(listQuestionContentDTO.size())); + // Adding in the qa wizard data if it is turned on + if (qaService.getConfigItem(QaConfigItem.KEY_ENABLE_QAWIZARD) != null + && qaService.getConfigItem(QaConfigItem.KEY_ENABLE_QAWIZARD).getConfigValue().equals("true")) { + request.setAttribute(QaAppConstants.ATTR_WIZARD_ENABLED, true); + request.setAttribute(QaAppConstants.ATTR_WIZARD_CATEGORIES, qaService.getWizardCategories()); + } + QaAction.logger.debug("fwd ing to newQuestionBox: "); return mapping.findForward("newQuestionBox"); } Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaAdminAction.java =================================================================== diff -u --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaAdminAction.java (revision 0) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaAdminAction.java (revision 80a367726b9e7607851be28429bda54d9b306159) @@ -0,0 +1,271 @@ +/**************************************************************** + * Copyright (C) 2008 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 + * **************************************************************** + */ + +/* $Id$ */ +package org.lamsfoundation.lams.tool.qa.web; + +import java.io.IOException; +import java.io.StringReader; +import java.util.SortedSet; +import java.util.TreeSet; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.xml.parsers.DocumentBuilder; +import javax.xml.parsers.DocumentBuilderFactory; +import javax.xml.parsers.ParserConfigurationException; + +import org.apache.log4j.Logger; +import org.apache.struts.action.ActionForm; +import org.apache.struts.action.ActionForward; +import org.apache.struts.action.ActionMapping; +import org.lamsfoundation.lams.tool.qa.QaConfigItem; +import org.lamsfoundation.lams.tool.qa.QaWizardCategory; +import org.lamsfoundation.lams.tool.qa.QaWizardCognitiveSkill; +import org.lamsfoundation.lams.tool.qa.QaWizardQuestion; +import org.lamsfoundation.lams.tool.qa.service.IQaService; +import org.lamsfoundation.lams.tool.qa.service.QaServiceProxy; +import org.lamsfoundation.lams.util.WebUtil; +import org.lamsfoundation.lams.web.action.LamsDispatchAction; +import org.w3c.dom.Document; +import org.w3c.dom.Element; +import org.w3c.dom.NamedNodeMap; +import org.w3c.dom.Node; +import org.w3c.dom.NodeList; +import org.xml.sax.InputSource; +import org.xml.sax.SAXException; + +/** + * Handles the admin page for question and answer which includes the settings + * and items for the q&a question wizard + * + * @author lfoxton + * + * + */ +public class QaAdminAction extends LamsDispatchAction { + + private static Logger logger = Logger.getLogger(QaAdminAction.class.getName()); + + public static final String ATTR_CATEGORIES = "categories"; + public static final String ATTR_CATEGORY = "category"; + public static final String ATTR_QUESTION = "question"; + public static final String ATTR_SKILL = "skill"; + public static final String ATTR_TITLE = "title"; + public static final String ATTR_UID = "uid"; + public static final String NULL = "null"; + + IQaService qaService; + + /** + * Sets up the admin page + */ + public ActionForward unspecified(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response) { + // set up mdlForumService + if (qaService == null) { + qaService = QaServiceProxy.getQaService(this.getServlet().getServletContext()); + } + + QaAdminForm adminForm = (QaAdminForm) form; + + QaConfigItem enableQaWizard = qaService.getConfigItem(QaConfigItem.KEY_ENABLE_QAWIZARD); + if (enableQaWizard != null) + adminForm.setQaWizardEnabled(enableQaWizard.getConfigValue()); + + request.setAttribute("error", false); + request.setAttribute(ATTR_CATEGORIES, getQaWizardCategories()); + + return mapping.findForward("config"); + } + + /** + * Saves admin page, if the wizard is enabled, saves the wizard content + * @param mapping + * @param form + * @param request + * @param response + * @return + */ + public ActionForward saveContent(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response) { + QaAdminForm adminForm = (QaAdminForm) form; + + // set up mdlForumService + if (qaService == null) { + qaService = QaServiceProxy.getQaService(this.getServlet().getServletContext()); + } + + QaConfigItem enableQaWizard = qaService.getConfigItem(QaConfigItem.KEY_ENABLE_QAWIZARD); + + if (adminForm.getQaWizardEnabled() != null && adminForm.getQaWizardEnabled()) { + enableQaWizard.setConfigValue(QaAdminForm.TRUE); + + // get the wizard content and save + if (adminForm.getSerialiseXML() != null && !adminForm.getSerialiseXML().trim().equals("")) { + updateWizardFromXML(adminForm.getSerialiseXML().trim()); + } + + // remove any wizard items that were removed + removeWizardItems(adminForm.getDeleteCategoriesCSV(), adminForm.getDeleteSkillsCSV(), adminForm + .getDeleteQuestionsCSV()); + } + else { + enableQaWizard.setConfigValue(QaAdminForm.FALSE); + } + qaService.saveOrUpdateConfigItem(enableQaWizard); + + request.setAttribute(ATTR_CATEGORIES, getQaWizardCategories()); + request.setAttribute("savedSuccess", true); + return mapping.findForward("config"); + + } + + /** + * Gets the complete set of wizard categories + * @return + */ + public SortedSet getQaWizardCategories() { + return qaService.getWizardCategories(); + } + + /** + * Removes all the removed wizard items from the db using CSV values + * + * @param categoriesCSV + * @param skillsCSV + * @param questionsCSV + */ + public void removeWizardItems(String categoriesCSV, String skillsCSV, String questionsCSV) { + + // remove categories + if (categoriesCSV != null && !categoriesCSV.equals("")) { + String categoryUIDs[] = categoriesCSV.split(","); + for (int i = 0; i < categoryUIDs.length; i++) { + qaService.deleteWizardCategoryByUID(Long.parseLong(categoryUIDs[i])); + } + } + + // remove skills + if (skillsCSV != null && !skillsCSV.equals("")) { + String skillUIDs[] = skillsCSV.split(","); + for (int i = 0; i < skillUIDs.length; i++) { + qaService.deleteWizardSkillByUID(Long.parseLong(skillUIDs[i])); + } + } + + // remove questions + if (questionsCSV != null && !questionsCSV.equals("")) { + String questionUIDs[] = questionsCSV.split(","); + for (int i = 0; i < questionUIDs.length; i++) { + qaService.deleteWizardQuestionByUID(Long.parseLong(questionUIDs[i])); + } + } + } + + /** + * Saves all the wizard items from the xml serialisation sent from the form + * @param xmlStr + */ + @SuppressWarnings("unchecked") + public void updateWizardFromXML(String xmlStr) { + //SortedSet currentCategories = getQaWizardCategories(); + SortedSet newCategories = new TreeSet(); + try { + DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); + DocumentBuilder db = dbf.newDocumentBuilder(); + Document document = db.parse(new InputSource(new StringReader(xmlStr))); + + // Get a list of category nodes + NodeList categoryNodeList = document.getElementsByTagName(ATTR_CATEGORY); + + for (int i = 0; i < categoryNodeList.getLength(); i++) { + + Element categoryElement = (Element) categoryNodeList.item(i); + + // Get the attributes for this category + NamedNodeMap categoryNamedNode = ((Node) categoryNodeList.item(i)).getAttributes(); + + QaWizardCategory category = new QaWizardCategory(); + category.setTitle(categoryNamedNode.getNamedItem(ATTR_TITLE).getNodeValue()); + category.setCognitiveSkills(new TreeSet()); + + if (categoryNamedNode.getNamedItem(ATTR_UID).getNodeValue() != null + && !categoryNamedNode.getNamedItem(ATTR_UID).getNodeValue().equals(NULL)) { + category.setUid(Long.parseLong(categoryNamedNode.getNamedItem(ATTR_UID).getNodeValue())); + } + + // Get a list of cognitive skill nodes + NodeList skillNodeList = categoryElement.getElementsByTagName(ATTR_SKILL); + for (int j = 0; j < skillNodeList.getLength(); j++) { + Element skillElement = (Element) skillNodeList.item(j); + + // Get the attributes for this skill + NamedNodeMap skillNamedNode = ((Node) skillNodeList.item(j)).getAttributes(); + + // Create the skill and add attributes from the node + QaWizardCognitiveSkill skill = new QaWizardCognitiveSkill(); + skill.setCategory(category); + skill.setTitle(skillNamedNode.getNamedItem(ATTR_TITLE).getNodeValue()); + skill.setQuestions(new TreeSet()); + + if (skillNamedNode.getNamedItem(ATTR_UID).getNodeValue() != null + && !skillNamedNode.getNamedItem(ATTR_UID).getNodeValue().equals(NULL)) { + skill.setUid(Long.parseLong(skillNamedNode.getNamedItem(ATTR_UID).getNodeValue())); + } + + // add the skill to the parent category + category.getCognitiveSkills().add(skill); + + // Get a list of questions for this skill + NodeList questionNodeList = skillElement.getElementsByTagName(ATTR_QUESTION); + for (int k = 0; k < questionNodeList.getLength(); k++) { + // Get the attributes for this question + NamedNodeMap questionNamedNode = ((Node) questionNodeList.item(k)).getAttributes(); + + // Create the question, and add attributes from the node + QaWizardQuestion question = new QaWizardQuestion(); + question.setQuestion(questionNamedNode.getNamedItem(ATTR_QUESTION).getNodeValue()); + + if (questionNamedNode.getNamedItem(ATTR_UID).getNodeValue() != null + && !questionNamedNode.getNamedItem(ATTR_UID).getNodeValue().equals(NULL)) { + question.setUid(Long.parseLong(questionNamedNode.getNamedItem(ATTR_UID).getNodeValue())); + } + + // add the question to the parent cognitive skill + skill.getQuestions().add(question); + } + } + newCategories.add(category); + } + + } catch (ParserConfigurationException e) { + logger.error("Could not parse wizard serialise xml", e); + } catch (SAXException e) { + logger.error("Could not parse wizard serialise xml", e); + } catch (IOException e) { + logger.error("Could not parse wizard serialise xml", e); + } + + qaService.saveOrUpdateQaWizardCategories(newCategories); + } +} Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaAdminForm.java =================================================================== diff -u --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaAdminForm.java (revision 0) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaAdminForm.java (revision 80a367726b9e7607851be28429bda54d9b306159) @@ -0,0 +1,88 @@ +/**************************************************************** + * Copyright (C) 2008 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 + * **************************************************************** + */ + +/* $Id$ */ +package org.lamsfoundation.lams.tool.qa.web; + +import org.apache.struts.action.ActionForm; + +public class QaAdminForm extends ActionForm { + + public static final long serialVersionUID = 978235712395273523L; + + public static final String TRUE= "true"; + public static final String FALSE= "false"; + + private Boolean qaWizardEnabled; + private String serialiseXML; + private String deleteCategoriesCSV; + private String deleteSkillsCSV; + private String deleteQuestionsCSV; + + public QaAdminForm() {} + + public Boolean getQaWizardEnabled() { + return qaWizardEnabled; + } + + public void setQaWizardEnabled(Boolean qaWizardEnabled) { + this.qaWizardEnabled = qaWizardEnabled; + } + + public void setQaWizardEnabled(String qaWizardEnabled) { + this.qaWizardEnabled = qaWizardEnabled.equals(TRUE); + } + + public String getSerialiseXML() { + return serialiseXML; + } + + public void setSerialiseXML(String serialiseXML) { + this.serialiseXML = serialiseXML; + } + + public String getDeleteCategoriesCSV() { + return deleteCategoriesCSV; + } + + public void setDeleteCategoriesCSV(String deleteCategoriesCSV) { + this.deleteCategoriesCSV = deleteCategoriesCSV; + } + + public String getDeleteSkillsCSV() { + return deleteSkillsCSV; + } + + public void setDeleteSkillsCSV(String deleteSkillsCSV) { + this.deleteSkillsCSV = deleteSkillsCSV; + } + + public String getDeleteQuestionsCSV() { + return deleteQuestionsCSV; + } + + public void setDeleteQuestionsCSV(String deleteQuestionsCSV) { + this.deleteQuestionsCSV = deleteQuestionsCSV; + } + + +} Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaStarterAction.java =================================================================== diff -u -rc4dfe712e2f4adc4d448e5653df6430eb2949002 -r80a367726b9e7607851be28429bda54d9b306159 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaStarterAction.java (.../QaStarterAction.java) (revision c4dfe712e2f4adc4d448e5653df6430eb2949002) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaStarterAction.java (.../QaStarterAction.java) (revision 80a367726b9e7607851be28429bda54d9b306159) @@ -150,6 +150,7 @@ import org.lamsfoundation.lams.tool.qa.QaApplicationException; import org.lamsfoundation.lams.tool.qa.QaComparator; import org.lamsfoundation.lams.tool.qa.QaCondition; +import org.lamsfoundation.lams.tool.qa.QaConfigItem; import org.lamsfoundation.lams.tool.qa.QaContent; import org.lamsfoundation.lams.tool.qa.QaGeneralAuthoringDTO; import org.lamsfoundation.lams.tool.qa.QaQueContent; @@ -165,8 +166,8 @@ * * @author Ozgur Demirtas * - * TODO To change the template for this generated type comment go to Window - Preferences - Java - Code Style - Code - * Templates + * TODO To change the template for this generated type comment go to Window - + * Preferences - Java - Code Style - Code Templates * * A Map data structure is used to present the UI. */ @@ -389,9 +390,11 @@ } /** - * retrives the existing content information from the db and prepares the data for presentation purposes. - * ActionForward retrieveExistingContent(HttpServletRequest request, ActionMapping mapping, QaAuthoringForm - * qaAuthoringForm, Map mapQuestionContent, long toolContentID) + * retrives the existing content information from the db and prepares the + * data for presentation purposes. ActionForward + * retrieveExistingContent(HttpServletRequest request, ActionMapping + * mapping, QaAuthoringForm qaAuthoringForm, Map mapQuestionContent, long + * toolContentID) * * @param request * @param mapping @@ -521,7 +524,7 @@ qaAuthoringForm.setOfflineInstructions(qaContent.getOfflineInstructions()); sessionMap.put(QaAppConstants.ONLINE_INSTRUCTIONS_KEY, qaContent.getOnlineInstructions()); sessionMap.put(QaAppConstants.OFFLINE_INSTRUCTIONS_KEY, qaContent.getOfflineInstructions()); - + QaStarterAction.logger.debug("ACTIVITY_TITLE_KEY set to:" + sessionMap.get(QaAppConstants.ACTIVITY_TITLE_KEY)); qaAuthoringForm.resetUserAction(); @@ -530,9 +533,10 @@ } /** - * each tool has a signature. QA tool's signature is stored in MY_SIGNATURE. The default tool content id and other - * depending content ids are obtained in this method. if all the default content has been setup properly the method - * persists DEFAULT_CONTENT_ID in the session. + * each tool has a signature. QA tool's signature is stored in MY_SIGNATURE. + * The default tool content id and other depending content ids are obtained + * in this method. if all the default content has been setup properly the + * method persists DEFAULT_CONTENT_ID in the session. * * readSignature(HttpServletRequest request, ActionMapping mapping) * @@ -596,7 +600,8 @@ * * @param long * toolContentID - * @return boolean determine whether a specific toolContentID exists in the db + * @return boolean determine whether a specific toolContentID exists in the + * db */ protected boolean existsContent(long toolContentID, IQaService qaService) { QaContent qaContent = qaService.loadQa(toolContentID); @@ -610,8 +615,9 @@ /** * bridges define later url request to authoring functionality * - * executeDefineLater(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse - * response, IQaService qaService) throws IOException, ServletException, QaApplicationException + * executeDefineLater(ActionMapping mapping, ActionForm form, + * HttpServletRequest request, HttpServletResponse response, IQaService + * qaService) throws IOException, ServletException, QaApplicationException * * @param mapping * @param form Index: lams_tool_laqa/web/WEB-INF/struts-config.xml =================================================================== diff -u -r0af4ed13b963a588f3499b080801863d57f8ad95 -r80a367726b9e7607851be28429bda54d9b306159 --- lams_tool_laqa/web/WEB-INF/struts-config.xml (.../struts-config.xml) (revision 0af4ed13b963a588f3499b080801863d57f8ad95) +++ lams_tool_laqa/web/WEB-INF/struts-config.xml (.../struts-config.xml) (revision 80a367726b9e7607851be28429bda54d9b306159) @@ -17,6 +17,8 @@ + + @@ -432,7 +434,23 @@ - + + + + + Index: lams_tool_laqa/web/admin/config.jsp =================================================================== diff -u --- lams_tool_laqa/web/admin/config.jsp (revision 0) +++ lams_tool_laqa/web/admin/config.jsp (revision 80a367726b9e7607851be28429bda54d9b306159) @@ -0,0 +1,527 @@ + + +<%@ include file="/common/taglibs.jsp"%> + + + + <%@ include file="/includes/jsp/qaWizardCommon.jsp"%> + + <fmt:message key="pageTitle.admin" /> + + + + + + + + + + + + + + + +
+ +

+ +

+ + + + + + +

+ +

+
+ +

+ +

+
+ +

+ +

+
+ + + + + + + + + +
+ + + + +
+ + + +
+ + + + + + + + + + + + + + + + \ No newline at end of file Index: lams_tool_laqa/web/authoring/newQuestionBox.jsp =================================================================== diff -u -r18e5e690d2e1a7c3d918759f7a2827c8205feaac -r80a367726b9e7607851be28429bda54d9b306159 --- lams_tool_laqa/web/authoring/newQuestionBox.jsp (.../newQuestionBox.jsp) (revision 18e5e690d2e1a7c3d918759f7a2827c8205feaac) +++ lams_tool_laqa/web/authoring/newQuestionBox.jsp (.../newQuestionBox.jsp) (revision 80a367726b9e7607851be28429bda54d9b306159) @@ -25,8 +25,10 @@ <%@ include file="/common/header.jsp"%> + <%@ include file="/includes/jsp/qaWizardCommon.jsp"%> + - + + + - + + @@ -53,6 +136,50 @@ + + + +
+

+ +

+ + + + + + + + + + + + + + + +
+
+
+
+
+ + + + + +
+ + + + + +
+
+
@@ -74,6 +201,8 @@ + + Index: lams_tool_laqa/web/includes/jsp/qaWizardCommon.jsp =================================================================== diff -u --- lams_tool_laqa/web/includes/jsp/qaWizardCommon.jsp (revision 0) +++ lams_tool_laqa/web/includes/jsp/qaWizardCommon.jsp (revision 80a367726b9e7607851be28429bda54d9b306159) @@ -0,0 +1,82 @@ + + \ No newline at end of file