@@ -244,7 +244,8 @@ discard block |
||
244 | 244 | $poly_answer = convert_coordinates($answer_question, '|'); |
245 | 245 | $max_coord = poly_get_max($poly_user, $poly_answer); |
246 | 246 | |
247 | - if (empty($_GET['hotspot'])) { //no user response |
|
247 | + if (empty($_GET['hotspot'])) { |
|
248 | +//no user response |
|
248 | 249 | $overlap = -2; |
249 | 250 | } else { |
250 | 251 | $poly_user_compiled = poly_compile($poly_user, $max_coord); |
@@ -346,7 +347,8 @@ discard block |
||
346 | 347 | $test = false; |
347 | 348 | // if ($answerId == 2 ){$test = true;} for test oars |
348 | 349 | |
349 | - if (empty($_GET['hotspot'])) { //no user response |
|
350 | + if (empty($_GET['hotspot'])) { |
|
351 | +//no user response |
|
350 | 352 | $overlap = false; |
351 | 353 | } else { |
352 | 354 | // poly_compile really works tested with gnuplot |
@@ -108,7 +108,8 @@ |
||
108 | 108 | Display::display_footer(); |
109 | 109 | } |
110 | 110 | |
111 | -function check_question_type($parameter) { |
|
111 | +function check_question_type($parameter) |
|
112 | +{ |
|
112 | 113 | $question_list = Question::get_question_type_list(); |
113 | 114 | foreach ($question_list as $key => $value) { |
114 | 115 | $valid_question_types[] = $key; |
@@ -1046,7 +1046,8 @@ |
||
1046 | 1046 | $di->addChunk($ic_slide); |
1047 | 1047 | |
1048 | 1048 | //index and return search engine document id |
1049 | - if (!empty($question_exercises)) { // if empty there is nothing to index |
|
1049 | + if (!empty($question_exercises)) { |
|
1050 | +// if empty there is nothing to index |
|
1050 | 1051 | $did = $di->index(); |
1051 | 1052 | unset($di); |
1052 | 1053 | } |
@@ -18,13 +18,15 @@ |
||
18 | 18 | $objExercise = Session::read('objExercise'); |
19 | 19 | $hotspotId = $_GET['hotspotId']; |
20 | 20 | $exerciseId = $objExercise->selectId(); |
21 | -if ($_GET['answerId'] == "0") { // click is NOT on a hotspot |
|
21 | +if ($_GET['answerId'] == "0") { |
|
22 | +// click is NOT on a hotspot |
|
22 | 23 | $hit = 0; |
23 | 24 | $answerId = $hotspotId; |
24 | 25 | |
25 | 26 | // remove from session |
26 | 27 | unset($_SESSION['exerciseResult'][$questionId][$answerId]); |
27 | -} else { // user clicked ON a hotspot |
|
28 | +} else { |
|
29 | +// user clicked ON a hotspot |
|
28 | 30 | $hit = 1; |
29 | 31 | $answerId = $hotspotId; |
30 | 32 |
@@ -169,7 +169,8 @@ |
||
169 | 169 | my_delete($document_sys_path.$uploadPath.'/'.$fld.'/'.$filename); |
170 | 170 | DocumentManager::updateDbInfo('delete', $uploadPath.'/'.$fld.'/'.$filename); |
171 | 171 | } |
172 | - if ($imgcount == 0) { // all image uploaded |
|
172 | + if ($imgcount == 0) { |
|
173 | +// all image uploaded |
|
173 | 174 | $finish = 1; |
174 | 175 | } |
175 | 176 | } else { |
@@ -11,7 +11,8 @@ discard block |
||
11 | 11 | </span> |
12 | 12 | '); |
13 | 13 | |
14 | -function reports_template_CourseArticulate_getSQL() { |
|
14 | +function reports_template_CourseArticulate_getSQL() |
|
15 | +{ |
|
15 | 16 | // settings |
16 | 17 | |
17 | 18 | |
@@ -23,7 +24,8 @@ discard block |
||
23 | 24 | $queries[0] = $query; |
24 | 25 | $extraFieldType = \Chamilo\CoreBundle\Entity\ExtraField::USER_FIELD_TYPE; |
25 | 26 | // Custom Field |
26 | - foreach (array("tags" => "tags") as $k => $v) { // FIXME |
|
27 | + foreach (array("tags" => "tags") as $k => $v) { |
|
28 | +// FIXME |
|
27 | 29 | $query = 'select ufv.value as "'.$v.'" '; |
28 | 30 | $query .= 'from '.Database::get_main_table(TABLE_MAIN_USER).' u '; |
29 | 31 | $query .= 'left join'.Database::get_main_table(TABLE_EXTRA_FIELD).' uf '; |
@@ -39,8 +41,9 @@ discard block |
||
39 | 41 | // Stored Value |
40 | 42 | $sv = array(); |
41 | 43 | foreach ($sv as $k => $v) { |
42 | - if (!isset($v['sql'])) |
|
43 | - $v['sql'] = 'FIELD'; |
|
44 | + if (!isset($v['sql'])) { |
|
45 | + $v['sql'] = 'FIELD'; |
|
46 | + } |
|
44 | 47 | $sqlField = str_replace('FIELD', 'sv.sv_value', $v['sql']); |
45 | 48 | $query = 'select '.$sqlField.' as "'.$v['title'].'" '; |
46 | 49 | // $query = 'select sec_to_time(sv.sv_value) as "'.$v.'" '; |
@@ -110,8 +113,9 @@ discard block |
||
110 | 113 | $query .= ' on u.user_id = lv.user_id and lv.lp_id = '.$v['lid']; |
111 | 114 | $query .= ' left outer join '.Database::get_course_table(TABLE_LP_ITEM_VIEW).' liv '; |
112 | 115 | $query .= ' on lv.id = liv.lp_view_id '; |
113 | - if ($v['target_view_count']) |
|
114 | - $query .= ' and liv.view_count = '.$v['target_view_count']; |
|
116 | + if ($v['target_view_count']) { |
|
117 | + $query .= ' and liv.view_count = '.$v['target_view_count']; |
|
118 | + } |
|
115 | 119 | $query .= ' and liv.lp_item_id = '.$v['liid'].' '; |
116 | 120 | $query .= ' where u.user_id in ('.reports_getVisibilitySQL().') '; |
117 | 121 | $query .= ' group by u.user_id '; |
@@ -8,7 +8,7 @@ |
||
8 | 8 | |
9 | 9 | api_protect_admin_script(); |
10 | 10 | |
11 | -switch ($action) { |
|
11 | +switch ($action) { |
|
12 | 12 | case 'getEventTypes': |
13 | 13 | $events = Event::get_all_event_types(); |
14 | 14 | print json_encode($events); |
@@ -76,7 +76,8 @@ |
||
76 | 76 | &$array, |
77 | 77 | $function, |
78 | 78 | $apply_to_keys_also = false |
79 | -) { |
|
79 | +) |
|
80 | +{ |
|
80 | 81 | static $recursive_counter = 0; |
81 | 82 | if (++$recursive_counter > 1000) { |
82 | 83 | die('possible deep recursion attack'); |
@@ -63,7 +63,8 @@ |
||
63 | 63 | ); |
64 | 64 | if ($course_visible_for_user) { |
65 | 65 | $result = $result_tmp; |
66 | - } else { // course not visible for user |
|
66 | + } else { |
|
67 | +// course not visible for user |
|
67 | 68 | if ($search_show_unlinked_results) { |
68 | 69 | $result_tmp['url'] = ''; |
69 | 70 | $result = $result_tmp; |