registration and subject methods
Registered semesters, faculty list, and subject preference print. Models live in src/registration.js. Semester is reused from src/attendance.js.
Flow#
flowchart TD A[get_registered_semesters] --> B[Semester array] B --> C[get_registered_subjects_and_faculties] C --> D[Registrations] D --> E[RegisteredSubject list] B --> F[get_subject_choices] F --> G[raw response]
get_registered_semesters#
async get_registered_semesters()
POST /reqsubfaculty/getregistrationList
Encrypted JSON:
{ instituteid, studentid: this.session.memberid }
Maps resp.response.registrations with Semester.from_json.
get_registered_subjects_and_faculties#
async get_registered_subjects_and_faculties(semester)
POST /reqsubfaculty/getfaculties
{
instituteid,
studentid: this.session.memberid,
registrationid: semester.registration_id,
}
Returns new Registrations(resp.response).
classDiagram
class Registrations {
raw_response
total_credits
subjects
}
class RegisteredSubject {
employee_name
employee_code
minor_subject
remarks
stytype
credits
subject_code
subject_component_code
subject_desc
subject_id
audtsubject
}
Registrations --> RegisteredSubject : subjectsRegistrations reads totalcreditpoints and maps registrations through RegisteredSubject.from_json. JSON keys are flattened names (employeename, subjectcode, …).
get_subject_choices#
async get_subject_choices(semester)
POST /studentchoiceprint/getsubjectpreference
{
instituteid,
clientid: this.session.clientid,
registrationid: semester.registration_id,
}
Returns resp.response unchanged.
sequenceDiagram participant App participant WP as WebPortal participant API as StudentPortalAPI App->>WP: get_registered_semesters WP->>API: getregistrationList API-->>App: Semester[] App->>WP: get_registered_subjects_and_faculties(sem) WP->>API: getfaculties API-->>App: Registrations App->>WP: get_subject_choices(sem) WP->>API: getsubjectpreference API-->>App: object
Semester identity#
Semester is the same class attendance uses. Pass a Semester from this list into faculty / choices. A semester from grade-card or exam endpoints has the same fields but may not be valid for /reqsubfaculty.
flowchart LR att[attendance semlist] --> Sem[Semester] reg[reqsubfaculty registrations] --> Sem exam[exam semestercode] --> Sem grade[gradecard registrations] --> Sem
All four lists parse with Semester.from_json. Do not mix them blindly across endpoints.
These three methods are in authenticatedMethods.
flowchart LR json[portal JSON] --> from[RegisteredSubject.from_json] from --> fields[employee_name credits subject_id]