main/inc/local.inc.php 1 location
|
@@ 1037-1041 (lines=5) @@
|
| 1034 |
|
$sql = "SELECT * FROM $group_table |
| 1035 |
|
WHERE c_id = ".$_course['real_id']." AND id = '$gidReq'"; |
| 1036 |
|
$result = Database::query($sql); |
| 1037 |
|
if (Database::num_rows($result) > 0) { // This group has recorded status related to this course |
| 1038 |
|
$gpData = Database::fetch_array($result); |
| 1039 |
|
$_gid = $gpData ['id']; |
| 1040 |
|
Session::write('_gid', $_gid); |
| 1041 |
|
} |
| 1042 |
|
} |
| 1043 |
|
} |
| 1044 |
|
} |
main/inc/lib/api.lib.php 1 location
|
@@ 5416-5421 (lines=6) @@
|
| 5413 |
|
|
| 5414 |
|
$result = Database::query($sql); |
| 5415 |
|
|
| 5416 |
|
if (Database::num_rows($result) > 0) { |
| 5417 |
|
$visibility = Database::fetch_array($result); |
| 5418 |
|
$visibility = $visibility['visibility']; |
| 5419 |
|
} else { |
| 5420 |
|
$visibility = 0; |
| 5421 |
|
} |
| 5422 |
|
// Shortcut permissions in case the visibility is "open to the world". |
| 5423 |
|
if ($visibility === COURSE_VISIBILITY_OPEN_WORLD) { |
| 5424 |
|
return true; |
main/forum/forumfunction.inc.php 1 location
|
@@ 5283-5286 (lines=4) @@
|
| 5280 |
|
poster_id = ".intval($user_id)." AND visible = 1 "; |
| 5281 |
|
$result = Database::query($sql); |
| 5282 |
|
$count = 0; |
| 5283 |
|
if (Database::num_rows($result) > 0) { |
| 5284 |
|
$count = Database::fetch_array($result); |
| 5285 |
|
$count = $count['count']; |
| 5286 |
|
} |
| 5287 |
|
|
| 5288 |
|
return $count; |
| 5289 |
|
} |