Skip to content

[BUG]: Dynamic classGroupId options parsing from getDateForSemesterPreview endpoint #9

Description

@Vishal-770

Overview

When querying the Academic Calendar options endpoint https://vtopcc.vit.ac.in/vtop/getDateForSemesterPreview (POST), VTOP returns an HTML response containing a <select> element for class groups (classGroupId):

<select data-validation-engine="validate[required]" onchange="javascript:getListForSemester('getListForSemester');">
    <option value="COMB" selected="selected">All Class Group (Combined)</option>
    <option value="ALL">General (Semester)</option>
    <option value="ALL02">General (Flexible)</option>
    <option value="ALL03">General (Freshers B.Tech)</option>
    <option value="ALL05">General (LAW)</option>
    <option value="ALL06">General (Flexible Freshers)</option>
    <option value="ALL11">General (Flexible Research)</option>
    <option value="ALL13">General (Flexible LLM)</option>
</select>

These class group options vary depending on the student's program and semester (semSubId).

Currently, the Rust backend payload hardcodes ("classGroupId", "COMB") when requesting the calendar schedule view. Because classGroupId is hardcoded, students in different class groups (such as ALL, ALL02, ALL03, ALL05, ALL06, ALL11, ALL13) cannot load their academic calendars.


Required Changes

1. Dynamic Class Group Extraction

  • Parse the <select> options returned by https://vtopcc.vit.ac.in/vtop/getDateForSemesterPreview to extract available classGroupId values dynamically (value and label).

2. Dynamic Payload Parameter

  • Pass the selected classGroupId dynamically in the POST payload instead of hardcoding "COMB".

3. Frontend Selector

  • Add a Class Group dropdown filter in the Academic Calendar view if multiple class group options are present for the semester.

Verification Criteria

  • Available class group options are dynamically parsed from getDateForSemesterPreview response.
  • Users can select their active class group (e.g. COMB, ALL03, ALL06).
  • Academic calendar fetches schedule data using the user's selected classGroupId.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions