Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

  • Loading branch information...
commit 5bd7b691b68d38d62558189f961b2d345e96a6b7 1 parent e5d6cd5
Sam Hemelryk samhemelryk authored
7 mod/feedback/item/captcha/lib.php
View
@@ -327,7 +327,12 @@ public 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);
}
}
6 mod/feedback/item/feedback_item_class.php
View
@@ -128,13 +128,13 @@ public function value_is_array() {
*/
abstract public 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);
}
@@ -186,4 +186,4 @@ public function can_switch_require() {
public function clean_input_value($value) {
}
-}
+}
7 mod/feedback/item/info/lib.php
View
@@ -389,7 +389,12 @@ public 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);
}
}
5 mod/feedback/item/label/lib.php
View
@@ -270,6 +270,11 @@ public function get_printval($item, $value) {
}
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 '';
}
11 mod/feedback/item/multichoice/lib.php
View
@@ -827,11 +827,12 @@ public function value_is_array() {
return true;
}
- 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_array($value, PARAM_INT);
}
}
7 mod/feedback/item/multichoicerated/lib.php
View
@@ -678,7 +678,12 @@ public 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);
}
}
9 mod/feedback/item/numeric/lib.php
View
@@ -534,8 +534,13 @@ public function get_hasvalue() {
public 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);
}
}
7 mod/feedback/item/textarea/lib.php
View
@@ -334,7 +334,12 @@ public 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);
}
}
7 mod/feedback/item/textfield/lib.php
View
@@ -321,7 +321,12 @@ public 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);
}
}
3  mod/feedback/lib.php
View
@@ -2064,9 +2064,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
*/
Please sign in to comment.
Something went wrong with that request. Please try again.