From bb6f3b9323d21867c2b2b8a82ea892d7e7ac2f01 Mon Sep 17 00:00:00 2001
From: moodler
$var = 'a very, very long string with a '.$single.' variable in it';
$var = "some $text with $many variables $within it";
function forum_get_ratings_mean($postid,
+
+
+
+/**
+
+
+
+ * The description should be first, with asterisks laid out exactly
+ * like this example. If you want to refer to a another function,
+ * do it like this: {@link clean_param()}. Then, add descriptions
+ * for each parameter as follows.
+ *
+ * @param int $postid The PHP type is followed by the variable name
+ * @param array $scale The PHP type is followed by the variable name
+ * @param array $ratings The PHP type is followed by the variable name
+ * @return mixed
+ */
+function forum_get_ratings_mean($postid,
$scale, $ratings=NULL)
- {
- /// Return the mean rating of a post given
- to the current user by others.
- /// Scale is an array of possible ratings in the scale
- /// Ratings is an optional simple array of actual ratings (just integers)
-
- if (!$ratings)
+ {
+ if (!$ratings)
{
$ratings
= array(); //
@@ -158,6 +175,7 @@ GOOD: $assignments (for an array of objects)
{
....etc