Conditional Requirements

The Conditional Requirements module allows for group and degree requirements to change based on some criteria, for example, what the current Term ID is on campus.

Syntax follows this pattern:

IF condition THEN action( new requirement string )

For example, to add a course requirement of ENGL 101 on Term ID 2017F, you would enter this:

IF term_is_gte(2017F) THEN add_course("ENGL 101")

Note that syntax is not case sensitive.  The IF and THEN are NOT optional.  Also required:  Place spaces between keywords.

You may expand the new requirement string to whatever is valid.  For example, in a degree:

IF term_is_gte(2017F) THEN add_course("ENGL 101 (C) m")

or, in a group:

IF term_is_gte(2017F) THEN add_course("ENGL 101 [2]")

And so on.

 

Available Syntax

Conditions:

term_is_gte( VALUE )

(term is greater than or equal to)

When the current term is greater than or equal to VALUE.  

Examples of usage:

term_is_gte(2017F)
term_is_gte(202045)

 

Actions:

add_course("new string")

 

Add the "new string" (must be contained within double quotes!) to the requirements list.

Examples of usage:

add_course("ENGL 101")
add_course("MATH 101 (C)")
add_course("MUSC 101 [4]")

rem_course("string")

 

Remove the "string" (must be contained within double quotes!) from the requirements list.

Note, the contents of "string" must exactly match a requirement in either the degree or the group.

Examples of usage:

rem_course("ENGL 101")
rem_course("MATH 101 (C)")

rem_course_if_not_prev_completed("string")

Removes the course specified in "string" only if the student has not previously completed the course, by the term specified in term_is_gte().

For example, if we should remove the course "ACCT 101", but not if the student has taken the course before term 201810, then the complete command would look like this:

IF term_is_gte(201810) THEN
rem_course_if_not_prev_completed("ACCT 101")

(Remember: all on one line, no line breaks)

 

Comments:

Any line that begins with a # (pound sign) will be considered a "comment", and will be ignored.  Comments are lines meant just for you, so you can explain to yourself or others what is going on.

Example:

# In the Fall, we want to remove MATH 101, and replace it with MATH 102
IF term_is_gte(2017F) THEN rem_course("MATH 101")
IF term_is_gte(2017F) THEN add_course("MATH 102")