-
Notifications
You must be signed in to change notification settings - Fork 2
Home
The following example explains how to use this plugin's name extraction feature to suggest a standardized name for a new course.
For this example we assume that two courses will be the "source" of enrollments for a new, third course:
fullname | shortname | idnumber |
---|---|---|
SMPL 101.01-Fall 2017 Sample Course | SC 101.01-Fall 2017 | 100000.201710 |
SMPL 101.02-Fall 2017 Sample Course | SC 101.02-Fall 2017 | 100001.201710 |
We need to configure the plugin to recognize our course format. This will be specific to your student information system and internal naming conventions. The plugin can populate the following values from the course's fullname:
-
[TITLE]
:the course title -
[DEPT]
:the department code -
[NUM]
:the course number -
[TERM]
:the name of the term -
[SECTION]
:the section number
In addition, one field is extracted from the course idnumber:
-
[TERMCODE]
: the term code
Given the sample data above, the following regular expression describes the fullname:
/[A-Z&]+\s[0-9]+L?\.[0-9]+-[A-Za-z]+\sI?\s?[0-9]{4,}\s.*/
For each of the individual settings in the plugin configuration page, use parenthesis to create a matching group for the relevant field. For example, setting /([A-Z&]+)\s[0-9]+L?\.[0-9]+-[A-Za-z]+\sI?\s?[0-9]{4,}\s.*/
in the "Department" section would set the value of [DEPT]
to SMPL
.
This regular expression describes the idnumber: /[0-9]+\.[0-9]+/
The name formats may be used to assemble and enforce a naming convention. All of the fields above are available, as is [SECTIONS]
. This field is concatenated from the section numbers of all the source courses. This table shows the constructed names for a new course:
field | format | result |
---|---|---|
fullname | [DEPT] [NUM]-[TERM] [TITLE] | SMPL 101-Fall 2017 Sample Course |
shortname | [DEPT] [NUM].[SECTIONS]-[TERM] | SMPL 101.0102-Fall 2017 |
idnumber | [DEPT][NUM].[SECTIONS].[TERMCODE] | SMPL101.0102.201710 |