-
Notifications
You must be signed in to change notification settings - Fork 23
Introducing audit logging table for playlist videos and its cleanup cronjob #1381
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
Conversation
- Implemented PlaylistVideosAuditLog for tracking add, delete, and restore actions. - Enhanced PlaylistVideos model to log actions during delete and store operations. - Created a cronjob (OpencastPlaylistVideosAuditCleanup) to periodically clean up old audit log entries. (every 28 days) - Added migration to create the oc_playlist_videos_audit_log table and schedule the cleanup task.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code looks good and this patch solves the problem of the linked issue except the case above. However, I wonder if there is an easier way to solve this problem without a cronjob and a new database table.
For example, wouldn't it be sufficient to check whether the video has been added to the Stud.IP database for the first time, i.e. seen by Stud.IP?
If this is the case, the video would be added to the series playlist. Otherwise, the series would be ignored.
I would prefer to keep this logic within the plugin itself, especially when it comes to logging and event tracking, instead of relying on a higher-level recording mechanism (if I understood your suggestion correctly). Additionally, please note that the cronjob here is only used as a periodic cleanup task. So no need to be intimidated by it! |
…efault playlist video re-adding
Discussion:
|
- reverting audit log mechanism - taking addToCoursePlaylist out of OpencastVideoSync observer - only call addToCoursePlaylist when the video is fresh, this should happen only when scheduling occurs!
[UPDATE]: the change have been applied according to the discussion!
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, Farbod. I like this solution! It works and the code looks great!
This PR fixes #1257,
P.S. Feedback, suggestions, and arguments are very much appreciated!
[UPDATE]: the above mentioned description no longer applied, please see #1381 (comment)