Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting timetables for classes, students and teachers not just "My Timetable" #16

Open
cfpwastaken opened this issue Feb 26, 2022 · 8 comments

Comments

@cfpwastaken
Copy link

Yeah would be pretty cool to have, especially for my edupage discord bot as it currently shows my timetable to all students in my class who might have slightly different timetables.
Also i think this might be very easy to implement.
There should be some kind of InsufficientPermission exception for when you do not have permission to see a timetable.

@loumadev
Copy link
Owner

I looked it up, and it turned out it isn't that easy to implement. The only thing I can get from EduPage is a few megabytes large JSON object with all the data divided into arrays. So to implement it properly, I have to make the whole parser/generator to create the final timetable (like on original EduPage site). I have currently no free time, but I will try to make it run (don't know when though).

@cfpwastaken
Copy link
Author

cfpwastaken commented Feb 26, 2022

I looked it up, and it turned out it isn't that easy to implement.

bruh

I have currently no free time, but I will try to make it run (don't know when though).

Ok.

@ivanhrabcak
Copy link
Contributor

image

Can this be used?

@loumadev
Copy link
Owner

Unfortunately no, but actually, under the hood it uses the same data (so it wouldn't help, it would even harder to optain that data).

@ivanhrabcak
Copy link
Contributor

I've been able to implement this with this endpoint:
https://{subdomain}.edupage.org/server/currenttt.js?__func=curentttGetData - it returns JSON.

If your school setup in such way that you don't see the timetables of other people, it won't work obviously, but I think this is the easiest way to implement this and it should work for everyone (if school is setup correctly).

Code from edupage-api

@cfpwastaken
Copy link
Author

actually, when I go to that url with my schools subdomain it goes to 404.edupage.org

@BelKed
Copy link

BelKed commented Mar 24, 2022

@cfpwastaken Same result for me – your school probably doesn't have enabled viewing timetables of other people.
Also, you have to send a POST request to these endpoints...

But you can use it like this to view timetables in a browser:

https://{subdomain}.edupage.org/timetable/view.php?student={student_id}
https://{subdomain}.edupage.org/timetable/view.php?teacher={teacher_id}
https://{subdomain}.edupage.org/timetable/view.php?class={class_id}
https://{subdomain}.edupage.org/timetable/view.php?classroom={classroom_id}
https://{subdomain}.edupage.org/timetable/view.php?num={timetable_id}

@cfpwastaken
Copy link
Author

cfpwastaken commented Mar 24, 2022

your school probably doesn't have enabled viewing timetables of other people.

My school has that disabled too.
But my school has enabled viewing timetables for classes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants