url.'mod/waramu/waramu.js">'; $b = new Browser(array()); if (empty($subject_id)) { /*translation:Subjects*/ $title = elgg_echo("koolielu:subjects_page_Subjects"); $c_subjpages = ""; /*translation:Subject pages*/ $c_subjpages .= "
"; } else { $c_subjpages .= " | "; $sub = $table_subcount[1][$i]; $c_subjpages .= "wwwroot . "pg/waramu/subjects/".$sub[1]."\">".$sub[2].""; $c_subjpages .=" | "; } // Third if (($i == sizeof($table_subcount[0])) && (sizeof($subcount)%3 == 1)) { $c_subjpages .= ""; } else { $c_subjpages .= " | "; $sub = $table_subcount[2][$i]; $c_subjpages .= "wwwroot . "pg/waramu/subjects/".$sub[1]."\">".$sub[2].""; $c_subjpages .=" | "; } $c_subjpages .= ""; } $c_subjpages .= "
";
// Learning materials part
$b->v['curriculumSubject'] = $real_subject;
$b->v['_sort'] = 'created';
$b->v['_limit'] = 5;
$ids = $b->doQuery('list_of_ids', true);
unset($b->v['_limit']);
unset($b->v['_sort']);
if (is_array($ids) && sizeof($ids) > 0) {
// Heading
$subjects_main .= " ";
/*translation:Learning resources*/
$subjects_main .= "";
$subjects_main .= " ";
// Content
$subjects_main .= "";
$subjects_main .= waramu_list_resources($ids, false);
$subjects_main .= " ";
}
// Groups part
$groups = get_entities_from_metadata("subjects", $subject_id, "group", "", 0, 5);
if (!empty($groups)) {
// Heading
$subjects_main .= "";
/*translation:Groups*/
$subjects_main .= "";
$subjects_main .= " ";
// Content
$subjects_main .= "";
$subjects_main .= " ";
}
// Tools part
$tools = list_entities_from_metadata("subjects", $subject_id, "object", "tool", 0, 5, false, false, false);
if (!empty($tools)) {
// Heading
$subjects_main .= " ";
$subjects_main .= "";
/*translation:Tools*/
$subjects_main .= "";
$subjects_main .= " ";
$subjects_main .= "";
$subjects_main .= $tools;
$subjects_main .= " ";
}
// Right side
$subjects_main .= " | ";
// News part
$news = list_entities_from_metadata_multi(array("subjects" => $subject_id, "approved" => "1", "archived" => "0"), "object", "news", 0, 5, false, false, false);
if (!empty($news)) {
// Heading
$subjects_main .= " ";
/*translation:News*/
$subjects_main .= "";
$subjects_main .= " ";
// Content
$subjects_main .= "";
$subjects_main .= $news;
$subjects_main .= " ";
}
// Courses part
$courses = list_entities_from_metadata_multi(array("subjects" => $subject_id, "approved" => "1", "archived" => "0"), "object", "course", 0, 5, false, false, false);
if (!empty($courses)) {
// Heading
$subjects_main .= "";
/*translation:Courses*/
$subjects_main .= "";
$subjects_main .= " ";
// Content
$subjects_main .= "";
$subjects_main .= $courses;
$subjects_main .= " ";
}
// Job_ads section
$job_ads = list_entities_from_metadata_and_subtypes(array("subjects" => $subject_id, "approved" => "1", "archived" => "0"), "object", array("job_offering", "job_wanted_ad"), 0, 5, false, false, false);
if (!empty($job_ads)) {
// Heading
$subjects_main .= "";
/*translation:Job ads*/
$subjects_main .= "";
$subjects_main .= " ";
// Content
$subjects_main .= "";
$subjects_main .= $job_ads;
$subjects_main .= " ";
}
$subjects_main .= " |