Skip to content

Fix annotation status default value in UI #708

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

Merged
merged 1 commit into from
Dec 1, 2024
Merged

Conversation

Splines
Copy link
Member

@Splines Splines commented Nov 23, 2024

Fixes #704.

Currently, if I create a new medium in a lecture where the lecture has "share annotations with teacher" set as true, the default for the new medium is that annotations are not shared. This is contrary to the intended behaviour.

In reality, the default was indeed that the status is inherited from the lecture. You could even open a video and verify that users can create annotations and share them with the teacher.

The problem was that originally, Marlon used the values -1, 0, 1 to signify:

  • -1: deactivated
  • 0: inherit
  • 1: activated

and I changed that to the following when I worked on the annotation tool:

  • -1: inherit
  • 0: deactivated
  • 1: activated

However, I forgot to update the values at this place in the UI and therefore the wrong radio button was highlighted (the frontend got the value -1 which meant deactivated beforehand).

Luckily, this is a simple frontend bug and we don't have to update anything in the backend.

Copy link
Collaborator

@fosterfarrell9 fosterfarrell9 left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link

codecov bot commented Nov 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (dev@8d58aea). Learn more about missing BASE report.

Additional details and impacted files
@@          Coverage Diff           @@
##             dev     #708   +/-   ##
======================================
  Coverage       ?   54.28%           
======================================
  Files          ?      170           
  Lines          ?     7348           
  Branches       ?        0           
======================================
  Hits           ?     3989           
  Misses         ?     3359           
  Partials       ?        0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Splines Splines merged commit 7dd3a33 into dev Dec 1, 2024
4 checks passed
@Splines Splines deleted the fix/annotation-default branch December 1, 2024 16:55
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.

2 participants