Access Keys:
Skip to content (Access Key - 0)

SCASUBJI User Interface

Please note that this page and related pages are being developed as part of the CIM Courses Project and are subject to change.

This article describes the functionality of the SCASUBJI form. This form allows power Registrar users to directly edit Subject data in the Container/Template Subject Structure.

Accessing SCASUBJI


User access SCASUBJI user interface through the SMD forms collection:

Direct links to the SCASUBJI UI:


Please refer to the Subject Management Authorizations KB page. The roles that pertain to CIM Courses access are sent via the User Provisioning Feed.


The majority of validations performed by SCASUBJI can be found on the Subject Management Business Rules KB page. Many of the restrictions/validations are performed using the MIT Subject Management API. This article lists the restriction/validations that are performed on the front-end by SCASUBJI only.

  • Perform a check on save for a Subject Number = "URN" and for attribute "UROP". If these conditions are true, check for a "URN" attribute. If "URN" is not present, "URN" will automatically be included in the JSON to the API upon save.
  • If no value is provided for Roll_Faculty and no value already exists, set to "P" for "Previous Term"


Q: Why are the input boxes related to Equivalencies and Scheduling Relationships grayed out except for the on a container's most recent template?
A: TBD (Tim to add)

Developer info

Thin apache proxy

All requests from the UI are routed through an apache server which acts as a thin proxy to the back-end APIs.

The apache server:

  • Serves the files that make up the angular application (css, html, js, etc)
  • Integrates with Touchstone
  • Relays requests to API, appending client id and secret and referred user info
  • Exposes endpoints for getting property and user info

Location and configuration

The apache server lives on a virtual machine in our VMWare Cloud. It is managed by the App Delivery team and configured via Puppet.

The puppet config for the non-production tiers can be found at File: hiera:nodes: <servername>: common.yaml. Contact the App Delivery team for information about the production configuration.

Production is load balanced between two servers.

/service/apis/user and /service/apis/tier endpoints

Two endpoints are configured directly in the apache configuration.

  • The /service/apis/user endpoint returns information provided by Touchstone about the authenticated user
  • The /service/apis/tier endpoint returns tier-specific properties to be used by the UI

Architecture diagram

Show/hide diagram

[Image source:]

Frameworks used


APIs start with: /service/apis/subjectmanagement/

Calls to APIs also have a unique token appended as a cachebuster (will appear as 'token_' plus a timestamp). This will prevent the browser from using cached versions of API results.


Clone repository:
git clone

To build local version, from inside root folder of the repo you just cloned, run:
npm install

To run local server, from inside same folder:
grunt serve

Work from inside the /app folder. /dev folder will be created upon any saves.

Two main views

SCASUBJI comprises two main views: 1. a search page that enables user to manage templates/containers, and 2. a create/edit page to enter details on a subject, including cross-listings, equivalents, requisites, etc.
(Note that the Home button takes user to the main SDM search page, not the main SCASUBJI page.)

1: Search

  • View: views/home.html
  • Controller: scripts/controllers/homeCtrl.js
  • Factory: Factories/homeFactory.js
MIT subjects

Clicking search button calls searchSubj() in controller. If this is an MIT subject, this then calls:

homeFactory.getSubjectDtls($scope.course, $scope.number.toUpperCase())

which calls API endpoint:


If a term is included, it calls a different method, from different factory:

viewFactory.getSubjectDtls($scope.course, $scope.number.toUpperCase(), $scope.offeringTerm.toUpperCase())

API endpoint is called to make sure department entered as part of subject is valid:


This returns metadata about the department, e.g. for department 22,

departmentCode: " 22"
departmentName: "Nuclear Engineering"
schoolCode: "E"
schoolDescription: "Engineering"

Then processSearchResult (in controller homeCtrl.js) is called, whether a term was included or not in search. This sets the data ($root.searchResults) used to render the main table.

Non-MIT subjects

If it's a non-MIT search, it calls the same method, with or without a term provided:

homeFactory.getNonMitSubjectDtls($scope.nonMitCourseNumber, $scope.offeringTerm.toUpperCase() )

the factory method then calls the API:


This retrieves a list of templates and stores it in the page controller to render the main table. (For non-MIT subjects this will usually be 1 match.)

Other functionality on the page

These functions enable to user to manage a template's metadata.


Confirmation of term code entered in modal runs deactivateSubject(), which calls the API:


After the user confirms the deactivate request, the subjects list is updated.


Confirmation of term code entered in modal runs reactivateSubject(), which redirects to the edit page for that subject in that term (using the containerId in the container list):



Similar to Deactivate, confirmation of term code entered in modal runs backdateContainer(), which then calls the API:


Create New Subject link

Redirects to


This takes user to Edit Subject screen, described below.

Show All Templates for Container link

Displays all templates for a container. Each link should expand to show all templates for only that containerId.

In a few cases (e.g. 6.802) there are multiple containerIds.

uiSettings is a scope var that keeps track of user's Show All Templates choice, key is containerId.

2: Create/Edit Subject

This is the main SCASUBJI subject editing screen.

  • views/editSubject.html
  • scripts/controllers/editSubjCtrl.js
  • factories/editFactory.js

Clicking on link in table calls Subjects endpoint with course/number/term params (and cache buster token) and calls API:


Supporting data

On page load, the following lookups are made (some APIs, some from apache config):



Sets metadata for current tier (DEV, TEST, SCHED-TEST, or PROD) e.g.:

attributesUrl: "",
gradingModesUrl: "",
sdmUrl: "",
tier: "DEV"

Department info

Sets metadata for this department; see example above.


Retrieval API:


Save API:


Renders querybuilder component, which adds a node to requisites. Querybuilder calls itself recursively to render nested groups.

The save button is in the editRequisites modal, markup for this modal is in /views/editSubject.html. The save function, saveRequisitesData(), is in the edit page's controller (editSubjectCtrl.js).


Gets display controls (user selected data), options (to build dropdowns), and reference point (templateId and version number). API:


Under Term Plan, when user selects Fall, IAP, Spring, and/or Summer, a corresponding section will appear in the Online Listing section that follows.


Mostly uses bootstrap default CSS.

styles/main.scss comprises all other files; add to top if need to add new files.

Some media queries should be removed (use bootstrap's responsive breakpoints).

Subject Management Documentation Index

The Subject Management Documentation Index is the central listing for documentation pertaining to Subject Management.

IS&T Contributions

Documentation and information provided by IS&T staff members

Last Modified:

April 02, 2019

Get Help

Request help
from the Help Desk
Report a security incident
to the Security Team
c-scasubji c-scasubji Delete
r-content r-content Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.
This product/service is:
Easy to use
Difficult to use

This article is:
Adaptavist Theme Builder (4.2.3) Powered by Atlassian Confluence 3.5.13, the Enterprise Wiki