Permalink
Browse files

MDL-27675 mod_feedback: Tidy up of phpdocs and scope within feedback mod

Conflicts:

	mod/feedback/item/feedback_item_class.php
	mod/feedback/item/label/lib.php
	mod/feedback/item/multichoice/lib.php
  • Loading branch information...
1 parent 9c96488 commit f991601b637dcbadd9179e5a97fde159771ffc4a Sam Hemelryk committed May 28, 2012
@@ -281,7 +281,12 @@ function can_switch_require() {
return false;
}
- function clean_input_value($value) {
+ /**
+ * 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,13 +104,13 @@ function get_data() {
*/
abstract function print_item_show_value($item, $value = '');
- /**
+ /**
* cleans the userinput while submitting the form
*
* @param mixed $value
* @return mixed
*/
- abstract function clean_input_value($value);
+ abstract public function clean_input_value($value);
}
@@ -324,7 +324,12 @@ function can_switch_require() {
return false;
}
- function clean_input_value($value) {
+ /**
+ * 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,8 +233,13 @@ 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) {}
-
- function clean_input_value($value) {
+
+ /**
+ * 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,11 +710,24 @@ function hidenoselect($item) {
return false;
}
- function can_switch_require() {
+ public function can_switch_require() {
return true;
}
- function clean_input_value($value) {
- return clean_param($value, PARAM_INT);
+ public function value_type() {
+ return PARAM_INT;
+ }
+
+ 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);
}
}
@@ -589,7 +589,12 @@ function can_switch_require() {
return true;
}
- function clean_input_value($value) {
+ /**
+ * 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,8 +420,13 @@ function get_hasvalue() {
function can_switch_require() {
return true;
}
-
- function clean_input_value($value) {
+
+ /**
+ * 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);
}
}
@@ -281,7 +281,12 @@ function can_switch_require() {
return true;
}
- function clean_input_value($value) {
+ /**
+ * 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);
}
}
@@ -275,7 +275,12 @@ function can_switch_require() {
return true;
}
- function clean_input_value($value) {
+ /**
+ * 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,9 +1927,10 @@ 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
*/

0 comments on commit f991601

Please sign in to comment.