Changeset 1117
- Timestamp:
- 03/21/10 19:31:48 (2 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
-
common/db/score.php (modified) (3 diffs)
-
www/macros/macro_rankings.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/common/db/score.php
r1116 r1117 97 97 function score_get_count($user, $task, $round) { 98 98 $where = score_build_where_clauses($user, $task, $round); 99 if (count($where) == 0) { 100 return 0; 101 } 99 102 $query = sprintf("SELECT COUNT(DISTINCT user_id) AS `cnt` 100 103 FROM ia_score_user_round … … 362 365 function score_get_rankings($rounds, $tasks, $start = 0, $count = 999999, 363 366 $detail_task = false, $detail_round = false) { 364 if (count($rounds) == 0) { 367 $where = score_build_where_clauses(null, null, $rounds); 368 if (count($where) == 0) { 365 369 return array(); 366 370 } 367 $where = score_build_where_clauses(null, null, $rounds);368 371 369 372 // Get the total score for all rounds … … 442 445 //task columns 443 446 if ($detail_task == true) { 444 foreach ($tasks as $task) { 445 $task_id = $task['id']; 447 foreach ($tasks as $task_id) { 446 448 if (isset($task_scores[$user_id][$task_id])) { 447 449 $score = $task_scores[$user_id][$task_id]; -
trunk/www/macros/macro_rankings.php
r1116 r1117 92 92 'title' => $task['title'] 93 93 )); 94 array_push($tasks, $task );94 array_push($tasks, $task['id']); 95 95 } 96 96 }
Note: See TracChangeset
for help on using the changeset viewer.
![[infoarena] development](/chrome/site/logo.png)