Revert "Merge branch 'MDL-27675_22_wip' of git://github.com/grabs/moodle into MOODLE_22_STABLE"
This reverts commite5d6cd5461, reversing changes made todcd5d0840b.
This commit is contained in:
@@ -507,8 +507,11 @@ if ($feedback_can_submit) {
|
||||
//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);
|
||||
if (isset($formdata->{$frmvaluename})) {
|
||||
$value = $formdata->{$frmvaluename};
|
||||
} else {
|
||||
$value = null;
|
||||
}
|
||||
} else {
|
||||
if (isset($feedbackcompletedtmp->id)) {
|
||||
$value = feedback_get_item_value($feedbackcompletedtmp->id,
|
||||
@@ -527,7 +530,6 @@ if ($feedback_can_submit) {
|
||||
feedback_print_item_complete($feedbackitem, $value, $highlightrequired);
|
||||
echo $OUTPUT->box_end();
|
||||
}
|
||||
|
||||
echo $OUTPUT->box_end();
|
||||
|
||||
$lastbreakposition = $feedbackitem->position; //last item-pos (item or pagebreak)
|
||||
|
||||
@@ -72,7 +72,7 @@ if (isset($formdata->sesskey) AND
|
||||
!isset($formdata->gonextpage) AND
|
||||
!isset($formdata->gopreviouspage)) {
|
||||
|
||||
$gopage = (int) $formdata->lastpage;
|
||||
$gopage = $formdata->lastpage;
|
||||
}
|
||||
if (isset($formdata->savevalues)) {
|
||||
$savevalues = true;
|
||||
@@ -441,10 +441,13 @@ if ($feedback_can_submit) {
|
||||
echo $OUTPUT->box_start('feedback_item_box_'.$align.$dependstyle);
|
||||
$value = '';
|
||||
//get the value
|
||||
$frmvaluename = $feedbackitem->typ . '_'. $feedbackitem->id;
|
||||
$frmvaluename = $feedbackitem->typ.'_'.$feedbackitem->id;
|
||||
if (isset($savereturn)) {
|
||||
$value = isset($formdata->{$frmvaluename}) ? $formdata->{$frmvaluename} : null;
|
||||
$value = feedback_clean_input_value($feedbackitem, $value);
|
||||
if (isset($formdata->{$frmvaluename})) {
|
||||
$value = $formdata->{$frmvaluename};
|
||||
} else {
|
||||
$value = null;
|
||||
}
|
||||
} else {
|
||||
if (isset($feedbackcompletedtmp->id)) {
|
||||
$value = feedback_get_item_value($feedbackcompletedtmp->id,
|
||||
@@ -463,7 +466,6 @@ if ($feedback_can_submit) {
|
||||
feedback_print_item_complete($feedbackitem, $value, $highlightrequired);
|
||||
echo $OUTPUT->box_end();
|
||||
}
|
||||
|
||||
echo $OUTPUT->box_end();
|
||||
|
||||
$lastbreakposition = $feedbackitem->position; //last item-pos (item or pagebreak)
|
||||
|
||||
@@ -326,13 +326,4 @@ class feedback_item_captcha extends feedback_item_base {
|
||||
public 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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -128,14 +128,6 @@ abstract class feedback_item_base {
|
||||
*/
|
||||
abstract public 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
|
||||
@@ -183,7 +175,7 @@ class feedback_item_pagebreak extends feedback_item_base {
|
||||
}
|
||||
public function can_switch_require() {
|
||||
}
|
||||
public function clean_input_value($value) {
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -388,13 +388,4 @@ class feedback_item_info extends feedback_item_base {
|
||||
public 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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -270,12 +270,4 @@ class feedback_item_label extends feedback_item_base {
|
||||
}
|
||||
public 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 '';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -826,13 +826,4 @@ class feedback_item_multichoice extends feedback_item_base {
|
||||
public function value_is_array() {
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -678,12 +678,4 @@ class feedback_item_multichoicerated extends feedback_item_base {
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -534,13 +534,4 @@ class feedback_item_numeric extends feedback_item_base {
|
||||
public 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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -333,13 +333,4 @@ class feedback_item_textarea extends feedback_item_base {
|
||||
public 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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -320,13 +320,4 @@ class feedback_item_textfield extends feedback_item_base {
|
||||
public 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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2064,18 +2064,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.
|
||||
|
||||
Reference in New Issue
Block a user