Permalink
Browse files

Revert "Merge branch 'MDL-27675_21_wip' of git://github.com/grabs/moo…

…dle into MOODLE_21_STABLE"

This reverts commit 9c96488, reversing
changes made to b228842.
  • Loading branch information...
1 parent 01ab2bb commit 24b464d9f7cc314ebc72efb98c2fa3a101078007 Sam Hemelryk committed May 30, 2012
@@ -434,8 +434,7 @@
//get the value
$frmvaluename = $feedbackitem->typ . '_'. $feedbackitem->id;
if(isset($savereturn)) {
- $value = isset($formdata->{$frmvaluename})?$formdata->{$frmvaluename}:NULL;
- $value = feedback_clean_input_value($feedbackitem, $value);
+ $value = isset($formdata->{$frmvaluename})?$formdata->{$frmvaluename}:NULL;
}else {
if(isset($feedbackcompletedtmp->id)) {
$value = feedback_get_item_value($feedbackcompletedtmp->id, $feedbackitem->id, true);
@@ -54,7 +54,7 @@
//if the use hit enter into a textfield so the form should not submit
if(isset($formdata->sesskey) AND !isset($formdata->savevalues) AND !isset($formdata->gonextpage) AND !isset($formdata->gopreviouspage)) {
- $gopage = (int)$formdata->lastpage;
+ $gopage = $formdata->lastpage;
}
if(isset($formdata->savevalues)) {
$savevalues = true;
@@ -383,8 +383,7 @@
//get the value
$frmvaluename = $feedbackitem->typ . '_'. $feedbackitem->id;
if(isset($savereturn)) {
- $value = isset($formdata->{$frmvaluename})?$formdata->{$frmvaluename}:NULL;
- $value = feedback_clean_input_value($feedbackitem, $value);
+ $value = isset($formdata->{$frmvaluename})?$formdata->{$frmvaluename}:NULL;
}else {
if(isset($feedbackcompletedtmp->id)) {
$value = feedback_get_item_value($feedbackcompletedtmp->id, $feedbackitem->id, sesskey());
@@ -280,13 +280,4 @@ function get_hasvalue() {
function can_switch_require() {
return false;
}
-
- /**
- * Cleans the value coming from the user for a field of this type.
- * @param mixed $value
- * @return mixed
- */
- public function clean_input_value($value) {
- return clean_param($value, PARAM_RAW);
- }
}
@@ -104,14 +104,6 @@ function get_data() {
*/
abstract function print_item_show_value($item, $value = '');
- /**
- * cleans the userinput while submitting the form
- *
- * @param mixed $value
- * @return mixed
- */
- abstract public function clean_input_value($value);
-
}
//a dummy class to realize pagebreaks
@@ -137,7 +129,6 @@ function print_item_preview($item) {}
function print_item_complete($item, $value = '', $highlightrequire = false) {}
function print_item_show_value($item, $value = '') {}
function can_switch_require(){}
- function clean_input_value($value){}
}
@@ -323,13 +323,4 @@ function get_hasvalue() {
function can_switch_require() {
return false;
}
-
- /**
- * Cleans the value coming from the user for a field of this type.
- * @param mixed $value
- * @return mixed
- */
- public function clean_input_value($value) {
- return clean_param($value, PARAM_INT);
- }
}
@@ -233,13 +233,4 @@ function excelprint_item(&$worksheet, $rowOffset, $xlsFormats, $item, $groupid,
function print_analysed($item, $itemnr = '', $groupid = false, $courseid = false) {}
function get_printval($item, $value) {}
function get_analysed($item, $groupid = false, $courseid = false) {}
-
- /**
- * Cleans the value coming from the user for a field of this type.
- * @param mixed $value
- * @return mixed
- */
- public function clean_input_value($value) {
- return '';
- }
}
@@ -710,24 +710,8 @@ function hidenoselect($item) {
return false;
}
- public function can_switch_require() {
- return true;
- }
-
- public function value_type() {
- return PARAM_INT;
- }
- public function value_is_array() {
+ function can_switch_require() {
return true;
}
-
- /**
- * Cleans the value coming from the user for a field of this type.
- * @param mixed $value
- * @return mixed
- */
- public function clean_input_value($value) {
- return clean_param_array($value, PARAM_INT);
- }
}
@@ -589,12 +589,4 @@ function can_switch_require() {
return true;
}
- /**
- * Cleans the value coming from the user for a field of this type.
- * @param mixed $value
- * @return mixed
- */
- public function clean_input_value($value) {
- return clean_param($value, PARAM_INT);
- }
}
@@ -420,13 +420,4 @@ function get_hasvalue() {
function can_switch_require() {
return true;
}
-
- /**
- * Cleans the value coming from the user for a field of this type.
- * @param mixed $value
- * @return mixed
- */
- public function clean_input_value($value) {
- return clean_param($value, PARAM_FLOAT);
- }
}
@@ -280,13 +280,4 @@ function get_hasvalue() {
function can_switch_require() {
return true;
}
-
- /**
- * Cleans the value coming from the user for a field of this type.
- * @param mixed $value
- * @return mixed
- */
- public function clean_input_value($value) {
- return clean_param($value, PARAM_CLEANHTML);
- }
}
@@ -274,13 +274,4 @@ function get_hasvalue() {
function can_switch_require() {
return true;
}
-
- /**
- * Cleans the value coming from the user for a field of this type.
- * @param mixed $value
- * @return mixed
- */
- public function clean_input_value($value) {
- return clean_param($value, PARAM_CLEANHTML);
- }
}
View
@@ -1927,18 +1927,6 @@ function feedback_get_page_to_continue($feedbackid, $courseid = false, $guestid
//functions to handle the values
////////////////////////////////////////////////
-/**
- * cleans the userinput while submitting the form.
- *
- * @param stdClass $item The feedback item record from the database that the value needs to be cleaned against.
- * @param mixed $value
- * @return mixed
- */
-function feedback_clean_input_value($item, $value) {
- $itemobj = feedback_get_item_class($item->typ);
- return $itemobj->clean_input_value($value);
-}
-
/**
* this saves the values of an completed.
* if the param $tmp is set true so the values are saved temporary in table feedback_valuetmp.

0 comments on commit 24b464d

Please sign in to comment.