Skip to content

Migrate the core logic #35

@premagarwals

Description

@premagarwals

Currently, the core logic is using the erp central breadth list, which doesn't show all the available subjects. Here is one example fetch request that is able to fetch all the available breadth/depth subjects for a specific department-

await fetch("https://erp.iitkgp.ac.in/Academic/getOtherDeptSubjectList.htm?department=AG&sub_type_code=Breadth&semno=5&subject_status=Normal", {
    "credentials": "include",
    "headers": {
        "User-Agent": "Mozilla/5.0 (X11; Linux x86_64; rv:136.0) Gecko/20100101 Firefox/136.0",
        "Accept": "application/json, text/javascript, */*; q=0.01",
        "Accept-Language": "en-US,en;q=0.5",
        "Content-Type": "application/json",
        "X-Requested-With": "XMLHttpRequest",
        "Sec-GPC": "1",
        "Sec-Fetch-Dest": "empty",
        "Sec-Fetch-Mode": "cors",
        "Sec-Fetch-Site": "same-origin",
        "Priority": "u=0"
    },
    "referrer": "https://erp.iitkgp.ac.in/Academic/subjectRegistrationUGPG.htm",
    "body": "{\"order\":\"asc\",\"limit\":10,\"offset\":0}",
    "method": "POST",
    "mode": "cors"
}); 

(To try above script, login to erp then open the browser console, paste this, hit enter and wait. You will see the response structure...)

we can change the dept code to get the available breadths in that dept. Feel free to modify different parameters to optimize the workflow.

Conclusion: show Department wise non-clashing subjects.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions