main/inc/lib/statsUtils.lib.inc.php 1 location
|
@@ 74-79 (lines=6) @@
|
| 71 |
|
$res = Database::query($sql); |
| 72 |
|
if ($res !== false) { |
| 73 |
|
$i = 0; |
| 74 |
|
while ($resA = Database::fetch_array($res, 'NUM')) { |
| 75 |
|
$resu[$i][0] = $resA[0]; |
| 76 |
|
$resu[$i][1] = $resA[1]; |
| 77 |
|
$resu[$i][2] = $resA[2]; |
| 78 |
|
$i++; |
| 79 |
|
} |
| 80 |
|
} |
| 81 |
|
|
| 82 |
|
return $resu; |
main/inc/lib/thematic.lib.php 1 location
|
@@ 901-907 (lines=7) @@
|
| 898 |
|
if (!isset($thematic_id) && !isset($description_type)) { |
| 899 |
|
// group all data group by thematic id |
| 900 |
|
$tmp = array(); |
| 901 |
|
while ($row = Database::fetch_array($rs,'ASSOC')) { |
| 902 |
|
$tmp[] = $row['thematic_id']; |
| 903 |
|
if (in_array($row['thematic_id'], $tmp)) { |
| 904 |
|
$row['session_id'] = $thematic_plan_complete_list[$row['id']]; |
| 905 |
|
$data[$row['thematic_id']][$row['description_type']] = $row; |
| 906 |
|
} |
| 907 |
|
} |
| 908 |
|
} else { |
| 909 |
|
while ($row = Database::fetch_array($rs,'ASSOC')) { |
| 910 |
|
$row['session_id'] = $thematic_plan_complete_list[$row['id']]; |
main/survey/survey.lib.php 1 location
|
@@ 2265-2271 (lines=7) @@
|
| 2262 |
|
$result = Database::query($sql); |
| 2263 |
|
$number_of_answers = array(); |
| 2264 |
|
$data = array(); |
| 2265 |
|
while ($row = Database::fetch_array($result)) { |
| 2266 |
|
if (!isset($number_of_answers[$row['question_id']])) { |
| 2267 |
|
$number_of_answers[$row['question_id']] = 0; |
| 2268 |
|
} |
| 2269 |
|
$number_of_answers[$row['question_id']] += $row['total']; |
| 2270 |
|
$data[$row['option_id']] = $row; |
| 2271 |
|
} |
| 2272 |
|
|
| 2273 |
|
foreach ($options as $option) { |
| 2274 |
|
$optionText = strip_tags($option['option_text']); |
main/inc/lib/tracking.lib.php 1 location
|
@@ 2315-2320 (lines=6) @@
|
| 2312 |
|
|
| 2313 |
|
$progress = array(); |
| 2314 |
|
$viewCount = array(); |
| 2315 |
|
while ($row = Database::fetch_array($result, 'ASSOC')) { |
| 2316 |
|
if (!isset($viewCount[$row['lp_id']])) { |
| 2317 |
|
$progress[$row['lp_id']] = $row['progress']; |
| 2318 |
|
} |
| 2319 |
|
$viewCount[$row['lp_id']] = $row['view_count']; |
| 2320 |
|
} |
| 2321 |
|
|
| 2322 |
|
// Fill with lp ids |
| 2323 |
|
if (!empty($lpIdList)) { |