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

Favorite Lecture View #1498

Open
wants to merge 4 commits into
base: dev
Choose a base branch
from
Open

Favorite Lecture View #1498

wants to merge 4 commits into from

Conversation

feriel97
Copy link
Contributor

Motivation and Context

fixes issue #1426

Description

I have added a user setting "Preferred Lecture View" in the global user settings that allows the user to choose his preferred lecture mode : split, combined, presentation... I have then according to the preference updated the view shown ie the URL redirected to the preferred view of the student.

Steps for Testing

Prerequisites:

  • 1 Student
  • 1 Lecture : lecture should have all 4 views available to see if the switch happens as expected
  1. Log in
  2. Navigate to Settings
  3. Choose preferred lecture view
  4. Go back to the main page and choose a course
  5. Click on a lecture and check if the view that the student chose in the settings is actually being displayed.

Screenshots

preferred-view

@feriel97 feriel97 changed the title Favorite view n Favorite Lecture View Feb 12, 2025
@feriel97 feriel97 marked this pull request as ready for review February 12, 2025 22:23
@@ -61,7 +61,7 @@
{{if $stream.PlaylistUrl}}
<a class="text-left flex justify-start items-center w-full text-3 px-4 py-2 hover:cursor-pointer hover:bg-gray-200 dark:hover:bg-gray-600"
title="Combined view"
@click="watch.switchView('/w/{{$course.Slug}}/{{$stream.Model.ID}}')">
@click="watch.switchView('/w/{{$course.Slug}}/{{$stream.Model.ID}}/COMB')">
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we don't need to add the '/COMB' at the end of the URL and thus shouldn't because the URL looks cleaner without.

@@ -82,6 +82,21 @@ func (r mainRoutes) WatchPage(c *gin.Context) {
}
}

if c.Param("version") == "" {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're already checking for version != "" so maybe we should combine these with an if/else so code is more readable

Comment on lines +88 to +90

c.Redirect(http.StatusFound, c.Request.RequestURI+"/PRES")

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The unnecessary whitespace can be removed.

case "Camera":
c.Redirect(http.StatusFound, c.Request.RequestURI+"/CAM")
case "Combined":
c.Redirect(http.StatusFound, c.Request.RequestURI+"/COMB")
Copy link
Contributor

@karjo24 karjo24 Feb 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we choose to leave out /COMB at https://github.com/TUM-Dev/gocast/pull/1498/files#r1971590406, we can leave it out here as well afaik.

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

Successfully merging this pull request may close these issues.

3 participants