diff --git a/README.md b/README.md
index 05a4f0b2..4c41cf45 100644
--- a/README.md
+++ b/README.md
@@ -83,155 +83,31 @@ input you can evaluate your answer (in self assessment mode) or move to the next
Version History
===============
+* The stable version 3.1.x for **ILIAS 5.4** with new feedback styles is found in the Github branch **master-ilias54**
* The stable version 3.0.x for **ILIAS 5.3** with new functionalities from STACK such a new input types is found in the Github branch **master-ilias53**
* The stable version 2.4.x for **ILIAS 5.2 to 5.3** is found in the GitHub branch **master-ilias52**
* The stable version 2.3.x for **ILIAS 5.0 to 5.1** is found in the GitHub branch **master**
-Update from Version 2.x
------------------------
-After updating the code files of the plugin, the update is started in the plugin administration of ILIAS.
-All STACK questions of your platform will be translated to the new syntax for CAS text in STACK (use of {@..@} instead of @...@)
-This change is automatically done in the plugin update, but we recommend to check the questions before use it in tests.
-
-PLEASE BACKUP YOUR DATABASE before you run the update from an older version. Depending on the number of questions, the update takes some minutes, please set the PHP variable max_execution_time high enough.
-
-The translation is also done when importing questions from ILIAS or MoodleXML, but please notice that this conversion is one way.You can import "old CASText behaviour" questions to a platform with STACK plugin version 3.0+.
-But if you import "new CASText behaviour" questions to a platform with a previous version of the plugin, your question will not be properly shown on that platform.
-
-Version 3.0.22 (2019-05-03) for ILIAS 5.3
-----------------------------------------
-The following bug reports were fixed:
-- https://mantis.ilias.de/view.php?id=22847 About validation in equivalence inputs
-- https://mantis.ilias.de/view.php?id=24640 About model answer being variables which are a set of numbers.
-- https://mantis.ilias.de/view.php?id=24998 About not showing best solution properly when best solution is 0.
-- Partial solution for https://mantis.ilias.de/view.php?id=24273 for Algebraic inputs. Not solved for other question types.
-- https://mantis.ilias.de/view.php?id=24835 About matrix brackets
-- https://mantis.ilias.de/view.php?id=25256 About user input not shown in validation or test results
-
-Version 3.0.20 (2019-04-03) for ILIAS 5.3
-----------------------------------------
-The following bug reports were fixed:
-- https://mantis.ilias.de/view.php?id=24998
-
-Version 3.0.17 (2019-03-13) for ILIAS 5.3
------------------------------------------
-- Configuration of multiple MaximaPool servers for different purposes (Authoring, Test Run)
-
-Version 3.0.16 (2019-02-27) for ILIAS 5.3
------------------------------------------
-- Added a new feature Copy of Nodes and PRT: In question Authoring now exists the option to copy nodes and PRT, when clicking on copying Node or PRT, the chosen element is stored in the session, then, the user should go to the question or PRT the user wants to paste te node/prt and click on paste. A new PRT or a new node will be created with the values of the copied one. Please notice that when a node is copied to a PRT, the fields next node when true/false are not copied and should be edited by hand.
-The following bug reports were fixed:
-- https://mantis.ilias.de/view.php?id=24835 about matrix brackets
-
-Version 3.0.12 (2018-11-30) for ILIAS 5.3
+Version 3.1.1 (2019-06-24) for ILIAS 5.4
----------------------------------------
-- Solved some problems with best solution display when question variables are used in model answer in algebraic inputs.
-- Solved some problems with Matrix display in best solution
-The following bug reports were fixed:
-- https://mantis.ilias.de/view.php?id=23977
-- https://mantis.ilias.de/view.php?id=23895 about syntax hints
+This version includes the changes needed to run STACK questions in ILIAS 5.4.
+* A new feature has been included: Feedback Styles, that can be managed through plugin configuration and Layout and Styles / Content styles. You can use your own content style for STACK feedback, In plugin configuration there is a new tab under General Settings / Feedback Styles Settings where settings for this new feature can be found.
-Version 3.0.11 (2018-11-26) for ILIAS 5.3
-----------------------------------------
-- Solved problems to establish default values for options, inputs and PRT, now all already present default values works properly.
-- Added the following default values to plugin configuration: Options: Matrix Parenthesis, Inputs: Syntax hint, Forbidden word, allowed words, show validation (as dropdown) and extra options for inputs, PRT: Simplification, First node of predefined PRT: Answertest, test options, quiet feedback, and mode, score, penalty and answernote for both positive and negative branch.
-- Added TinyMCE editor for default feedback in configuration/options.
-- Some text changes has been made in the german language.
-The following bug report were fixed:
-- https://mantis.ilias.de/view.php?id=24003 about missing translation to german.
-- https://mantis.ilias.de/view.php?id=23913 about grammatical error in german
-- https://mantis.ilias.de/view.php?id=24121 about missing display of best solution
-
-Version 3.0.10 (2018-10-24) for ILIAS 5.3
-----------------------------------------
-Validation button is now directly attached to the input for algebraic inputs, instead of having an space between them.
-Validation buttons now doesn´t use the bootstrap style.
-Some minor changes has been made, and the following bugs has been solved.
-- https://mantis.ilias.de/view.php?id=23753 about checking the user response in the code.
-- https://mantis.ilias.de/view.php?id=23314 about info messages
-- https://mantis.ilias.de/view.php?id=23533 about validation of string inputs
-- https://mantis.ilias.de/view.php?id=23414 about testcases
-
-Version 3.0.9 (2018-10-10) for ILIAS 5.3
+Version 3.1.2 (2019-07-01) for ILIAS 5.4
----------------------------------------
-Validation button is now displayed as a small "check" button, and is always displayed next to the input it belongs.
-Some minor bugs has been solved in this version, please use https://mantis.ilias.de to report bugs.
+The following bugs have been solved:
+- https://mantis.ilias.de/view.php?id=25256 About validation of matrix inputs after checking results in preview mode.
+- https://mantis.ilias.de/view.php?id=25290 About default values for PRT and Nodes not working properly in non-new questions.
-Version 3.0.8 (2018-09-07) for ILIAS 5.3
+Version 3.1.3 (2019-07-31) for ILIAS 5.4
----------------------------------------
-Inputs representation in validation and best solution now takes the minimal size as possible, depending on user or teacher input, and it´s displayed as code text, instead of repeating the input again
-
-Version 3.0.7 (2018-09-03) for ILIAS 5.3
-----------------------------------------
-Some important changes has been made to question view, either in preview, test mode or printview, the main goal of this changes is to fulfill the needs of SIG Mathe+ILIAS in terms of going back to previous 5.2 style of inputs presentation
-- All inputs which can be validated got the validation view changed to a disabled input or textarea filled in with the user solution on the left side, and the validation feedback on the right side.
-- Validation messages are now displayed with a white background in order to distinct it from question text.
-- The behaviour of inputs presentation in best solution in aligned to validation, instead of showing only a message saying "a possible solution is..." a disabled input is presented filled in with the model answer, All these inputs have the same format as the question input.
-Some minor bugs has been solved in this version, please use https://mantis.ilias.de to report bugs.
-
-Version 3.0.6 (2018-06-25) for ILIAS 5.3
-----------------------------------------
-Some index has been created in the DB, in order to improve performance.
-Some code changes were made in order to allow STACK questions run in Learning modules through PCPluginQuestion plugin.
-Some bugfix were made on this version:
-- https://www.ilias.de/mantis/view.php?id=23135 About showing validation in dropdown, checkbox and radiobutton inputs
-- https://www.ilias.de/mantis/view.php?id=22900 About showing validation after question has been evaluated
-- https://www.ilias.de/mantis/view.php?id=22655 About error messages shown in wrong places.
-- https://www.ilias.de/mantis/view.php?id=22954 About missing german text in units questions.
-- https://www.ilias.de/mantis/view.php?id=23237 About problem when updating to 3.0 with prt feedback.
-
-Version 3.0.5 (2018-05-28) for ILIAS 5.3
-----------------------------------------
-Some bugfix were made on this version:
-- https://www.ilias.de/mantis/view.php?id=22847 About validation in new input types
-- https://www.ilias.de/mantis/view.php?id=22969 About validation options
-- https://www.ilias.de/mantis/view.php?id=23016 About equivalence input firstline option
-- https://www.ilias.de/mantis/view.php?id=22900 about showing validation.
-
-Version 3.0.4 (2018-04-26) for ILIAS 5.3
-----------------------------------------
-Some bugfix were made on this version:
-- https://www.ilias.de/mantis/view.php?id=22945 About space between checkboxes and radiobuttons and texts
-- https://www.ilias.de/mantis/view.php?id=22938 About problems installing the plugin in a fresh 5.3 client
-- https://www.ilias.de/mantis/view.php?id=22925 About answertests names in german missing
-- https://www.ilias.de/mantis/view.php?id=22912 About german text file
-- https://www.ilias.de/mantis/view.php?id=22946 About validation in equivalence inputs
-- https://www.ilias.de/mantis/view.php?id=22947 About syntax hint in equivalence inputs
-- https://www.ilias.de/mantis/view.php?id=22847 About validation in equivalence inputs
-- Some other minor changes.
-
-Version 3.0.3 (2018-04-05) for ILIAS 5.3
-----------------------------------------
-Some bugfix were made on this version:
-- https://www.ilias.de/mantis/view.php?id=22795 About Deployed seeds navigation
-- https://www.ilias.de/mantis/view.php?id=22782 About testcases
-
+Some small changes has been made in language variables
+Now all feedback Types are always displayed in the authoring interface also if no content style has been chosen in the plugin configuration.
-Version 3.0.2 (2018-03-28) for ILIAS 5.3
+Version 3.1.4 (2019-08-23) for ILIAS 5.4
----------------------------------------
-Some bugfix were made on this version:
-- https://www.ilias.de/mantis/view.php?id=22780 regarding br before inputs
-- https://www.ilias.de/mantis/view.php?id=22779 about HTML in version 3.0
+This version includes support for PHP 7.2 in ILIAS 5.4 platform, during the process of update this plugin some ILIAS core bugs were found (e.g. importing question pools), those non-STACk related bugs can make the experience of using the plugin in a PHP 7.2 installation not smooth as intended, if you find any bugs in a PHP 7.2 platform, please report it in Mantis.
-Version 3.0.0 (2018-03-07) for ILIAS 5.3
+Version 3.1.5 (2019-08-26) for ILIAS 5.4
----------------------------------------
-This is a major update. It uses the core classes from STACK version 4.0, the sample questions have also be changed. Please read the section "Update from version 2.x".
-
-NEW FEATURES:
-- 8 new input types (We highly recommend to read the Documentation of all new input types that can be found here: https://stack2.maths.ed.ac.uk/demo/question/type/stack/doc/doc.php/Authoring/Inputs.md):
- - Numerical input:
- This input type requires the student to type in a number of some kind. Any expression with a variable will be rejected as invalid.
- - Scientific units input:
- The support for scientific units includes an input type which enables teachers to check units as valid/invalid.
- - Equivalence reasoning input:
- The purpose of this input type is to enable students to work line by line and reason by equivalence. Note, the teacher's answer and any syntax hint must be a list! If you just pass in an expression strange behaviour may result.
- - Dropdown/Checkbox/Radio:
- The dropdown, checkbox and radio input types enable teachers to create multiple choice questions.
- - String input:
- This is a normal input into which students may type whatever they choose. It is always converted into a Maxima string internally. Note that there is no way whatsoever to parse the student's string into a Maxima expression. If you accept a string, then it will always remain a string! You can't later check for algebraic equivalence, the only tests available will be simple string matches, regular expressions etc
- - Notes input
- This input is a text area into which students may type whatever they choose. It can be used to gather their notes or "working". However, this input always returns an empty value to the CAS, so that the contents are never assessed.
- - CASText now supports conditional statements and adaptive blocks.
- - Healthcheck has been rebuilt, now shows more information about the CAS connection and the Maxima version used.
- - Maxima Libraries can be added to maximalocal from plugin configuration (Notice that this feature doesn't work with server configuration)
-
+Some bugs in PHP 7.2 installations has been solved.
\ No newline at end of file
diff --git a/classes/GUI/question_authoring/class.assStackQuestionAuthoringGUI.php b/classes/GUI/question_authoring/class.assStackQuestionAuthoringGUI.php
index d30f22e4..4e38a53b 100644
--- a/classes/GUI/question_authoring/class.assStackQuestionAuthoringGUI.php
+++ b/classes/GUI/question_authoring/class.assStackQuestionAuthoringGUI.php
@@ -113,6 +113,10 @@ public function showAuthoringPanel()
$this->getPlugin()->includeClass('utils/FormProperties/class.ilTabsFormPropertyGUI.php');
$this->getPlugin()->includeClass('utils/FormProperties/class.ilButtonFormPropertyGUI.php');
+ //https://mantis.ilias.de/view.php?id=25290
+ require_once('./Customizing/global/plugins/Modules/TestQuestionPool/Questions/assStackQuestion/classes/model/configuration/class.assStackQuestionConfig.php');
+ $this->default = assStackQuestionConfig::_getStoredSettings("all");
+
//Add general properties to form like question text, title, author...
//ADD predefined input and validation fields
if ($this->getQuestionGUI()->object->getQuestion() == "")
@@ -120,8 +124,6 @@ public function showAuthoringPanel()
$this->new_question = TRUE;
$this->getQuestionGUI()->object->setQuestion("[[input:ans1]] [[validation:ans1]]");
$this->getQuestionGUI()->object->setPoints("1");
- require_once('./Customizing/global/plugins/Modules/TestQuestionPool/Questions/assStackQuestion/classes/model/configuration/class.assStackQuestionConfig.php');
- $this->default = assStackQuestionConfig::_getStoredSettings("all");
}
//Add question title when blank
@@ -227,7 +229,7 @@ public function addInputs()
$inputs_section_header->setTitle($this->getPlugin()->txt('inputs'));
$this->getForm()->addItem($inputs_section_header);
- if (sizeof($this->getQuestionGUI()->object->getInputs()))
+ if (!empty($this->getQuestionGUI()->object->getInputs()))
{
//In case of edition
foreach ($this->getQuestionGUI()->object->getInputs() as $input_name => $input)
@@ -254,7 +256,7 @@ public function addPRTs()
{
$prts = new ilTabsFormPropertyGUI($this->getPlugin()->txt('prts'), "question_prts", 12, FALSE);
- if (sizeof($this->getQuestionGUI()->object->getPotentialResponsesTrees()))
+ if (!empty($this->getQuestionGUI()->object->getPotentialResponsesTrees()))
{
foreach ($this->getQuestionGUI()->object->getPotentialResponsesTrees() as $prt_name => $prt)
{
@@ -268,9 +270,25 @@ public function addPRTs()
$new_prt = new assStackQuestionPRT(-1, $this->getQuestionGUI()->object->getId());
$new_prt->setPRTName('new_prt');
$new_prt->setPRTValue(1);
+ //https://mantis.ilias.de/view.php?id=25290
+ $new_prt->setAutoSimplify($this->default["prt_simplify"]);
$new_prt->checkPRT(TRUE);
+ //https://mantis.ilias.de/view.php?id=25290
$new_prt_node = new assStackQuestionPRTNode(-1, $this->getQuestionGUI()->object->getId(), 'new_prt', '0', -1, -1);
+ $new_prt_node->setAnswerTest($this->default["prt_node_answer_test"]);
+ $new_prt_node->setQuiet($this->default["prt_node_quiet"]);
+ $new_prt_node->setTestOptions($this->default["prt_node_options"]);
+
+ $new_prt_node->setTrueScoreMode($this->default["prt_pos_mod"]);
+ $new_prt_node->setFalseScoreMode($this->default["prt_neg_mod"]);
+
+ $new_prt_node->setTrueScore($this->default["prt_pos_score"]);
+ $new_prt_node->setFalseScore($this->default["prt_neg_score"]);
+
+ $new_prt_node->setTruePenalty($this->default["prt_pos_penalty"]);
+ $new_prt_node->setFalsePenalty($this->default["prt_neg_penalty"]);
+
$new_prt_node->checkPRTNode(TRUE);
$new_prt->setPRTNodes(array('0' => $new_prt_node));
$new_prt->setFirstNodeName($new_prt->getFirstNodeName(TRUE));
@@ -737,7 +755,7 @@ public function getNodesPart(assStackQuestionPRT $prt, $container_width = "")
$nodes = new ilTabsFormPropertyGUI($this->getPlugin()->txt('prt_nodes'), 'prt_' . $prt->getPRTName() . '_nodes', $container_width, FALSE);
$q_nodes = $prt->getPRTNodes();
- if (sizeof($q_nodes))
+ if (!empty($q_nodes))
{
foreach ($q_nodes as $node)
{
@@ -750,7 +768,7 @@ public function getNodesPart(assStackQuestionPRT $prt, $container_width = "")
}
}
//Add tab per node in the current PRT
- if (sizeof($q_nodes))
+ if (!empty($q_nodes))
{
foreach ($q_nodes as $node)
{
@@ -764,6 +782,20 @@ public function getNodesPart(assStackQuestionPRT $prt, $container_width = "")
if ($prt->getPRTName() != 'new_prt')
{
$new_prt_node = new assStackQuestionPRTNode(-1, $this->getQuestionGUI()->object->getId(), $prt->getPRTName(), $prt->getPRTName() . '_new_node', -1, -1);
+ //https://mantis.ilias.de/view.php?id=25290
+ $new_prt_node->setAnswerTest($this->default["prt_node_answer_test"]);
+ $new_prt_node->setQuiet($this->default["prt_node_quiet"]);
+ $new_prt_node->setTestOptions($this->default["prt_node_options"]);
+
+ $new_prt_node->setTrueScoreMode($this->default["prt_pos_mod"]);
+ $new_prt_node->setFalseScoreMode($this->default["prt_neg_mod"]);
+
+ $new_prt_node->setTrueScore($this->default["prt_pos_score"]);
+ $new_prt_node->setFalseScore($this->default["prt_neg_score"]);
+
+ $new_prt_node->setTruePenalty($this->default["prt_pos_penalty"]);
+ $new_prt_node->setFalsePenalty($this->default["prt_neg_penalty"]);
+
$new_prt_node->checkPRTNode(TRUE);
$new_node_part = $this->getNodePart($prt, $new_prt_node);
$new_node_part->setTitle($this->getPlugin()->txt('add_new_node'));
@@ -949,6 +981,9 @@ public function getNodePositivePart(assStackQuestionPRT $prt, assStackQuestionPR
$node_pos_specific_feedback_info_text .= $this->addInfoTooltip("cas_text");
$node_pos_specific_feedback->setInfo($node_pos_specific_feedback_info_text);
+ $node_pos_feedback_class = new ilSelectInputGUI($this->getPlugin()->txt('prt_node_pos_feedback_class'), 'prt_' . $prt->getPRTName() . '_node_' . $node->getNodeName() . '_pos_feedback_class');
+ $node_pos_feedback_class->setOptions($this->getFeedbackOptions());
+ $node_pos_feedback_class->setInfo($this->getPlugin()->txt('prt_node_pos_feedback_class_info'));
$this->getQuestionGUI()->setRTESupport($node_pos_specific_feedback);
@@ -961,6 +996,7 @@ public function getNodePositivePart(assStackQuestionPRT $prt, assStackQuestionPR
//$node_pos_next_node->setValue($this->default[""]);
$node_pos_answernote->setValue($this->default["prt_pos_answernote"]);
//$node_pos_specific_feedback->setValue($this->default[""]);
+ $node_pos_feedback_class->setValue(1);
} else
{
$node_pos_mode->setValue($node->getTrueScoreMode());
@@ -969,6 +1005,7 @@ public function getNodePositivePart(assStackQuestionPRT $prt, assStackQuestionPR
$node_pos_next_node->setValue($node->getTrueNextNode());
$node_pos_answernote->setValue($node->getTrueAnswerNote());
$node_pos_specific_feedback->setValue($node->getTrueFeedback());
+ $node_pos_feedback_class->setValue($node->getTrueFeedbackFormat());
}
@@ -982,6 +1019,7 @@ public function getNodePositivePart(assStackQuestionPRT $prt, assStackQuestionPR
}
$positive_part->addFormProperty($node_pos_answernote);
$positive_part->addFormProperty($node_pos_specific_feedback);
+ $positive_part->addFormProperty($node_pos_feedback_class);
return $positive_part;
}
@@ -1031,6 +1069,9 @@ public function getNodeNegativePart(assStackQuestionPRT $prt, assStackQuestionPR
$node_neg_specific_feedback_info_text .= $this->addInfoTooltip("cas_text");
$node_neg_specific_feedback->setInfo($node_neg_specific_feedback_info_text);
+ $node_neg_feedback_class = new ilSelectInputGUI($this->getPlugin()->txt('prt_node_neg_feedback_class'), 'prt_' . $prt->getPRTName() . '_node_' . $node->getNodeName() . '_neg_feedback_class');
+ $node_neg_feedback_class->setOptions($this->getFeedbackOptions());
+ $node_neg_feedback_class->setInfo($this->getPlugin()->txt('prt_node_neg_feedback_class_info'));
$this->getQuestionGUI()->setRTESupport($node_neg_specific_feedback);
@@ -1043,6 +1084,7 @@ public function getNodeNegativePart(assStackQuestionPRT $prt, assStackQuestionPR
//$node_neg_next_node->setValue($this->default[""]);
$node_neg_answernote->setValue($this->default["prt_neg_answernote"]);
//$node_neg_specific_feedback->setValue($this->default[""]);
+ $node_neg_feedback_class->setValue(1);
} else
{
$node_neg_mode->setValue($node->getFalseScoreMode());
@@ -1051,6 +1093,7 @@ public function getNodeNegativePart(assStackQuestionPRT $prt, assStackQuestionPR
$node_neg_next_node->setValue($node->getFalseNextNode());
$node_neg_answernote->setValue($node->getFalseAnswerNote());
$node_neg_specific_feedback->setValue($node->getFalseFeedback());
+ $node_neg_feedback_class->setValue($node->getFalseFeedbackFormat());
}
//Add properties to form
@@ -1063,6 +1106,8 @@ public function getNodeNegativePart(assStackQuestionPRT $prt, assStackQuestionPR
}
$negative_part->addFormProperty($node_neg_answernote);
$negative_part->addFormProperty($node_neg_specific_feedback);
+ $negative_part->addFormProperty($node_neg_feedback_class);
+
return $negative_part;
}
@@ -1076,11 +1121,14 @@ public function manageErrorMessages()
$session_error_message = "";
$session_info_message = "";
- if (sizeof($_SESSION["stack_authoring_errors"][$this->getQuestionGUI()->object->getId()]))
+ if (isset($_SESSION["stack_authoring_errors"][$this->getQuestionGUI()->object->getId()]))
{
- foreach ($_SESSION["stack_authoring_errors"][$this->getQuestionGUI()->object->getId()] as $session_error)
+ if (!empty($_SESSION["stack_authoring_errors"][$this->getQuestionGUI()->object->getId()]))
{
- $session_error_message .= $session_error . "";
+ foreach ($_SESSION["stack_authoring_errors"][$this->getQuestionGUI()->object->getId()] as $session_error)
+ {
+ $session_error_message .= $session_error . "";
+ }
}
}
@@ -1194,4 +1242,28 @@ public function getTemplate()
return $this->template;
}
+ public function getFeedbackOptions()
+ {
+ global $DIC;
+ $lng = $DIC->language();
+ $options = array();
+
+ //Add default option
+
+ /*
+ * AS WE ARE USING THE TRUE/FALSE FEEDBACK FORMAT FIELD OF THE DATABASE
+ * WHICH IS NOT USED AT THE MOMENT, AND IS ALWAYS 0 OR 1. WE HAVE TO
+ * DEFINE VALUES FOR EACH OF THE FEEDBACK STYLES, BEGINNING BY 2, TO DISTINGUISH
+ * QUESTION WHICH USES THIS STYLES AND THOSE WHICH NOT.
+ */
+
+ $options[1] = $lng->txt("default");
+ $options[2] = $this->getPlugin()->txt("feedback_node_right");
+ $options[3] = $this->getPlugin()->txt("feedback_node_wrong");
+ $options[4] = $this->getPlugin()->txt("feedback_solution_hint");
+ $options[5] = $this->getPlugin()->txt("feedback_extra_info");
+ $options[6] = $this->getPlugin()->txt("feedback_plot_feedback");
+
+ return $options;
+ }
}
\ No newline at end of file
diff --git a/classes/GUI/question_authoring/class.assStackQuestionDeployedSeedsGUI.php b/classes/GUI/question_authoring/class.assStackQuestionDeployedSeedsGUI.php
index 1cebfb06..136413dd 100644
--- a/classes/GUI/question_authoring/class.assStackQuestionDeployedSeedsGUI.php
+++ b/classes/GUI/question_authoring/class.assStackQuestionDeployedSeedsGUI.php
@@ -98,7 +98,7 @@ private function getQuestionNotesForSeeds()
$q_note = $deployed_seed->getQuestionNote();
$include = TRUE;
- if (sizeof($valid_seeds))
+ if (!empty($valid_seeds))
{
foreach ($valid_seeds as $valid_seed)
{
diff --git a/classes/GUI/question_display/class.assStackQuestionDisplayGUI.php b/classes/GUI/question_display/class.assStackQuestionDisplayGUI.php
index 6ba5ae10..9e3e7071 100644
--- a/classes/GUI/question_display/class.assStackQuestionDisplayGUI.php
+++ b/classes/GUI/question_display/class.assStackQuestionDisplayGUI.php
@@ -254,9 +254,9 @@ private function replacePlaceholders($show_feedback = FALSE)
{
$display = $this->getDisplay('prts', $prt_name);
}
- $question_text = str_replace("[[feedback:{$prt_name}]]", $display['display'], $this->getDisplay('question_text'));
+ $question_text = str_replace("[[feedback:{$prt_name}]]", assStackQuestionUtils::_replaceFeedbackPlaceHolders($display['display']), $this->getDisplay('question_text'));
$this->setDisplay($question_text, 'question_text');
- $question_specific_feedback = str_replace("[[feedback:{$prt_name}]]", $display['display'], $this->getDisplay('question_specific_feedback'));
+ $question_specific_feedback = str_replace("[[feedback:{$prt_name}]]", assStackQuestionUtils::_replaceFeedbackPlaceHolders($display['display']), $this->getDisplay('question_specific_feedback'));
$this->setDisplay($question_specific_feedback, 'question_specific_feedback');
}
} else
diff --git a/classes/GUI/question_display/class.assStackQuestionFeedbackGUI.php b/classes/GUI/question_display/class.assStackQuestionFeedbackGUI.php
index b0763e7b..e6ccf243 100644
--- a/classes/GUI/question_display/class.assStackQuestionFeedbackGUI.php
+++ b/classes/GUI/question_display/class.assStackQuestionFeedbackGUI.php
@@ -51,9 +51,11 @@ function __construct(ilassStackQuestionPlugin $plugin, $feedback_data, $specific
//Set feedback data
$this->setFeedback($feedback_data);
- if (sizeof($this->getFeedback('prt')) > 1) {
+ if (!empty($this->getFeedback('prt')))
+ {
$this->show_user_response = TRUE;
- } else {
+ } else
+ {
$this->show_user_response = FALSE;
}
@@ -62,7 +64,8 @@ function __construct(ilassStackQuestionPlugin $plugin, $feedback_data, $specific
$mathJaxSetting = new ilSetting("MathJax");
$this->getTemplate()->addJavaScript($mathJaxSetting->get("path_to_mathjax"));
- if (is_string($specific_feedback)) {
+ if (is_string($specific_feedback))
+ {
$this->specific_feedback = $specific_feedback;
}
}
@@ -114,8 +117,10 @@ private function fillTemplate($graphical_output, $show_points, $show_feedback, $
//General feedback info
$this->fillGeneralInfo($show_question_text, $show_points, $show_feedback, $show_correct_solution);
//PRT Specific part
- if (is_array($this->getFeedback('prt'))) {
- foreach ($this->getFeedback('prt') as $prt_name => $prt) {
+ if (is_array($this->getFeedback('prt')))
+ {
+ foreach ($this->getFeedback('prt') as $prt_name => $prt)
+ {
$this->fillSpecificPrtFeedback($show_question_text, $prt_name, $prt, $graphical_output, $show_points, $show_feedback, $show_correct_solution);
}
}
@@ -132,8 +137,10 @@ private function fillBestSolutionTemplate($mode = "correct")
$this->getTemplate()->setVariable('QUESTION_TEXT', assStackQuestionUtils::_getLatex($this->getQuestionTextFilledIn($mode)));
//Fill how to solve
- if ($mode == "correct") {
- $this->getTemplate()->setVariable('HOW_TO_SOLVE', assStackQuestionUtils::_getLatex($this->getQuestionHowToSolve($this->getFeedback('general_feedback'))));
+ if ($mode == "correct")
+ {
+ $text = assStackQuestionUtils::_getLatex($this->getQuestionHowToSolve($this->getFeedback('general_feedback')));
+ $this->getTemplate()->setVariable('HOW_TO_SOLVE', assStackQuestionUtils::_getFeedbackStyledText($text, "feedback_solution_hint"));
}
@@ -175,18 +182,22 @@ private function fillBestSolutionTemplate($mode = "correct")
private function fillGeneralInfo($show_question_text, $show_points, $show_feedback, $show_correct_solution)
{
// question_text
- if ($this->getFeedback('question_text') != '' AND $_GET['activecommand'] != 'directfeedback') {
+ if ($this->getFeedback('question_text') != '' AND $_GET['activecommand'] != 'directfeedback')
+ {
//If test is finished use LaTeX
- if ($_GET['cmd'] != 'preview') {
+ if ($_GET['cmd'] != 'preview')
+ {
$this->getTemplate()->setVariable('QUESTION_TEXT_MESSAGE', $this->getPlugin()->txt('message_question_text'));
$this->getTemplate()->setVariable('QUESTION_TEXT', assStackQuestionUtils::_replacePlaceholders(assStackQuestionUtils::_getLatex($this->getFeedback('question_text'))));
- } else {
+ } else
+ {
$this->getTemplate()->setVariable('QUESTION_TEXT_MESSAGE', $this->getPlugin()->txt('message_question_text'));
$this->getTemplate()->setVariable('QUESTION_TEXT', assStackQuestionUtils::_replacePlaceholders(assStackQuestionUtils::_getLatex($this->getFeedback('general_feedback'))));
}
- } elseif ($this->getFeedback('general_feedback') != '' AND $_GET['activecommand'] == 'directfeedback') {
+ } elseif ($this->getFeedback('general_feedback') != '' AND $_GET['activecommand'] == 'directfeedback')
+ {
//If test is finished use LaTeX
$this->getTemplate()->setVariable('QUESTION_TEXT_MESSAGE', $this->getPlugin()->txt('message_general_feedback'));
@@ -194,11 +205,13 @@ private function fillGeneralInfo($show_question_text, $show_points, $show_feedba
}
//If there are general feedback to be shown
- if ($show_feedback AND $this->getFeedback('general_feedback') != '') {
+ if ($show_feedback AND $this->getFeedback('general_feedback') != '')
+ {
//If test is finished use LaTeX
//$this->getTemplate()->setVariable('GENERAL_FEEDBACK_MESSAGE', $this->getPlugin()->txt('message_general_feedback'));
//$this->getTemplate()->setVariable('GENERAL_FEEDBACK', assStackQuestionUtils::_getLatex($this->getFeedback('general_feedback')));
- } else {
+ } else
+ {
//Show message for no general feedback.
//v1.6.1 Not use general_feedback
//$this->getTemplate()->setVariable('GENERAL_FEEDBACK', $this->getPlugin()->txt('message_no_how_to_solve_in_this_question'));
@@ -233,27 +246,32 @@ private function fillSpecificPrtFeedback($show_question_text, $prt_name, $prt, $
$this->getTemplate()->setCurrentBlock('question_part');
$this->getTemplate()->setVariable('PRT_NAME', $prt_name);
//Fill the user response part
- if (($this->show_user_response AND $_GET['activecommand'] == 'directfeedback') OR $_GET['activecommand'] != 'directfeedback') {
+ if (($this->show_user_response AND $_GET['activecommand'] == 'directfeedback') OR $_GET['activecommand'] != 'directfeedback')
+ {
$this->fillUserResponse($prt['response'], $show_correct_solution);
}
//Set block again to continue filling the question part
$this->getTemplate()->setCurrentBlock('question_part');
//Points reached in this prt
- if (($this->show_user_response AND $_GET['activecommand'] == 'directfeedback') OR $_GET['activecommand'] != 'directfeedback') {
- if (!is_null($prt['points']) AND $show_points) {
+ if (($this->show_user_response AND $_GET['activecommand'] == 'directfeedback') OR $_GET['activecommand'] != 'directfeedback')
+ {
+ if (!is_null($prt['points']) AND $show_points)
+ {
$this->getTemplate()->setVariable('POINTS_MESSAGE', $this->getPlugin()->txt('message_points'));
$this->getTemplate()->setVariable('POINTS', $prt['points']);
}
}
//Errors
- if ($prt['errors'] AND $show_feedback) {
+ if ($prt['errors'] AND $show_feedback)
+ {
$this->getTemplate()->setVariable('ERROR_MESSAGE', $this->getPlugin()->txt('message_error_part'));
$this->getTemplate()->setVariable('ERROR', assStackQuestionUtils::_getLatex($prt['errors']));
}
//Specific feedback given for this prt
- if ($prt['feedback']) {
+ if ($prt['feedback'])
+ {
//$this->getTemplate()->setVariable('FEEDBACK_MESSAGE', $this->getPlugin()->txt('message_feedback_solution_part'));
$this->getTemplate()->setVariable('PART_FEEDBACK', assStackQuestionUtils::_getLatex($prt['feedback']));
}
@@ -265,9 +283,11 @@ private function fillSpecificPrtFeedback($show_question_text, $prt_name, $prt, $
}*/
//Fill color for the feedback status of this input.
- if ($graphical_output AND $_GET['cmd'] != 'outUserListOfAnswerPasses') {
+ if ($graphical_output AND $_GET['cmd'] != 'outUserListOfAnswerPasses')
+ {
//Status message
- if (is_array($prt['status'])) {
+ if (is_array($prt['status']))
+ {
$this->getTemplate()->setVariable('FEEDBACK_STATUS', $prt['status']['message']);
}
@@ -287,17 +307,20 @@ private function fillUserResponse($response_data, $show_correct_solution)
{
$this->getTemplate()->setVariable('USER_RESPONSE_CONTAINER_MESSAGE', $this->getPlugin()->txt('message_user_response_container'));
//For each input evaluated in current PRT
- foreach ($response_data as $input_name => $response) {
+ foreach ($response_data as $input_name => $response)
+ {
//Set block
$this->getTemplate()->setCurrentBlock('user_response_part');
//If there is a model answer to show
- if (isset($response['model_answer'])) {
+ if (isset($response['model_answer']))
+ {
//User response
$this->getTemplate()->setVariable('USER_RESPONSE_MESSAGE', $this->getPlugin()->txt('message_user_solution_part'));
$this->getTemplate()->setVariable('USER_RESPONSE', $response['display']);
//Teacher solution
//TODO this may not work in all configurations detetmine how to call the system delimiters for LaTeX
- if ($show_correct_solution AND $_GET['activecommand'] != 'directfeedback') {
+ if ($show_correct_solution AND $_GET['activecommand'] != 'directfeedback')
+ {
//$this->getTemplate()->setVariable('TEACHER_ANSWER_MESSAGE', $this->getPlugin()->txt('message_best_solution'));
//$this->getTemplate()->setVariable('TEACHER_ANSWER', ilUtil::insertLatexImages('\[ ' . assStackQuestionUtils::_solveKeyBracketsBug($response['model_answer'])) . ' \]');
}
@@ -314,7 +337,8 @@ private function fillUserResponse($response_data, $show_correct_solution)
*/
private function getColor($status)
{
- switch ($status) {
+ switch ($status)
+ {
case 1:
return "#b5eeac";
case 0:
@@ -331,21 +355,29 @@ public function getQuestionTextFilledIn($mode = "correct")
$question_text = $this->getFeedback('question_text');
$specific_feedback = $this->specific_feedback;
//$question_text = preg_replace('/\[\[validation:(.*?)\]\]/', "", $question_text);
- if (is_array($this->getFeedback('prt'))) {
- foreach ($this->getFeedback('prt') as $prt_name => $prt) {
- if(is_array($prt['response'])){
- foreach ($prt['response'] as $input_name => $input) {
- if ($input['model_answer'] != "" AND $mode == "correct") {
+ if (is_array($this->getFeedback('prt')))
+ {
+ foreach ($this->getFeedback('prt') as $prt_name => $prt)
+ {
+ if (is_array($prt['response']))
+ {
+ foreach ($prt['response'] as $input_name => $input)
+ {
+ if ($input['model_answer'] != "" AND $mode == "correct")
+ {
$question_text = str_replace("[[input:" . $input_name . "]]", $input['model_answer'], $question_text);
$question_text = str_replace("[[validation:" . $input_name . "]]", $input['model_answer_display'], $question_text);
- } elseif ($input['model_answer'] != "" AND $mode == "user") {
+ } elseif ($input['model_answer'] != "" AND $mode == "user")
+ {
$question_text = str_replace("[[input:" . $input_name . "]]", $this->getFilledInputUser($input['display']), $question_text);
$question_text = str_replace("[[feedback:" . $prt_name . "]]", $this->replacementForPRTPlaceholders($prt, $prt_name, $input), $question_text);
$specific_feedback = str_replace("[[feedback:" . $prt_name . "]]", $this->replacementForPRTPlaceholders($prt, $prt_name, $input), $specific_feedback);
- } elseif ($mode == "user") {
+ } elseif ($mode == "user")
+ {
$question_text = str_replace("[[input:" . $input_name . "]]", $this->getPlugin()->txt("no_model_solution_for_this_input"), $question_text);
$question_text = str_replace("[[feedback:" . $prt_name . "]]", $this->replacementForPRTPlaceholders($prt, $prt_name, $input), $question_text);
- } elseif ($mode == "correct") {
+ } elseif ($mode == "correct")
+ {
$question_text = str_replace("[[input:" . $input_name . "]]", $this->getPlugin()->txt("no_model_solution_for_this_input"), $question_text);
$question_text = str_replace("[[feedback:" . $prt_name . "]]", "", $question_text);
}
@@ -354,19 +386,18 @@ public function getQuestionTextFilledIn($mode = "correct")
}
}
- if ($mode == "correct") {
+ if ($mode == "correct")
+ {
$string = "";
//feedback
- $string .= '
';
-
- $question_text = str_replace("[[feedback:" . $prt_name . "]]", $string, $question_text);
+ $question_text = str_replace("[[feedback:" . $prt_name . "]]", assStackQuestionUtils::_getFeedbackStyledText($string, "feedback_default"), $question_text);
}
}
}
@@ -843,14 +870,22 @@ public function getQuestionOutput($solutions, $best_solution, $show_feedback, $j
}
/**
- * Return the specific feedback
- * @param int $active_id
- * @param int $pass
- * @return string
+ * Returns the answer specific feedback for the question
+ *
+ * Please not that the solution array structure is STACK specific!
+ *
+ * @param array $userSolution ($userSolution[] = )
+ * @return string HTML Code with the answer specific feedback
+ * @see assStackQuestion::getSolutionValues()
**/
- public function getSpecificFeedbackOutput($active_id, $pass)
+ public function getSpecificFeedbackOutput($userSolution)
{
- //Check for PASS
+ //We cannot use $userSolution, we need to get active id and pass to get the
+//Check for PASS
+
+ $active_id = $this->active_id;
+ $pass = $this->pass;
+
if ($active_id)
{
require_once './Modules/Test/classes/class.ilObjTest.php';
@@ -878,6 +913,7 @@ public function getSpecificFeedbackOutput($active_id, $pass)
}
}
$specific_feedback = $this->object->getOptions()->getSpecificFeedback();
+
//Search for feedback placeholders in specific feedback text.
foreach ($this->object->getPotentialResponsesTrees() as $prt_name => $prt)
{
@@ -887,15 +923,13 @@ public function getSpecificFeedbackOutput($active_id, $pass)
{
$string = "";
//feedback
- $string .= '
',$text);
+
+ return $text;
+ }
+
+
+ public static function _isPhP72()
+ {
+ $php_version = phpversion();
+
+ $version = substr($php_version, 0, 3);
+ if ($version < 7.2)
+ {
+ return FALSE;
+ } else
+ {
+ return TRUE;
+ }
+ }
}
diff --git a/lang/ilias_de.lang b/lang/ilias_de.lang
index 02b7c04f..429e726d 100644
--- a/lang/ilias_de.lang
+++ b/lang/ilias_de.lang
@@ -400,6 +400,25 @@ notes_best_solution_message#:#Notizen haben keine bestmögliche Lösung
show_default_prts_settings#:#Vorgabewerte für Rückmeldebäume-Einstellungen
default_prts_settings#:#Standard-Einstellungen für Rückmeldebäume und Knoten
config_default_prts_message#:#Die Einstellungen für Rückmeldebäume wurden erfolgreich geändert.
+prt_node_pos_feedback_class#:#Feedback-Style, wenn wahr
+prt_node_pos_feedback_class_info#:#Wählen Sie den Feedback-Style, wenn der Answertest dieses Knotens wahr ist.
+prt_node_neg_feedback_class#:#Feedback-Style, wenn falsch
+prt_node_neg_feedback_class_info#:#Wählen Sie den Feedback-Style, wenn der Answertest dieses Knotens falsch ist.
+feedback_styles_settings#:#Feedback-Style Einstellungen
+feedback_styles_settings#:#Feedback-Style Einstellungen
+feedback_node_right#:#Richtig
+feedback_node_right_info#:#Feedback-Typ für richtige Antworten
+feedback_node_wrong#:#Falsch
+feedback_node_wrong_info#:#Feedback-Typ für falsche Antworten
+feedback_solution_hint#:#Hinweis
+feedback_solution_hint_info#:#Feedback-Style für Lösungshinweise
+feedback_extra_info#:#Info
+feedback_extra_info_info#:#Feedback-Style für zusätzliche Informationen
+feedback_plot_feedback#:#Diagramm
+feedback_plot_feedback_info#:#Für Diagramme benutzter Feedback-Style
+config_feedback_styles_changed_message#:#Die Standardeinstellungen für Feedback-Style wurden erfolgreich geändert.
+feedback_extra_1#:#Teilweise korrekt
+feedback_extra_1_info#:#Feedback-Style für teilweise korrekte Antworten
copy_node#:#Knoten kopieren
paste_node#:#Knoten einfügen
copy_prt#:# Rückmeldebaum kopieren
@@ -431,4 +450,12 @@ servers_deactivated#:#Die Server wurden deaktiviert.
no_server_selected#:#Bitte wählen Sie einen Server aus.
confirm_delete_servers#:#Möchten Sie den/die folgenden Server löschen?
server_deleted#:#Der Server wurde gelöscht.
-servers_deleted#:#Die Server wurden gelöscht.
\ No newline at end of file
+servers_deleted#:#Die Server wurden gelöscht.
+deletion_error_connected_node#:#You cannot delete this node as is connected to a PRT, please change the PRT structure to disconnect the node before delete it.
+import_in_test_error#:#Import STACK questions from MoodleXML is not allowed in tests, please import it into a question pool before including it into a test.
+feedback_stylesheet_id#:#Content-Style
+feedback_stylesheet_id_info#:#Wählen Sie den Content-Style, der für das STACK-Feedback verwendet wird. Es können nur aktive Content-Style ausgewählt werden. Wenn kein Inhaltsstil ausgewählt ist, wird der Standard-Feedback-Style verwendet. Bitte beachten Sie, dass bei einer Änderung des Inhaltsstils alle Werte in diesem Formular auf Standard zurückgesetzt werden.
+feedback_default#:#Allgemeiner Feedback-Style
+feedback_default_info#:#Wählen Sie den Feedback-Style für Feedback-Nachrichten in STACK-Fragen. Er wird für den Abschnitt einer Feedback-Nachricht von STACK verwendet. Innerhalb dieses Abschnitts sind die Feedbacks der Knoten eines Rückmeldebaums eingebettet, die zusätzlich mit eigenen Styles versehen werden können.
+nodes_feedback#:#Feedback von Knoten
+config_prts_changed_message#:#Änderungen wurden übernommen
\ No newline at end of file
diff --git a/lang/ilias_en.lang b/lang/ilias_en.lang
index 799cfd91..45eb8eef 100644
--- a/lang/ilias_en.lang
+++ b/lang/ilias_en.lang
@@ -400,26 +400,22 @@ notes_best_solution_message#:#Notes inputs have no best solution
show_default_prts_settings#:#Default values for Potential response Trees and First nodes
default_prts_settings#:#Default values for Potential response Trees
config_default_prts_message#:#The default settings for PRT have been changed successfully.
-prt_node_pos_feedback_class#:#Feedback Style if True
-prt_node_pos_feedback_class_info#:#Choose the feedback style if this node's answertest is true, feedback style can be managed in plugin configuration.
-prt_node_neg_feedback_class#:#Feedback Style if False
-prt_node_neg_feedback_class_info#:#Choose the feedback style if this node's answertest is false, feedback style can be managed in plugin configuration.
+prt_node_pos_feedback_class#:#Feedback Type if True
+prt_node_pos_feedback_class_info#:#Choose the feedback style if this node's answertest is true
+prt_node_neg_feedback_class#:#Feedback Type if False
+prt_node_neg_feedback_class_info#:#Choose the feedback style if this node's answertest is false
feedback_styles_settings#:#Feedback Styles Settings
-feedback_node_right#:#Right Answer
+feedback_node_right#:#Right
feedback_node_right_info#:#Feedback style for right answers
-feedback_node_wrong#:#Wrong Answer
+feedback_node_wrong#:#Wrong
feedback_node_wrong_info#:#Feedback style for wrong answers
-feedback_solution_hint#:#Solution Hint
+feedback_solution_hint#:#Hint
feedback_solution_hint_info#:#Feedback style for solution hints
-feedback_extra_info#:#Extra Information
+feedback_extra_info#:#Info
feedback_extra_info_info#:#Feedback style used for extra information
feedback_plot_feedback#:#Plot
feedback_plot_feedback_info#:#Feedback style used for plots
config_feedback_styles_changed_message#:#The default settings for Feedback Styles have been changed successfully.
-feedback_extra_1#:#Partially correct
-feedback_extra_1_info#:#Feedback style for partially correct answers
-options_stepwise_feedback#:#Stepwise Feedback
-options_stepwise_feedback_info#:#Allow students to evaluate each PRT separately without reload the page
copy_node#:#Copy Node
paste_node#:#Paste Node
copy_prt#:#Copy Potential Response Tree
@@ -452,3 +448,11 @@ no_server_selected#:#Please select a server.
confirm_delete_servers#:#Delete the following server(s)?
server_deleted#:#The server is deleted.
servers_deleted#:#The servers are deleted.
+deletion_error_connected_node#:#You cannot delete this node as is connected to a PRT, please change the PRT structure to disconnect the node before delete it.
+import_in_test_error#:#Import STACK questions from MoodleXML is not allowed in tests, please import it into a question pool before including it into a test.
+feedback_stylesheet_id#:#Content Style
+feedback_stylesheet_id_info#:#Select the content style used for STACK Feedback. Only active content styles can be selected. If no content style is chosen the default feedback style will be applied. Please notice, in case you change the content style, all values in this form will be set to default.
+feedback_default#:#General Feedback Style
+feedback_default_info#:#Select the feedback style for feedback messages in STACK questions. It is used for the section of a STACK feedback message. Within this section, the feedbacks of the nodes of a potential response tree are embedded, which can also be provided with their own styles.
+nodes_feedback#:#Feedback from Nodes
+config_prts_changed_message#:#Changes have been applied
\ No newline at end of file
diff --git a/plugin.php b/plugin.php
index 26d350d5..2bd8993b 100644
--- a/plugin.php
+++ b/plugin.php
@@ -8,12 +8,13 @@
$id = "xqcas";
// code version; must be changed for all code changes
-$version = "3.0.22";
+
+$version = "3.1.5";
// ilias min and max version; must always reflect the versions that should
// run with the plugin
-$ilias_min_version = "5.3.0";
-$ilias_max_version = "5.3.999";
+$ilias_min_version = "5.4.0";
+$ilias_max_version = "5.4.999";
// optional, but useful: Add one or more responsible persons and a contact email
$responsible = "Fred Neumann, Jesus Copado";
diff --git a/sql/dbupdate.php b/sql/dbupdate.php
index 03c70412..f540d21d 100644
--- a/sql/dbupdate.php
+++ b/sql/dbupdate.php
@@ -737,4 +737,37 @@
$db->insert("xqcas_configuration", array('parameter_name' => array('text', "prt_neg_penalty"), 'value' => array('clob', '0'), 'group_name' => array('text', 'prts')));
$db->insert("xqcas_configuration", array('parameter_name' => array('text', "prt_neg_answernote"), 'value' => array('clob', 'prt1-0-F'), 'group_name' => array('text', 'prts')));
}
-?>
\ No newline at end of file
+?>
+<#36>
+
+<#37>
+database();
+//Create feedback styles
+if ($db->tableExists('xqcas_configuration'))
+{
+ //Feedback style 1 will be used as default, in case feedback_default is chosen, the value in true/false_feedback_format will be 1, and no specific style will be used, but platform style
+ $db->insert("xqcas_configuration", array('parameter_name' => array('text', "feedback_default"), 'value' => array('clob', ''), 'group_name' => array('text', 'feedback')));
+ //Specific feedback formats.
+ $db->insert("xqcas_configuration", array('parameter_name' => array('text', "feedback_node_right"), 'value' => array('clob', ''), 'group_name' => array('text', 'feedback')));
+ $db->insert("xqcas_configuration", array('parameter_name' => array('text', "feedback_node_wrong"), 'value' => array('clob', ''), 'group_name' => array('text', 'feedback')));
+ $db->insert("xqcas_configuration", array('parameter_name' => array('text', "feedback_node_partially"), 'value' => array('clob', ''), 'group_name' => array('text', 'feedback')));
+ $db->insert("xqcas_configuration", array('parameter_name' => array('text', "feedback_solution_hint"), 'value' => array('clob', ''), 'group_name' => array('text', 'feedback')));
+ $db->insert("xqcas_configuration", array('parameter_name' => array('text', "feedback_extra_info"), 'value' => array('clob', ''), 'group_name' => array('text', 'feedback')));
+ $db->insert("xqcas_configuration", array('parameter_name' => array('text', "feedback_plot_feedback"), 'value' => array('clob', ''), 'group_name' => array('text', 'feedback')));
+}
+?>
+<#38>
+database();
+//Create feedback styles
+if ($db->tableExists('xqcas_configuration'))
+{
+ //We have to store the id of the content style we want to use for stack feedback styles
+ $db->insert("xqcas_configuration", array('parameter_name' => array('text', "feedback_stylesheet_id"), 'value' => array('clob', ''), 'group_name' => array('text', 'feedback')));
+}
+?>