Commit Graph

244 Commits

Author SHA1 Message Date
Spencer Olson 3eb1a26604 remove checks for post_policies_enabled
closes EVAL-671
flag=post_policies_enabled

Test Plan:
- General smoke test of post policies

Change-Id: I618ade57dca203e5500d882f29a9494253839319
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/251977
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Shafovaloff <ashafovaloff@instructure.com>
Reviewed-by: Adrian Packel <apackel@instructure.com>
QA-Review: Kai Bjorkman <kbjorkman@instructure.com>
Product-Review: Syed Hussain <shussain@instructure.com>
2020-11-17 21:47:36 +00:00
Spencer Olson 1957ca8d20 only fetch assignments for selected grading period
Changes the assignment loading strategy for the Gradebook when Grading
Periods are being used. Now, two requests are made to get assignments;
the first requests only assignments in the current grading period, the
second requests the rest of the assignments in the course. When the
former returns, we can show the gradebook to the user. When the
latter returns, we allow the user to change the grading period in the
dropdown.

closes EVAL-1247
flag=none

Test Plan:
1. Create a course with multiple grading periods, with different
   assignments in each grading period (and a handful of assignments
   that are due in different grading periods for different students).
2. Go to the Gradebook.
3. Select "All Grading Periods" from the grading
   period dropdown. Refresh the page. When the page refreshes, verify
   in your browser dev tools that there is only a single request to
   get assignment groups + assignments.
4. Verify you can change the grading period in the dropdown and the
   expected assignments are shown.
5. Select a grading period from the grading period dropdown. Refresh
   the page. When the page refreshes, verify in your browser dev tools
   that there are two requests to get assignment groups + assignments.
   One request should have an 'assignment_ids' param that includes only
   the assignments in the current grading period. The other request
   should have an 'assignment_ids' param that includes all the rest of
   the assignment_ids for the course. if there are any assignments that
   are in both the current grading period AND and other grading period,
   you should see that assignment_id in the former call but not in the
   latter.
6. Before the call for the "rest of the assignments" returns, note that
   the menu options in the grading period dropdown are disabled. Once
   that call returns, note that the options in the menu are re-enabled.
   Once they are enabled, verify that you can change the grading period
   and the expected assignments are shown.
7. Do a quick smoke-test of using other filters in conjunction with the
   grading period filter to make sure everything works as expected.
8. Do a general smoke-test to make sure the gradebook and its filters
   work as expected for a course that does not use grading periods.
9. Verify the assignment_ids param added to the
   AssignmentGroupsAPI#index works as expected (expected behavior is
   described in the API docs for it).

Change-Id: I856810333e56de012982fb704d9cfc9a1a44b8d0
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/250580
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Kai Bjorkman <kbjorkman@instructure.com>
Product-Review: Jody Sailor
Reviewed-by: Adrian Packel <apackel@instructure.com>
Reviewed-by: Gary Mei <gmei@instructure.com>
2020-11-09 17:07:52 +00:00
Spencer Olson 93aee7f242 optimize grading period assignments fetching
closes EVAL-1246
flag=none

Test Plan:
1. Create a course that uses grading periods. Have at least 2 grading
   periods.
2. Create an assignment. Assign it to one student in the first grading
   period, and the rest of the students ("Everyone Else") in the second
   grading period.
3. Sign in as the "one student" from the previous step. Click on
   "Grades". Select the first grading period from the Grading Period
   dropdown and click "Apply". You should see the assignment show up.
   Then, select the second grading period from the Grading Period
   dropdown and click "Apply". You should no longer see the assignment
   listed.

Change-Id: I69d4b8369784086034a7883460e63f4f259a79ca
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/248932
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Adrian Packel <apackel@instructure.com>
Reviewed-by: Kai Bjorkman <kbjorkman@instructure.com>
QA-Review: Syed Hussain <shussain@instructure.com>
Product-Review: Jody Sailor
2020-10-21 16:12:52 +00:00
Cody Cutrer 247189ecda rails 6: fixes for integration specs
Change-Id: Idfff9d798ce3f3f65c7a3ed97bfd1669ba20e240
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/250574
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2020-10-21 02:07:44 +00:00
Cody Cutrer c5227d3f1b shackles was renamed to guardrail
closes FOO-989, FOO-990

Change-Id: I49dfa130cb74c34dd0eb25952790176ae4951058
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/249365
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2020-10-06 19:23:08 +00:00
Jackson Howe ff92ddcdcd Allow direct share for teachers in concluded term
Previously, direct share options appeared for users with
manage_content rights in a course. This commit gives direct share
options to users with read_as_admin rights, so any teacher, TA, or
designer can direct share content, even if a course is concluded.

flag=none
Fixes LS-1409

Test plan:
 - Enable direct share on account
 - Create a term where "teachers can access from" is concluded
 - Add course to term
 - In the course as a teacher, verify that direct share functions from
   the following locations (also expect most other menu items to not
   appear):
   - Modules
   - Pages index and individual
   - Discussions index and individual
   - Assignments index and individual
   - Quizzes index and individual
 - Modify term settings to allow access for teachers always
 - Teachers should now see all menu items in above locations, including
   direct share
 - Students should never see any menu options in above locations
 - Disable direct share for account; verify that menus in above
   locations still function

Change-Id: I53b09ed0c535079ab4e811d58de18ab1ef7f6d3a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/248214
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Jackson Howe <jackson.howe@instructure.com>
2020-09-29 15:21:21 +00:00
Davis Hyer a3ccb49d59 allow cross shard enrollments to view peer reviews
fixes VICE-769
flag=none

