main/survey/survey.lib.php 1 location
|
@@ 948-955 (lines=8) @@
|
945 |
|
// Getting the information of the question options |
946 |
|
|
947 |
|
$result = Database::query($sqlOption); |
948 |
|
while ($row = Database::fetch_array($result, 'ASSOC')) { |
949 |
|
/** @todo this should be renamed to options instead of answers */ |
950 |
|
$return['answers'][] = $row['option_text']; |
951 |
|
$return['values'][] = $row['value']; |
952 |
|
|
953 |
|
/** @todo this can be done more elegantly (used in reporting) */ |
954 |
|
$return['answersid'][] = $row['question_option_id']; |
955 |
|
} |
956 |
|
|
957 |
|
return $return; |
958 |
|
} |
main/exercise/exercise.php 1 location
|
@@ 1050-1054 (lines=5) @@
|
1047 |
|
|
1048 |
|
$result = Database::query($sql); |
1049 |
|
|
1050 |
|
while ($row = Database :: fetch_array($result, 'ASSOC')) { |
1051 |
|
$attribute['path'][] = $row['path']; |
1052 |
|
$attribute['visibility'][] = $row['visibility']; |
1053 |
|
$attribute['comment'][] = $row['comment']; |
1054 |
|
} |
1055 |
|
|
1056 |
|
$nbrActiveTests = 0; |
1057 |
|
if (isset($attribute['path']) && is_array($attribute['path'])) { |
main/inc/lib/sessionmanager.lib.php 1 location
|
@@ 926-932 (lines=7) @@
|
923 |
|
$sql_query = sprintf($sql, $course['real_id']); |
924 |
|
$result = Database::query($sql_query); |
925 |
|
$arrLesson = array(array()); |
926 |
|
while ($row = Database::fetch_array($result)) { |
927 |
|
if (empty($arrLesson[$row['session_id']]['lessons_total'])) { |
928 |
|
$arrLesson[$row['session_id']]['lessons_total'] = 1; |
929 |
|
} else { |
930 |
|
$arrLesson[$row['session_id']]['lessons_total'] ++; |
931 |
|
} |
932 |
|
} |
933 |
|
|
934 |
|
/** |
935 |
|
* Exercises |