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

Navigation for CA's via Quick Bar #18

Open
miloberry opened this issue Nov 23, 2020 · 4 comments
Open

Navigation for CA's via Quick Bar #18

miloberry opened this issue Nov 23, 2020 · 4 comments
Labels
bug Something isn't working

Comments

@miloberry
Copy link

Currently, the navigation to the grades and assignments sections in the quick bar do not navigate correctly if you have elevated privileges. Grades shows a student's view rather than input for grades while the assignments tab shows that access is not allowed

@MattGalan MattGalan added the bug Something isn't working label Nov 23, 2020
@MattGalan
Copy link
Owner

MattGalan commented Nov 23, 2020

Currently the URLs for the quickbar are populated based on a template:

<a href="https://mycourses.rit.edu/d2l/le/content/${c.id}/Home">
  Content
</a>
<a href="https://mycourses.rit.edu/d2l/lms/dropbox/user/folders_list.d2l?ou=${c.id}&isprv=0">
  Assignments
</a>
<a href="https://mycourses.rit.edu/d2l/lms/quizzing/user/quizzes_list.d2l?ou=${c.id}">
  Quizzes
</a>
<a href="https://mycourses.rit.edu/d2l/lms/grades/my_grades/main.d2l?ou=${c.id}">
  Grades
</a>

from quickbar.js#L67-L78

Do the URLs for a CA's grades and assignments pages look similar? Also, do you know if there's any way for the extension to determine if you're a CA? Maybe there's some indicator on the course page we could programmatically search for.

@miloberry
Copy link
Author

miloberry commented Nov 23, 2020

The grades url is https://mycourses.rit.edu/d2l/lms/grades/admin/enter/user_list_view.d2l?ou=858294 and assignments is https://mycourses.rit.edu/d2l/lms/dropbox/admin/folders_manage.d2l?ou=858294 I know there are places on the course home page that you can see the role but will the quick bar be able to access this? It might slow down the loading of the page if it has to check all the pinned courses for CA roles

@MattGalan
Copy link
Owner

MattGalan commented Nov 23, 2020

my concern is about the ou query param. I need to do some research to see what that actually is.

In my experience, the ou param refers to the 6 digit ID that each class has. In the code snippet above you can see it being populated by the template.

I know there are places on the course home page that you can see the role but will the quick bar be able to access this? It might slow down the loading of the page if it has to check all the pinned courses for CA roles

Well, we only have to determine whether you're a CA for a given class once - when you first add it to the quick bar. After that, we can store it as a boolean alongside the other quick bar data.

Looking for an HTML element via jQuery is fast and easy. Currently, however, you don't have to be on a course's home page to add it to the quick bar (meaning you can add it from the assignments page, content page, etc.).

If there are pages where it's not possible to tell if you're a CA, we can either restrict it so you can only add to the quick bar from a course home page, or we can load and scrape the course home page behind the scenes (which is trickier and slower, but will still allow you to add to the quick bar from anywhere).

@miloberry
Copy link
Author

I think restricting it to only being added on the home page would be the easiest but would be more frustrating for users. I can play around with scraping the course home page behind the scenes but if it's super slow or more trouble than it's worth it might be best to restrict to only the course home page

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants