Skip to content
Browse files

MDL-12133 - Errors calling parent::validation in a moodle form subcla…

…ss because the base class method signature was changed. This patch fixes all calls to parent::validation in the question editing forms.
  • Loading branch information...
1 parent 6ededd5 commit 1a632495f7d39445757202fce6a67521f060ca19 tjhunt committed Nov 20, 2007
View
4 question/type/calculated/edit_calculated_form.php
@@ -171,8 +171,8 @@ function qtype() {
return 'calculated';
}
- function validation($data){
- $errors = parent::validation($data);
+ function validation($data, $files){
+ $errors = parent::validation($data, $files);
//verifying for errors in {=...} in question text;
$qtext = "";
$qtextremaining = $data['questiontext'] ;
View
4 question/type/match/edit_match_form.php
@@ -70,8 +70,8 @@ function qtype() {
return 'match';
}
- function validation($data){
- $errors = parent::validation($data);
+ function validation($data, $files){
+ $errors = parent::validation($data, $files);
$answers = $data['subanswers'];
$questions = $data['subquestions'];
$questioncount = 0;
View
4 question/type/missingtype/edit_missingtype_form.php
@@ -66,8 +66,8 @@ function qtype() {
return 'missingtype';
}
- function validation($data){
- $errors = parent::validation($data);
+ function validation($data, $files){
+ $errors = parent::validation($data, $files);
$answers = $data['answer'];
$answercount = 0;
View
4 question/type/multianswer/edit_multianswer_form.php
@@ -73,10 +73,10 @@ function set_data($question) {
parent::set_data($question);
}
- function validation($data){
+ function validation($data, $files){
//TODO would be nice to parse the question text here and output some error
//messages if there is a problem with the text.
- $errors = parent::validation($data);
+ $errors = parent::validation($data, $files);
//extra check to make sure there is something in the htmlarea besides a <br />
$questiontext= trim(strip_tags($data['questiontext']));
if ($questiontext==''){
View
4 question/type/multichoice/edit_multichoice_form.php
@@ -107,8 +107,8 @@ function qtype() {
return 'multichoice';
}
- function validation($data){
- $errors = parent::validation($data);
+ function validation($data, $files){
+ $errors = parent::validation($data, $files);
$answers = $data['answer'];
$answercount = 0;
View
4 question/type/numerical/edit_numerical_form.php
@@ -107,8 +107,8 @@ function set_data($question) {
}
parent::set_data($question);
}
- function validation($data){
- $errors = parent::validation($data);
+ function validation($data, $files){
+ $errors = parent::validation($data, $files);
// Check the answers.
$answercount = 0;
View
4 question/type/randomsamatch/edit_randomsamatch_form.php
@@ -47,9 +47,9 @@ function qtype() {
return 'randomsamatch';
}
- function validation($data){
+ function validation($data, $files){
global $QTYPES;
- $errors = parent::validation($data);
+ $errors = parent::validation($data, $files);
$saquestions = $QTYPES['randomsamatch']->get_sa_candidates($data['category']);
$numberavailable = count($saquestions);
if ($saquestions === false){
View
4 question/type/shortanswer/edit_shortanswer_form.php
@@ -69,8 +69,8 @@ function set_data($question) {
}
parent::set_data($question);
}
- function validation($data){
- $errors = parent::validation($data);
+ function validation($data, $files){
+ $errors = parent::validation($data, $files);
$answers = $data['answer'];
$answercount = 0;
$maxgrade = false;

0 comments on commit 1a63249

Please sign in to comment.
Something went wrong with that request. Please try again.