'1', 'subjects' => $subject, 'archived' => '0'), 'object', array('course'), '', 999999); } else { $objs = get_entities_from_metadata_and_subtypes(array('approved' => '1', 'archived' => '0'), 'object', array('course'), '', 999999); } // filter results $current_objs = array(); $current_time = time(); foreach($objs as $obj) { $obj_begin = $obj->beginning_date; $obj_end = $obj->ending_date; if ($begin && !$end) { // if only begin time given if ($obj_begin && ($obj_begin >= $begin)) $current_objs[] = $obj; } else if ($end && !$begin) { // if only end time given if ($obj_end && ($obj_end <= $end)) $current_objs[] = $obj; } else if ($begin && $end) { //if full period given if ($obj_begin && $obj_end && ($obj_begin >= $begin) && ($obj_end <= $end)) $current_objs[] = $obj; } else { //show all $current_objs[] = $obj; } } // display course subjects tagcloud $tagcloud = "
";
/*translation:Period begins*/
$period .= elgg_echo("koolielu:label_period_begins") . "
";
$period .= elgg_view('input/dateselection', array('internalname' => 'begin', 'value' => $begin));
$period .= "
";
/*translation:Period ends*/
$period .= elgg_echo("koolielu:label_period_ends") . "
";
$period .= elgg_view('input/dateselection', array('internalname' => 'end', 'value' => $end));
$period .= "
";
$period .= elgg_view('input/hidden', array('internalname' => 'subject', 'value' => $subject));
/*translation:Filter*/
$period .= elgg_view('input/submit', array('internalname' => 'filter_button', 'value' => elgg_echo('koolielu:button_filter')));
/*translation:Reset filter*/
$period .= " " . elgg_view('input/submit', array('internalname' => 'reset_button', 'value' => elgg_echo('koolielu:button_reset_filter')));
$period .= "