DLI Home

Digital Initiatives & Projects
Access & Discovery
Data Repositories
Digital Repositories
Digital Collections
Physical Spaces
Geospatial
Mobile Apps
Data Analysis

DLI Staff

Validate Course

Description

The Validate Course widget verifies whether a curriculum code, course number, and section number are formatted correctly, and whether they are included in the database of known courses.

Base Request

http://www.lib.ncsu.edu/widget/validate_course

This widget normally takes a curriculum code, course number, and section number as input for validation. The widget returns a string. The first number in the string indicates whether the parameters are formatted correctly ('1'=true, '2'=false). The second number indicates whether the curriculum code is included in the database ('1'=true, '2'=false). The third number indicates the number of valid fields. A message is also returned that explains the validity of the supplied parameters.

1|0|0|No course-related params

Custom Views

URL pattern

/ncsu_curriculum_code/ncsu_course_number/ncsu_section_number

Parameter Accepted values
ncsu_curriculum_code Standard 1 to 3 letter course prefix
ncsu_course_number 3 digits with optional suffix
ncsu_section_number 3 digits

The parameters passed to this widget are validated for format as well as inclusion in the database of known courses.

Examples

/eng/101/001

1|1|3|Course string with valid curriculum ID, course number and section number

/eng

1|1|1|Course string with valid curriculum ID