return $output;
}
-function calendar_sql_where($tstart, $tend, $users, $groups, $courses, $withduration = true) {
+function calendar_sql_where($tstart, $tend, $users, $groups, $courses, $withduration=true, $ignorehidden=true) {
$whereclause = '';
// Quick test
if(is_bool($users) && is_bool($groups) && is_bool($courses)) {
if(!empty($whereclause)) $whereclause .= ' OR';
$whereclause .= ' groupid = 0 AND courseid != 0';
}
+
+ if ($ignorehidden) {
+ if (!empty($whereclause)) $whereclause .= ' AND';
+ $whereclause .= ' visible = 1';
+ }
+
if($withduration) {
$timeclause = 'timestart + timeduration >= '.$tstart.' AND timestart <= '.$tend;
}