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

Init new annotation tool #512

Closed
wants to merge 52 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
9271fdb
Created migrations for annotations.
Frodo161 Feb 10, 2023
a5530ff
Added/changed abilities for annotations. Changed permission of migrat…
Frodo161 Feb 10, 2023
03777ce
Added/changed asset files for the annotation-tool.
Frodo161 Feb 10, 2023
f9d0bb8
Added/changed controllers for annotation-tool.
Frodo161 Feb 10, 2023
7bab1a1
Added/changed models for the annotation-tool. Added (empty) annotatio…
Frodo161 Feb 10, 2023
306a7b9
Added/edited view files for the annotation-tool.
Frodo161 Feb 10, 2023
40ca2fb
Added routes for the annotation-tool.
Frodo161 Feb 10, 2023
89e0384
Improved the CSS of the annotation buttons in the interactive area.
Frodo161 Feb 12, 2023
d043fd2
Fixed a bug which caused the annotation's category not to be updated …
Frodo161 Feb 12, 2023
618b011
Added ":search" in line 8 of the file medium_ability.rb which was acc…
Frodo161 Feb 13, 2023
84567fb
Changed marker offset such that it fits better for larger videos.
Frodo161 Feb 18, 2023
e7dbf2d
Changed 'annotation_status' in the lectures controller to the correct…
Frodo161 Mar 6, 2023
e2b3fdf
Replaced the standard color picker of the annotation form by a select…
Frodo161 Mar 13, 2023
ff4f51a
Replaced cases with hash in the AnnotationsHelper.
Frodo161 Mar 29, 2023
fd61649
The timestamp of an annotation is now properly saved as a TimeStamp o…
Frodo161 Apr 11, 2023
019453f
Created Feedback player.
Frodo161 Apr 29, 2023
24ee7e6
Fixed feedback player and added a first implementation of heatmaps.
Frodo161 May 3, 2023
8dc1abc
Fixed annotation form (category selections works now) and an a small …
Frodo161 May 5, 2023
aad43e0
Excluded mistake annotations from the heatmap and changed their appea…
Frodo161 May 10, 2023
79cafe3
Merged current mampf-next into annotation-tool.
Frodo161 May 11, 2023
51bf11c
Added possibility to automatically create a comment on the video when…
Frodo161 May 14, 2023
bcbdfb6
Added timestamp to comments generated from annotations. Added a restr…
Frodo161 May 24, 2023
d78a4bc
Added pop-up message for the case that a user tries to edit an annota…
Frodo161 May 24, 2023
c9bd62d
Fixed bug with previous/next annotation button in the feedback player.
Frodo161 May 24, 2023
fc33f71
Removed cypress folder which was accidently added.
Frodo161 May 28, 2023
15cab9a
Removed cypress.json and annotation_spec.js which were accidently added.
Frodo161 May 28, 2023
cb86e7e
Added pop-up message for publishing mistake annotations: The current …
Frodo161 May 31, 2023
d2d5ab3
Teachers (and editors) can now enter an "emergency-link" which is sho…
Frodo161 Jun 21, 2023
6aa5ae4
Category subtext ("definition", "argument", "proof strategy") is now …
Frodo161 Jun 23, 2023
9ae417a
Fixed edit form for annotations.
Frodo161 Jun 23, 2023
e4d977e
Edit form now correctly selects the subcategory of the annotation.
Frodo161 Jun 23, 2023
3e9972f
Added locales.
Frodo161 Jun 27, 2023
885a731
Combined new and edit scripts for the annotations controller (as they…
Frodo161 Jun 27, 2023
1011f97
Fixed bug which caused the annotation area to overlap with the video …
Frodo161 Jun 27, 2023
34d28bd
Manually set the ranges of the thyme feedback player to a default val…
Frodo161 Jul 1, 2023
5f37f33
Merged mampf-next into this branch.
Frodo161 Jul 4, 2023
0880507
Updated all emergency button forms to bootstrap 5 standards. Changed …
Frodo161 Jul 8, 2023
3f051c9
Added abilities for the annotations controller.
Frodo161 Jul 16, 2023
e6b51c9
Replaced the updateMarkers method in the resizeContainer method such …
Frodo161 Jul 16, 2023
e0ad2c3
Fixed typo from the last commit.
Frodo161 Jul 16, 2023
e52cf69
Outsourced latex compilation for the thyme (feedback) player into a s…
Frodo161 Jul 16, 2023
12220d6
Added (LaTex) preview to the annotation modal.
Frodo161 Jul 19, 2023
a99e635
Fixed annotation modal headline locales.
Frodo161 Jul 22, 2023
15c77a7
Corrected position of the annotation modal when clicking the preview …
Frodo161 Jul 22, 2023
1079f65
Corrected the resizing of the thyme player such that an open annotati…
Frodo161 Jul 22, 2023
73ee896
Fixed updating of the heatmap.
Frodo161 Jul 22, 2023
ec8a7ab
Added the script thyme_func.coffee where the shared functions of thym…
Frodo161 Jul 30, 2023
9a2c46e
Added missing locales for the annotation area buttons.
Frodo161 Aug 6, 2023
46f3123
Added tooltip for the visible_for_teacher checkbox and slightly chang…
Frodo161 Aug 6, 2023
7a06da8
Merged mampf-next.
Frodo161 Aug 8, 2023
e4fe639
Removed unwanted return statement from the edit JS of the annotation …
Frodo161 Aug 9, 2023
c2d26f3
Replace thyme related coffeescripts by javascripts.
Frodo161 Aug 18, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions app/abilities/annotation_ability.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
class AnnotationAbility
include CanCan::Ability

def initialize(user)
can [:edit, :update, :destroy], Annotation do |annotation|
annotation.user == user
end

can [:new, :create, :update_markers, :near_mistake_annotations], Annotation
end

end
4 changes: 2 additions & 2 deletions app/abilities/medium_ability.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ def initialize(user)
user ||= User.new
clear_aliased_actions

can [:index, :new, :search], Medium
can [:index, :new, :search, :check_annotation_visibility], Medium

can [:show, :show_comments], Medium do |medium|
medium.visible_for_user?(user) &&
Expand All @@ -16,7 +16,7 @@ def initialize(user)
!user.generic? && medium.visible_for_user?(user)
end

can [:edit, :update, :enrich, :publish, :destroy, :cancel_publication,
can [:edit, :update, :enrich, :feedback, :publish, :destroy, :cancel_publication,
:add_item, :add_reference, :add_screenshot, :remove_screenshot,
:import_script_items, :import_manuscript, :get_statistics,
:render_medium_tags, :fill_quizzable_area,
Expand Down
3 changes: 3 additions & 0 deletions app/assets/javascripts/annotations.coffee
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://coffeescript.org/
2 changes: 2 additions & 0 deletions app/assets/javascripts/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,10 @@
//= require talks
//= require terms
//= require tex_preview
//= require thyme_func
//= require thyme
//= require thyme_editor
//= require thyme_feedback
//= require upload
//= require users
//= require vertices
Expand Down
24 changes: 23 additions & 1 deletion app/assets/javascripts/lectures.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ disableExceptOrganizational = ->
return

$(document).on 'turbolinks:load', ->

# activate all popovers
$('[data-bs-toggle="popover"]').popover()

Expand Down Expand Up @@ -206,6 +205,29 @@ $(document).on 'turbolinks:load', ->
userModalContent.dataset.filled = 'true'
return

# Dynamically render content for entering emergency links.
updateEmergencyLink = (value) ->
if value == "no_link"
$('#direct-link-field').hide()
$('#lecture-link-field').hide()
if value == "lecture_link"
$('#direct-link-field').hide()
$('#lecture-link-field').show()
if value == "direct_link"
$('#lecture-link-field').hide()
$('#direct-link-field').show()
return

emergencyLinkRadios = document.getElementById('emergency-link-status-radios')

if (emergencyLinkRadios != null)
$('#emergency-link-status-radios input:radio:checked').each ->
updateEmergencyLink(this.value)
return
emergencyLinkRadios.addEventListener 'click', (evt) ->
if evt.target && event.target.matches("input[type='radio']")
updateEmergencyLink(evt.target.value)
return

# on small mobile display, use shortened tag badges and
# shortened course titles
Expand Down
Loading