function _AdvisingScreenTypeView::match_requirement_type
Search API
4.x _AdvisingScreenTypeView.php | _AdvisingScreenTypeView::match_requirement_type($test_type, $req_type) |
5.x _AdvisingScreenTypeView.php | _AdvisingScreenTypeView::match_requirement_type($test_type, $req_type) |
Does the testType match the reqType? This function is used to make sure that courses or groups with a certain requirement_type are placed in the correct semester blocks on screen.
Parameters
string $test_type:
string $req_type:
Return value
bool
1 call to _AdvisingScreenTypeView::match_requirement_type()
- _AdvisingScreenTypeView::display_semester_list in classes/
_AdvisingScreenTypeView.php - Display contents of a semester list as a single semester, only displaying courses matching the requirement_type. If the requirement_type is "e", then we will look for anything not containing an m, s, uc, um, or c as a requirement_type.
File
- classes/
_AdvisingScreenTypeView.php, line 59
Class
- _AdvisingScreenTypeView
- This class is the View by Type view for FlightPath. As such, it inherits most of it's classes from __advising_screen.
Code
function match_requirement_type($test_type, $req_type)
{
// Does the testType match the reqType?
if ($test_type == $req_type)
{
return true;
}
if ($test_type == "uc" && $req_type == "c")
{ // university captone core.
return true;
}
if ($test_type == "um" && $req_type == "m")
{ // university captone major
return true;
}
if ($req_type == "e")
{
// type "elective." test must not be c, s, or m.
if ($test_type != "c" && $test_type != "s" && $test_type != "m"
&& $test_type != "uc" && $test_type != "um" && $test_type != "dev")
{
return true;
}
}
return false;
}