@@ -173,6 +173,9 @@ discard block |
||
173 | 173 | return $x; |
174 | 174 | } |
175 | 175 | |
176 | +/** |
|
177 | + * @param integer $mode |
|
178 | + */ |
|
176 | 179 | function get_nquestions($unit, $mode) { |
177 | 180 | global $snap; |
178 | 181 | |
@@ -187,6 +190,9 @@ discard block |
||
187 | 190 | return 0; |
188 | 191 | } |
189 | 192 | |
193 | +/** |
|
194 | + * @param integer $mode |
|
195 | + */ |
|
190 | 196 | function get_views($unit, $mode) { |
191 | 197 | global $snap; |
192 | 198 | |
@@ -231,6 +237,10 @@ discard block |
||
231 | 237 | |
232 | 238 | $rownum = 0; |
233 | 239 | |
240 | +/** |
|
241 | + * @param string $class |
|
242 | + * @param boolean $is_answer |
|
243 | + */ |
|
234 | 244 | function show_unit_row($unit, $class, $level, $is_answer) { |
235 | 245 | global $breakdown, $breakdown_cat; |
236 | 246 | global $rownum, $course_id; |
@@ -319,6 +329,9 @@ discard block |
||
319 | 329 | echo "</tr>\n"; |
320 | 330 | } |
321 | 331 | |
332 | +/** |
|
333 | + * @param string $class |
|
334 | + */ |
|
322 | 335 | function breakdown_class($class) { |
323 | 336 | switch ($class) { |
324 | 337 | case "BoltLesson": |
@@ -356,6 +369,9 @@ discard block |
||
356 | 369 | } |
357 | 370 | } |
358 | 371 | |
372 | +/** |
|
373 | + * @param integer $level |
|
374 | + */ |
|
359 | 375 | function show_unit_recurse($unit, $level) { |
360 | 376 | show_unit($unit, $level); |
361 | 377 | if ($unit->is_item) return; |
@@ -34,6 +34,9 @@ |
||
34 | 34 | require_once($file); |
35 | 35 | } |
36 | 36 | |
37 | +/** |
|
38 | + * @param integer $i |
|
39 | + */ |
|
37 | 40 | function show_bossa_app($app, $i) { |
38 | 41 | $j = $i%2; |
39 | 42 | echo "<tr class=row$j> |
@@ -28,6 +28,9 @@ discard block |
||
28 | 28 | require_once("../inc/util_basic.inc"); |
29 | 29 | require_once("../inc/util_ops.inc"); |
30 | 30 | |
31 | +/** |
|
32 | + * @param integer $range |
|
33 | + */ |
|
31 | 34 | function rand_color($im, $range) { |
32 | 35 | $mid = 200; |
33 | 36 | $lo = $mid - $range; |
@@ -35,12 +38,18 @@ discard block |
||
35 | 38 | return imagecolorallocate($im, rand($lo,$hi), rand($lo,$hi), rand($lo,$hi)); |
36 | 39 | } |
37 | 40 | |
41 | +/** |
|
42 | + * @param resource $im |
|
43 | + */ |
|
38 | 44 | function add_ellipse($im, $case) { |
39 | 45 | imagefilledellipse( |
40 | 46 | $im, $case->cx, $case->cy, $case->w, $case->h, rand_color($im, 50) |
41 | 47 | ); |
42 | 48 | } |
43 | 49 | |
50 | +/** |
|
51 | + * @param resource $im |
|
52 | + */ |
|
44 | 53 | function add_rect($im) { |
45 | 54 | $cx = rand(-100, 600); |
46 | 55 | $cy = rand(-100, 400); |
@@ -66,6 +66,9 @@ |
||
66 | 66 | // $x is an array of result/host objects; |
67 | 67 | // return the variance among claimed credits given an FP weight |
68 | 68 | // |
69 | +/** |
|
70 | + * @param double $fpw |
|
71 | + */ |
|
69 | 72 | function fpw_var($results, $fpw) { |
70 | 73 | $cc = array(); |
71 | 74 | foreach ($results as $r) { |
@@ -65,6 +65,9 @@ |
||
65 | 65 | return $running; |
66 | 66 | } |
67 | 67 | |
68 | +/** |
|
69 | + * @param boolean $running |
|
70 | + */ |
|
68 | 71 | function show_status($host, $function, $running) { |
69 | 72 | echo "<tr><td>$function</td><td>$host</td>"; |
70 | 73 | if ($running) { |
@@ -12,6 +12,9 @@ |
||
12 | 12 | // insert "\n</venue>\n" before "</global_preferences>" |
13 | 13 | // This fixes an XML error introduced at some point in the past |
14 | 14 | // |
15 | +/** |
|
16 | + * @return string |
|
17 | + */ |
|
15 | 18 | function repair_prefs($prefs) { |
16 | 19 | if (strstr($prefs, '\"')) { |
17 | 20 | return str_replace('\"', '"', $prefs); |
@@ -24,12 +24,18 @@ |
||
24 | 24 | |
25 | 25 | db_init(); |
26 | 26 | |
27 | +/** |
|
28 | + * @param string $tag |
|
29 | + */ |
|
27 | 30 | function parse_num($xml, $tag) { |
28 | 31 | $x = parse_element($xml, $tag); |
29 | 32 | if (!$x) return 0; |
30 | 33 | return $x; |
31 | 34 | } |
32 | 35 | |
36 | +/** |
|
37 | + * @param string $tag |
|
38 | + */ |
|
33 | 39 | function parse_boolint($xml, $tag) { |
34 | 40 | $x = parse_bool($xml, $tag); |
35 | 41 | if ($x) return 1; |
@@ -231,6 +231,9 @@ discard block |
||
231 | 231 | } |
232 | 232 | } |
233 | 233 | |
234 | +/** |
|
235 | + * @param resource $log |
|
236 | + */ |
|
234 | 237 | function do_batch($startid, $n, $log) { |
235 | 238 | $result = _mysql_query( |
236 | 239 | "select * from user where id>$startid order by id limit $n" |
@@ -245,6 +248,9 @@ discard block |
||
245 | 248 | return $startid; |
246 | 249 | } |
247 | 250 | |
251 | +/** |
|
252 | + * @param resource $log |
|
253 | + */ |
|
248 | 254 | function do_one($thisid, $log) { |
249 | 255 | $result = _mysql_query( |
250 | 256 | "select * from user where id=$thisid" |
@@ -39,6 +39,9 @@ |
||
39 | 39 | BoincNotify::delete_aux("create_time < $t"); |
40 | 40 | } |
41 | 41 | |
42 | +/** |
|
43 | + * @param string $message |
|
44 | + */ |
|
42 | 45 | function send_notify_email($userid, $message) { |
43 | 46 | $user = BoincUser::lookup_id($userid); |
44 | 47 | $subject = "Daily notification summary from ".PROJECT; |