TUM-Dev / gocast

TUMs lecture streaming service.
https://live.rbg.tum.de/
MIT License
183 stars 42 forks source link

course management data-providers refactor #1137

Closed mono424 closed 11 months ago

mono424 commented 1 year ago

Motivation and Context

Currently, the course management relies on Go generated template data. This means we need page reloads and also it is not good practice to have backend and frontend entangled in that way. Further, much very specific code is used to handle the course management tasks, that could be abstracted in cleaner ways.

Description

This PR untangles backend and frontend by using data-providers that are introduced earlier and are already used for data-sections and other parts of the app. This gives a standardized abstraction to handle the lecture's client side. Also, this will prevent useless page reloads and give a better standardized and app-global API to create new lectures, fetch or update them.

Steps for Testing

Screenshots

Way shorter UI specific code (edit-course.ts):

difference

github-actions[bot] commented 1 year ago

Your Testserver will be ready at https://1137.test.live.mm.rbg.tum.de in a few minutes.

Logins | Kurs1 | Kurs2 | Kurs3 | Kurs4 | | ---------------------------------------- | ------------------------- | ------------------------- | ------------------------- | | public | public | loggedin | enrolled | | prof1 | prof1 | prof2 | prof1
prof2 | | student1
student2
student3 | student1
student2 | student2
student3 | student1
student2 |
mono424 commented 12 months ago

Changes look good.

Somehow the "Delete Lecture" in the dropdown menu doesn't work anymore. (Console: ReferenceError: Can't find variable: deleteLecture) 😅

thanks for the ping! Should have tested better, delete and deleteSeries should be fixed now ;)

mono424 commented 12 months ago

@joschahenningsen regarding the size of the pr do you want to take a look first before I merge or can I just go ahead and merge it?