Permalink
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. Merged from MOODLE_19_STABLE.
  • Loading branch information...
1 parent 828f84c commit fe93ba838bd2c29bcd361817d5b0a8c2e756459a tjhunt committed Nov 20, 2007
@@ -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'] ;
@@ -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;
@@ -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;
@@ -190,10 +190,10 @@ function set_data($question) {
parent::set_data($question);
}
- function validation($data){
+ function validation($data, $files){
$errors =array();
- $parenterrors = parent::validation($data,'');
+ $parenterrors = parent::validation($data, $files);
if (is_array($parenterrors) && count($parenterrors)) {
if (is_array($errors)) {
$errors = array_merge($errors,$parenterrors);
@@ -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;
@@ -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;
@@ -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){
@@ -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 fe93ba8

Please sign in to comment.