-
-
Notifications
You must be signed in to change notification settings - Fork 166
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
Add customized menu for the admin course. #2009
Conversation
I poked around and it looks good. i did not try actually using admin tools but i assume they still all work. Should there still be a Help menu item? (Specialized to the admin course...) And report bugs? |
I think if we want help menu items, we should also give more help to the various admin pages, similar to what has been done for normal courses. That is beyond this pull request though, maybe another pull request can add admin help pages and a general help menu. I can add the report bugs link, though for course admins, is that Bugzilla link the appropriate place to send them to report bugs about the admin course? Though I guess they could also be reporting bugs about a problem or something else as well, just using the admin course for the link. |
Overall, this looks good and I agree with having some help pages as well. I wonder if the User Settings is needed, since you've included the classlist editor and the password/email can be changed there and the other settings are relevant. |
I don't think you can change your own password there anymore. |
I think the "Course Administration link should be above the "User Settings" link in the nav. That is the home page, and so it should be first. Probably the coloring should either be dispensed with for the admin course, or made entirely the way the #2010 makes it for students. In other words, uniform. |
948231b
to
3b6ac93
Compare
Moved user settings more towards the bottom (under the course admin links right before the class list editor). Added report bug link. Made everything the primary color assuming #2010 gets accepted. The Menu header's color will be updated with #2010 changes. I think the admin help additions should be put in another pull request, so leaving help link off for now. |
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.
This looks good. I think this is a nice improvement to the admin course.
Eventually it would be good to remove the sub_display
url paramenter, and make the admin pages proper routes. But that is for future work.
Move the links (nav menu) from the top of the admin page over to the main menu. Also remove most of the course links since they don't really do much on the admin page. Label this new menu 'Admin Menu'.
Applied @drgrice1 code cleanup comments. I am working on adding some help items to the admin pages (in case someone else was thinking about working on this). I'll add a PR when its ready, though lots of the help is quite short (most pages already describe what they do). We can talk about this more once I make the PR. |
I'm interested in keeping File Manager available in the admin course. After Googling today, I find that I can:
And now in the admin course's file manager, I have a This would be useful for me managing the Runestone server, where users request their full archive files from the past, and I could get them through the admin course. And I'm not risking some kind of accident since it's read-only. Similarly, I might want to mount like this to the Thoughts on this? |
@Alex-Jordan My thoughts was to just give the admin file manager access to all courses by allowing it to move all the way up to the courses root directory. This also makes it so the admin file manager can download and upload archives (which cannot currently be done). It appears this is fairly easy to pull off, I have a patch on this branch, https://github.com/somiaj/webwork2/tree/admin-file-manager. Thoughts? |
Personally I would like to avoid the admin course having so much write access. With what you propose, one of my colleagues (who have access to the admin course) might accidentally do something very bad and lose/corrupt files from the courses folder tree. |
Ahh I missed you mounted the link read only. I still think it would be nice to be able to add archives (I like to copy an archive from my live server to my test server) from the admin course, though since I have server access it isn't needed. Though agreed it might be too much access. In either case I can add the file manager back. |
I think this comment got lost above (or lost in translation). On the User Settings, there are the "Change Display Settings", which isn't relevant for the admin course. It looks like you are using the existing User Settings page. Can the "Change Display Settings" block be hidden if the course is the admin course? |
I know this is merged now but this seems like an OK place for discussion. How do you feel about:
(Actually maybe "Courses" can go away for all courses? You can just click the WeBWorK logo to get there if you want to...) |
Seems reasonable, maybe add a PR.
The plural is being used to indicate wither the tool can only act on a single course at a time or multiple courses at a time. |
@Alex-Jordan: All of your suggestions sound good. Could you work up a PR for those things? Note that if you remove the "Courses" link from the site nav, then you will also need to find a fix for @somiaj's issue pointed out in #2010 (comment). |
That is a good question. That certainly should be the case. I will check that when I get a chance. |
I don't think I tested for this, so most likely all users in the admin course see the same menu. |
I just tested this, and yes, all users see the full site nav. Users that don't have student permissions see "You are not authorized to create or delete courses" or "You are not authorized to access instructor tools" for all of the pages except the "User Settings" page. Users that only have "professor" permission can actually create and delete courses (and do everything). So this is a problem that needs to be fixed. |
Note, it appears that @Alex-Jordan If you make a PR to update the link names here, might also want to consider some of the suggestions in #1992 and update the names on the main menu as well. |
I am about to open a PR that has my initial suggestions. I have to stop WW stuff for the rest of the day and possibly weekend. So the things from #1992 and the issue about people with low permissions being able to do things they shouldn't will come separately. I don't think I will bee available until late next week, so if anyone else wants to do those, go for it. |
I will go fix the issue I overlooked with permissions. |
I just tested on webwork 2.17, and I see that a user with 'student' permissions in the admin course can't see or do anything. However, a user with 'professor' permissions could create and delete courses (and everything else). So this change makes the 'student' user issue messy looking, but the 'professor' issue is not new (but should be fixed). |
Removing the items from the menus will be easy for 'professor' or anyone with 'access_instructor_tools', but if they actually type in the URL of a given instructor tool they will most likely still have access. Maybe just increase 'access_instructor_tools' to 'admin' in the admin |
Looking into this a bit more, I think that you don't need to worry about the 'professor' user being able to create and delete courses and such. The issue with that is not in any of the admin course code. Permissions are actually checked there. The problem is in defaults.conf. The permission level for the "create_and_delete_courses" action is "professor". That is why this is happening. |
So all that needs to be done is to hide the links for those that do not have permission to perform those actions. |
Move the links (nav menu) from the top of the admin page over to
the main menu. Also remove most of the course links since they
don't really do much on the admin page. Label this new menu
'Admin Menu'.
The only old menu items used are the user settings to be able to change the password, class list editor, and email since the admin users may want to email various instructors or manage them (since they are created automatically with new courses). There was also some discussion of maybe the file manager being useful, but not added here. I had wondered if the admin file manager could go up one more directory to the courses directory root, so admin users have access to all course files.