test plan:
  - grab a snack, you might be here awhile
  - create two accounts that are trusted
    - you'll need mra configured on your installation
    - once you have the two accounts created, create a trust:
      > Account.create_web_of_trust([account1, account2])
    - add to the account your course will live in a new auth provider
      - visit /accounts/:id/authentication_providers
      - select 'trusted canvas instance' in the identity provider dropdown
      - select the other account as the provider
        - if this fails, ensure both accounts have populated domains
          > account.account_domains.create(host: 'foo.bar') # if not
  - make sure to eat your snack, we're only halfway done
  - in one of the accounts, create a course with a graded discussion topic
    - enroll two users from the second account
    - as both users, leave a reply to the discussion
    - enable the peer review option for grading
    - assign the two users as peer reviewers for each other
      - this can be done at /courses/:id/assignments/:id/peer_reviews
    - as both of the users, visit the discussion once again
      - you should see that each user is assigned as a peer reviewer
  - if you really want to get fancy, test the same setup, but with
    users on the same shard as the course
    - or re-read the tests and see we should be good \o/

qa risk: low

Change-Id: Iebf08ffdaed9c268b22728f53042a377df9608ab
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/247519
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Matthew Lemon <mlemon@instructure.com>
QA-Review: Matthew Lemon <mlemon@instructure.com>
Product-Review: Matthew Lemon <mlemon@instructure.com>
2020-09-14 16:40:08 +00:00
Andrew Haberlandt 92a038cd53 Add score statistics to the assignments API as an 'include' option
This is designed to match the grade distribution graphs
shown in the web UI on the 'Grades' screen to students.

The permissions model is identical: students can view grade
grade distribution (min, max, mean) only if all of the following:
  - The 'hide_distribution_graphs' setting is NOT enabled
  by the instructor in the course's settings
  - There are at least 5 graded submissions
  - The student's submission is graded, and the grade is visible
  to them.

Instructors (or anyone with the read_admin permission) can
always view distributions when they are looking at a student
with a graded assignment.

closes EVAL-1057
closes GH-1669
flag=none

Test Plan:
  - Make API requests to the GET endpoints for individual assignments,
  assignment groups, and for listing all assignments for a course
  - Test these API endpoints with and without the
  include[]=score_statistics flag.
  - Verify that the statistics match those shown in the grade
  distribution graphs on in the web UI
  - Verify that the statistics are only available in the API
  when there are 5 graded submissions and when not disabled by
  the instructor (this behavior should match the distribution
  graphs in the web UI)

Change-Id: Ib0213794abbc45c1debdd989bdbf04e516c2dd82
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/243903
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Jody Sailor
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Syed Hussain <shussain@instructure.com>
QA-Review: Kai Bjorkman <kbjorkman@instructure.com>
2020-08-19 15:10:03 +00:00
Jacob Burroughs 69b866ace2 Remove unfavorite_course_from_dashboard feature flag
Change-Id: I6c2216d6848f9ce44dd76a13ad67cced8ede65d0
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/244585
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2020-08-18 13:36:12 +00:00
Spencer Olson 3a6857318c fix submission uploads page anonymity bug
closes EVAL-1028
flag=none

Test Plan:
Prerequisites: Have a course with the anonymous grading feature option
turned on.

Anonymous Assignment:
1. Create a file upload assignment with the anonymous grading setting
   enabled.
2. As a student, submit a file to the assignment.
3. As the teacher, download the student submissions.
4. Re-upload the zip file of student submissions. Notice that the
   confirmation page anonymizes student names. Student names should be
   shown as "Anonymous Student" and should link to the student's
   submission in SpeedGrader. File names should link to the individual
   file download, and the URL should not contain user IDs.

Non-Anonymous Assignment:
1. Create a file upload assignment with the anonymous grading setting
   disabled.
2. As a student, submit a file to the assignment.
3. As the teacher, download the student submissions.
4. Re-upload the zip file of student submissions. Notice that the
   confirmation page does not anonymize student names. Student name
   links should link to the student's submission page. File names should
   link to the individual file download, and the URL should contain the
   user's ID.

Change-Id: Ic3fd47ca4febb273840f360d3ad15735d6eb7efc
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/244712
Reviewed-by: Gary Mei <gmei@instructure.com>
Reviewed-by: Adrian Packel <apackel@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Kai Bjorkman <kbjorkman@instructure.com>
Product-Review: Jody Sailor
2020-08-14 19:03:52 +00:00
Clint Furse 3719481ce2 fixes bug where trusted account course showed as unpublished
closes LS-1224
flag = unpublished_courses

Test Plan:
- follow JIRA steps to reproduce issue.  This will require you setup a trust account.
  use the link in the JIRA comment for instructions for doing that.

Change-Id: Ieb6647e1e16a8cdeb98652cf0ea0b9a9cd4acc8f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/244267
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: James Williams <jamesw@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Clint Furse <cfurse@instructure.com>
2020-08-05 20:45:05 +00:00
James Williams 3f4a5d1084 drop submission.context_code in favor of submission.course_id
test plan:
* smoke test todo list
 (needs grading and peer review lists in particular)

closes #LA-952

Change-Id: I613ffa2499986700744482c56976bba207cfb971
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/234903
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2020-05-28 23:31:13 +00:00
Keith T. Garner c62b2787f2 rewrite grades presenter course score statistic to be cached
This caches the averages for the teacher's grade as part of the score
statistics generator. This rewrite removes the need for a course-level
cache busting as it was only used

closes TALLY-851
flag=none

test plan:
 - Have a few courses with a few assignments and a few students
 - As a teacher, grade the students
 - As a teacher, go to /grades
 - Ensure values for all the teacher's courses appear
 - Ensure the values are correct (i.e. the average of each courses
   current scores for all active and invited enrollments)

Change-Id: Ieeb5ddb734d8bc21f40196014d062b9ba5935ebd
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/234109
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Reviewed-by: Adrian Packel <apackel@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Keith Garner <kgarner@instructure.com>
2020-04-23 19:37:50 +00:00
Pat Renner e9dd338631 Add publish button to course dashboard
closes UXS-71
flag=unpublished_courses

Test-plan:
- Login as a teacher or account admin on your
local canvas instance
- Ensure you have student/teacher enrollments in
published and unpublished courses
- Visit the user dashboard
- Ensure that no publish button appears for your
teacher enrollments
- Enable the `unpublished_courses` FF
- Refresh the user dashboard
- Confirm that for your teacher enrollments in
unpublished courses that a publish button appears
in the top left of the dashboard card
- Clicking the button should:
  - Prompt you to select a home page if
   the default view for your course is
   the modules page and you have no modules
   in the course
  - Publish the course if the default view
    for your course is modules and you have
    at least one module item
  - Publish the course if your default view
    is not modules
  - This behavior should match the existing
    behavior of clicking the `Publish` button
    within a course
- Only users that have the permission to manage
 course status should be able to see the button
  - Confirm that, for your student enrollments,
  you do not see the course publish button

Change-Id: I7b696284e77dbb1ac9c24bf7d8169633f9bf99ab
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/233090
Reviewed-by: Davis Hyer <dhyer@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Mark McDermott <mmcdermott@instructure.com>
Product-Review: Jody Sailor
2020-04-17 18:50:39 +00:00
Pat Renner 5759fddedc Split user dashboard into published & unpublished courses
closes UXS-68

Test-plan:
- Turn on the `unpublished_courses` FF at the root account level
- Ensure you have published and unpublished courses within your
canvas instance
- Navigate to the user dashboard while logged in as a teacher
- Ensure the course dashboard has two sections, one for unpublished
and published courses
- Published courses should not be draggable into the unpublished
section and vice versa
- Log in as a student
- Ensure the dashboard is back to the unified view

flag=unpublished_courses

Change-Id: I6eee1033d5635550a33a32f7fb5232b896238817
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/231722
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Mark McDermott <mmcdermott@instructure.com>
Reviewed-by: John Corrigan <jcorrigan@instructure.com>
QA-Review: Mark McDermott <mmcdermott@instructure.com>
Product-Review: Jody Sailor
2020-04-16 21:40:05 +00:00
James Williams b85f7553a4 fix some n+1's on user dashboard
don't re-fetch dashboard positions and preload roles

test plan:
* dashboard should load

closes #LA-911

Change-Id: I324b9a31ecb90660348320eb72163ec7358796fa
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/233661
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
2020-04-13 16:46:29 +00:00
August Thornton 2a8b3c95a4 Add QR for Mobile Login link to /profile routes
closes USERS-458
flag=mobile_qr_login

This commit changes how we're adding the link to render the mobile
QR code modal. We're going to be using the profile tab approach
instead of adding it directly to the global profile tray. This
will allow it to exist not only in the global profile tray, but
the user profile, and even the global mobile nav. The QR for mobile
link tab will show up for any active path under '/profile'

Test Plan:
 - Ensure your version of canvas has an up to date
   instructure_misc_plugin
 - create a developer key
 - add https://sso.canvaslms.com/canvas/login as its only redirect URI
 - In a rails console
   - a = Account.default
   - a.settings[:ios_mobile_sso_developer_key_id] = <dev key global id>
   - a.save!
   - a.account_domains.create!(name: 'sso.canvaslms.com')

With the :mobile_qr_login feature flag enabled:

*Web View*
 - Navigate to '/'
 - Open the profile tray and click 'QR for Mobile Login'
 - Ensure the QR code image is generated with the title and expire tag
 - Navigate to '/profile'
 - Click on 'QR for Mobile Login' on the left hand side section tabs
 - Ensure the QR code image is generated with the title and expire tag

*Mobile Web View*
 - Shrink browser horizontally until Canvas web view is rendered
 - Click on the down carrot menu at the top of the global nav
 - Click on 'QR for Mobile Login' option at the bottom
 - Ensure the QR code image is generated with the title and expire tag
 - Click on the hamburger menu in the top left
 - Select the Account drop-down
 - Click on 'QR for Mobile Login'
 - Ensure the QR code image is generated with the title and expire tag

- 'QR for Mobile Login' link tab should only appear for paths
  under '/profile'

With the :mobile_qr_login feature flag disabled:

 - Verify the 'QR for Mobile Login' link tab does not appear
   in any of the above locations previously tested
 - Hitting the '/profile/qr_for_Mobile' path directly renders
   a 404

Change-Id: If69d5f3a7526f7aa84cfae22d0747e5afd2d617b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/232750
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Charley Kline <ckline@instructure.com>
QA-Review: Charley Kline <ckline@instructure.com>
Product-Review: Peyton Craighill <pcraighill@instructure.com>
2020-04-08 21:38:26 +00:00
Gary Mei a1c9022857 remove N+1 from student grades page
Test Plan
- Create a lot of assignments.
- Load the grades page as a student and verify in the server output that
there are not a lot of `SELECT * FROM post_policies...`

Change-Id: Ic606a50c081f1ff3dbc6158cb26edc1d6f85acec
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/232100
Reviewed-by: Adrian Packel <apackel@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Keith Garner <kgarner@instructure.com>
Product-Review: Keith Garner <kgarner@instructure.com>
2020-03-30 16:42:36 +00:00
Ben Nelson b9460b989a add Observee to dashboard card
When an Observer is linked to multiple students, there is no indication
on the dashboard for which course is for which student. Now, the card
will list the names of all students the observer is linked to for that
particular course.

Test Plan:
 - Create a course with a student and linked observer
 - As the observer, the dashboard card should show the students name
 - As a user without a linked student, no observer information should be
     shown on dashboard cards.
 - An observer linked to multiple students in a course should list all
     students, the the list truncating with an ellipsis

closes KNO-366
flag=none

Change-Id: I8a5783ad9fe7d488971a98dd482632558a7357d9
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/231275
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Davis Hyer <dhyer@instructure.com>
QA-Review: Davis Hyer <dhyer@instructure.com>
Product-Review: Davis Hyer <dhyer@instructure.com>
2020-03-27 18:33:13 +00:00
James Williams ff543160ef preload course data on user dashboard
fix n+1's on enrollment term, favorites and nicknames

test plan:
* user dashboard should load nicknames as before
* also favorites (when "Course Favorites From Dashboard"
 feature is enabled)

closes #LA-821

Change-Id: Idf4b71ee54ca2f5b826c86ea4f1d8637532a1d28
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/230099
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
Reviewed-by: Mysti Lilla <mysti@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
2020-03-24 14:00:17 +00:00
Ben Nelson c689c64c5d Fix anonymous peer review links for non-students
This change fixes an issue where students with anonymous peer reviews
assigned were being given non-anonymized links on the Dashboard ToDo
list if they had a non-student enrollment in another course.

Test Plan:
 - Add 2 student enrollments to a published course
 - Enroll one of those students as a teacher in another course
 - Create an assignment in the first course with:
 -- A due date that is nearby
 -- Anonymous peer reviews enabled
 -- Submissions from both students
 -- Peer reviews assigned for both students
 - As the student with a teacher enrollment visit the Dashboard
 - Ensure that the peer review link is one with 'anonymous_submissions'

fixes KNO-293
flag=none

Change-Id: I54f8e325d740ef36a82d13a52a619212c950c388
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/228143
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Ahmad Amireh <ahmad@instructure.com>
Product-Review: Ahmad Amireh <ahmad@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
2020-03-02 15:15:53 +00:00
Adrian Packel 65c7aaadc7 Update submission/grades page similarity icons
flag=new_gradebook_plagiarism_indicator
closes TALLY-246

Test plan:

SETUP
Enable Turnitin for your setup:
  - Set some fake settings for your root account in a console:
    > account = <your root account>
    > account.turnitin_account_id = 1
    > account.turnitin_shared_secret = "fred"
    > account.settings[:enable_turnitin] = true
    > account.save!
  - At this point, account.turnitin_settings should return an array of
    values if the above is set up properly (otherwise it returns nil)
Enable Vericite for your setup:
  - Open the plugin at http://<your canvas>/plugins/vericite
    - Create a configuration for "All Accounts" and un-disable it
    - The rest of the settings don't matter

CREATION
- Have a course using New Gradebook with 5 or more students
- Create several assignments:
  - A Turnitin-based assignment with text entry submisisons
  - A Turnitin-based assignment with attachment submisisons
    - For both the above, enable Turnitin on the assignment edit page
  - A VeriCite-based assignment with text entry submisisons
  - A VeriCite-based assignment with attachment submisisons
    - For both the above, enable VeriCite on the assignment edit page
  - An assignment with text entry submisisons
  - An assignment with attachment submisisons
    - These two assignments will use originality reports, so no need to
      enable either of the above
- For each assignment
  - Have each student submit a text entry or attachment as appropriate
  - Set up plagiarism data in the following states (one per student):
    - "Error" state
    - "Pending" state
    - Scored, 70% similarity
    - Scored, 40% similarity
    - Scored, 10% similarity

ACTUALLY CHECKING THE ICONS

The existing behavior of the icons varies dramatically depending on the
page in question and the state/source of the similarity report. For
instance, on the student grades page, "pending" submissions only show an
icon if the submission uses an originality report (Turnitin and
VeriCite-based submissions do not show an icon). This patchset makes no
attempt to regularize any of the existing logic; instead, for a given
page, you should check that a given submission consistently displays an
icon (or does not) with the New Gradebook Plagiarism Indicator feature
flag enabled or disabled.

With that in mind, check the following pages:
  - Grade summary page
  - Submission details page
    - Beneath the grade input in the upper right for text entry
      submissions
    - In the main submission frame for attachment submissions
  - SpeedGrader submission view (not the right-hand side, just the
    preview frame)

In all cases, in a plagiarism icon is shown (or hidden) with the new
flag OFF, a corresponding new-style icon should be shown (or hidden)
when the flag is ON.

Change-Id: Ic9ada3fe8f1e983429d1baa05e649adb07db396a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/225155
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Adrian Packel <apackel@instructure.com>
Product-Review: Jonathan Fenton <jfenton@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Gary Mei <gmei@instructure.com>
2020-02-10 18:17:52 +00:00
James Williams 5a3c23e058 only show direct share content on course discussions
not on groups discussions

test plan:
* students with discussion management rights in their own
 group should not be able to see the "Send To" menu options
 in their group

flag=direct_share
closes #LA-550

Change-Id: I782efb9b86950c9f8a34429cf14d8ace7fe2b142
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/224554
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
2020-02-06 16:35:11 +00:00
Jonathan Novecio 249cbf9e7c Prevent page error when Dashcard position contains string
fixes #1561

test plan:
- set a dashcard position as a numeric string, like "2" via the api
- reload the dashboard
- it should still work

Change-Id: I92460e600f8221c12f8bc43389cbee4abab5fc3e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/225002
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
Reviewed-by: Johnny Le <jle@instructure.com>
QA-Review: Ben Nelson <bnelson@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2020-01-31 16:51:59 +00:00
Jon Willesen 99c4dfcf91 add direct share features to discussion show page
closes LA-299
flag=direct_share

test plan:
- as a teacher, and only when the direct share feature flag is on, the
  direct share options should appear in the discussions show page kabob
  menu and be functional.
- when students have permission to create and manage discussion topics
  in the course, they should not have the direct share options.

Change-Id: I9de37369b323cbad7009807cfa61c86b629e1a68
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/219991
Reviewed-by: Mysti Lilla <mysti@instructure.com>
Tested-by: Jenkins
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Mysti Lilla <mysti@instructure.com>
Product-Review: Jon Willesen <jonw+gerrit@instructure.com>
2019-12-12 00:12:05 +00:00
James Williams 38e7a93e12 don't load all module progressions for mark done requirement
Change-Id: Icb266a84b82dcfed22fa1badae6e6e6e90d76c53
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/219104
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Tested-by: Jenkins
QA-Review: James Williams <jamesw@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
Reviewed-by: Landon Gilbert-Bland <lbland@instructure.com>
2019-12-03 16:49:24 +00:00
James Williams 61c6a42125 don't allow setting assignment or group positions to nil
also fix the grade summary page if any existing rows
have null positions

test plan:
* use the assignments API to try to update an assignment
 to have a blank/null position
* it should not save the change

closes #LA-139

Change-Id: I9a3e26a41dad328defa763c5f9c8f9697ed5a4c5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/216204
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Tested-by: Jenkins
QA-Review: Jeremy Stanley <jeremy@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
2019-11-15 18:07:50 +00:00
Adrian Packel 8067ee5ce5 Hide grades for resubmitted submissions
Broaden the check in Submission#hide_grade_from_student? to hide grades
for auto-posted submissions when they have been hidden and the student
has submitted a new version. Previously, this would expose the grade to
the student even when the submission was hidden, since resubmitting
moved the submission's workflow_state from "graded" back to "submitted"
and we only checked for the former.

fixes APG-130

Test plan:
- Have a course with New Gradebook and Post Policies enabled
- Have an assignment with online submissions
- As a student:
  - Submit to the assignment
  - The student grades page should *not* show the hidden eye icon for
    the assignment
- As a teacher:
  - Grade the assignment
- As the student:
  - The student grades page should show the grade for the assignment as
    expected
- As the teacher:
  - Hide grades
- As the student:
  - The student grades page should show the hidden eye icon
  - Re-submit to the assignment
  - The student grades page should still show the hidden eye icon
- As the teacher:
  - Re-post grades or re-grade the student
- As the student:
  - The student grades page should now show the updated grade

Change-Id: Idfcd750f85848a5a846229249d8e8d8c74074b0a
Reviewed-on: https://gerrit.instructure.com/211854
Tested-by: Jenkins
Reviewed-by: Gary Mei <gmei@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
QA-Review: Gary Mei <gmei@instructure.com>
Product-Review: Jonathan Fenton <jfenton@instructure.com>
2019-10-16 18:17:48 +00:00
Christine Yan 9fcffe6863 Unfavorite courses from the dashboard
fixes APG-44

Test Plan:
- Enable feature flag.
  - A course with favorites:
    - In Dashboard, to unfavorite a course:
      - DashboardCard popup menu > Move tab > Unfavorite
        - A confirmation modal should appear.
        - Close or [X] should close the modal.
        - Submit should remove the card from dashboard.
  - A course with only one favorite:
    - Unfavorite and confirm removal of final course.
      - An alert should appear with link to All Courses.
  - A course with no favorites:
    - All active courses should appear in dashboard.
    - Under DashboardCard popup menu > Move tab:
      - No unfavorite option should be available.

- Disable feature flag.
  - In Dashboard:
    - DashboardCard popup menu > Move tab
    - No Unfavorite option should be available.

flag=unfavorite_course_from_dashboard

Change-Id: I5f1265dc7ef17134d2a9e68ba04e31b6e778e65f
Reviewed-on: https://gerrit.instructure.com/202443
Tested-by: Jenkins
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Reviewed-by: Adrian Packel <apackel@instructure.com>
QA-Review: Adrian Packel <apackel@instructure.com>
Product-Review: Matthew Goodwin <mattg@instructure.com>
2019-09-27 19:32:12 +00:00
James Williams 099cd4bd05 add host to peer review notification urls
test plan:
* generate a peer review notification
* the link should have a full url with host

closes #CNVS-46754

Change-Id: I6e1f7b028e79adbabbb102f5b644dc91bf76b286
Reviewed-on: https://gerrit.instructure.com/206925
Tested-by: Jenkins
Product-Review: James Williams <jamesw@instructure.com>
Reviewed-by: Gary Mei <gmei@instructure.com>
Reviewed-by: Jeremy Neander <jneander@instructure.com>
QA-Review: Jeremy Neander <jneander@instructure.com>
2019-09-06 13:44:37 +00:00
Gary Mei 338f4a9df1 fix eye icon being used when submission not hidden
refs GRADE-2291

Test Plan
- Create an automatically posting assignment.
- Create a manually posting assignment.
- Load the student grades page.
- The student's score for the automatically posting assignment should
  not have the eye icon; it should show a "-".
- The student's score for the manually posting assignment should have
  the eye icon.
- This behavior should be consistent even when using What-If scores.

Change-Id: I4e7bd35ad0baf5a0a77065f42802c3e5fe3a0d7e
Reviewed-on: https://gerrit.instructure.com/201119
Tested-by: Jenkins
Reviewed-by: Keith Garner <kgarner@instructure.com>
Reviewed-by: Adrian Packel <apackel@instructure.com>
QA-Review: Gary Mei <gmei@instructure.com>
Product-Review: Keith Garner <kgarner@instructure.com>
2019-07-15 14:01:03 +00:00
Adrian Packel bfbe2faac9 Move post policies to setting, tie to NG
Convert post policies from a garden-variety feature flag into a global
setting and remove the old feature flag. Add some helper methods to
handle enabling and disabling, and have everywhere in the code that
references the feature use the new helper methods instead. Also, have
the activation of post policies for a given course depend on whether new
gradebook is active for that course.

closes GRADE-1974

Test plan:

Note that the Post Policies feature flag no longer exists, and instead
there's a setting you'll need to turn on. You can do so in the console
using:
  > PostPolicy.enable_feature!

To disable it:
  > PostPolicy.disabled_feature!

Note that, even when enabled, it should only apply to courses that have
new gradebook turned on.

- With the new setting ENABLED:
  - Courses with new gradebook behave as though post policies is enabled
    - Do a bit of smoke testing to see if stuff like posting/hiding and
      changing assignment posting policies hasn't broken
  - Courses with old gradebook do not
    - For example, calling a mutation like postAssignmentGrades on an OG
      course should return an error indicating the feature isn't enabled
- With the new setting DISABLED:
  - Courses with new gradebook behave as though post policies is
    disabled (e.g., old-style muting is active)
    - Calling a mutation, as described above, should return an error

Change-Id: I5e223d2c4ca4202cce0641f316ecaa505a66298c
Reviewed-on: https://gerrit.instructure.com/196062
Tested-by: Jenkins
Reviewed-by: Keith Garner <kgarner@instructure.com>
Reviewed-by: Gary Mei <gmei@instructure.com>
QA-Review: Derek Bender <djbender@instructure.com>
Product-Review: Keith Garner <kgarner@instructure.com>
2019-06-13 22:09:06 +00:00
Nathan Mills f898af4332 Revert "optimize dashcard course images"
fixes CORE-3034

This reverts commit 626140841b.

Reason for revert: Images are too small, and Inst-FS doesn't currently support specifying the resolution.

Change-Id: I3e7b1180e4e8ada363862887fc851037a9b566f6
Reviewed-on: https://gerrit.instructure.com/196445
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2019-06-13 20:32:44 +00:00
wdransfield adbdbdcd9c Support versioned text entry originality reports
Closes PLAT-4296, PLAT-4559, PLAT-4558

Test Plan:
- Create a text entry submission
- Create an originality report for the submission
- Resubmit the assignment
- Create an originality report with a different
  score for the resubmission
- Verify the gradebook submission details dialog
  shows the correct report for each submission
  version

- Create a text entry submission with an originality report
- Verify the report can be viewed in speedgrader
- Resubmit the assignment and create a new originality report
- Verify speed grader shows the correct originality score for
  each submission
- Verify speed grader correctly displays originality reports
  tied to an attachment
- Verify speed grader correctly dispalys originality reports
  from tii plugin

Change-Id: I433be93083a501cb03cbaa04bb2329c50bbfffca
Reviewed-on: https://gerrit.instructure.com/196697
Tested-by: Jenkins
Product-Review: Jesse Poulos <jpoulos@instructure.com>
QA-Review: Kai Bjorkman <kbjorkman@instructure.com>
Reviewed-by: Marc Phillips <mphillips@instructure.com>
2019-06-12 16:16:46 +00:00
Nathan Mills 626140841b optimize dashcard course images
fixes CORE-2811

test-plan:
* turn on course_card_images feature flag
* upload a large image for a course
* load the course dashboard
* check that the image being returned is a thumbnail

Change-Id: I5866a6839b1125dff944ae6249736b662a075687
Reviewed-on: https://gerrit.instructure.com/194600
Tested-by: Jenkins
Reviewed-by: James Williams <jamesw@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Nathan Mills <nathanm@instructure.com>
2019-05-31 19:02:33 +00:00
Keith T. Garner cedc0090bc remove calls to invalidate a cache that is no longer populated
ff83302bb0 stopped populating the cache with assignment stat
data, however, the code to invalidate the cache remained just burning
time. This removes the function to invalidate the cache and the code
that calls it.

test plan:
 - specs pass
 - Confirm grade calculator and student grades page still function.

Change-Id: I5bcd29359addfd9d46f161c74d2e433417914a4f
Reviewed-on: https://gerrit.instructure.com/193869
Reviewed-by: Adrian Packel <apackel@instructure.com>
Tested-by: Jenkins
QA-Review: Keith Garner <kgarner@instructure.com>
Product-Review: Keith Garner <kgarner@instructure.com>
2019-05-16 22:35:20 +00:00
Adrian Packel 0ef25ad084 Make grade summary page cognizant of unposted
closes GRADE-2148

Test plan:
- Have two courses, one with post policies enabled and one without
- In the enabled course:
  - Set up some assignments in the following states:
    - Posted to all students (A1)
    - Not posted to anyone (A2)
    - Posted to some students but not all (A3)
  - As a student, view the grade summary page
    - A2 and A3 (if not posted for that student) should show the "eye"
      icon in place of the "muted" icon
      - The icon tooltip text should read "Hidden"
- In the disabled course:
  - Set up a muted assignment and a non-muted assignment
  - View the grade summary page as a student
    - Verify that the "muted" icon still appears and is shown based on
      whether the assignment is muted

Change-Id: Id7f0365bb104227618c6ddf1ddd68245da484a93
Reviewed-on: https://gerrit.instructure.com/191711
Tested-by: Jenkins
Reviewed-by: Gary Mei <gmei@instructure.com>
Reviewed-by: Derek Bender <djbender@instructure.com>
QA-Review: James Butters <jbutters@instructure.com>
Product-Review: Jonathan Fenton <jfenton@instructure.com>
2019-05-07 16:47:08 +00:00
Ed Schiebel 069b1ecaf5 A2 edit date-times
fixes: ADMIN-2488

- Enables editing of override date-times
- Because the dates required cross-field validation, changes were
  made to how validation failure messages are handled.

TESTING NOTES:
  - The due/available/until date editor has issues
    - is completely broken in firefox
    - cannot close with ESC in firefox or Edge
    - VO and NVDA get stuck on the edit button after the
      editor opens
    see ADMIN-2568
  - only test the date editing. anything below that are just
    placeholders.

test plan:
  - edit an assignment (you no longer need #edit in the URL)
  - edit due, available, and until dates
  > expect validation to require available < due < until dates
  > expect the error message to appear in the popup when editing
    and to be shown below the 3 dates when no dates are being edited
    (note: you may get a slightly different message)
  - try to navigate away from the page
  > if you have changed anything but not saved, expect a confirmation
    popup
  - click Cancel
  > expect the date values (and anything else changed) to revert to
    their original values and the footer goes away
  - edit stuff
  - click Save
  > expect the Everyone Else dates to be saved, but not override.
    (that's another ticket)
also
  - if the assignment is assigned to everyone in the class
    via sections and/or individual students, there will be no
    "Everyone Else"
  - if the assignment is simply assigned to everyone, there will
    be a single "Everyone" override
  - if the assignment is assigned to some students via sections or
    individually, there will be an "Everyone Else" override

Change-Id: Ib22c747aef7b3541501e0a8fecd6e519147a62b7
Reviewed-on: https://gerrit.instructure.com/184622
Tested-by: Jenkins
Reviewed-by: Carl Kibler <ckibler@instructure.com>
QA-Review: Daniel Sasaki <dsasaki@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
2019-04-17 13:19:29 +00:00
Nick Houle 533b02544f Update Progress Widget UI
Fixes: GOOF-701

Note:
- We are no longer using the `workflow_state` attribute form the
  Attachment model. We are using AttachmentUploadStatus that is
  joined to the Attachment model to retrieve the same results.
  We are now using Redis to track the state of the Attachment
  per Submission which will allow us to give a more accurate view
  of the Attachment state as it is being processed.

Test plan:
- Compile assets for canvas
- Boot up the docker container
- Navigate to a course with the google lti installed
- As a student submit an assignment from google drive
- On the assignment detials, submission details and grade summary
  pages (found on the invision links in the ticket) confirm you
  see the progress widgets and the files correct upload status
- On the submission details page in the grade book confirm you
  can see the icons
- In speedgrader confirm you can see the correct icons on the right
  hand sidebar AND confirm they change accrodignly as you change
  the submission selected from the dropdown if there are multiple
  submissions

Change-Id: I6c1152cb7b450c3c2e3a2ca810233fc222c0967a
Reviewed-on: https://gerrit.instructure.com/180605
Tested-by: Jenkins
Reviewed-by: Joshua Orr <jgorr@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Jesse Poulos <jpoulos@instructure.com>
2019-03-19 18:31:36 +00:00
Adrian Packel 1c3878778a Use anonymous URLs for anonymous peer reviews
fixes GRADE-2058

Test plan:

NB: In the test plan below, "anonymized" refers to links of the form:
  assignments/<assignment ID>/anonymous_submissions/<anon ID>
as opposed to the standard, "non-anonymized" form:
  assignments/<assignment ID>/submissions/<user ID>

Note that the above format is solely for submissions and submission
comments: rubrics behave a bit differently, as described below.

Setup:
- Create the following assignments corresponding to test sections:
  1. An assignment with anonymous peer reviews
  2. An assignment with non-anonymous peer reviews
  3. An assignment with anonymous peer reviews + a rubric
  4. An assignment with non-anonymous peer reviews + a rubric
- For each assignment, assign some peer reviews
- Have the Network panel in your browser's developer tools handy so you
  can see the requests being sent, as described below

Testing (1):
- As a peer-reviewer, open the assignment
  - The 'Assigned Peer Reviews' links should be anonymized
  - Select one to peer-review
    - Check that leaving a comment sends an anonymized request
  - As that student, open your own submission details page
    - This URL should *not* be anonymized
    - Leaving a comment should send a non-anonymized request
- As a grader, open the submission details page for a student
  - The links should *not* be anonymized

Testing (2):
- As a peer-reviewer, open the assignment
  - The peer review links and comment requests should *not* be
    anonymized
- As a grader, open the assignment
  - Same here; links should not be anonymized

Testing (3):
- Take a mighty breath and gird yourself for battle
- As a peer-reviewer, open the assignment
  - Click "Show Rubric" and submit a rubric assessment
  - Check that the parameters of the sent request include:
    - rubric_assessment[anonymous_id]: <anonymous ID>
    - They should *not* include rubric_assessment[user_id]
  - Unlike with submissions, the URL will not change for
    anonymous rubric assessments (since it includes no
    data directly identifying the user)
- As a grader, open the assignment
  - Submit a rubric assessment
  - Check that the parameters of the sent request include:
    - rubric_assessment[user_id] (i.e., same as before)

A note on testing rubrics: as far as I can tell, students can't edit a
peer review rubric after they've submitted it. To work around this in
testing, you can set the workflow_state of the relevant RubricAssessment
to 'assigned' (instead of 'completed') and it'll be editable again.

Testing (4):
- Same as (3), but in both cases we should send
  rubric_assessment[user_id] as before

Finally:
- Do some smoke testing for assignments (3) and (4) in SpeedGrader to
  make sure we haven't broken rubrics there
  - Note that SpeedGrader will not currently attempt to anonymize
    rubric assessments as described above even if anonymous grading
    is enabled, which is fine for now since peer reviewers can't
    access SpeedGrader

Change-Id: I25d9350a6a486fd5ba84b9c784017eac45d24098
Reviewed-on: https://gerrit.instructure.com/184406
Tested-by: Jenkins
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Reviewed-by: Gary Mei <gmei@instructure.com>
QA-Review: Gary Mei <gmei@instructure.com>
Product-Review: Jonathan Fenton <jfenton@instructure.com>
2019-03-18 16:26:11 +00:00
Cody Cutrer 15d13bff49 rip out ruby-saml-mod gem
Change-Id: Id6c71716a3060747b817e7c031487746aa170cc7
Reviewed-on: https://gerrit.instructure.com/177869
Tested-by: Jenkins
QA-Review: Tucker Mcknight <tmcknight@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
2019-02-22 19:20:32 +00:00
Adrian Packel 3b7131f1be Hide grade summary plagiarism info if anon
Do not show similarity scores on the grade summary page for assignments
that are currently anonymizing students.

fixes GRADE-1882

Test plan:
- Have a course with at least one student
- Create an anonymous assignment and a non-anonymous one with submission
  type text entry (to make life easier)
- For a particular student:
  - Upload a text submission for each assignment
  - Create an OriginalityReport for each submission (see below)
- Navigate to the grade summary page for that student/course
  - The non-anonymous assignment, as before, should show the plagiarism
    icon (which resembles some sort of sideways battlement and can be
    clicked on to bring up an originality report) on the right
  - The anonymous assignment should *not* show said icon
- Unmute the anonymous assignment
  - The icon should now appear for that assignment

To create an originality report:

> submission.originality_reports.create!(
    originality_score: 75, # between 1 and 100
    workflow_state: 'scored',
    originality_report_url: 'an-optional-custom-report-url-if-you-want'
  )

Change-Id: I9bfdab73b7c8012c76b29bee1554c9f83b1e4b43
Reviewed-on: https://gerrit.instructure.com/175906
Tested-by: Jenkins
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Reviewed-by: Keith Garner <kgarner@instructure.com>
QA-Review: James Butters <jbutters@instructure.com>
Product-Review: Sidharth Oberoi <soberoi@instructure.com>
2018-12-19 20:01:03 +00:00
Cody Cutrer 5b3e82940d allow plugins to define custom auth providers
add some stubs

refs CORE-2213

Change-Id: I35014fc1ea61a963cfb5d3da24eb7d6b80cc599b
Reviewed-on: https://gerrit.instructure.com/174070
Tested-by: Jenkins
Reviewed-by: James Williams <jamesw@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2018-12-05 19:50:58 +00:00
Nick Houle 6759b56024 Add Progress widget
Fixes: GOOF-443, GOOF-436, GOOF-628

This reverts commit 1f7dccc1a1.

Test plan:
- Compile assets for canvas
- Boot up the docker container
- Navigate to a course with the google lti installed
- As a student submit an assignment from google drive
- On the assignment detials, submission details and grade summary
  pages (found on the invision links in the ticket) confirm you
  see the progress widgets and the files correct upload status
- On the submission details page in the grade book confirm you
  can see the icons
- In speedgrader confirm you can see the images for the correct
  states in the iframe and see the correct icons on the right
  hand sidebar AND confirm they change accrodignly as you change
  the submission selected from the dropdown if there are multiple
  submissions

Change-Id: I5e44483b07d0fde462db93838864437dd631e36d
Reviewed-on: https://gerrit.instructure.com/170883
Reviewed-by: Jeremy Slade <jslade@instructure.com>
Reviewed-by: Michael Guymon <mguymon@instructure.com>
Reviewed-by: Keith Garner <kgarner@instructure.com>
Tested-by: Jenkins
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Jesse Poulos <jpoulos@instructure.com>
2018-11-14 22:49:53 +00:00
Dan Minkevitch 98a4d3c419 Remove Dashcard Reorder Feature Flag
Closes ADMIN-257

Test Plan:
* Ensure that you are able to reorder/drag-n-drop dashcards
  without having to enable any feature flags

Change-Id: Ia09c4ee821eb6a867a9521fdff5ccda5c599bcca
Reviewed-on: https://gerrit.instructure.com/166529
Tested-by: Jenkins
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
Reviewed-by: Carl Kibler <ckibler@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Carl Kibler <ckibler@instructure.com>
2018-11-08 18:18:36 +00:00
Rob Orton 1f7dccc1a1 Revert "Add Progress widget"
This reverts commit de24e65b85.

Change-Id: I0d13c23684dbc2a80aa1ba2212f99107c176f4c2
Reviewed-on: https://gerrit.instructure.com/170014
Tested-by: Jenkins
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2018-10-27 14:41:12 +00:00
James Williams cfe9573ef6 fix todo list presenter for cross-shard admins
need to fallback to normal permissions when
precalculation doesn't work

closes #ADMIN-1567

Change-Id: Ica180ec1606d76c78fa1494501df7672324b3387
Reviewed-on: https://gerrit.instructure.com/169555
Tested-by: Jenkins
Reviewed-by: Mysti Sadler <mysti@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
2018-10-24 16:53:14 +00:00
Ed Schiebel 8819c50832 Fix to_do_list_presenter when there are peer reviews
fixes ADMIN-1564

test plan:
  - have a course with a peer reviewed assignment due in the near
    future.
  - have the reviewee submit the assignment
  - load the course page as the reviewer
  > expect the page to load w/o rails throwing an exception
  > expect the peer review item to appear in the to do sidebar

Change-Id: I0704c6da01949e94396aa967db5e0e348b109e22
Reviewed-on: https://gerrit.instructure.com/169254
Tested-by: Jenkins
Reviewed-by: Carl Kibler <ckibler@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
Product-Review: KC Naegle <knaegle@instructure.com>
2018-10-23 18:52:41 +00:00
Ryan Shaw 957ffeaa85 restore "speed up dashcards by only loading tabs shown" & fix bug
Fixes: CORE-1964

This reverts commit 72d558f095

this restores the commit (aka, reverts that ^ revert) that was causing
us bugs on caturday. the root cause of the bug was that
["active_record_types", [], self].cache_key
and
["active_record_types", nil, self].cache_key
return the same string.

how to replay the buggy scenerio:
(as a student, in a course with annnouncements):
* right after having "touched" the course (so there's nothing cached),
* have one person go to  /courses/:course_id/assignments/syllabus
* in the controller action for that, it will do:
  `return unless tab_enabled?(@context.class::TAB_SYLLABUS)`
  that will call Course::uncached_tabs_available(only_check: @context.class::TAB_SYLLABUS)
  which would have called @course.active_record_types(only_check: [])
  (because @context.class::TAB_SYLLABUS is not one of the `tabs_that_can_be_marked_hidden_unused`)
  which woud have written `{}` to redis at ['active_record_types', [], self].cache_key
* now, as a different student, go to /courses/:course_id/annnouncements
  it will call `tab_enabled?(@context.class::TAB_ANNOUNCEMENTS)`
  that will call Course::uncached_tabs_available(only_check: @context.class::TAB_ANNOUNCEMENTS)
  which will call @course.active_record_types(only_check: [:announcements])
  it will do a cache read for ['active_record_types', [:announcements], self].cache_key
  since it it a fresh cach, that will not be found
  then it would have done a cache read for the "everything" cache at
  ['active_record_types', nil, self].cache_key
  THAT WOULD HAVE RETURNED THE CACHED `{}` SINCE `nil.cache_key` and `[].cache_key` ARE THE SAME!
* the user would be told the announcement page is not enabled for that course

the fix is to explicitly not allow Context::active_record_types to ever 
be called with `only_check: []`

and for good measure, we don't allow the implicit conversion of 
nil.cache_key to "" and instead use "everything" for the cache cache_key

I added specs to spefically catch this bug so that it doesn't happen again.

To see the difference, compare the latest patchset of this commit against
patchset 1. patchset 1 is the original version of this code without this
fix.

Change-Id: I513104b90dd94227a04c151ee02a22f4a4ac2832
Reviewed-on: https://gerrit.instructure.com/167400
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2018-10-08 22:33:23 +00:00
Ryan Shaw 72d558f095 [ci no-cached-dist] Revert "speed up dashcards by only loading tabs shown"
this reverts 3 commits:

Revert "spec: add spec to catch active_record_types bug"
This reverts commit 435332967a.

Revert "Fix spurious assignment load error"
This reverts commit b109db95c5.

and also reverts the original commit:
commit ebe40d8cb1.

Change-Id: Ia396d9f94e36201888a5118c882e26e512565f9b
Reviewed-on: https://gerrit.instructure.com/167349
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Gentry Beckmann <gbeckmann@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
Tested-by: Ryan Shaw <ryan@instructure.com>
2018-10-06 20:54:41 +00:00