Sorry. There has been an error somewhere.
It looks like the link used to get here is not valid.
";
$qc = (isset($_GET["qc"])) ? $_GET["qc"] : null;
$pos = (isset($_GET["pos"])) ? $_GET["pos"] : null;
$sub = (isset($_GET["s"])) ? $_GET["s"] : null;
$ft_pt = (isset($_GET["ft"])) ? $_GET["ft"] : null;
$ay = (isset($_GET["ay"])) ? $_GET["ay"] : null;
$oo = (isset($_GET["oo"])) ? $_GET["oo"] : null; //oo = On Offer. If 'N' then display 'Not on Offer Message Only'
$order = (isset($_GET["order"])) ? $_GET["order"] : null;
if((empty($_GET)) || ($qc == "") || ($qc == "x") || ($pos == "") || ($pos == "x") || ($ay == "") || ($ay == "x")){
echo $gen_error;exit();
}
if (!isset($qc)||empty($qc)||strlen($qc)>7||!ctype_alpha($qc)){
echo $gen_error;exit;
}
if(!ctype_digit($pos)||strlen($pos)>1||strlen($ay)!=4||strlen($sub)>7||strlen($order)>3){
echo $gen_error;exit;
}
if(isset($ft_pt)&&($ft_pt!='f'&&$ft_pt!='p'&&$ft_pt!='x')){
echo $gen_error;exit;
}
if(isset($oo) && $oo != 'n'){
echo $gen_error;exit;
}
if($oo == 'n'){
$display = 'NOTE: This programme is not on offer for the academic year you are looking at currently.
';
}
$var = httpCurlWithPW(API_URL."curriculum?ft=".$ft_pt."&ay=".$ay."&pos=".$pos."&qc=".$qc."&order=".$order, "GET");
if($var == '204'){
$json_output = [];
} else {
$json_output = json_decode($var, true);
}
if(!empty($json_output)){
$display2 .= "
Module Code |
Module Title |
Semester |
Core/Elective |
Credit Weighting |
";
foreach ($json_output as $key => $value) {
$ay = $value["acad_year"];
$qc = $value["qual_code"];
$qd = $value["qual_desc"];
$pos = $value["period_study"];
$sub = $value["subject"];
$subtitle = $value["subject_title"];
$ft_pt = $value["ft_pt"];
$mc = $value["module_code"];
$mt = $value["module_title"];
$sem = $value["semesters"];
$ce = $value["core_elective"];
if(($ce == "Y") || ($ce == "y")){
$ce = "Core";
}
elseif(($ce == "N") || $ce == "n"){
$ce = "Elective";
}
$cw = $value["credit_weight"];
//echo $module."
";
$display2 .= "".$mc." |
".$mt." |
".$sem." |
".$ce." |
".$cw." |
";
}
$display .= "Academic Year: ".$ay."
Programme: ".$qd."
Year of Study: ".$pos."
";
$display .= "
";
} else {
$display .= "There is no data available for this selection.
";
}
?>
UCC College Calendar - Semester Information