Skip to content
Snippets Groups Projects
Commit 6c0c8258 authored by Tim Hunt's avatar Tim Hunt
Browse files

Add an extra options field for input.

That is, add it in the database, on the form, and to import/export and
backup and restore.

This is necessary to make input types like dropdown-list work.

Note that this has not yet been wired up to to input type classes. There
are some new todos in the code for that.
parent 30a51a6d
Branches
No related tags found
No related merge requests found
...@@ -59,7 +59,7 @@ class backup_qtype_stack_plugin extends backup_qtype_plugin { ...@@ -59,7 +59,7 @@ class backup_qtype_stack_plugin extends backup_qtype_plugin {
$stackinput = new backup_nested_element('stackinput', array('id'), $stackinput = new backup_nested_element('stackinput', array('id'),
array('name', 'type', 'tans', 'boxsize', 'strictsyntax', 'insertstars', array('name', 'type', 'tans', 'boxsize', 'strictsyntax', 'insertstars',
'syntaxhint', 'forbidwords', 'forbidfloat', 'requirelowestterms', 'syntaxhint', 'forbidwords', 'forbidfloat', 'requirelowestterms',
'checkanswertype', 'mustverify', 'showvalidation')); 'checkanswertype', 'mustverify', 'showvalidation', 'options'));
$stackprts = new backup_nested_element('stackprts'); $stackprts = new backup_nested_element('stackprts');
$stackprt = new backup_nested_element('stackprt', array('id'), $stackprt = new backup_nested_element('stackprt', array('id'),
......
...@@ -98,6 +98,10 @@ class restore_qtype_stack_plugin extends restore_qtype_plugin { ...@@ -98,6 +98,10 @@ class restore_qtype_stack_plugin extends restore_qtype_plugin {
$data = (object)$data; $data = (object)$data;
if (!property_exists($data, 'options')) {
$data->options = '';
}
// Detect if the question is created or mapped. // Detect if the question is created or mapped.
$questioncreated = (bool) $this->get_mappingid('question_created', $this->get_old_parentid('question')); $questioncreated = (bool) $this->get_mappingid('question_created', $this->get_old_parentid('question'));
......
...@@ -47,7 +47,8 @@ ...@@ -47,7 +47,8 @@
<FIELD NAME="requirelowestterms" TYPE="int" LENGTH="4" NOTNULL="true" DEFAULT="0" SEQUENCE="false" COMMENT="Whether any fractions in the input must be given in lowest terms." PREVIOUS="forbidfloat" NEXT="checkanswertype"/> <FIELD NAME="requirelowestterms" TYPE="int" LENGTH="4" NOTNULL="true" DEFAULT="0" SEQUENCE="false" COMMENT="Whether any fractions in the input must be given in lowest terms." PREVIOUS="forbidfloat" NEXT="checkanswertype"/>
<FIELD NAME="checkanswertype" TYPE="int" LENGTH="4" NOTNULL="true" DEFAULT="0" SEQUENCE="false" COMMENT="Whether the type of the students answer (expression, list, ...) should be validated to ensure it is the same as tans." PREVIOUS="requirelowestterms" NEXT="mustverify"/> <FIELD NAME="checkanswertype" TYPE="int" LENGTH="4" NOTNULL="true" DEFAULT="0" SEQUENCE="false" COMMENT="Whether the type of the students answer (expression, list, ...) should be validated to ensure it is the same as tans." PREVIOUS="requirelowestterms" NEXT="mustverify"/>
<FIELD NAME="mustverify" TYPE="int" LENGTH="4" NOTNULL="true" DEFAULT="1" SEQUENCE="false" COMMENT="Whether the interpretation of this input must be verified by the student before it is graded." PREVIOUS="checkanswertype" NEXT="showvalidation"/> <FIELD NAME="mustverify" TYPE="int" LENGTH="4" NOTNULL="true" DEFAULT="1" SEQUENCE="false" COMMENT="Whether the interpretation of this input must be verified by the student before it is graded." PREVIOUS="checkanswertype" NEXT="showvalidation"/>
<FIELD NAME="showvalidation" TYPE="int" LENGTH="4" NOTNULL="true" DEFAULT="1" SEQUENCE="false" COMMENT="Whether the validation results for this input should be displayed." PREVIOUS="mustverify"/> <FIELD NAME="showvalidation" TYPE="int" LENGTH="4" NOTNULL="true" DEFAULT="1" SEQUENCE="false" COMMENT="Whether the validation results for this input should be displayed." PREVIOUS="mustverify" NEXT="options"/>
<FIELD NAME="options" TYPE="text" NOTNULL="true" SEQUENCE="false" COMMENT="Extra options that are interpreted in an input-specific way." PREVIOUS="showvalidation"/>
</FIELDS> </FIELDS>
<KEYS> <KEYS>
<KEY NAME="primary" TYPE="primary" FIELDS="id" NEXT="questionid"/> <KEY NAME="primary" TYPE="primary" FIELDS="id" NEXT="questionid"/>
......
...@@ -517,25 +517,62 @@ function xmldb_qtype_stack_upgrade($oldversion) { ...@@ -517,25 +517,62 @@ function xmldb_qtype_stack_upgrade($oldversion) {
// Launch rename table for qtype_stack. // Launch rename table for qtype_stack.
$dbman->rename_table($table, 'qtype_stack_options'); $dbman->rename_table($table, 'qtype_stack_options');
// stack savepoint reached. // Qtype stack savepoint reached.
upgrade_plugin_savepoint(true, 2013030100, 'qtype', 'stack'); upgrade_plugin_savepoint(true, 2013030100, 'qtype', 'stack');
} }
if ($oldversion < 2013030101) { if ($oldversion < 2013030101) {
// Define field inversetrig to be added to qtype_stack_options // Define field inversetrig to be added to qtype_stack_options.
$table = new xmldb_table('qtype_stack_options'); $table = new xmldb_table('qtype_stack_options');
$field = new xmldb_field('inversetrig', XMLDB_TYPE_CHAR, '8', null, XMLDB_NOTNULL, null, 'cos-1', 'complexno'); $field = new xmldb_field('inversetrig', XMLDB_TYPE_CHAR, '8', null, XMLDB_NOTNULL, null, 'cos-1', 'complexno');
// Conditionally launch add field inversetrig // Conditionally launch add field inversetrig.
if (!$dbman->field_exists($table, $field)) { if (!$dbman->field_exists($table, $field)) {
$dbman->add_field($table, $field); $dbman->add_field($table, $field);
} }
// stack savepoint reached // Qtype stack savepoint reached.
upgrade_plugin_savepoint(true, 2013030101, 'qtype', 'stack'); upgrade_plugin_savepoint(true, 2013030101, 'qtype', 'stack');
} }
if ($oldversion < 2013030102) {
// Define field options to be added to qtype_stack_inputs.
$table = new xmldb_table('qtype_stack_inputs');
$field = new xmldb_field('options', XMLDB_TYPE_TEXT, null, null, null, null, null, 'showvalidation');
// Conditionally launch add field options.
if (!$dbman->field_exists($table, $field)) {
$dbman->add_field($table, $field);
}
// Qtype stack savepoint reached.
upgrade_plugin_savepoint(true, 2013030102, 'qtype', 'stack');
}
if ($oldversion < 2013030103) {
// Fill qtype_stack_inputs.options column with empty strings.
$DB->set_field('qtype_stack_inputs', 'options', '');
// Question stack savepoint reached.
upgrade_plugin_savepoint(true, 2013030103, 'qtype', 'stack');
}
if ($oldversion < 2013030104) {
// Changing nullability of field options on table qtype_stack_inputs to not null
$table = new xmldb_table('qtype_stack_inputs');
$field = new xmldb_field('options', XMLDB_TYPE_TEXT, null, null, XMLDB_NOTNULL, null, null, 'showvalidation');
// Launch change of nullability for field options
$dbman->change_field_notnull($table, $field);
// Qtype stack savepoint reached.
upgrade_plugin_savepoint(true, 2013030104, 'qtype', 'stack');
}
// Add new upgrade blocks just above here. // Add new upgrade blocks just above here.
// This block of code is intentionally outside of an if statement. We want // This block of code is intentionally outside of an if statement. We want
......
...@@ -451,6 +451,9 @@ class qtype_stack_edit_form extends question_edit_form { ...@@ -451,6 +451,9 @@ class qtype_stack_edit_form extends question_edit_form {
stack_string('showvalidation')); stack_string('showvalidation'));
$mform->setDefault($inputname . 'showvalidation', true); $mform->setDefault($inputname . 'showvalidation', true);
$mform->addHelpButton($inputname . 'showvalidation', 'showvalidation', 'qtype_stack'); $mform->addHelpButton($inputname . 'showvalidation', 'showvalidation', 'qtype_stack');
$mform->addElement('text', $inputname . 'options', stack_string('inputextraoptions'), array('size' => 20));
$mform->addHelpButton($inputname . 'options', 'inputextraoptions', 'qtype_stack');
} }
/** /**
...@@ -638,6 +641,7 @@ class qtype_stack_edit_form extends question_edit_form { ...@@ -638,6 +641,7 @@ class qtype_stack_edit_form extends question_edit_form {
$question->{$inputname . 'checkanswertype'} = $input->checkanswertype; $question->{$inputname . 'checkanswertype'} = $input->checkanswertype;
$question->{$inputname . 'mustverify'} = $input->mustverify; $question->{$inputname . 'mustverify'} = $input->mustverify;
$question->{$inputname . 'showvalidation'} = $input->showvalidation; $question->{$inputname . 'showvalidation'} = $input->showvalidation;
$question->{$inputname . 'options'} = $input->options;
} }
return $question; return $question;
...@@ -843,6 +847,15 @@ class qtype_stack_edit_form extends question_edit_form { ...@@ -843,6 +847,15 @@ class qtype_stack_edit_form extends question_edit_form {
foreach ($inputs as $inputname => $notused) { foreach ($inputs as $inputname => $notused) {
$errors = $this->validate_cas_string($errors, $errors = $this->validate_cas_string($errors,
$fromform[$inputname . 'modelans'], $inputname . 'modelans', $inputname . 'modelans'); $fromform[$inputname . 'modelans'], $inputname . 'modelans', $inputname . 'modelans');
// TODO: find out if this input type acutally requires options, rather than
// the hard-coded check here.
if (false) {
$errors = $this->validate_cas_string($errors,
$fromform[$inputname . 'options'], $inputname . 'options', $inputname . 'options', false);
} else if ($fromform[$inputname . 'options']) {
$errors[$inputname . 'options'][] = stack_string('optionsnotrequired');
}
} }
// 3) Validate all prts. // 3) Validate all prts.
...@@ -1034,7 +1047,7 @@ class qtype_stack_edit_form extends question_edit_form { ...@@ -1034,7 +1047,7 @@ class qtype_stack_edit_form extends question_edit_form {
* @param array $errors the errors array that validation is assembling. * @param array $errors the errors array that validation is assembling.
* @param string $value the submitted value validate. * @param string $value the submitted value validate.
* @param string $fieldname the name of the field add any errors to. * @param string $fieldname the name of the field add any errors to.
* @param string $savestring the array key to save the string to in $this->validationcasstrings. * @param string $savesession the array key to save the string to in $this->validationcasstrings.
* @param bool|string $notblank false means do nothing (default). A string * @param bool|string $notblank false means do nothing (default). A string
* will validate that the field is not blank, and if it is, display that error. * will validate that the field is not blank, and if it is, display that error.
* @param int $maxlength the maximum allowable length. Defaults to 255. * @param int $maxlength the maximum allowable length. Defaults to 255.
...@@ -1146,6 +1159,12 @@ class qtype_stack_edit_form extends question_edit_form { ...@@ -1146,6 +1159,12 @@ class qtype_stack_edit_form extends question_edit_form {
$cs = new stack_cas_casstring($inputname.':'.$fromform[$inputname . 'modelans']); $cs = new stack_cas_casstring($inputname.':'.$fromform[$inputname . 'modelans']);
$cs->validate('t'); $cs->validate('t');
$inputvalues[] = $cs; $inputvalues[] = $cs;
if ($fromform[$inputname . 'options']) {
$cs = new stack_cas_casstring('optionsfor'.$inputname.':'.$fromform[$inputname . 'options']);
$cs->validate('t');
$inputvalues[] = $cs;
}
} }
$inputsession = clone $session; $inputsession = clone $session;
$inputsession->add_vars($inputvalues); $inputsession->add_vars($inputvalues);
...@@ -1153,6 +1172,14 @@ class qtype_stack_edit_form extends question_edit_form { ...@@ -1153,6 +1172,14 @@ class qtype_stack_edit_form extends question_edit_form {
foreach ($inputs as $inputname => $notused) { foreach ($inputs as $inputname => $notused) {
if ($inputsession->get_errors_key($inputname)) { if ($inputsession->get_errors_key($inputname)) {
$errors[$inputname . 'modelans'][] = $inputsession->get_errors_key($inputname); $errors[$inputname . 'modelans'][] = $inputsession->get_errors_key($inputname);
// TODO: Send the acutal value to to input, and ask it to validate it.
// For example, the matrix input type could check that the model answer is a matrix.
}
if ($fromform[$inputname . 'options'] && $inputsession->get_errors_key('optionsfor' . $inputname)) {
$errors[$inputname . 'options'][] = $inputsession->get_errors_key('optionsfor' . $inputname);
} else {
// TODO: Send the acutal value to to input, and ask it to validate it.
} }
} }
...@@ -1160,6 +1187,7 @@ class qtype_stack_edit_form extends question_edit_form { ...@@ -1160,6 +1187,7 @@ class qtype_stack_edit_form extends question_edit_form {
if (!empty($errors)) { if (!empty($errors)) {
return $errors; return $errors;
} }
// TODO: loop over all the PRTs in a similar manner.... // TODO: loop over all the PRTs in a similar manner....
// Remember, to use // Remember, to use
// clone $inputsession // clone $inputsession
......
...@@ -108,6 +108,9 @@ $string['showvalidation_help'] = 'Setting this option displays any validation fe ...@@ -108,6 +108,9 @@ $string['showvalidation_help'] = 'Setting this option displays any validation fe
$string['showvalidation_link'] = '%%WWWROOT%%/question/type/stack/doc/doc.php/Authoring/Inputs.md#Show_validation'; $string['showvalidation_link'] = '%%WWWROOT%%/question/type/stack/doc/doc.php/Authoring/Inputs.md#Show_validation';
$string['htmlfragment'] = 'You appear to have some HTML elements in your expression.'; $string['htmlfragment'] = 'You appear to have some HTML elements in your expression.';
$string['illegalcaschars'] = 'The characters @ and $ are not allowed in CAS input.'; $string['illegalcaschars'] = 'The characters @ and $ are not allowed in CAS input.';
$string['inputextraoptions'] = 'Extra options';
$string['inputextraoptions_help'] = 'Some input types require extra options in order to work. You can enter them here. This value is a CAS expression.';
$string['inputextraoptions_link'] = '%%WWWROOT%%/question/type/stack/doc/doc.php/Authoring/Inputs.md#Extra options';
$string['inputheading'] = 'Input: {$a}'; $string['inputheading'] = 'Input: {$a}';
$string['inputtype'] = 'Input type'; $string['inputtype'] = 'Input type';
$string['inputtype_help'] = 'This determines the type of the input element, e.g. form field, true/false, text area.'; $string['inputtype_help'] = 'This determines the type of the input element, e.g. form field, true/false, text area.';
...@@ -158,6 +161,7 @@ $string['nodexwhenfalse'] = 'Node {$a} when false'; ...@@ -158,6 +161,7 @@ $string['nodexwhenfalse'] = 'Node {$a} when false';
$string['nodexwhentrue'] = 'Node {$a} when true'; $string['nodexwhentrue'] = 'Node {$a} when true';
$string['nonempty'] = 'This must not be empty.'; $string['nonempty'] = 'This must not be empty.';
$string['noprtsifnoinputs'] = 'A questoin with no inputs cannot have any PRTs.'; $string['noprtsifnoinputs'] = 'A questoin with no inputs cannot have any PRTs.';
$string['optionsnotrequired'] = 'This input type does not require any options.';
$string['penalty'] = 'Penalty'; $string['penalty'] = 'Penalty';
$string['penalty_help'] = 'The penalty scheme deducts this value from the result of each PRT for each different and valid attempt which is not completely correct.'; $string['penalty_help'] = 'The penalty scheme deducts this value from the result of each PRT for each different and valid attempt which is not completely correct.';
$string['penalty_link'] = '%%WWWROOT%%/question/type/stack/doc/doc.php/Authoring/Feedback.md'; $string['penalty_link'] = '%%WWWROOT%%/question/type/stack/doc/doc.php/Authoring/Feedback.md';
......
...@@ -144,6 +144,7 @@ class qtype_stack extends question_type { ...@@ -144,6 +144,7 @@ class qtype_stack extends question_type {
$input->checkanswertype = $fromform->{$inputname . 'checkanswertype'}; $input->checkanswertype = $fromform->{$inputname . 'checkanswertype'};
$input->mustverify = $fromform->{$inputname . 'mustverify'}; $input->mustverify = $fromform->{$inputname . 'mustverify'};
$input->showvalidation = $fromform->{$inputname . 'showvalidation'}; $input->showvalidation = $fromform->{$inputname . 'showvalidation'};
$input->options = $fromform->{$inputname . 'options'};
$questionhasinputs = true; $questionhasinputs = true;
$DB->update_record('qtype_stack_inputs', $input); $DB->update_record('qtype_stack_inputs', $input);
...@@ -299,7 +300,7 @@ class qtype_stack extends question_type { ...@@ -299,7 +300,7 @@ class qtype_stack extends question_type {
array('questionid' => $question->id), 'name', array('questionid' => $question->id), 'name',
'name, id, questionid, type, tans, boxsize, strictsyntax, insertstars, ' . 'name, id, questionid, type, tans, boxsize, strictsyntax, insertstars, ' .
'syntaxhint, forbidwords, forbidfloat, requirelowestterms, ' . 'syntaxhint, forbidwords, forbidfloat, requirelowestterms, ' .
'checkanswertype, mustverify, showvalidation'); 'checkanswertype, mustverify, showvalidation, options');
$question->prts = $DB->get_records('qtype_stack_prts', $question->prts = $DB->get_records('qtype_stack_prts',
array('questionid' => $question->id), 'name', array('questionid' => $question->id), 'name',
...@@ -366,6 +367,7 @@ class qtype_stack extends question_type { ...@@ -366,6 +367,7 @@ class qtype_stack extends question_type {
} }
$parameters[$paramname] = $allparameters[$paramname]; $parameters[$paramname] = $allparameters[$paramname];
} }
// TODO: Do something with $inputdata->options here.
$question->inputs[$name] = stack_input_factory::make( $question->inputs[$name] = stack_input_factory::make(
$inputdata->type, $inputdata->name, $inputdata->tans, $parameters); $inputdata->type, $inputdata->name, $inputdata->tans, $parameters);
} }
...@@ -801,6 +803,7 @@ class qtype_stack extends question_type { ...@@ -801,6 +803,7 @@ class qtype_stack extends question_type {
$output .= " <checkanswertype>{$input->checkanswertype}</checkanswertype>\n"; $output .= " <checkanswertype>{$input->checkanswertype}</checkanswertype>\n";
$output .= " <mustverify>{$input->mustverify}</mustverify>\n"; $output .= " <mustverify>{$input->mustverify}</mustverify>\n";
$output .= " <showvalidation>{$input->showvalidation}</showvalidation>\n"; $output .= " <showvalidation>{$input->showvalidation}</showvalidation>\n";
$output .= " <options>{$input->options}</options>\n";
$output .= " </input>\n"; $output .= " </input>\n";
} }
...@@ -970,7 +973,7 @@ class qtype_stack extends question_type { ...@@ -970,7 +973,7 @@ class qtype_stack extends question_type {
$fromform->{$name . 'syntaxhint'} = $format->getpath($xml, array('#', 'syntaxhint', 0, '#'), ''); $fromform->{$name . 'syntaxhint'} = $format->getpath($xml, array('#', 'syntaxhint', 0, '#'), '');
$fromform->{$name . 'forbidwords'} = $format->getpath($xml, array('#', 'forbidwords', 0, '#'), ''); $fromform->{$name . 'forbidwords'} = $format->getpath($xml, array('#', 'forbidwords', 0, '#'), '');
$fromform->{$name . 'forbidfloat'} = $format->getpath($xml, array('#', 'forbidfloat', 0, '#'), 1); $fromform->{$name . 'forbidfloat'} = $format->getpath($xml, array('#', 'forbidfloat', 0, '#'), 1);
$fromform->{$name . 'requirelowestterms'} = $format->getpath($xml, array('#', 'requirelowestterms', 0, '#'), 0); $fromform->{$name . 'options'} = $format->getpath($xml, array('#', 'options', 0, '#'), '');
$fromform->{$name . 'checkanswertype'} = $format->getpath($xml, array('#', 'checkanswertype', 0, '#'), 0); $fromform->{$name . 'checkanswertype'} = $format->getpath($xml, array('#', 'checkanswertype', 0, '#'), 0);
$fromform->{$name . 'mustverify'} = $format->getpath($xml, array('#', 'mustverify', 0, '#'), 1); $fromform->{$name . 'mustverify'} = $format->getpath($xml, array('#', 'mustverify', 0, '#'), 1);
$fromform->{$name . 'showvalidation'} = $format->getpath($xml, array('#', 'showvalidation', 0, '#'), 1); $fromform->{$name . 'showvalidation'} = $format->getpath($xml, array('#', 'showvalidation', 0, '#'), 1);
......
...@@ -942,6 +942,7 @@ class qtype_stack_test_helper extends question_test_helper { ...@@ -942,6 +942,7 @@ class qtype_stack_test_helper extends question_test_helper {
$input->checkanswertype = 0; $input->checkanswertype = 0;
$input->mustverify = 1; $input->mustverify = 1;
$input->showvalidation = 1; $input->showvalidation = 1;
$input->options = '';
$qdata->inputs['ans1'] = $input; $qdata->inputs['ans1'] = $input;
$prt = new stdClass(); $prt = new stdClass();
...@@ -1057,6 +1058,7 @@ class qtype_stack_test_helper extends question_test_helper { ...@@ -1057,6 +1058,7 @@ class qtype_stack_test_helper extends question_test_helper {
$input->checkanswertype = 0; $input->checkanswertype = 0;
$input->mustverify = 1; $input->mustverify = 1;
$input->showvalidation = 1; $input->showvalidation = 1;
$input->options = '';
$qdata->inputs['ans1'] = $input; $qdata->inputs['ans1'] = $input;
$input = new stdClass(); $input = new stdClass();
...@@ -1075,6 +1077,7 @@ class qtype_stack_test_helper extends question_test_helper { ...@@ -1075,6 +1077,7 @@ class qtype_stack_test_helper extends question_test_helper {
$input->checkanswertype = 0; $input->checkanswertype = 0;
$input->mustverify = 1; $input->mustverify = 1;
$input->showvalidation = 1; $input->showvalidation = 1;
$input->options = '';
$qdata->inputs['ans2'] = $input; $qdata->inputs['ans2'] = $input;
$input = new stdClass(); $input = new stdClass();
...@@ -1093,6 +1096,7 @@ class qtype_stack_test_helper extends question_test_helper { ...@@ -1093,6 +1096,7 @@ class qtype_stack_test_helper extends question_test_helper {
$input->checkanswertype = 0; $input->checkanswertype = 0;
$input->mustverify = 1; $input->mustverify = 1;
$input->showvalidation = 1; $input->showvalidation = 1;
$input->options = '';
$qdata->inputs['ans3'] = $input; $qdata->inputs['ans3'] = $input;
$input = new stdClass(); $input = new stdClass();
...@@ -1111,6 +1115,7 @@ class qtype_stack_test_helper extends question_test_helper { ...@@ -1111,6 +1115,7 @@ class qtype_stack_test_helper extends question_test_helper {
$input->checkanswertype = 0; $input->checkanswertype = 0;
$input->mustverify = 0; $input->mustverify = 0;
$input->showvalidation = 0; $input->showvalidation = 0;
$input->options = '';
$qdata->inputs['ans4'] = $input; $qdata->inputs['ans4'] = $input;
$prt = new stdClass(); $prt = new stdClass();
......
...@@ -201,10 +201,11 @@ class qtype_stack_test extends qtype_stack_walkthrough_test_base { ...@@ -201,10 +201,11 @@ class qtype_stack_test extends qtype_stack_walkthrough_test_base {
<syntaxhint></syntaxhint> <syntaxhint></syntaxhint>
<forbidwords></forbidwords> <forbidwords></forbidwords>
<forbidfloat>1</forbidfloat> <forbidfloat>1</forbidfloat>
<requirelowestterms>0</requirelowestterms> <options>0</options>
<checkanswertype>0</checkanswertype> <checkanswertype>0</checkanswertype>
<mustverify>1</mustverify> <mustverify>1</mustverify>
<showvalidation>1</showvalidation> <showvalidation>1</showvalidation>
<requirelowestterms>0</requirelowestterms>
</input> </input>
<prt> <prt>
<name>firsttree</name> <name>firsttree</name>
...@@ -312,6 +313,7 @@ class qtype_stack_test extends qtype_stack_walkthrough_test_base { ...@@ -312,6 +313,7 @@ class qtype_stack_test extends qtype_stack_walkthrough_test_base {
<checkanswertype>0</checkanswertype> <checkanswertype>0</checkanswertype>
<mustverify>1</mustverify> <mustverify>1</mustverify>
<showvalidation>1</showvalidation> <showvalidation>1</showvalidation>
<options>0</options>
</input> </input>
<prt> <prt>
<name>firsttree</name> <name>firsttree</name>
...@@ -407,6 +409,7 @@ class qtype_stack_test extends qtype_stack_walkthrough_test_base { ...@@ -407,6 +409,7 @@ class qtype_stack_test extends qtype_stack_walkthrough_test_base {
$expectedq->ans1checkanswertype = 0; $expectedq->ans1checkanswertype = 0;
$expectedq->ans1mustverify = 1; $expectedq->ans1mustverify = 1;
$expectedq->ans1showvalidation = 1; $expectedq->ans1showvalidation = 1;
$expectedq->ans1options = '';
$expectedq->firsttreevalue = 1; $expectedq->firsttreevalue = 1;
$expectedq->firsttreeautosimplify = 1; $expectedq->firsttreeautosimplify = 1;
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
defined('MOODLE_INTERNAL') || die(); defined('MOODLE_INTERNAL') || die();
$plugin->version = 2013030101; $plugin->version = 2013030104;
$plugin->requires = 2012062503; $plugin->requires = 2012062503;
$plugin->cron = 0; $plugin->cron = 0;
$plugin->component = 'qtype_stack'; $plugin->component = 'qtype_stack';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment