Problem/Motivation
When viewing an activity while taking a course, a user with appropriate permissions (teacher or LMS admin) should be able to easily edit the activity directly. Currently if they want to edit it, they have to leave the course, and separately find the activity via the LMS admin. This is a pain point for course creators.
There is a data integrity issue if the LMS "Use Revisions" setting is disabled; if that setting is off and students have already started the course, reverting revisions should likely be disabled as well.
Proposed resolution
Add local tasks to front-end view of course activities.
| Comment | File | Size | Author |
|---|---|---|---|
| #13 | Screenshot.png | 68.89 KB | graber |
Issue fork lms-3588690
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
ob3ron commentedInitial commit for review.
Comment #4
graber commentedWe should definitely do it together with #3588821: UI/UX: teachers need to see the latest version of a course (or after), treating those 2 separately will not work well.
Comment #5
graber commentedAlso left a comment on the MR.
Comment #6
ob3ron commentedDid it the right way.
Comment #7
graber commentedLet's also remove the delete tab, you cannot delete anyway as the activity is used when trying to delete from a course tab. Removing from lesson would be more tricky so let's leave it for a possible follow-up.
Ok to merge once that's done.
Comment #8
ob3ron commentedRemoved the front-end Delete tab. The back end still has its original Delete tab but that's still useful for activities that are not in any lesson.
Comment #9
graber commentedWhen editing an activity from course - view tab is not visible so there's no way to go back except pressing the back button. We could also hide the delete tab if a course route is in destination and add a "Cancel" submit button on the edit form?
Comment #10
ob3ron commentedImproved back-end tabs, added Cancel button, hid Delete button when editing an activity from a front-end activity view.
Comment #11
graber commentedLeft some comments on the MR
Comment #12
ob3ron commentedMade the requested changes.
Comment #13
graber commentedJust one more tiny thing: destination gets applied to tab links also on the edit and revisions page. That's ok for all tabs except the "View" tab, where the link should be just the course activity page.

Ok to merge once removed.
Comment #14
ob3ron commentedAh, good catch, fixed.
Comment #15
ob3ron commented