Fixes COMMS-1139
Test Plan:
- Send a new conversation to your main user
- Using https://lti-tool-provider-example.herokuapp.com/xml_builder,
create a new collaboration. Set the collaboration section to
content_item_selection_request
- Go to http://localhost:3000/api/v1/users/self/activity_stream and
verify that the message for the collaboration object is the collab's
description.
- Also verify that the title of the conversation object is the subject
Change-Id: If1fecd634ecf3e3af89055b5e0f958c83f419d27
Reviewed-on: https://gerrit.instructure.com/155673
Tested-by: Jenkins
Reviewed-by: Landon Gilbert-Bland <lbland@instructure.com>
QA-Review: Steven Burnett <sburnett@instructure.com>
Product-Review: Sara Chadwick <schadwick@instructure.com>
Some production installations have a beta or test environment that is
refreshed with data from production, and is used as a place to test
integrations or new features. In that case, you may want to create
a developer key that only works against this test instance, which has
traditionally meant making the following tradeoff:
- Create the key in the test instance directly, which means it will be
removed the next time the data is refreshed
- Create the key in production, which means the key works against the
production instance as well
This new functionality allows the best of both worlds: create the key in
production for persistance, but only allow it to function against a test
cluster.
To enable test cluster functionality, you need a plugin that overrides
`ApplicationController.test_cluster?` to return appropriately for the
environment.
To see the functionality, you need to set:
`Setting.set("dev_key_test_cluster_checks_enabled", true)`
closes PLAT-3392
[ci no-db-snapshot]
test plan:
- First ensure that all existing developer key functionality works and
no new functionality appears without any action taken
- Then set Setting.set("dev_key_test_cluster_checks_enabled", true), you
should see the new option available in the new dev key UI
- Create a key with and without the new option checked. Access tokens
from the key without it check should still work normally. Tokens from
the key with it checked should not work
- Now manually override `ApplicationController.test_cluster?` to be
true.
- Tokens from both keys should now work
Change-Id: I5bbb46782d19c26a7b703834aaa507b0cb10039a
Reviewed-on: https://gerrit.instructure.com/153035
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Product-Review: Karl Lloyd <karl@instructure.com>
closes ADMIN-1155
refs ADMIN-1031
Test plan
- Set up some discussion topics
- Load /api/v1/planner/items for those topics
and ensure you don't have to load
discussion_topic_participants for each one
Change-Id: I92aea7516bea0ec2b1e7406470c6d0f545b0123f
Reviewed-on: https://gerrit.instructure.com/154274
Tested-by: Jenkins
Reviewed-by: Carl Kibler <ckibler@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Mysti Sadler <mysti@instructure.com>
Student homework submissions from the Google Drive LTI are
failing when the Delay Job queue is backed up. The browser sends two
requests for the submission. The first request clones the url and the
second submits the file for the assignment. If the first request takes a
long time, the student will close their browser, prevent the second
request from happening and stopping the submission.
This increases the priority of url submissions to high, so they will be
priortized by the Delayed Job workers.
refs: GOOF-434
Test Plan: Submit an online homework submission from Google or Office.
The Delayed Job record created will have a priority of zero (lower is
better).
Change-Id: I72d583b22c83a8e058497ba6d965fd992bf05ffd
Reviewed-on: https://gerrit.instructure.com/153745
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
QA-Review: Mark McDermott <mmcdermott@instructure.com>
Product-Review: Jesse Poulos <jpoulos@instructure.com>
Refs MBL-10742
Test Plan:
- Create a threshold for each type for an observer-student
pairing
- Generate an alert for each threshold type
- The title should match the ticket
- Threshold Types:
- course_grade_low
- course_grade_high
- assignment_grade_low
- assignment_grade_high
- assignment_missing
- course_announcement
- institution_announcement
- For assignment grade thresholds have multiple
assignments that have different display grade as
types and ensure it puts the correct grade in the
alert title
Change-Id: Ia971e707c8da73b09066c5f23a742fe60a64be8f
Reviewed-on: https://gerrit.instructure.com/155341
Tested-by: Jenkins
Reviewed-by: Layne Moseley <lmoseley@instructure.com>
QA-Review: Layne Moseley <lmoseley@instructure.com>
Product-Review: Matthew Sessions <msessions@instructure.com>
* Adds html_url for assignment_missing alerts
* Always includes action_date field
Refs MBL-10730
Test plan:
* Create an assignment_missing alert for an observer
* View alerts via api `/api/v1/users/self/observer_alerts/:userID`
* Verify that action_date field is present
* Verify that html_url field is present
Change-Id: I1276d6467b392ffaa9f919440ec7635ebd925895
Reviewed-on: https://gerrit.instructure.com/155092
Reviewed-by: Matthew Sessions <msessions@instructure.com>
Product-Review: Matthew Sessions <msessions@instructure.com>
QA-Review: Matthew Sessions <msessions@instructure.com>
Tested-by: Jenkins
test plan:
- enable planner
- have assignments and graded discussions
- ensure these link to the assignment or discussion
on a student's planner
- ensure after the student submits and/or the teacher
grades the item, the planner links to the submission
page where the student can see feedback
fixes ADMIN-179
Change-Id: I4bbe2f11c8c95899b6fda6d0935dc9bc48a66d39
Reviewed-on: https://gerrit.instructure.com/154256
Tested-by: Jenkins
Reviewed-by: Dan Minkevitch <dan@instructure.com>
QA-Review: Ed Schiebel <eschiebel@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
This adds a calculate_grades parameter to the assignment creation api
that defaults to true. When set to false, after an assignment is
created the DueDateCacher will run but not force a grade calculation
for the course. The gradebook upload process is the first user of this
parameter to avoid a race condition between the creation of the
assignment during a gradebook upload and the subsequent grade
calculation after the submissions are updated with scores.
fixes GRADE-1229
test plan:
- Create a course with some assignments and some students
- Export the gradebook
- In the CSV add a new assignment and grade the students for that new
assignment
- Import the gradebook
- After import is completed check the canvas logs and confirm that
the grade calculator doesn't run after the call to the assignment
api but does run after the call to submission bulk update
Change-Id: Ibf52a119e3ad34b95786b6e171f585431111feb8
Reviewed-on: https://gerrit.instructure.com/154077
Tested-by: Jenkins
Reviewed-by: Gary Mei <gmei@instructure.com>
Reviewed-by: Jeremy Neander <jneander@instructure.com>
QA-Review: James Butters <jbutters@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
refs ADMIN-1031
closes ADMIN-1136
Test plan
- Ensure /api/v1/planner/items call runs
- It shouldn't have to load individual
SQL queries for content tags for assignments
or for assignment overrides or to get
assignments from quiz/wiki/discussions
Change-Id: I7720944df118f158b444330842bdb2c2780f053b
Reviewed-on: https://gerrit.instructure.com/153422
Tested-by: Jenkins
Reviewed-by: Dan Minkevitch <dan@instructure.com>
QA-Review: Dan Minkevitch <dan@instructure.com>
Product-Review: Mysti Sadler <mysti@instructure.com>
refs GRADE-1002
test plan:
A. Setup
1. Set up a course with a moderated assignment
2. Log in as various instructors and grade some students
3. Log in as the final grader
4. Visit SpeedGrader and grade some students
B. Verify without Grader Anonymity
1. Ensure the final grader can see grader names
2. Visit the Moderation Page
3. Verify the final grader's grades are visible
* They appear in the Select menu only
* e.g. "9.8 (Custom)"
4. Verify the final grader's grades can be selected
C. Verify with Grader Anonymity
1. Ensure the final grader cannot see grader names
2. Visit the Moderation Page
3. Verify the final grader's grades are visible
4. Verify the final grader's grades can be selected
D. Verify as an Admin (w & w/o Grader Anonymity)
1. Visit the Moderation Page
2. Verify the final grader's grades are visible
3. Verify the final grader's grades can be selected
Change-Id: I7ded82f9663be9bea74598c3fa4d71146ffb25cd
Reviewed-on: https://gerrit.instructure.com/153784
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
Tested-by: Jenkins
Product-Review: Sidharth Oberoi <soberoi@instructure.com>
closes QO-374
test plan:
- in Canvas, create a course and a quiz
- in browser, request /api/v1/courses/<course_id>/quizzes/<quiz_id>
- check response, question_types should be included
Change-Id: Ib49767203a882497c8c7e1d2c330c542a9405403
Reviewed-on: https://gerrit.instructure.com/153933
Tested-by: Jenkins
Reviewed-by: Omar Khan <okhan@instructure.com>
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Product-Review: Gentry Beckmann <gbeckmann@instructure.com>
Remove the old Anonymous Grading course flag; update checks for it to
instead look at whether a given assignment (or quiz) is anonymous.
closes GRADE-957
Test plan:
Course flag:
- Check that the relevant course flags are now 'Anonymous Grading (OLD)'
(which should not be able to be enabled) and 'Anonymous Grading' (the
"new" setting previously called Anonymous Marking)
- The old flag should be hidden for any course or account that does not
have a value in the database for it already
Assignments:
- Create an anonymous assignment and a non-anonymous assignment
- Test the assignments:
- SpeedGrader: student names should be visible for the non-anonymous
assignment only
- Log in as a student and upload submissions for the assignments
created above; as a teacher, download them and make sure that the
anonymous assignment does not include the students' names in
its filenames
Anonymous surveys:
- Create two quizzes with a type of Graded (or Ungraded) Survey, and
enable anonymous submissions for one of them but not the other
- Log in as one or more students and answer both surveys
- As a teacher, open the "Moderate This Survey" link for each survey:
- Student names should be shown for the non-anonymous survey but
replaced by "Student 1" and so forth for the anonymous survey
- The history page (accessible by clicking the name of a student who
has filled out the survey) should show the student's name for the
non-anonymous survey but only "Student" for the anonymous survey
Change-Id: Iaa0bc4e40b938056b8e9dfd6d13aff7e6b2ee7bd
Reviewed-on: https://gerrit.instructure.com/152985
Tested-by: Jenkins
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
refs ADMIN-1031
Test plan
- Set up an assignment, a graded discussion topic and a
graded wiki page (that requires conditional release...
so maybe we'll want to get them involved for qa)
- Run the API call and ensure you don't get any SQL
calls for `SQL RubricAssociation Load` from the
api/v1/planner/items call (in the server logs)
- Probably also try a graded quiz, but I don't think
it loaded a rubric association for that
Change-Id: I67c71526eb02d7d40afc444e6b985ee388acc85a
Reviewed-on: https://gerrit.instructure.com/152529
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Tested-by: Jenkins
Product-Review: Mysti Sadler <mysti@instructure.com>
Adds the "Graders can view each other's comments", "Final Grader can
view other grader names", and "Graders cannot view each other's names"
checkboxes.
closes GRADE-1206
Test Plan:
Note: Any interactions between checkboxes and/or conditions that cause
checkboxes to be hidden/revealed/disabled/enabled will be tackled in
follow-up commits to this one. This commit is just the bare-bones
addition of three new checkboxes, and the ability to persist those
checkboxes' settings.
1. In a course, enable Anonymous Marking and Moderated Grading.
2. Create or edit an assignment, and verify the following two
new checkboxes are available in the "Moderated Grading" section:
"Graders can view each other's comments" and "Final grader can view
other grader names". For new assignments, both of these checkboxes
should default to being checked.
3. In the "Anonymous Grading" section, verify there is a checkbox for
"Graders cannot view each other's names". The "Graders cannot view
each other's names" checkbox should default to being unchecked.
4. Verify the checked settings of the checkboxes persist after saving
the assignment. For the "Graders cannot view each other's names"
checkbox state to be persisted as checked, the "Graders can view
each other's comments" checkbox must also be checked.
Cosmetic Updates:
- The bold "Grade Anonymously" text has been removed from the "Graders
cannot see student names" checkbox.
- Grammar update to the "Number of Graders" validation message when
the input value exceeds the maximum graders, and the maximum grader
count is 1. Changed from "There are currently 1 available graders" to
"There is currently 1 available grader".
Change-Id: I143be77ef3f594acbc67428f20fe986138e56e87
Reviewed-on: https://gerrit.instructure.com/152729
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Tested-by: Jenkins
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
QA-Review: James Butters <jbutters@instructure.com>
Product-Review: Sidharth Oberoi <soberoi@instructure.com>
closes OUT-2300
test plan (dev-qa):
- create a new outcome
- create a new rubric and align the outcome
- align the rubric to a new assignment, ensure you
choose the box to remove points from rubric
- assess a student
- go to the LMGB
- the outcome_rollups response should include a
hide_points field in the json
- hide_points should be 'true' on the rollup for the new outcome
with the newly created outcome
- attach the newly create outcome to a different assignment, one
that doesn't have its points hidden on the rubric association
- assess the student
- return to lmgb
- hide_points should be 'false' for the rollup on the new outcome
Change-Id: I0f9accb4ff0cc76f40c08ce08e21091e35df6af8
Reviewed-on: https://gerrit.instructure.com/153547
Tested-by: Jenkins
Reviewed-by: Michael Brewer-Davis <mbd@instructure.com>
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
Product-Review: Michael Brewer-Davis <mbd@instructure.com>
QA-Review: Michael Brewer-Davis <mbd@instructure.com>
fixes GRADE-976
test plan:
* Make sure the AMM flag is off
* All AMM features should be visible and work
* The Anonymous Marking and Moderated feature flags should be visible
* Toggling the AMM feature flag should do nothing
Change-Id: Ie0c52c23748389c6f5df5b85e8580bdf474c0a52
Reviewed-on: https://gerrit.instructure.com/152067
Reviewed-by: Adrian Packel <apackel@instructure.com>
Tested-by: Jenkins
Reviewed-by: Derek Bender <djbender@instructure.com>
QA-Review: James Butters <jbutters@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
refs ADMIN-1031
Test plan
- Set up some assignments in varying
states of submission/grade/whatever
- Load /api/v1/planner/items for a user
and ensure it doesn't make all 6 of the
submission queries for every assignment
Change-Id: If22c3a3d74849c4bfdab401ce2da2caa07cda527
Reviewed-on: https://gerrit.instructure.com/152710
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins
QA-Review: Luke Kingsley <lkingsley@instructure.com>
Product-Review: Mysti Sadler <mysti@instructure.com>
Fixes COMMS-1159 COMMS-1129
Test Plan:
* On the edit permission tray:
- Notice that no notifications are displayed onBlur when you didn't
change the role name
- Notice that no notifications are displayed onBlur when you have a
totally empty role name
- If you change the role name to a new name that is not currently
being used it pops up with a success message on blur
- If you change the role name to a new name that is currently
being used it pops up with an error message on blur
- It no longer displayes the `changeBaseRole` dropdown menu
* On the permission tray:
- Notice that the `Changed By` field is gone, as we are not storing
that information in the database
- Notice that the `Assigned To` field is also gone.
- If you change the role name, insure it will update the last
changed date in the permission tray.
- (once Sara's commit is in), notice that when you change a
permission (role_override), the last changed date of the
permission will also be updated
- Make sure the last changed date is properly localized
* Make sure the permissions tray works for account roles and course
roles (using the tab switchet at the top of the page)
Change-Id: I9102d33b7a684c1a3b7f5a6fe4a67ecf678af8b0
Reviewed-on: https://gerrit.instructure.com/153013
Reviewed-by: Steven Burnett <sburnett@instructure.com>
Tested-by: Jenkins
QA-Review: Venk Natarajan <vnatarajan@instructure.com>
Product-Review: Landon Gilbert-Bland <lbland@instructure.com>
refs ADMIN-1031
Test plan
- Set up a couple of planner items
and make sure there are some overrides
to check for (mark as complete or dismiss
opportunities)
- Run the api/v1/planner/items call and ensure
you don't get a planner_override sql call for
every item
Change-Id: I8b4f468e3cb6177ced2aee3abec810a75d9aec9e
Reviewed-on: https://gerrit.instructure.com/152697
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins
QA-Review: Luke Kingsley <lkingsley@instructure.com>
Product-Review: Mysti Sadler <mysti@instructure.com>
- skinnied down the feedback in the api to just the comment we want
- updated planner to show the feedback if it exists
closes ADMIN-1022
test plan
- create an assignment, have the student submit an entry, have the
teacher grade it and include a comment that's long enough that it
gets truncated in the planner
> expect the comment to show up with the item in the planner
> expect the comment to be truncated with an ellipsis in desktop
and tablet view
Change-Id: Ie540c6b11a95422fae3723f9a78e6bf68dbf10e9
Reviewed-on: https://gerrit.instructure.com/151377
Tested-by: Jenkins
Reviewed-by: Jon Willesen <jonw+gerrit@instructure.com>
QA-Review: Luke Kingsley <lkingsley@instructure.com>
Product-Review: Jon Willesen <jonw+gerrit@instructure.com>
fixes RECNVS-471
fixes RECNVS-479
allows API requests from access tokens issued by whitelisted developer
keys to receive additional claims in the JWTs of inst-fs links in the
response. these additional claims are a workaround to cause inst-fs to
accept the link as if authenticated despite the client not having an
inst-fs session or presenting inst-fs with the access token.
updated API clients will need to present their API token when accessing
inst-fs links. once the clients associated with a developer key are
updated, the developer key will be removed from the whitelist. this is
only a temporary workaround.
test-plan:
- have inst-fs configured and enabled with your canvas instance
- generate a new access token for your user
- in the rails console of your canvas instance, set:
Setting.set('instfs.whitelist_all_developer_keys', 'true')
- using something without a session, like postman, POST to
/api/v1/courses/:course_id/files with a valid preflight and
authenticated via the access token (e.g. using the `Authorization`
header)
- the `upload_url` in the response should be an inst-fs link
- the `upload_url` should include a `token` query parameter with a JWT
as the value
- decoding the JWT from the `upload_url`, it should include
`legacy_api_developer_key_id` and a `legacy_api_root_account_id`
claims
- in the rails console of your canvas instance:
Setting.remove('instfs.whitelist_all_developer_keys')
- repeat the upload preflight attempt from above
- this time, the JWT should not include the `legacy_api_*` claims
Change-Id: I911d18c031d9ba90de808e260e4644beaef69ff9
Reviewed-on: https://gerrit.instructure.com/151690
Tested-by: Jenkins
Reviewed-by: Jonathan Featherstone <jfeatherstone@instructure.com>
QA-Review: Collin Parrish <cparrish@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
closes MBL-10561
test plan:
- go through all the observer_alerts & observer_alert_thresholds
endpoints and use them with a course observer
Change-Id: I64b14746969727b69b047139fdceecb89f4c123a
Reviewed-on: https://gerrit.instructure.com/151107
Reviewed-by: Matthew Sessions <msessions@instructure.com>
Tested-by: Jenkins
QA-Review: Taylor Wilson <twilson@instructure.com>
Product-Review: Taylor Wilson <twilson@instructure.com>
closes OUT-2235
Test plan:
- Enable non-scoring rubrics
- Create a question bank aligned to an outcome
- Create a quiz using questions from the question
bank
- As a student, take the quiz
- Go to the student lmgb
- Verify that the outcome result for the quiz
shows the quizzes icon, and shows the name
of the quiz rather than the name of the quiz bank
Change-Id: I413bb936c182485dbcc3d01c34fbb5f292856548
Reviewed-on: https://gerrit.instructure.com/150948
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
Tested-by: Jenkins
QA-Review: Dariusz Dzien <ddzien@instructure.com>
Product-Review: Sidharth Oberoi <soberoi@instructure.com>
fixes GRADE-898 GRADE-1023
test plan:
1. create a course with 3 teachers and 1 student
2. create an anonymously graded and moderated assignment with 2 graders
3. as a teacher, give the student a provisional grade
4. as another teacher, give the student another provisional grade
5. as the final grader, visit the grade moderation page
6. inspect the API responses, there should be no identifiable ids or
names in the responses
7. select a final grade
8. make sure the API request and response when selecting the final grade
is also anonymous
Change-Id: I083673e29d4b49c1d97cedad46571bccc622a8a2
Reviewed-on: https://gerrit.instructure.com/151134
Tested-by: Jenkins
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
closes OUT-2236
Test plan:
- create two assignments with rubrics
- for one of the rubrics, set "Don't post Outcomes results to Learning
Mastery Gradebook" to true. For the other, leave unchecked.
- assess a student on each assignment using the rubric
- visit the student learning mastery gradebook
- verify that the assignment with "Don't post" selected is NOT
included in the gradebook
- verify that the assignment without "Don't post" selected
is included
Change-Id: I2ea3a9fb170e2f8ef626d0166b6dfabaeb6bc38f
Reviewed-on: https://gerrit.instructure.com/150977
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
Reviewed-by: Frank Murphy <fmurphy@instructure.com>
Tested-by: Jenkins
QA-Review: Andrew Porter <hporter-c@instructure.com>
Product-Review: Sidharth Oberoi <soberoi@instructure.com>
refs QUIZ-4415
test plan:
- cr
- Quiz.Next CC import is not ready for test with only this patch
- regression on `Import Content`, to make sure:
1) `Qti .zip file` import works
2) `Common Catridge 1.x Package` import works
Change-Id: Iba2818a2b864020b6c59ef55e02f122b996e4c40
Reviewed-on: https://gerrit.instructure.com/149978
Reviewed-by: Andrew Butterfield <abutterfield@instructure.com>
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: David Tan <dtan@instructure.com>
Product-Review: Han Yan <hyan@instructure.com>
refs GRADE-964
refs GRADE-877
refs GRADE-1024
test plan:
A. Setup
1. Enable Anonymous Moderated Marking
2. Select or create a course
a. with Anonymous Marking enabled
b. with three instructors (A, B, and C)
c. with at least one student
3. Select or create an assignment
a. with Moderated Grading
b. with instructor A as the final grader
4. Select or create an assignment
a. with Moderated Grading
b. with Anonymous Grading
c. with instructor A as the final grader
5. As each instructor (B and C)
a. give at least one student a provisional grade
on each assignment (using SpeedGrader)
* This SHOULD create a new moderation_grader for each user
and for each assignment
B. Verify the Non-Anonymous Assignment
1. Log in or act as instructor A
2. Visit the moderation page for the assignment
3. Verify the assignment title is visible on the page
4. Open the browser console
5. View the contents of ENV.GRADERS
6. Verify for both instructors B and C:
a. user_id is present
b. anonymous_id is NOT present
c. grader_name is present
B. Verify the Anonymous Assignment
1. Log in or act as instructor A
2. Visit the moderation page for the assignment
3. Verify the assignment title is visible on the page
4. Open the browser console
5. View the contents of ENV.GRADERS
6. Verify for both instructors B and C:
a. anonymous_id is present
b. user_id is present
c. grader_name is NOT present
Change-Id: Id69f926972c1daaf8d7db5257f66b92e30a914fa
Reviewed-on: https://gerrit.instructure.com/151149
Reviewed-by: Derek Bender <djbender@instructure.com>
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
Tested-by: Jenkins
QA-Review: Indira Pai <ipai@instructure.com>
Product-Review: Sidharth Oberoi <soberoi@instructure.com>
When loading or selecting a student in SpeedGrader, an ajax call is made
to obtain the provisional grade status for that student. This provides a
way to perform this request anonymously.
closes GRADE-1128
test plan
- given an anonymously graded and moderated assignment
- given some students assigned to said assignment
- when visiting speed grader
- then the page loads provisional grades endpoint which can be viewed in
the dev tools on the network tab. The URL looks like:
/api/v1/courses/1/assignments/1/anonymous_provisional_grades/status
Change-Id: Ib3d3a7b58fc8fa044d240dee0c1bef08b80384d0
Reviewed-on: https://gerrit.instructure.com/151607
Tested-by: Jenkins
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
QA-Review: Indira Pai <ipai@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
closes OUT-1855, OUT-2214
test plan:
- create an access token, which will be used below
to perform HTTP requests, see:
https://canvas.instructure.com/doc/api/file.oauth.html#using-access-tokens
- using a tool like Postman, set an outcome proficiency
for an account. perform a POST request at the endpoint
`http://canvas.docker/api/v1/accounts/1/outcome_proficiency`
with a `Content-Type` header value `application/json`
and body with content like:
{
"ratings": [
{
"description": "great work",
"points": 10,
"mastery": true,
"color": "00ff00"
}
]
}
- retrieve the saved proficiency by performing GET request
at the endpoint
`http://canvas.docker/api/v1/accounts/1/outcome_proficiency`.
it should match the proficiency created above.
- update the proficiency by doing another POST request, but
with multiple ratings, like:
{
"ratings": [
{
"description": "great work",
"points": 10,
"mastery": true,
"color": "00ff00"
},
{
"description": "bad work",
"points": 0,
"mastery": false,
"color": "ff0000"
}
]
}
- do a GET request to confirm the above changes were saved
- do several other POST requests with multiple ratings
that contain either multiple mastery ratings or none.
these requests should fail with a 422 status code
and an error message that contains `Only one rating can have mastery`.
Change-Id: Ib301c0394a99dbf55d7d85ceef28a95075faaec2
Reviewed-on: https://gerrit.instructure.com/150095
Reviewed-by: Frank Murphy <fmurphy@instructure.com>
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
Reviewed-by: Matt Berns <mberns@instructure.com>
QA-Review: Andrew Porter <hporter-c@instructure.com>
Product-Review: Michael Brewer-Davis <mbd@instructure.com>
Adds the `context_codes` param to the planner/items
endpoint to allow filtering for contexts like the
existing calendar endpoint allows.
This is primarily for laying the foundation
so that the planner items endpoint
can be used for both the planner and the calendar
since they share the same data.
closes ADMIN-930
Test Plan:
* Ensure planner APIs still return things correctly
without context codes
* Send various context_codes to the API and ensure
only items from that/those context_codes are returned
Change-Id: I3747ef82c382ca56b80ea97e740b70072179057b
Reviewed-on: https://gerrit.instructure.com/147880
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Luke Kingsley <lkingsley@instructure.com>
Product-Review: Mysti Sadler <mysti@instructure.com>
Can now set whether a developer key require scopes or not.
Legacy behavior of scopes is to allow dev keys to have
access to all endpoints, this allows for the continuing
behavior.
Fixes: PLAT-3345
Test Plan:
- Go to a create/upate a key
- Notice the require scopes checkbox
- Click the require scopes checkbox so that it is
toggled off
- Scopes ui should be removed and saving the key
persists the state
- attempt to access an endpoint using the changed
endpoint that had scopes, it should be able to act
like a legacy key
- go back to the key management modal and flip the
require scopes back to on.
- attempt to access an endpoint that does not have a
scope for the dev key, should fail
- for a legacy key, the scopes ui should be off when
first editing.
Change-Id: I0a53ff8a44b80081b518d780a8288f4cc4c36027
Reviewed-on: https://gerrit.instructure.com/150216
QA-Review: August Thornton <august@instructure.com>
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
Product-Review: Jesse Poulos <jpoulos@instructure.com>
Tested-by: Jenkins
when this permission was created, we verified that it prevented
students from getting at other users' emails, but we failed to
anticipate taking it away from teachers and account admins
test plan:
- create custom teacher and account admin roles that deny
the "See other users' primary email address" permission
- create a student with an email address (and to avoid confusion,
ensure the student's name and login are not the email address)
- ensure these users don't see the student's email in the following
places:
- /users/X (accessible only to the account admin)
- /courses/X/users/Y (test with "Enable Profiles" on and off
in account settings)
- /api/v1/users/X/profile
- other places that you might think of
fixes ADMIN-1049
Change-Id: Ie2a482df337f7e4baed1b71e14456f199aa8b595
Reviewed-on: https://gerrit.instructure.com/150293
Reviewed-by: Mysti Sadler <mysti@instructure.com>
QA-Review: Mysti Sadler <mysti@instructure.com>
Tested-by: Jenkins
Product-Review: Jeremy Stanley <jeremy@instructure.com>
closes MBL-10123
test plan:
- with a user_observation_link and an observer_alert_threshold
make observer_alerts in the rails console
- hit the endpoint
/users/:user_id/observer_alerts/:student_id
- it should return all alerts for that observer/student
Change-Id: I01fe71e3414d63cedc0e02eaed4e0d8822f80fcf
Reviewed-on: https://gerrit.instructure.com/150143
Reviewed-by: Matthew Sessions <msessions@instructure.com>
Tested-by: Jenkins
QA-Review: Taylor Wilson <twilson@instructure.com>
Product-Review: Cameron Sutter <csutter@instructure.com>
Fixes OUT-2215
Test Plan
- Enable the non-scoring rubrics feature flag (note that due to caching
you may need to wait for the feature to be truly enabled)
- Create a rubric with several criterion (outcomes and non-outcomes)
- Verify that the component looks correct in the LMGB assignments page
for a given student:
- Verify the Outcome icon is present next to criterion that are used
for outcomes.
- Verify the threshold for mastery points is displayed on outcomes
criterion.
- Create an assignment with a points-scale rubric. Assign points.
Verify that the right columns are selected when graded.
- Add comments to the points-scale rubric assignment. Verify they are
displayed in the criterion heading.
- Create a comment with newlines. Verify the line breaks are preserved
when displaying the comment.
- Create an outcome with a very long description. Use it in a rubric.
Verify the "show long description" button is there and works
properly.
- Create an assignment with free-form comments. Grade an assignment,
entering some free form comments. Verify the comments are presented
instead of the points scale when displayed in LMGB.
- Align to an assignment with total points hidden. Verify the total
points are not present.
Change-Id: I305649237bdfaacc5001b75de3965bc12ff81298
Reviewed-on: https://gerrit.instructure.com/149468
Reviewed-by: Matt Berns <mberns@instructure.com>
QA-Review: Dariusz Dzien <ddzien@instructure.com>
Tested-by: Jenkins
Product-Review: Michael Brewer-Davis <mbd@instructure.com>
The Quiz#question_types method is expensive for large quizzes. It's
currently called every time a quiz is serialized, even though we only
need the question_types attribute in API responses (I believe it's used
by the mobile app).
This commit moves the question_types attribute to a separate
QuizApiSerializer that is only used in API responses.
Fixes QO-356
Fixes QO-357
Test plan:
- Create several huge quizzes (tens of thousands of questions across
multiple question groups)
- Open the quizzes list page
- Check that the page loads reasonably quickly
Change-Id: Id18a32fc47f20cd24cb178e972f49e8984bfe53e
Reviewed-on: https://gerrit.instructure.com/149829
Reviewed-by: James Williams <jamesw@instructure.com>
Tested-by: Jenkins
QA-Review: David Tan <dtan@instructure.com>
Product-Review: Omar Khan <okhan@instructure.com>
* tell user if avatar isn't properly saved after 5 seconds
closes RECNVS-421
test plan:
* (this needs to be on a cross-shard platform to work)
* enable instfs and User Avatars (in Admin > Settings)
* go to user profiles
* upload an avatar images
* verify that it goes through instfs
* and that it doesn't GET `/users/self/avatars` for more than 5 seconds
Change-Id: I5572d32a047479ff1b7e822e94c1729db7c6954c
Reviewed-on: https://gerrit.instructure.com/149618
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Jenkins
QA-Review: Collin Parrish <cparrish@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
closes ADMIN-1033
Test plan
- Ensure api/v1/planner/items and
api/v1/planner/overrides(/:id)
work as expected
- Specs pass
Change-Id: I4a1d5f8f81bb2bdd2eace8c61bc807d2f0457cdf
Reviewed-on: https://gerrit.instructure.com/149265
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Reviewed-by: Carl Kibler <ckibler@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Mysti Sadler <mysti@instructure.com>
closes GRADE-974
Test Plan:
1. Enable Anonymous Moderated Marking at the account level.
2. Create a new assignment moderated assignment and verify there is
an input to enter the number of graders.
3. Verify the default value for the input is 2, or if the class has
<= 2 active instructors the default is 1.
4. Verify the following validations with the input:
a. Clearing out the value and then tabbing away from the input
results in an error message showing below the input.
b. Entering 0 into the input results in an error message showing
below the input.
c. You can only enter positive, whole numbers.
d. Entering a number > 10 results in a hint showing below the input.
e. Entering a number > the number of active instructors in the
course results in a hint showing below the input.
f. Trying to save the assignment when there is invalid data in the
input results in the assignment not being saved and an error
tooltip showing for the input. Note that the cases covered in
steps d and e above are not considered invalid, and therefore
the assignment should still save successfully.
5. Verify you can save the assignment when you enter a valid grader
count. Reload the page and verify the grader count has persisted.
6. Repeat steps 2-5, but update an assignment instead of creating a
new one.
7. Verify you can set the grader_count on an assignment when creating
it via the API (you must also set moderated_grading to true).
POST /api/v1/courses/:id/assignments
8. Verify you can update the grader_count on an existing moderated
assignment via the API.
PUT /api/v1/courses/:course_id/assignments/:id
9. Disable Anonymous Moderated Marking at the account level. In a
course, create or update an assignment and verify there is no
'Number of graders' input.
Change-Id: I50d52a11051c60b59b06176ddd6bf975a567ee24
Reviewed-on: https://gerrit.instructure.com/148747
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Reviewed-by: Derek Bender <djbender@instructure.com>
Tested-by: Jenkins
QA-Review: James Butters <jbutters@instructure.com>
Product-Review: Sidharth Oberoi <soberoi@instructure.com>
closes MBL-10122
test plan:
- do CRUD operations on the observer_alert_threshold endpoints
/users/<id>/observer_alert_threshold[?student_id=<id>]
and
/users/<id>/observer_alert_threshold/<id>
Change-Id: I2c5c7700adaedd4a2068a61568217219b763339e
Reviewed-on: https://gerrit.instructure.com/149147
Reviewed-by: Matthew Sessions <msessions@instructure.com>
Product-Review: Matthew Sessions <msessions@instructure.com>
QA-Review: Matthew Sessions <msessions@instructure.com>
Tested-by: Jenkins
Closes ADMIN-1020
Test Plan:
* With student planner enabled
* As a student
* With a recent submission that has comments/feedback
* GET `api/v1/planner/items`, passing the parameters
necessary to include the assignment for the aforementioned
submission
* The response should include the assignment with a
`submissions.feedback` key whose value is an array
of hashes of submission comments containing
the comment, author name, and author avatar url
Change-Id: Ib288330bd276e3c32f994e1cb2a178ecb3eb2ca3
Reviewed-on: https://gerrit.instructure.com/149562
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
Reviewed-by: Mysti Sadler <mysti@instructure.com>
Reviewed-by: Carl Kibler <ckibler@instructure.com>
Tested-by: Jenkins
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Dan Minkevitch <dan@instructure.com>
closes GRADE-973
Test Plan:
1. Enable Anonymous Moderated Marking at the account level.
2. Create a teacher in a course.
2. In the course, create a new moderated assignment.
3. In a rails console, assign the teacher as the final grader for the
assignment.
teacher = User.find(<teacher-id>)
assignment = Assignment.find(<assignment-id>)
assignment.update!(final_grader: teacher)
4. Deactivate the teacher's enrollment. Then, in a rails console,
verify the assignment is valid and it still has the teacher
assigned as the final grader.
assignment.reload
assignment.valid? # should return true
assignment.final_grader_id # should return the teacher's ID
5. Reactivate the teacher's enrollment and then conclude it. Then, in
a rails console, verify the assignment is valid and it still has the
teacher assigned as the final grader.
assignment.reload
assignment.valid? # should return true
assignment.final_grader_id # should return the teacher's ID
6. Unconclude the teacher's enrollment. Enroll the teacher in the
course a second time, now as a TA. Then, delete the 'teacher'
enrollment (leaving only the 'TA' enrollment). In a rails console,
verify the assignment is valid and it still has the teacher assigned
as the final grader.
assignment.reload
assignment.valid? # should return true
assignment.final_grader_id # should return the teacher's ID
7. Delete the 'TA' enrollment for the teacher. Then, in a rails
console, verify the assignment is valid and its final grader has
been set to nil.
assignment.reload
assignment.valid? # should return true
assignment.final_grader_id # should return nil
8. Verify the assignment's final_grader_id can be set to a valid
final grader via the API.
PUT /api/v1/courses/:course_id/assignments/:id?assignment[final_grader_id]=<valid-teacher-id>
=> should be successful
9. Verify that trying to set a student's ID as the final grader results
in an error stating that the user does not have permission to select
final grade.
PUT /api/v1/courses/:course_id/assignments/:id?assignment[final_grader_id]=<a-student-id>
=> should return an error
Change-Id: If33ee8136a3ce9fe4588fa95e3aa7ecb91d7de60
Reviewed-on: https://gerrit.instructure.com/148549
Tested-by: Jenkins
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Reviewed-by: Adrian Packel <apackel@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Sidharth Oberoi <soberoi@instructure.com>
Closes PLAT-3313
Test Plan:
* Verify you can set scopes for developer keys in the
create and update actions.
* Verify you can only specify valid scopes
* Verify developer key scopes are returned in JSON
responses of API requests
* Verify the API token scoping FF must be enabled
for these changes to work.
Change-Id: I2151c4ac98ae35287c5db6ea56887ba18a83d709
Reviewed-on: https://gerrit.instructure.com/148627
Tested-by: Jenkins
Reviewed-by: Andrew Butterfield <abutterfield@instructure.com>
Reviewed-by: Stewie aka Nicholas Stewart <nstewart@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
closes ADMIN-971
Test plan
- Ensure calendar items from courses,
groups, user and appointments show up
on the planner with correct info
- Ensure all day events show up properly
- Ensure events group up with to do items
- Ensure item links to calendar and goes to
the event (and opens it) when you click
the link
Change-Id: I1a2ae654df785b0e2e8c010456ab6c666e0deabc
Reviewed-on: https://gerrit.instructure.com/148505
Tested-by: Jenkins
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
Reviewed-by: Carl Kibler <ckibler@instructure.com>
QA-Review: Ed Schiebel <eschiebel@instructure.com>
Product-Review: Christi Wruck
fixes QO-340
test plan:
- to be tested in mobile app (or in browser + postman)
- Create a quiz with an essay question
- As a student, start taking the quiz
- As a teacher, update the question to be a file upload question
(can also change point value, question stem, title, etc)
- As the student, resume the quiz on the app
(or hit /api/v1/quiz_submissions/YOUR_QUIZ_SUBMISSION_ID/questions)
- the question type should still be essay
- other question details should reflect the original question from
when you started the quiz as the student
Change-Id: Ie6be814d4b8c3b154cdb79f79766c5ac0a04bf45
Reviewed-on: https://gerrit.instructure.com/147893
Reviewed-by: Mark Grant <mgrant@instructure.com>
Tested-by: Jenkins
QA-Review: Sven Thirion <sthirion@instructure.com>
Product-Review: Kevin Dougherty <jdougherty@instructure.com>
closes GRADE-959
test plan:
A. Setup
1. Set Anonymous Moderated Marking to "ON"
* Root Account Level Feature Flag
2. Set Anonymous Marking to "ON"
* Root Account > Course Level Feature Flag
3. Create an anonymous Assignment
B. Verify in New Gradebook
1. Visit New Gradebook
2. Mute the assignment from above
3. Verify the option to Unmute is disabled
4. Verify other assignments can be muted and unmuted
C. Verify in Old Gradebook
1. Visit Old Gradebook
2. Mute the assignment from above
3. Verify the option to Unmute is disabled
4. Verify other assignments can be muted and unmuted
Change-Id: Iafcf18db396b4150efeb415aba5e3cb55dcfffa3
Reviewed-on: https://gerrit.instructure.com/148100
Tested-by: Jenkins
Reviewed-by: Adrian Packel <apackel@instructure.com>
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
QA-Review: Indira Pai <ipai@instructure.com>
Product-Review: Sidharth Oberoi <soberoi@instructure.com>
test plan:
* the announcements index should not include test
students or completed students in the user counts
on the tooltips
closes #COMMS-1093
Change-Id: I2104f63e5ded6578b3bc80a187668337361ca5c0
Reviewed-on: https://gerrit.instructure.com/148572
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
QA-Review: Aaron Kc Hsu <ahsu@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
closes ADMIN-970
Test plan
- Add some calendar events, including a course
event, a user event, a group event and an
appointment group appointment
- Go to /api/v1/planner/items and ensure all
of the items show up with the appropriate
info
Change-Id: I5b0dc6402a98c5018d3597a3474d6a4a68ad3ae7
Reviewed-on: https://gerrit.instructure.com/148244
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Mysti Sadler <mysti@instructure.com>
Fixes PLAT-3299
Test Plan:
- Create a site admin devleoper key and set it to 'allow' and 'visible'
- From a root account view the inherited key and set its workflow state
to 'off'
- Verify the workflow state control is not disabled
- Verify key inheritance and workflow state is properly displayed
Change-Id: I7602ae0a570125f9022ee697c8369e11d662a473
Reviewed-on: https://gerrit.instructure.com/148252
Reviewed-by: Marc Alan Phillips <mphillips@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
I couldn't take it anymore. it was driving me crazy
Change-Id: Ib40addff56e98a6e0a6d80f246c208e0ce0cb762
Reviewed-on: https://gerrit.instructure.com/148026
Tested-by: Jenkins
Reviewed-by: James Williams <jamesw@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Closes QUIZ-3761
Test plan:
- Log in as admin or teacher
- Create an API access token by following the instructions here:
https://community.canvaslms.com/docs/DOC-10806-4214724194
- Make a note of the token
- Create a Quizzes.Next assignment
- Go back to the assignments page
- Click the kebab menu on the assignment and click 'Duplicate'
- Find the id of the new, duplicating assignment. You can do this by
running `Assignment.last.id` in a canvas rails console. Make a note of
this id
- Notify canvas that the assignment has duplicated successfully by
running:
curl -v -XPUT \
-H 'Authorization: Bearer <token>' \
-H 'Content-Type: application/json' \
-d '{"assignment": {"duplicated_successfully": true}}' \
http://canvas.docker/api/v1/courses/<course_id>/assignments/<id>
where <token> is the API access token created earlier, <course_id> is
the id of the course, and <id> is the id of the duplicating assignment
you made a note of earlier.
- Refresh the assignments page
- Check that the assignment is now in the "unpublished" state
- Repeat these steps, but this time with
{"assignment": {"duplicated_successfully": false}}
as the request body
- Refresh the assignments page
- Check that the assignment is now in the "failed_to_duplicate" state
Change-Id: Ief72eb84fc711207bea43c66b866710489235280
Reviewed-on: https://gerrit.instructure.com/147483
Tested-by: Jenkins
Reviewed-by: Jeff Belser <jbelser@instructure.com>
Product-Review: Jeff Belser <jbelser@instructure.com>
refs gh-1273
test plan
- course api include account should work
Change-Id: If4dbd24c70fdb5f9502cd65b031466334b7b9c0d
Reviewed-on: https://gerrit.instructure.com/146762
Tested-by: Jenkins
Reviewed-by: Spencer Olson <solson@instructure.com>
QA-Review: Tucker McKnight <tmcknight@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
Removes all but the name, workflow_state, and id of the inherited
developer keys. Also addes the developers key that are inherited
to a different tab.
closes PLAT-3244, PLAT-3207, PLAT-3247
Test Plan:
- Go to the Developer Key page for site admin and create a few keys
- One with off, one with on, and one with allow
- Make sure that the feature flag is turned on
- Click the visibility (eye) icon to enable visibility of each
- Go to the developer key page for a root admin
- Note that the inherited tab has the three keys
- If key is on, should be set to on in the inherited tab and can't
change
- If key is off, shoudl be set to off in the inherited tab and can't
change
- If allowed, should be set to allowed and can change
- Change this key in the root page to on or off, refresh, note
that state persists
- Go back to site admin page, change the allow to on or off
- Go back to the root page and note that the state has been
overridden and can't change
- Create a key for the root account and refresh page
- Note that the root account keys are still in the main tab
- Create more than 11 root account keys, refresh page, and note that
it is now paginated
- Click the show more button, all the remaining keys should appear
- Go back to the site admin page, create more than 11 keys
- Go back to the root admin page, click on the inherited tab, and see
that the show more button appears
- Click the show more button; all the keys should appear
- Go back to the site admin page and turn off the visibility of all the
keys
- Go back to the root admin page, click on the inherited tab, and note
that none of the keys are now visible
Change-Id: Ib666cb33636b1582108dcc4a8822c8625c633157
Reviewed-on: https://gerrit.instructure.com/145427
Reviewed-by: Stewie aka Nicholas Stewart <nstewart@instructure.com>
Product-Review: Marc Alan Phillips <mphillips@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
closes MBL-10278
test plan:
- fetch a group discussion from the discussion index & show api endpoints
- the attribute "group_topic_children" should return an array of:
{id: <id>, group_id: <group_id}
Change-Id: Ibf095ae64e2bd906758e6641c49f2766399e2c7f
Reviewed-on: https://gerrit.instructure.com/147207
Tested-by: Jenkins
Reviewed-by: James Williams <jamesw@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Taylor Wilson <twilson@instructure.com>
Product-Review: Gentry Beckmann <gbeckmann@instructure.com>
fixes gh-1273
test plan
- rake doc:api should work
Change-Id: I5dcc154eca68c789395ffe9f0297d04b66821823
Reviewed-on: https://gerrit.instructure.com/146733
Reviewed-by: Spencer Olson <solson@instructure.com>
Tested-by: Jenkins
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
closes RECNVS-404
test plan:
- a request for an attachment which includes `?include[]=instfs_uuid`
returns the instfs_uuid property for the attachment
Change-Id: If2ecaf43807be1a4f1c0489dc30af6e5ef7c4e76
Reviewed-on: https://gerrit.instructure.com/145949
Reviewed-by: Jacob Fugal <jacob@instructure.com>
QA-Review: Collin Parrish <cparrish@instructure.com>
Tested-by: Jenkins
Product-Review: Michael Jasper <mjasper@instructure.com>
test plan:
- enable the "Account Course and User Search" feature
- ensure "See other users' primary email address"
permission is required to find by email address
- ensure "Read SIS data" or "Manage SIS data" is
required to find by SIS ID
- ensure "View login ids for users" is required
to find by login ID
- ensure you can find users by canvas ID and name
in the same search (where one user's name matches
another user's ID)
also:
- ensure students cannot use the include[]=email
option in the "List users in course" API to
retrieve email addresses of other students
(unless granted "See other users' primary
email address" permission)
fixes ADMIN-836
Change-Id: I9c0a1ba9a643632047f42dc010822b6e5035d0d4
Reviewed-on: https://gerrit.instructure.com/143915
Reviewed-by: Mysti Sadler <mysti@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Matt Goodwin <mattg@instructure.com>
Tested-by: Jenkins
Closes PLAT-3256
Test Plan:
- Turn off all developer key feature flags.
- Visit the /developer_keys page and
verify no queries for developer key account
bindings occur.
Change-Id: I06b6783f29f227e446346b00a8c5431ccaf6b306
Reviewed-on: https://gerrit.instructure.com/145887
Product-Review: August Thornton <august@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Tested-by: Jenkins
Reviewed-by: Nathan Mills <nathanm@instructure.com>
refs CORE-20
test plan:
- test file upload api with success_include[]=avatar on the preflight
request
- the final response on success should include the avatar property
- test with local storage, s3, and InstFS
Change-Id: I974197944d0f84ad0b89a628ab8604f50cdec45e
Reviewed-on: https://gerrit.instructure.com/144456
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Jenkins
QA-Review: Tucker McKnight <tmcknight@instructure.com>
Product-Review: Brent Burgoyne <bburgoyne@instructure.com>
fixes COMMS-1024
Test Plan
* make sure profiles are off and avatars
* go to a student enrolled in a course
* find the student enrollment on a course
example /courses/11/users/2
* Click more details and add a last attended date to the user
* use the api such as the bottom to get all enrollments for
the course
* curl http://localhost:3000/api/v1/courses/11/enrollments
or do something to get the request.. you can visit the url
with canvas running
* make sure that date you set shows up
Change-Id: Idf3dbd39192f1fe3c6088c8fc45a4112994b3419
Reviewed-on: https://gerrit.instructure.com/145253
Reviewed-by: Steven Burnett <sburnett@instructure.com>
Reviewed-by: Venk Natarajan <vnatarajan@instructure.com>
QA-Review: Landon Gilbert-Bland <lbland@instructure.com>
Product-Review: Aaron Kc Hsu <ahsu@instructure.com>
Tested-by: Jenkins
fixes RECNVS-401
the javascript has already been adapted to expect a progress instead of
the file status blob, that's what causes the bug. give it what it
expects. the progress results are populated during Attachment#clone_url,
and the progress is flagged completed once the worker successfully
completes the job.
test-plan:
- with inst-fs turned off in the account
- have a course with the Google Drive LTI tool enabled
- have a file upload assignment in that course
- as a student in the course, click "Submit Assignment" on the file
upload assignment
- choose the Google Drive tab, authorize a google account, select a
file from the drive, and click submit.
- submit the assignment with the selected file; the submission should
go through without error (will give an error at this point without
this commit)
- click the link to download the submission; should download
Change-Id: I43e991f419a9f81359145d9f40899ecc82675da0
Reviewed-on: https://gerrit.instructure.com/145403
Reviewed-by: Michael Jasper <mjasper@instructure.com>
Tested-by: Jenkins
Reviewed-by: Andrew Huff <ahuff@instructure.com>
QA-Review: Collin Parrish <cparrish@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
Closes PLAT-3196, PLAT-3210, PLAT-3017
Test Plan:
- Create a developer key in site admin
- Verify in the DB a DeveloperKeyAccountBinding is
created for that key and associated to the site
admin account. The workflow state of the binding
should be 'allow'
- Set the developer key visible to true
- Navigate to a root account.
- Verify the site admin key is visible and set to 'allow'
- In the root account UI change the visiblity to 'on'
- Refresh the page and verify the change persisted
- In the site admin UI turn the developer key to 'off'
- In the root account UI verify the key is now set to 'off'
and the control is disabled.
- In the site admin account UI set the status to 'allow'
- In the root account verify the key status has been
changed back to 'on' and is no longer disabled.
- Create a key in the root account and verify you can
succesfully change its binding status to 'allow', 'off',
and 'on'
- Try any other combinations of keys and states you can think of.
The binding state set at the site admin level shoud always override
the state set in the root account.
- Turn off the dev key rewrite feature flags and verify the old UI
works as before
Change-Id: I50e92e75447529ece7a27a5b9f4b0009f8d1288e
Reviewed-on: https://gerrit.instructure.com/144248
Tested-by: Jenkins
Reviewed-by: Stewie aka Nicholas Stewart <nstewart@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Karl Lloyd <karl@instructure.com>
rather than `url`, which can clash with Backbone's cid
test plan:
- create a course containing Pages named "C1", "C2", ..., "C9"
- ensure all pages appear on the Pages index,
without needing to re-sort the list
- regression test creating and editing wiki pages from the UI
fixes ADMIN-903
Change-Id: I6fcada03eb843625370f211cca23f15a73580629
Reviewed-on: https://gerrit.instructure.com/145081
Tested-by: Jenkins
Reviewed-by: Dan Minkevitch <dan@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
Refs MBL-9902
The show discussion endpoint did not
accept any include parameters. Added
all_dates, sections, sections_user_count,
and overrides
Test Plan:
- Create a discussion that is section specific
and has a due date and has overrides
- Hit /courses/:courseID/discussions/:discussionID
- It should just give you back the discussion with the
assignment
- Include ?include[]=all_dates
- It should include all_dates on the assignment
- Include ?include[]=overrides
- It should include overrides on the assignment
- Include ?include[]=sections
- It should include sections on the discussion
- Include ?include[]=sections&include[]=sections_user_count
- It should include the user count on the section
- Hit /courses/:courseID/discussions
- It should not include the overrides on the assignment
- Include ?include[]=overrides
- It should include the overrides on the assignment
Change-Id: I41820dc47720152ef6494d1b0a3428e07272e645
Reviewed-on: https://gerrit.instructure.com/145060
Tested-by: Jenkins
Reviewed-by: Cameron Sutter <csutter@instructure.com>
QA-Review: Landon Gilbert-Bland <lbland@instructure.com>
Product-Review: Matthew Sessions <msessions@instructure.com>
Closes QUIZ-3753
Test plan:
- Create an assignment
- Click on the assignment's kebab menu and select 'Duplicate'
- Open a rails console with:
`docker-compose run --rm web bundle exec rails console`
- In the rails console, fetch the duplicate assignment:
`assignment = Assignment.last`
- Put the assignment in the 'duplicating' state:
`assignment.update!(workflow_state: 'duplicating')`
- Refresh the assignment list, check that a spinner and 'Making a copy'
text appear as per the mockup
- Put the assignment in the 'failed_to_duplicate' state:
`assignment.update!(workflow_state: 'failed_to_duplicate')`
- Refresh the assignment list, check that a 'Something went wrong'
message, 'Retry' and 'Cancel' buttons appear as per the mockup
- Click the 'Cancel' button, check that assignment disappears
- Repeat the above steps and click the 'Retry' button, check that it
duplicates the assignment
Change-Id: Id594395d27dc05c07e621974875281341fa4390a
Reviewed-on: https://gerrit.instructure.com/144512
Tested-by: Jenkins
Reviewed-by: Steve Kacsmark <skacsmark@instructure.com>
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Product-Review: Kevin Dougherty <jdougherty@instructure.com>
Fixes ADMIN-829
Test Plan:
* Turn on the new Course and User search feature option
at the account level
* Create a course with multiple sections and enroll two
teachers in one of the sections
* Add one of the teachers as a teacher to the second section
* View the Courses page at the account level and notice the
Show More link is not displayed under the list of teachers
for the course
Change-Id: If8fce197b5e0c3edb93027f04769476e1e7e0d7f
Reviewed-on: https://gerrit.instructure.com/144170
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Dan Minkevitch <dan@instructure.com>
QA-Review: Dan Minkevitch <dan@instructure.com>
Change-Id: Ia1477ba32f8424f3e5e00e4fb69136b3b1aaea53
Reviewed-on: https://gerrit.instructure.com/144172
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
fixes RECNVS-361
instead of just using Attachment.current_root_account.domain
to facilitate the change, all generation of non-public links to external
file storage go through a FileAuthenticator instance that holds the
necessary information about the current user and oauth host
test-plan:
[locally]
- smoke test file uploads and downloads, there should be no impact on
behavior, just a refactor
[once on beta]
- enable inst-fs in your sandbox
- logout of canvas
- open network logging in your browser dev tools and log back in to
canvas
- identify the requests related to the inst-fs login pixel and
corresponding oauth redirects
- the oauth should have occurred against your beta sandbox, not your
production sandbox
- attempt to upload a file; should be successful
Change-Id: Ic859b707908baef84f5ee4dba29f18bdd841abcc
Reviewed-on: https://gerrit.instructure.com/143930
Tested-by: Jenkins
Reviewed-by: Michael Jasper <mjasper@instructure.com>
QA-Review: Collin Parrish <cparrish@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
Add an "anonymous grading" field to the Assignment object, and add a
checkbox for it in the assignment UI that appears when the feature flags
for anonymous moderated marking (the base flag) and AMM-related
anonymous grading are enabled.
closes GRADE-949
Test plan:
* Run the attached migration and make sure there are no errors.
Afterward, open up a database console and check that there
are no values in the new column:
> select * from assignments where anonymous_grading is null;
The above query should return zero rows.
* Make sure that undoing the migration using db:migrate:down
properly deletes the new column (remember to re-run the
migration before continuing!).
* Enable Anonymous Moderated Marking at the account level if not
already enabled. Create a new course and turn on the new
Anonymous Marking flag for it.
* Create an assignment and edit it.
* There should be an "anonymous grading" checkbox on the edit page,
and if you check (or uncheck) it its value should persist between
views of the page.
* Check that if you turn the new anonymous grading flag off for the
course and edit the assignment again, the checkbox is no longer
present.
Change-Id: Ie8955644d78243008bdcd51a05689c093d5d8a8b
Reviewed-on: https://gerrit.instructure.com/143402
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Reviewed-by: Shahbaz Javeed <sjaveed@instructure.com>
Reviewed-by: Derek Bender <djbender@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
QA-Review: Indira Pai <ipai@instructure.com>
Product-Review: Sidharth Oberoi <soberoi@instructure.com>
Refs: PLAT-3184
Test Plan: Visible attribute should be in the dev key api
Change-Id: I0bfb76d9d0c40434ea12495dd1b24b32e5d6e4b3
Reviewed-on: https://gerrit.instructure.com/142847
Tested-by: Jenkins
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Stewie aka Nicholas Stewart <nstewart@instructure.com>
fixes ADMIN-131
Test plan
- Set up user with several assignments with
as many types of overrides as possible
- (User in multiple sections with different
due dates, user with an ad-hoc override,
overrides that don't override the due date, etc)
- Ensure the API returns the items in the correct
order (assuming the user has a due date for the
item)
- Check the same with ungraded quizzes
- Ensure the plannable_date is the correct date
for the user
- Turn off Canvas Planner and check to make sure
the to do list works correctly
Change-Id: Ie38900ac645804867823ed24b59f228cefef7f51
Reviewed-on: https://gerrit.instructure.com/142412
Tested-by: Jenkins
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Mysti Sadler <mysti@instructure.com>
fixes RECNVS-237
simplify FilesController#create_pending (which corresponds to the
POST /files/pending route) to do its preflight setup through
api_attachment_preflight. this makes it consistent with other preflight
endpoints, particularly so inst-fs gets used when enabled.
cascaded implications:
* FilesController#create for local uploads is removed in favor of
FilesController#api_create + FilesController#api_create_success
* FilesController#s3_success for s3 uploads is removed in favor of
FilesController#api_create_success
* FilesController#render_attachment_json is removed (was only used by
the previous two removed methods) in favor of the attachment_json
returned by #api_create_success
* JavaScript performing uploads through /files/pending now expects an
{<attachment fields>} shaped response in line with
attachment_json
* JavaScript performing uploads through /files/pending now expects a
'content-type' field in the response instead of 'content_type', in
line with attachment_json
as part of the cleanup, the duplicate_handling parameter was renamed to
on_duplicate to match other preflight endpoints, and the size parameter
was added to the request for quota checking
test-plan:
- generally, uploads that go through /files/pending:
- still work
- work with instfs
- specifically, the uploads that go through /files/pending are:
- uploading an image as an avatar in the user profile
- submitting an assignment via file upload
- conversation messages with attached files
- uploading a file to an eportfolio
- upload image from wiki sidebar (w/o RCE enabled)
- upload files from wiki sidebar (w/o RCE enabled)
- of particular interest to confirm beyond just "appears to work" are:
- attachment(s) are associated with conversation message correctly
after upload
- attachment(s) are associated with submission correctly after upload
- images uploaded to eportfolio are recognized as images
- video files uploaded via wiki sidebar are recognized as video
- image files uploaded via wiki sidebar are recognized as images
Change-Id: I463b3746e8e99a5e503df302664122bf364771c1
Reviewed-on: https://gerrit.instructure.com/141859
Tested-by: Jenkins
QA-Review: Collin Parrish <cparrish@instructure.com>
Reviewed-by: Jonathan Featherstone <jfeatherstone@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
refs RECNVS-331
allows simplifying course link validator to use progress_json
test-plan: N/A
Change-Id: I88bf27298773a40cf9bec0152093bbc8da9bed40
Reviewed-on: https://gerrit.instructure.com/142641
Tested-by: Jenkins
Reviewed-by: James Williams <jamesw@instructure.com>
QA-Review: Collin Parrish <cparrish@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
closes GRADE-927
test plan:
* Create a course with an assignment and a quiz
* Enroll three students in the course
* For the assignment
- Add two overrides with one student in each and ensure the
"Everyone Else" group isn't present in any overrides
- Observe the Rails logs while saving this to ensure DueDateCacher
runs only once
- Verify DueDateCacher only runs for the assignment and recalculates
grades at the same time
- Edit the assignment and submit without any changes
- Verify DueDateCacher does not run
* For the quiz
- Add two overrides with one student in each and ensure the
"Everyone Else" group isn't present in any overrides
- Observe the Rails logs while saving this to ensure DueDateCacher
runs only once
- Verify DueDateCacher only runs for the assignment and recalculates
grades at the same time
- Edit the assignment and submit without any changes
- Verify DueDateCacher does not run
* For the Course
- From the Course settings page, Copy the course with the following
settings:
> Change the start date to one year out
> Choose "Shift dates" for the Date adjustment
- Observe the Rails logs while saving this to ensure DueDateCacher
runs only once
- Verify DueDateCacher only runs for the course
Change-Id: Ia97620132f3f1ccc42668610deb125e67c45bd9a
Reviewed-on: https://gerrit.instructure.com/142197
Reviewed-by: Spencer Olson <solson@instructure.com>
Tested-by: Jenkins
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
QA-Review: Indira Pai <ipai@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
refs RECNVS-264
but still pass the @current_user for access and upload JWTs, so that it
can go in a separate claim if its different
test-plan:
- smoke test an inst-fs upload. should still work
Change-Id: I4be9cd4049c83848e69aae37500ae9f4b96392b4
Reviewed-on: https://gerrit.instructure.com/142334
Tested-by: Jenkins
Reviewed-by: Michael Jasper <mjasper@instructure.com>
QA-Review: Jonathan Featherstone <jfeatherstone@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
closes OUT-1534
Scheduling of outcome import jobs will occur in a separate PS,
after this merges and OUT-1997 is merged too.
test plan:
- start up canvas
- generate api docs:
> docker-compose run --rm web bundle exec rake doc:api
- load api docs in http://canvas.docker/doc/api/index.html
- read over the "Outcomes CSV Format" and make sure it reads well
- read over the "Outcomes Import" and make sure it reads well
- obtain an access token:
https://community.canvaslms.com/docs/DOC-10806-4214724194
- request an outcome import, replace "canvas-path" and "token" values:
curl -F attachment=@<canvas-path>/spec/lib/outcomes/fixtures/demo.csv \
-F 'import_type=instructure_csv' \
-H "Authorization: Bearer <token>" \
http://canvas.docker/api/v1/accounts/1/outcome_imports
- in a rails console, confirm that the import was accepted:
> docker-compose run --rm web bin/rails console
% pp OutcomeImport.last
# confirm that the import is in the 'created' state, associated with
your user and associated with an account context
# note the "id" value for later use
% pp OutcomeImport.last.attachment
# confirm that the attachment is in the 'processed' state and has
the filename "test_outcomes_1.csv" passed in above
- request the status of the outcome import (should return a message
saying "The specified resource does not exist"):
curl -H "Authorization: Bearer <token>" \
http://canvas.docker/api/v1/accounts/1/outcome_imports/latest
- back in the rails console created above, manually transition
the import to "importing":
% OutcomeImport.last.job_started
- run the above curl command again, and this time the latest outcome
import should be returned, in the 'importing' state
- run the above curl command again, replacing "latest" with the "id"
value obtained above. it should return the same response as the
previous step.
Change-Id: Ice7d67b625b443cec70f531f2e673face6d6fbeb
Reviewed-on: https://gerrit.instructure.com/142024
Reviewed-by: Neil Gupta <ngupta@instructure.com>
Reviewed-by: Frank Murphy <fmurphy@instructure.com>
Tested-by: Jenkins
QA-Review: Frank Murphy <fmurphy@instructure.com>
Product-Review: Neil Gupta <ngupta@instructure.com>
fixes CORE-1076
test plan
- specs should pass
Change-Id: Id0b88c21a606a69ec5663864f4303ba95101c14a
Reviewed-on: https://gerrit.instructure.com/142386
Reviewed-by: James Williams <jamesw@instructure.com>
Tested-by: Jenkins
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
refs RECNVS-313
test-plan:
- with inst-fs enabled, do the following:
- login, upload a file, access a file
- in each case the JWT serialized in the url should contain a
`host` claim which is the oauth host (domain of the root account)
Change-Id: I05e833407bfd6a3d6cb0dcb95d42d446e314d224
Reviewed-on: https://gerrit.instructure.com/141584
Tested-by: Jenkins
Reviewed-by: Jacob Fugal <jacob@instructure.com>
QA-Review: Collin Parrish <cparrish@instructure.com>
Product-Review: Michael Jasper <mjasper@instructure.com>
fixes CORE-763
test plan:
* set up two accounts, on different shards, and a user associated with both
* create a course on shard 2 and create a wiki page for the front page.
* create a module in that course
* as the content of the front page, embed an image from the course, and
link to the module
* using the domain of shard 1, go to /api/v1/courses/<id of shard 2>~<id the course>/front_page
* inspect the links in the returned body element. they should be using the
first account's domain, but should contain (short) global ids. there should
4 - the 'regular' URL for the image and the link, and a data-api-endpoint for each.
* exercise all 4 URLs. the HTML ones should redirect to account 2's domain,
and the API URLs should return a result directly
Change-Id: I10aa0fc1dc003a781d04ec5b230ede6aeba64fb9
Reviewed-on: https://gerrit.instructure.com/141664
Reviewed-by: Rob Orton <rob@instructure.com>
Tested-by: Jenkins
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Test Plan:
1 - Run the migrations and validate that the
`read_only` column exists on the
`custom_gradebook_columns` table, with a default
of false
2 - Create a new CustomGradebookColumn through the API
and validate that it accepts and persists the
`read_only` parameter. Example curls:
Create the column:
curl -H "Authorization: Bearer <token>" \
http://localhost:3000/api/v1/courses/:id/custom_gradebook_columns \
-X POST \
-F "title=ReadOnly" \
-F "read_only=true"
Validate the columns:
curl -H "Authorization: Bearer <token>" \
http://localhost:3000/api/v1/courses/:id/custom_gradebook_columns/
3 - Open the gradebook for a course and validate that you cannot
edit the `read_only` columns in both the old and new
gradebooks. (Tabbing should still work as normal.)
4 - Go to the Individual View. Under Global Settings, check Show Notes
in Student Info. Under Content Selection, select a student.
Confirm that you can only edit the custom columns that were
not created as read_only.
refs PFS-9913, PFS-9914, PFS-10003
Change-Id: I18005cc0eaf19202c00a5d79c2a04421b5d12a5c
Reviewed-on: https://gerrit.instructure.com/139625
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Tested-by: Jenkins
Product-Review: Ian Morris <ianm@instructure.com>
QA-Review: Aiona Hernandez <ahernandez@instructure.com>
test plan: ensure the API endpoint below does not include
the student view student in total counts
api/v1/courses/X?include=total_students
fixes ADMIN-800
Change-Id: I706bcdabdf2cba9031c8b5649a89370e1f0471e9
Reviewed-on: https://gerrit.instructure.com/141685
Tested-by: Jenkins
Reviewed-by: Jon Willesen <jonw+gerrit@instructure.com>
QA-Review: Jon Willesen <jonw+gerrit@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
Closes: GRADE-861
Test Plan
- Verify there are no N+1 queries when loading speedgrader
caused by originality reports
- Verify there are no N+1 queries when loading gradebook
caused by originality reports
- Verify originality reports are copied to all submissions
in a group when they are created or updated in a group
assignment.
- Verify online upload originality reports are displayed
correctly in speedgrader, gradebook, student grade page,
and submission details page.
- Verify originality reports display properly in gradebook
and speed grader when there are multiple submissions
and each has a different originality report.
- Verify the "resubmit to plagiarism tool" button still
appears in speedgrader.
- Verify originality reports for group assignments are displayed
correctly.
- Verify text entry originality reports are displayed correctly.
- Verify originality report launches work correctly from speedgrader
and gradebook.
Change-Id: I459bbf0a165bb131d58fc153feb0dce3d0bf07af
Reviewed-on: https://gerrit.instructure.com/141321
Tested-by: Jenkins
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
closes OUT-1566
When outcomes are imported into rubrics, then any updates
to an outcome's name, description and ratings will be
reflected in unassessed, updateable (referenced by no more
than one assignment) rubrics, specifically in the rubric
criteria containing the outcome.
test plan (unassessed/updateable):
- create an account outcome
- create an account rubric, using the outcome as
a single criterion
- edit the outcome, including name, description
ratings and total points possible (confirm that
a warning dialog appears before editing)
- confirm that the changes are reflected in the
account rubric's criterion (check criteria name,
ratings, and total points)
- create an assignment, and use the account rubric
as its rubric
- edit the outcome, including name, description
ratings and total points possible (confirm that
a warning dialog appears before editing)
- confirm that the changes are reflected in the
account rubric's criterion and the assignment's rubric
(check criteria name, ratings, and total points)
- create another assignment, and use the account rubric
as its rubric
- edit the outcome, including name, description
ratings and total points possible (confirm that
a warning dialog DOES NOT appear before editing)
- confirm that the changes are NOT reflected in the
account rubric's criterion and both the assignment
rubrics
test plan (assessed):
- create a new account rubric using the default criterion
- create a new assignment and use the account rubric
as its rubric
- as a student, submit to the assignment
- as a teacher, score the assignment, including the rubric
- add the account outcome to this new account rubric
- edit the outcome, including name, description
ratings and total points possible (confirm that
a warning dialog DOES NOT appear before editing)
- confirm that the changes are NOT reflected in the
account rubric's criterion and the assignment's rubric
Change-Id: Ie5064269689071a450fa503fb68c73f5beb16710
Reviewed-on: https://gerrit.instructure.com/127991
Reviewed-by: Michael Brewer-Davis <mbd@instructure.com>
Tested-by: Jenkins
Reviewed-by: Frank Murphy <fmurphy@instructure.com>
QA-Review: Andrew Porter <hporter-c@instructure.com>
QA-Review: Leo Abner <rabner@instructure.com>
Product-Review: Sidharth Oberoi <soberoi@instructure.com>
This commit updates Assignment#duplicate to store a reference to the
original assignment on the duplicated assignment. Both the original
assignment and the new assignment's lti_resource_link_id are included
in the `assignment_created` live event emitted when the new assignment
is saved.
This allows LTI tools listening for Canvas live events to identify when
an assignment has been duplicated, and duplicate their own data
accordingly.
Closes QUIZ-3749
Test plan:
- Set up live events and tail the kinesis stream as per the instructions
in doc/live_events.md
- Create an LTI assignment
- An `assignment_created` live event containing this assignment's
lti_resource_link_id should appear in the kinesis log. Make a note of
this lti_resource_link_id
- Duplicate this assignment by clicking the "kebab" menu and clicking
"Duplicate"
- Check that another `assignment_created` live event appears in the
kinesis log, containing both the original assignment's
lti_resource_link_id and the new assignment's lti_resource_link_id
Change-Id: I64bdb9a2132e58c4e7be0ab7687c2c819a3587fd
Reviewed-on: https://gerrit.instructure.com/140877
Tested-by: Jenkins
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Reviewed-by: Jeff Belser <jbelser@instructure.com>
Product-Review: Michael Hargiss <mhargiss@instructure.com>
Ignores soft-deleted Grading Periods when determining the current
grading period for an enrollment.
closes GRADE-834
Test Plan:
1. At the root account grading standards page
(accounts/:id/grading_standards), create an active Grading Period
(a period where `start_date` > now < `end_date`).
2. In a course that is using that grading period, hit the courses
endpoint as a student and verify the enrollments you get back have
a not-null current_grading_period_id:
GET /api/v1/courses/:id?include[]=total_scores&include[]=current_grading_period_scores
=> current_grading_period_id should be present
3. At the root account grading standards page, delete the Grading
Period you created in step 1.
4. In a course that is using that grading period, hit the courses
endpoint as a student and verify the enrollments you get back have
a null current_grading_period_id:
GET /api/v1/courses/:id?include[]=total_scores&include[]=current_grading_period_scores
=> current_grading_period_id should be null
Change-Id: I5aed1ba5bed47a08902d74ec3c41a4b9e2bad049
Reviewed-on: https://gerrit.instructure.com/139932
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
Reviewed-by: Josh Simpson <jsimpson@instructure.com>
Tested-by: Jenkins
Reviewed-by: Shahbaz Javeed <sjaveed@instructure.com>
QA-Review: Adrian Packel <apackel@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
Update several API methods to return unposted scores/grades alongside
the existing fields if the requesting user has either of the
:manage_grades or :view_all_grades permissions.
The updated functions are:
submissions_api_controller.rb#for_students
users_controller.rb#grades_for_student
course_json.rb#total_scores
course_json.rb#current_grading_period_scores
closes GRADE-761
Test plan:
Initial setup and notes:
- As a teacher, set up a course with some students and at least one
unposted assignment, and assign some grades.
- Also, set up a login for a student in the course.
For each step listed below, you should access the listed URL first
as the teacher, then log out and back in as a student, and access it
again. Check that your results are in line with what's indicated below.
To each URL, prepend your server and port (presumably localhost:3000 or
similar).
Testing submissions_api_controller:
- Access the following URL (replace "1" with your course ID):
/api/v1/courses/1/students/submissions?student_ids=all&include=total_scores&grouped=true
- As a teacher:
- In each individual student hash, the fields "unposted_current_score"
and "unposted_final_score" should appear alongside the corresponding
computed_ scores.
- The unposted fields should reflect each student's scores with
unposted assignments factored in.
- As a student:
- The unposted fields should not appear.
Testing grades_for_student:
- From your course above, identify the ID for a student's enrollment,
perhaps using the Rails console.
(E.g.: StudentEnrollment.find_by(course_id: <course ID>).id)
- Access the following URL (replace "1" with the enrollment ID):
/grades_for_student?enrollment_id=1
(note that the "/api/v1/" prefix is NOT part of this one)
- As a teacher:
- The output should include an 'unposted_grade' field reflecting the
student's unposted (current) score.
- As a student:
- The output should not include the new field.
Testing course_json:
- Set up a grading period that includes the current date and time,
if one is not already active.
- Identify the ID of a student in the course.
(E.g.: StudentEnrollment.find_by(course_id: <course ID>).user.id)
- Access the following URL (replace "1" with your course ID):
/api/v1/users/1/courses?include[]=enrollments&include[]=total_scores&include[]=current_grading_period_scores
- As a teacher:
- In the output, each element in the "enrollments" array should
include the following fields (which should, as described above,
reflect the student's scores factoring in unposted assignments):
- unposted_current_score
- unposted_current_grade
- unposted_final_score
- unposted_final_grade
- current_period_unposted_current_score
- current_period_unposted_current_grade
- current_period_unposted_final_score
- current_period_unposted_final_grade
- As a student:
- The unposted fields listed above should *not* be included.
Change-Id: Ie2b7cbfa41446d3f9010d4f6376407b1c1edd443
Reviewed-on: https://gerrit.instructure.com/138468
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
Reviewed-by: Shahbaz Javeed <sjaveed@instructure.com>
Tested-by: Jenkins
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
fixes CORE-922
test plan
- old api results should include limited errors
and warnings
Change-Id: Ia71bca882ea234d286b43be12baa291518e69f11
Reviewed-on: https://gerrit.instructure.com/139371
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
fixes CORE-324
test plan
- run a sis import with errors
- the errors should be included in the api JSON
Change-Id: I97e372a82b565e7bfa01cd9ca0bb66bb67c95723
Reviewed-on: https://gerrit.instructure.com/139071
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
fixes CORE-652
test plan
- groups response should include sis_id
- group category response should include sis id
Change-Id: I2e2ea884e6fed333baf4a2f5df8a8d1ad0e65f1c
Reviewed-on: https://gerrit.instructure.com/137876
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
QA-Review: Tucker McKnight <tmcknight@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
refs #ADMIN-675
Change-Id: Ie656b5272c63245aaa0df82d98efdd18941ea03d
Reviewed-on: https://gerrit.instructure.com/137748
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
This adds four additional fields (unposted_current_score,
unposted_final_score, unposted_current_grade, unposted_final_grade) to
the enrollment and users endpoints if the requesting user has either
manage_grades or view_all_grades permissions.
fixes GRADE-119
test plan:
- Have a course with a teacher and a student.
- Have three assignments each worth 10 points, one muted (Assignment 1)
and two not muted (Assignment 2 and Assignment 3).
- As the teacher, grade the student 6/10 for Assignment 1 and 10/10
for Assignment 2. Do not grade the student for Assignment 3.
- As the teacher, make an API call to get the grades for the student:
GET /api/v1/courses/:course_id/users/:student_id?include[]=enrollments
Authorization: Bearer the-teacher-api-token
Verify the grades on the enrollments in the response include the
unposted_current_score, unposted_final_score,
unposted_current_grade, and unposted_final_grade keys. Verify the
unposted_current_score is 80.00, the unposted_final_score is 53.33,
the unposted_current_grade is null, and the unposted_final_grade is
null.
- As the student, make an API call to get the grades for yourself:
GET /api/v1/courses/:course_id/users/:student_id?include[]=enrollments
Authorization: Bearer the-student-api-token
Verify the grades on the enrollment in the response do not include
the unposted_current_score, unposted_final_score,
unposted_current_grade, or unposted_final_grade keys.
Change-Id: Ibd14d0ed0a246f1cb8d16d7bc9ba0beb2680cba9
Reviewed-on: https://gerrit.instructure.com/137213
Reviewed-by: Shahbaz Javeed <sjaveed@instructure.com>
Tested-by: Jenkins
QA-Review: Indira Pai <ipai@instructure.com>
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Product-Review: Matt Goodwin <mattg@instructure.com>
fixes COMMS-584
Test Plan:
- With section specific announcements turned on
- Go to the announcements index page
- If you don't have any announcements create some
that are both section specific and some that aren't
- go back to the index page
- hover over the all sections toolip/the tool tip that
says the count of the amount of sections
- notice it states how many users it sent to (for all sections)
and how many it sent to for section specific
Change-Id: I74e37512f6244a32cfd2fdb90bce63c85e42be26
Reviewed-on: https://gerrit.instructure.com/136867
Reviewed-by: Venk Natarajan <vnatarajan@instructure.com>
Tested-by: Jenkins
QA-Review: Landon Gilbert-Bland <lbland@instructure.com>
Product-Review: Steven Burnett <sburnett@instructure.com>
refs CORE-23
Test Plan:
- Make a GET request to /api/v1/folders/XX/files?use_verifiers=0
using a valid JWT
- Verifiers should not be present in the URLs returned
Change-Id: I7111098fe1f1fd4f8d83d06bc19f0c819fb18a85
Reviewed-on: https://gerrit.instructure.com/136683
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Tucker McKnight <tmcknight@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
Change-Id: If147691095e217b4a523a231a0bf9844b0eac2dc
Reviewed-on: https://gerrit.instructure.com/136905
Tested-by: Jenkins
Reviewed-by: James Williams <jamesw@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
fixes CORE-667
fixes GRADE-250
fixes GRADE-251
test plan
- have a user with multiple sis pseudonyms
- enroll user into courses through sis import
using both sis_ids for different enrollments
- each enrollment should return the correct
pseudonym in grade export, Enrollment API,
Section API, Submission API
Change-Id: I2693851b6b65fe8266b3a4e6e8cefc30e3d6f214
Reviewed-on: https://gerrit.instructure.com/136804
Tested-by: Jenkins
QA-Review: Anju Reddy <areddy@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
Fixes ADMIN-311
Test Plan:
* Create an assignment that has an override
assigned to two students
* Conclude one of the users
* Go back to the assignment page and notice it
now only lists '1 Student'
* Go to the edit page and notice only the active
user is listed for the override
Change-Id: I2f351afa4cf341bab1e3679d47cc032c8f729207
Reviewed-on: https://gerrit.instructure.com/131961
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Dan Minkevitch <dan@instructure.com>
refs COMMS-587 COMMS-588
test plan:
- enable the section specific announcements feature flag
- use a course with multiple sections and students across sections
- create some section specific announcements and regular announcements
- test the following API routes as both a teacher and a student
- use your own course id as appropriate
- as a teacher you should see all announcements in a course
- as a student you should only see announcements specific to the
sections that you are enrolled in
[Announcements API]
- /api/v1/announcements?context_codes=course_2
- note that each announcement has a "is_section_specific"
property with the correct value
- /api/v1/announcements?context_codes=course_2&include[]=sections
- note that section specific announcements include correct section
- /api/v1/announcements?context_codes=course_2&include[]=sections&include[]=sections_student_count
- note that section specific announcements' include sections with
correct "student_count" property
[Discussion Topics API]
- /api/v1/courses/2/discussion_topics/?only_announcements=true
- note that each announcement has a "is_section_specific"
property with the correct value
- /api/v1/courses/2/discussion_topics/?only_announcements=true&include[]=sections
- note that section specific announcements include correct section
- /api/v1/courses/2/discussion_topics/?only_announcements=true&include[]=sections&include[]=sections_studenst_count
- note that section specific announcements' include sections with
correct "student_count" property
Change-Id: Idbe68e2d72a538ce5d3701daf12287f3e8bb8d94
Reviewed-on: https://gerrit.instructure.com/136266
Reviewed-by: Steven Burnett <sburnett@instructure.com>
Tested-by: Jenkins
Reviewed-by: Venk Natarajan <vnatarajan@instructure.com>
QA-Review: Landon Gilbert-Bland <lbland@instructure.com>
Product-Review: Felix Milea-Ciobanu <fmileaciobanu@instructure.com>
Fixes PLAT-2967
Test Plan:
- Create an assignment that uses file upload and
a plagiarism detection tool. The assignment
should be a group assignment. The tool should
support LTI launches for originality reports.
- As one of the students in the group submit
to the assignment (there should be at least
two students in the group).
- Create an originality report for the submission/attachment
combo.
- Verify that all originality report LTI launches work
for all students in the group (submission details page,
student grade page, gradebook, speedgrader).
- Verify the normal flow for originality reports works
for non-group assignments.
Change-Id: I2b4002c58bd6438181559f8dab66a67ee0a8f8e2
Reviewed-on: https://gerrit.instructure.com/135974
Reviewed-by: Nathan Mills <nathanm@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
fixes PLAT-2936
fixes PLAT-2935
Test plan:
* Ensure that when the membership service feature flag is disabled the
checkbox to allow it on the tool is not visible
* Ensure that when the memebership service feature flag is enabled the
checkbox to allow it on the tool is visible and can be checked
* Ensure that the checked box persists and is checked when editing the
tool
Change-Id: Ice75acbcdcc25548c8e9f5d53dd1b2256e8ff8ac
Reviewed-on: https://gerrit.instructure.com/134878
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
Product-Review: Karl Lloyd <karl@instructure.com>
test plan:
- import a course via SIS Import
- enroll a student in the course
- as a student, set a nickname for the course
- use the "List courses for a user" API endpoint as an
account admin to list the student's courses
- the SIS ID for the imported course should appear
in the API results
- the student's course nickname should not appear
in the admin's API results
also
- set up module items with completion requirements
- complete some but not all of these as the student
- as the account admin, call
/api/v1/users/<student id>/courses
with
include[]=course_progress
and ensure the student's module progress is included
in the API results
fixes ADMIN-603
Change-Id: I0d45c780505dd4d4c325c5da5651334d8dd44c39
Reviewed-on: https://gerrit.instructure.com/135878
Reviewed-by: James Williams <jamesw@instructure.com>
Tested-by: Jenkins
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
Fixes a bug where assignment group scores could get returned instead
of overall course scores.
closes GRADE-695
Test Plan:
1. Create a course with at least one assignment group and one student.
2. The course will need to be set up such that the following command
in a rails console returns the assignment group score:
enrollment = Enrollment.find(<the-enrollment-id>)
enrollment.scores.where(grading_period_id: nil).first
This may take some trial-and-error during setup to get this result.
My best guess would be that you need to do things in this order:
create the course, enroll the student, add the new assignment group,
delete the course score via a rails console, and then grade the
student in the gradebook to trigger recreation of the course score.
3. Hit the following endpoint and verify you get the scores for the
overall course score back, not the assignment group scores:
/api/v1/courses/:course_id/users/:user_id?include[]=enrollments
Change-Id: I947aefe5e9c76f20d470ae1d9471c62b8a0fa199
Reviewed-on: https://gerrit.instructure.com/135456
Tested-by: Jenkins
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
Reviewed-by: Derek Bender <djbender@instructure.com>
QA-Review: Derek Bender <djbender@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
test plan:
* in the rails console, set a maximum limit for avatars
Setting.set('max_conversation_participant_count_for_avatars', '2')
* have a conversation with 2 recipients and
one with more than 2 recipients
* calling /api/v1/conversations.json?include[]=participant_avatars
should only include 'avatar_urls' for the conversation
with 2 recipients
closes #COMMS-565
Change-Id: I63dfafbee2c44d2e70f8e7f1ecc7d42bb1559a26
Reviewed-on: https://gerrit.instructure.com/134629
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
QA-Review: Venk Natarajan <vnatarajan@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
Discussion topics can be unread even without replies if the user hasn't
looked at the topic yet. This is why it was showing up in the
new_activity filter. This makes the new_activity flag consistent with
the filter.
fixes ADMIN-564
test plan:
* In the student planner, unread discussion topics with no replies
should have the blue dot for new activity and be consistent with the new
activity filter in the api.
Change-Id: Iba112043c8544c4bc73fac5ecd579187969e9a57
Reviewed-on: https://gerrit.instructure.com/134441
Tested-by: Jenkins
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Jon Willesen <jonw+gerrit@instructure.com>
closes PLAT-2927
Test Plan:
- Under an assignment creation, select online
- Click only the Text Entry box
- The plagiarism Review section should appear
- Save the submission
- As a student, submit the assignment after entering text in the
field
- Submission should submit with the body to the TP
Change-Id: Ice010860a8bc89e0ead02c257baaad1bc4e91b23
Reviewed-on: https://gerrit.instructure.com/134430
Tested-by: Jenkins
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Karl Lloyd <karl@instructure.com>
fixes COMMS-525
test plan:
- create two students in a course
- create an assignment and assign it to everyone
- notice the assignment notification on the dashboard activity view
for each of the students
- edit the assignment by assigning it to only the first student
- check the first student's dashboard and notice the assignment
notification is still there
- check the second student's dashboard and notice that the assignment
notification is NOT still there
Change-Id: Id521e20ee3df91efe4b86b0a1677e791c4894dff
Reviewed-on: https://gerrit.instructure.com/133805
Reviewed-by: Venk Natarajan <vnatarajan@instructure.com>
Tested-by: Jenkins
QA-Review: Heath Hales <hhales@instructure.com>
Product-Review: Felix Milea-Ciobanu <fmileaciobanu@instructure.com>
apparently some courses have hundreds of thousands of them
refs #OUT-1611
Change-Id: I1416a8e03de11e7adcc148269689afe809c88592
Reviewed-on: https://gerrit.instructure.com/134241
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
This patchset adds a call to DueDateCacher.recompute to
Assignment#run_if_overrides_changed! to avoid situations where either
cleanup callbacks are skipped or other due date changes that would
change the cached due date.
fixes GRADE-677
test plan:
- Create a course with at least 2 users
- Create an assignment and assign it to just 2 of the users
- Visit the gradebook and note both students are able to be graded
- Return to the assignment settings and remove one of those users
from the override
- Visit the gradebook and note only the still assigned student is
able to be graded
Change-Id: I3cedd13ecedcc1cb785e2a70589fd79bef48802d
Reviewed-on: https://gerrit.instructure.com/134028
Tested-by: Jenkins
Reviewed-by: Shahbaz Javeed <sjaveed@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
QA-Review: Indira Pai <ipai@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
- have files, quizzes, learning outcomes, outcome groups,
and modules in a blueprint course. no items should be
locked.
- ensure outcome group changes appear in the unsynced
changes list correctly
- sync to an associated course
- delete items in the associated course
- change the same items in the blueprint in some way
(i.e., rename them)
- re-sync
- the deleted items should not be undeleted in the
associated course
- non-deleted outcome groups should not gain a link
to a deleted outcome (that shows only in the left pane)
fixes ADMIN-559
Change-Id: Ibe8842353760260b050a6330cd27df986b17b5e7
Reviewed-on: https://gerrit.instructure.com/133374
Tested-by: Jenkins
Reviewed-by: James Williams <jamesw@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
fixes ADMIN-105
Test plan
- Create a graded discussion
- As user 1 (probably a teacher), add a comment to the discussion
- As user 2 (probably a student), go to
/api/v1/planner/items?filter=new_activity
- Ensure the graded discussion shows up in the API
- Ensure it doesn't show up twice in /api/v1/planner/items (or
anywhere else it shouldn't)
Change-Id: I21a88a4e5181e2a43ce5d03cf92230d3107d5093
Reviewed-on: https://gerrit.instructure.com/132096
Tested-by: Jenkins
Reviewed-by: Dan Minkevitch <dan@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Pert Eilers <peilers@instructure.com>
It used to have an api url, which is the wrong thing to do. We don't
currently have a real html url for planner notes, so just omit the
field.
fixes ADMIN-533
test plan:
* planner todo items should not be links in the todo list
Change-Id: I8d65bfcfaeeb9fe9f89b05f3520437c5f121d4a9
Reviewed-on: https://gerrit.instructure.com/132675
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins
Product-Review: Pert Eilers <peilers@instructure.com>
fixes QO-281
test plan:
- have a quiz with a short time limit
- have a student start a quiz and not finish it
- as a teacher, go to the moderate page
- click on "Check on outstanding quiz submissions"
- it should show the users name correctly, and work if you submit
Change-Id: I40c36f41ca07536d700da9da9c9a7f9dd21b6b35
Reviewed-on: https://gerrit.instructure.com/132829
Tested-by: Jenkins
Reviewed-by: Davis Lynn McClellan <dmcclellan@instructure.com>
QA-Review: Michael Hanks <mhanks-c@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
In the groups index page for a course, we were not displaying
inactive users. This caused problems when a student tried to
sign up for a full group that had inactive users in it, since
we told them that the group had spaces.
This change now displays inactive as well as active users, so
the student is now told that the group is full. It is up to
the teacher to remove such students if they see fit.
Fixes COMMS-4
Test plan:
* Have a course with some self sign-up groups, with a limit.
* Fill the group up to the limit with active students, making
sure you have a student left that is not in the group.
* Now, deactivate one of the students in the group.
* With the student *not* in the group, act as that user.
* Go to the "people" page for the course and click on groups.
* Now the student will be told that the group is full.
* Become the teacher again.
* Go to the group in question, the inactive users in it should
be marked as such.
Change-Id: If54df1e22779a5c0a4a97ed79245e7d5a6d76713
Reviewed-on: https://gerrit.instructure.com/131728
Tested-by: Jenkins
Reviewed-by: Felix Milea-Ciobanu <fmileaciobanu@instructure.com>
QA-Review: KC Naegle <knaegle@instructure.com>
Product-Review: Matt Goodwin <mattg@instructure.com>
closes CNVS-13382
test plan
- import terms through SIS
- create terms manually
- GET /api/v1/accounts/:account_id/terms
should have sis_import_id if you have
permissions to see it
- check that sis_import_id is in api docs
Change-Id: I86b11910149b43280698460fb2967b9e385c0ce3
Reviewed-on: https://gerrit.instructure.com/29946
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
refs CNVS-10408
test plan
- import courses through SIS
- create courses manually
- /api/v1/accounts/self/courses should have
sis_import_id if you have permissions to see it
- check that sis_import_id is in api docs
Change-Id: Ia4537fb8856dcbc831f707350bd8c6b762673d79
Reviewed-on: https://gerrit.instructure.com/29940
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
The required delayed post and lock at times for group topics aren't
filled in in the database, so this fetches them and sticks them
in the response.
This wasn't a problem for *graded* discussions because the frontend
logic checks the associated assignment first for a delayed posting
time.
Fixes COMMS-194
Test Plan:
* Have a course with groups.
* Make a group discussion not available until the future.
Make sure it is not graded.
* Go to the group discussions page and verify that it the
"not available until" phrase is now shown.
Change-Id: I8aa961ffb5590d5d31cea34ef1f9d959386d55af
Reviewed-on: https://gerrit.instructure.com/131539
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
QA-Review: Felix Milea-Ciobanu <fmileaciobanu@instructure.com>
Product-Review: Venk Natarajan <vnatarajan@instructure.com>
Fixes: PFS-9067
Test Plan:
API ENDPOINT: api/v1/courses/[course_id]/assignments/[assignment_id]
1) Verify that legacy rubrics return correct default values.
- In an old rubric (created prior to September 2017) verify -
a) criterion_use_range is false.
b) rating.long_description is ""
2) Turn on criterion_use_range in account settings.
- Add a rubric with a criterion that uses ranges, and one that
does not.
- Verify criterion_use_range is correct in api for rubric.
3) Add a long description to a criterion.
- Verify long description shows up in the api endpoint.
Change-Id: I8d57a98a145f784f50c8d0bfbbabaed0cf90db8d
Reviewed-on: https://gerrit.instructure.com/131515
Tested-by: Jenkins
Reviewed-by: Matt Berns <mberns@instructure.com>
QA-Review: Aiona Hernandez <ahernandez@instructure.com>
QA-Review: Andrew Porter <hporter-c@instructure.com>
Product-Review: Sidharth Oberoi <soberoi@instructure.com>
test plan:
* create an object with html content
(e.g. a discussion topic)
* in the rce editor for the object
use the "create a link to a new page" to create a
link to a new wiki page with a title with a space
or another special character
* after saving, follow the link to create the new page
* use the api to view the html content for the object
(e.g. /api/v1/courses/X/discussion_topics/Y/)
* the "data-api-endpoint" added onto the wiki page
link should give a working api url to fetch
the wiki page data
closes #CNVS-39817
Change-Id: I79a035131c2f45560db96880056140f688b09dd0
Reviewed-on: https://gerrit.instructure.com/129956
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Tested-by: Jenkins
Product-Review: James Williams <jamesw@instructure.com>
test plan:
- render API docs
- test creating planner notes linked to learning objects
via linked_object_asset_string
- ensure you are not able to create more than one planner note
linked to a single learning object
- ensure the API results come back correctly
and the linked_object_url for each type works
(note: I (re)created wiki page links by id to avoid having
to instantiate the linked object in order to return a link,
for performance reasons which will become more important
once we start joining planner notes on index pages)
closes ADMIN-262
Change-Id: I1b5643cab75fb7fd5724d21837bcc6068ea5687f
Reviewed-on: https://gerrit.instructure.com/129557
Reviewed-by: Mysti Sadler <mysti@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Tested-by: Jenkins
Product-Review: Jeremy Stanley <jeremy@instructure.com>
fixes RECNVS-1
also, don't store the attachment.thumbnail_url in the
user.avatar_image_url; the former is potentially time-limited (and also
possibly too long to fit in the field), while the latter is intended for
deferred use.
test-plan:
- do not have inst-fs enabled
- have S3 storage configured, not local storage
- regression test uploads from:
- user and course files areas
- course image picker in course settings
- course content import
- user avatar image picker
- rich content editor
- conversations
- submissions
Change-Id: I0f194873977b621e1cab8413843ffe0345a34b1b
Reviewed-on: https://gerrit.instructure.com/129587
QA-Review: Collin Parrish <cparrish@instructure.com>
Tested-by: Jenkins
Reviewed-by: Andrew Huff <ahuff@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
Fixes: CNVS-37970
Test Plan:
- Enroll a user into a course across a shard boundary
- Add a calendar event (not assignment) for the course
- Log in on the user's home shard and view their calendar
- The event from the cross shard course should appear in the calendar
Change-Id: I3addb678c0504dfad885f11885da61b1a1d769ef
Reviewed-on: https://gerrit.instructure.com/126909
Reviewed-by: Rob Orton <rob@instructure.com>
Tested-by: Jenkins
QA-Review: Rob Orton <rob@instructure.com>
Product-Review: Tyler Pickett <tpickett@instructure.com>
Refs: CNVS-37970
Test Plan:
- Enroll a user in a course in a trusted shard that is not their home
- Create a dated assignment (NOT calendar event) in the cross-shard course
- Create an un-dated assignment (NOT calendar event) in the cross-shard
course
- View that user's calendar, the assignments should show up in the
calendar as well as the undated assignments area
Change-Id: I0c5eaa80fc78355e67a0150b760516997e66d0d9
Reviewed-on: https://gerrit.instructure.com/123495
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
Product-Review: Tyler Pickett <tpickett@instructure.com>
test plan:
* have a blueprint course
* /api/v1/courses/X should return the blueprint restrictions
as documented in the courses api
closes #ADMIN-70
Change-Id: I89a7ebc7e6329d66fada5377517f91b28b443ccf
Reviewed-on: https://gerrit.instructure.com/129275
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
we need to subtract all the slots, not just the visible ones
test plan:
- have an appointment group that covers two courses
with 1 participant per slot
- in one of these courses, reserve a slot as a student
- ensure a student in the other course no longer sees that
slot as available
fixes CNVS-36241
Change-Id: I88fae0ab1e94d75b5a5c10093502e0221453ee36
Reviewed-on: https://gerrit.instructure.com/127973
Tested-by: Jenkins
Reviewed-by: Mysti Sadler <mysti@instructure.com>
QA-Review: Heath Hales <hhales@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
test plan:
* enter student view in a course
* view the sections api index endpoint including
the 'total_students' parameter
i.e. /api/v1/courses/X/sections?include[]=total_students
* the count should not include the test student
closes #CNVS-39676
Change-Id: Iaabd4ad7fc7368bb720d10badd87aaaa96a13680
Reviewed-on: https://gerrit.instructure.com/128043
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
fixes CNVS-39375
test plan
- sis_login_id should not be returned
Change-Id: Icbb49d08052e1cb75c22d02ac0d9b52de14b60f6
Reviewed-on: https://gerrit.instructure.com/126378
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
Tested-by: Jenkins
refactor rest api for submissions to use same logic and param names
closes CNVS-39777
test plan
- verify that `submissionStatus` and `gradingStatus` are
available on a submission type query in GraphQL
- verify that the fields `submission_status` and
`grading_status` are available on the REST enpoint for
submissions by using the params
`?include[]=submission_status&include[]=grading_status`
Change-Id: I6bcfdacc9e868b824d2c00082fdd52310c4869d0
Reviewed-on: https://gerrit.instructure.com/128714
Tested-by: Jenkins
Reviewed-by: Cameron Matheson <cameron@instructure.com>
QA-Review: Collin Parrish <cparrish@instructure.com>
Product-Review: Michael Jasper <mjasper@instructure.com>
fixes CNVS-39635
test plan
- sis import api should return user
Change-Id: If54a50a646c8b73ebf122885d53717572930dda7
Reviewed-on: https://gerrit.instructure.com/128018
Tested-by: Jenkins
Reviewed-by: James Williams <jamesw@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
fixes CNVS-39058, CNVS-39061
Canvas doesn't need to store any additional metadata about instfs
thumbnails; the only metadata it uses about its legacy generated
thumbnails is the url (whether local or s3). we can just generate
thumbnail urls direct to instfs and forgo the thumbnail model
altogether.
test-plan:
- enable instfs
- upload an image to Canvas
- the uploaded image should have a thumbnail in the UI same as a
non-instfs file before this commit, but the thumbnail should be being
read from instfs as well
- regression test thumbnails with instfs disabled
Change-Id: I03c21be89469238de7efa317753763834d41c86c
Reviewed-on: https://gerrit.instructure.com/128180
Reviewed-by: Jonathan Featherstone <jfeatherstone@instructure.com>
Tested-by: Jenkins
QA-Review: Collin Parrish <cparrish@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
This patchset cleans up a few N+1s related to grading periods and
scores when the courses API is called for a student with
include=current_grading_period_scores and include=total_scores
fixes GRADE-300
test plan:
- Have a few courses in an enrollment term with multiple grading
periods set up.
- Have a few courses in an enrollment term without MGP set up.
- Register a student in those courses
- As the student hit the courses API endpoint as:
/api/v1/courses?include%5B%5D=needs_grading_count&include%5B%5D=syllabus_body&include%5B%5D=total_scores&include%5B%5D=term&include%5B%5D=permissions&include%5B%5D=current_grading_period_scores&include%5B%5D=favorites&include%5B%5D=tabs&per_page=99
- Observe in the logs that grading period information and score
information is only loaded once and not once per course
Change-Id: I5c2caf23bb7f51274a0a482ac8b4f3135e887cd6
Reviewed-on: https://gerrit.instructure.com/127447
Reviewed-by: Shahbaz Javeed <sjaveed@instructure.com>
Tested-by: Jenkins
Reviewed-by: Jeremy Neander <jneander@instructure.com>
QA-Review: Derek Bender <djbender@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
fixes CNVS-39065
vs. success_url for legacy path or body of S3 redirect. for parity with
those old responses, we need to have the Location returned from the
capture include the `enhanced_preview_url` when appropriate.
not sure why, but when S3 gives you a redirect after successful upload,
the XHR follows the redirect happily. when inst-fs does, Canvas gives a
CORS error (at least during local development with docker). rather than
try and tell the difference and fix, it, we really shouldn't be
redirecting anyways. use the appropriate REST status and let the client
know that it wants to fetch from the Location explicitly. this explicit
request is happy without any CORS mangling.
test-plan:
- have your local canvas connected to local inst-fs
- go to <canvas>/files
- upload a new file
- upload should succeed, including adding the new file to the UI
- repeat for any other place you can think of to upload a file in
canvas, including:
- avatars
- gradebook
- submissions
- conversations
- etc.
Change-Id: I312aaa17fd000843131c89023e827410cc5e13c6
Reviewed-on: https://gerrit.instructure.com/126012
Tested-by: Jenkins
Reviewed-by: Andrew Huff <ahuff@instructure.com>
QA-Review: Collin Parrish <cparrish@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
closes: GRADE-299
test plan:
- using the quiz submissions api, pass the following params:
- include[]=submission
- include[]=mobile_teacher_state
- include[]=mobile_student_label
- the api should respond with submission objects that include both
mobile_teacher_state and mobile_student_label
Change-Id: Ifd93cb84eee2ce142f17419eb06f4011026a22b7
Reviewed-on: https://gerrit.instructure.com/127416
Tested-by: Jenkins
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
QA-Review: Taylor Wilson <twilson@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
closes GRADE-303
Test Plan:
1. Verify the migration succeeds, and verify you can also roll the
migration back successfully. The rest of the steps will assume the
migration has been run.
2. Create a course with an assignment. Submit to that assignment as a
student, and comment on the submission as the student.
3. Make an API call to get the submissions and their comments for the
assignment.
GET api/v1/courses/:course_id/assignments/:id/submissions?
include[]=submission_comments
Verify the submission comments that are returned have an 'edited_at'
key on them. The value of 'edited_at' should be nil for all comments.
4. Enter a rails console and update the 'comment' attribute on the
submission comment.
assignment = Assignment.find(<your-assignment-id>)
student = User.find(<your-student-id>)
submission = assignment.submissions.find_by(user_id: student)
comment = submission.submission_comments.first
comment.update!(comment: "i am updating the text on the comment!")
5. Make an API call to get the submissions and their comments for the
assignment.
GET api/v1/courses/:course_id/assignments/:id/submissions?
include[]=submission_comments
Verify the value of the 'edited_at' attribute for the comment you
adjusted in step 4 is a timestamp.
Change-Id: I4c91fdfd7a9cef194f08a2d086601fb827a50095
Reviewed-on: https://gerrit.instructure.com/127476
Tested-by: Jenkins
Reviewed-by: Derek Bender <djbender@instructure.com>
Reviewed-by: Shahbaz Javeed <sjaveed@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
Closes PLAT-2819
Test Plan:
- Create a tool consumer profile associated with a
developer key that uses the newly added `vnd.Cavnas.User`
service.
- Install a plagiarism detection tool that uses the
new `vnd.Cavnas.User` service.
- Create an assignment in a course with students and
associate it with the tool.
- Make a request to `/api/lti/users/:user_id` with
the id of one of the students and no access token.
verify that you get a 401
- Make the same request but this time include an
access token. Verify the student details is returned.
- Make the same request but use the user's `lti_context_id`.
Verify that the user details is still returned.
- Remove the tool from the assignment and save the change.
- Make the same request and verify a 401 is returned.
- Verify the behaviors outlined above work when the tool
is installed in a course, account, and root account.
Change-Id: I81bd1446729d194f7f3910bca05638e57e5091d1
Reviewed-on: https://gerrit.instructure.com/126931
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Reviewed-by: August Thornton <august@instructure.com>
Reviewed-by: Nathan Mills <nathanm@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
fixes CNVS-38591
when the inst-fs service is enabled, generate a preflight response
tailored for inst-fs instead of for S3. the service will then receive
the POSTed file data, generate it, and ping Canvas at the embedded
capture URL. compatible with existing Canvas UI.
along the way, some cleanup refactoring in api_attachment_preflight:
* instead of taking submission_context and inferring a folder from
that, have the submission API be responsible for determining the
folder and then just specify it. note that the folder inference was
the only use of submission_context, the submission API was the only
caller of api_preflight_json to specify submission_context, and the
folder option we took over was previously both broken and unused.
* simplify the remaining folder inference code. if a folder is
specified by the code (vs. the user in params), assume they have
necessary access (the :manage_contents permission would fail for a
student making a submission)
* correctly abort if params[:on_duplicate] is invalid. before, if the
UI provided an explicit but invalid value, it would cause a double
render error.
* inline process_attachment_params for update, and skip it on
preflight. the UI never provides any of the possible params but
display_name for preflight, which is then ignored from the
process_attachment_params result because it's treated separately
TODO: tests
* InstFS.upload_preflight_json
* api_attachment_preflight:
- uploading a file to a submission (submissions_api#create_file) when the
submissions_folder feature is enabled stores the file in the user's
submissions folder
- student uploading a file to a submission is not blocked by permissions
- user with :manage_contents permission on a folder is not blocked when
uploading to that folder
- user without :manage_contents permission on a folder is blocked when
attempting to upload to that folder
- no double render error on on_duplicate=invalid
- updates to lock_at, etc., on a file (via files#api_update) stick
* files#api_capture:
- reject if over quota and not flagged quota_exempt
- attachment.locked based on usage rights settings
- attachment.handle_duplicates
- content migration success callback triggered
* InstFS.authenticated_url:
- includes iat claim
- expiration is a timestamp
test-plan:
inst-fs upload happy path:
- have inst-fs service running, have canvas configured to be able to
find and share a secret with it, and enable the inst-fs plugin setting
- go to the files area, or a discussion, or a conversation, etc., and
upload a file.
- the file should be successfully uploaded
- NOTE: known issue, there seems to be a race condition in the service
responding 201 Created with a Location before Canvas is ready to
respond to that Location. This will make the upload appear to fail.
But if you refresh the page, the file should be present. This race
condition will be fixed in a later commit; it has already been filed
as a separate bug.
- attempt to download/preview the file
- download/preview should work, and should be served from inst-fs
quota enforcement:
- configure a course to have a quota
- select a file that should exceed that quota when uploaded
- bypassing the canvas UI, access the preflight endpoint directly
while providing the true size; preflight should fail
- access the preflight endpoint directly while providing a false size
that would fit inside the quota; preflight should succeed
- attempt to POST the file to the returned upload_url with the
returned upload_params; the upload should fail
locking pending usage rights:
- configure the account to lock files without usage rights
- upload a file
- the newly created file should be locked
- assign usage rights to the new file
- it should unlock
path collisions:
- upload a file to a folder
- upload a distinct file but with the same filename to the same folder
- should be prompted to rename or overwrite
- select rename; the newly uploaded file should have the filename
modified to avoid the collision
- repeat, but selecting overwrite; the filename should now refer to
the new file, and the old file should not be accessible in the UI
non-inst-fs unharmed:
- disable the inst-fs plugin setting
- do general regression tests on file uploads (whether S3 or local
storage)
Change-Id: I2bff1e3c31a3ed0955c29e677a422b7149253318
Reviewed-on: https://gerrit.instructure.com/124929
Tested-by: Jenkins
Reviewed-by: Andrew Huff <ahuff@instructure.com>
QA-Review: Collin Parrish <cparrish@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
Closes PLAT-2848
Test Plan:
- Enable the vericite plugin
- Create an assignment and associate it with a plag detection tool
- Set the visibility option to 'after grading'
- save the assignment
- edit the assigment and verify the visibility optoin is still
set to 'after grading'
Change-Id: Ic5a9f4ef8088661a1ff36d387c6496adaf4177be
Reviewed-on: https://gerrit.instructure.com/126816
Reviewed-by: Nathan Mills <nathanm@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
fixes GRADE-174
Test Plan:
1. Create a course with at least one student
2. Create a new assignment with no overrides
- leave the due date blank
- press Save and Publish
3. Edit the assignment
- add an override for one student
- leave the due date blank
- press Save
4. Verify that the override is displayed correctly
on the assignment page
- first row titled "1 student"
- second row titled "Everyone Else"
Change-Id: I096f890cee807d1c62e8dd5785c123055b5a1b24
Reviewed-on: https://gerrit.instructure.com/126560
Tested-by: Jenkins
Reviewed-by: Neil Gupta <ngupta@instructure.com>
Reviewed-by: Shahbaz Javeed <sjaveed@instructure.com>
QA-Review: Indira Pai <ipai@instructure.com>
Product-Review: Pert Eilers <peilers@instructure.com>
Previoiusly, when viewing a section in the Gradebook as a teacher, if
the "Read SIS Data" permission wasn't enabled, there wasn't a
"Sync Grades" button. Now, the button is present in this scenario.
closes CNVS-39257
Test Plan:
1. Disable the "Read SIS Data" permission for teachers.
2. Create a course with a SIS ID.
3. Create two sections with SIS IDs.
4. Add a teacher to that course
5. Create an assignment.
6. Go to the assignments page and click the "sync to sis icon" next
to the assignment name.
7. As a teacher, go to the gradebook and notice the Sync Grades button.
8. Select an individual section, and notice there is still a Sync Grades
button.
Change-Id: I308e5b4eb23b18dc94cf8e5b6ea3f579e2ca9594
Reviewed-on: https://gerrit.instructure.com/126694
Tested-by: Jenkins
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Reviewed-by: Derek Bender <djbender@instructure.com>
QA-Review: Indira Pai <ipai@instructure.com>
Product-Review: Matt Goodwin <mattg@instructure.com>
when deleting attachments permanently this will
now also delete the s3object. this also makes it
avoid FK error when there are children attachments
fixes CNVS-39122
test plan
- destroy_permanently_plus should work
- download submission zip and it should work
- download eportfolio export and it should work
Change-Id: Ie995b9b3fac739e8aa3e9554c819b263cb67026b
Reviewed-on: https://gerrit.instructure.com/125236
Tested-by: Jenkins
Reviewed-by: brian kirkby <bkirkby@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
test plan:
* file upload assignment submissions should work
and by default be copied to users'
"submissions" folder
closes #CNVS-39333
Change-Id: I747775150a8b03aa305b96cc840354045256430c
Reviewed-on: https://gerrit.instructure.com/126229
Tested-by: Jenkins
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: David Tan <dtan@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
fixes OUT-518
test plan:
1. Select or create a course with three students.
2. Create an assignment.
3. Create an override for two of students.
4. Deactivate one of the students from the override.
5. Visit the Edit Assignment page for this assignment.
6. Change the date of the override.
7. Save the changes.
8. Verify the date was changed successfully.
Change-Id: Ibc3d07035c0a10ff0f3010909a149a722f762601
Reviewed-on: https://gerrit.instructure.com/125590
Tested-by: Jenkins
Reviewed-by: Matt Taylor <mtaylor@instructure.com>
Reviewed-by: Derek Bender <djbender@instructure.com>
QA-Review: Andrew Porter <hporter-c@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
also speed up some of the js_env data for sidebar
test plan:
* the api "Get blueprint information" endpoint
(e.g. /api/v1/courses/1/blueprint_templates/default)
for a blueprint template should
return an 'associated_course_count'
* also the blueprint sidebar should work as before
refs #CNVS-38933
Change-Id: Iea8d8cc6d67f0b53212f271afdcb6cc93cace3a8
Reviewed-on: https://gerrit.instructure.com/124442
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
refs CNVS-39375
test plan
- sis_login_id should not be returned
- it should be returned for the account if the
setting is set
Change-Id: I55c683d41ba7ff716de14df734b0b38f0877e7c5
Reviewed-on: https://gerrit.instructure.com/126052
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
fixes CNVS-39303
test plan
- set integration_id on user with no sis_id
- api should have sis_id attribute and
integration_id
Change-Id: Ia5da25bb9959dbc79aaadd31ea8e8aec36146a23
Reviewed-on: https://gerrit.instructure.com/126053
Tested-by: Jenkins
Reviewed-by: Tyler Pickett <tpickett@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
fixes OUT-996
test plan:
(I recommend having at least two browsers open, one logged in as a teacher
and one as a student, since you'll need to do a lot of switching)
- set up Canvas with CYOE, and ensure that the mastery paths
setting is enabled on the account
- create at least 4 quizzes that will be autograded (e.g. only multiple
choice or T/F questions)
- create some regular assignments that won't be autograded
- create some additional assignments. ensure that you don't assign the
assignment to everyone, only assign them to 'Mastery Paths'
- set up mastery paths on the quizzes and assignments with the additional
assignments, using at least three of each of the following setups for
each:
- single item in a path
- two or more items in a path
- add at least 2 of the quizzes to two modules, as well as the
assignments in their respective mastery paths
- add at least 2 more of the quizzes to other modules, and add assignments
that are NOT part of their respective mastery paths
- as a student, go to the show page of the various quizzes and original
assignments
- they should all indicate that the next mastery path is currently locked
- the 'Next' button should direct you to the course modules page
- as a teacher, go into course settings->Navigation and disable the
modules tab
- as the student, visit the show pages again. The 'Next' button
should be disabled, but the tooltip indicating that the path is locked
should still appear
- as a teacher, re-enable the modules tab
- The behaviors below should be observed in all quizzes unless otherwise
noted, regardless of whether or not the following items in the
respective module are in the quizzes mastery paths
- as a student, take a quiz with a single item in the path, on the
show/results page you should see one of two things, depending on
whether or not CYOE finishes assessing the item before the page is rendered
- it should state the next mastery path is currently processing, and
direct users to the course modules page when clicked
OR
- if the next item in the module was part of the quizzes mastery path,
it should show the newly unlocked item as being next. Otherwise, it
should simply show whatever is next in the module
- if you see the 'processing message above, refresh the page. by this point,
the 'Next' button should reflect the 2nd case mentioned above
- as a student, take the quiz that has a choice of one or another item set
- when you reach the results page, the 'Next' button should indicate that
the user needs to choose their next mastery path.
- clicking the button should take you to the path choose page
- select an item and return to the quiz show/results page.
- if the next item chosen was part of the module, the selected item should
now be shown on the 'Next' button. Otherwise, it should be whatever is next
in the module
- repeat the above steps for the originally created assignments. The only
different behavior that should be observed is that we should never have
to deal with a 'still processing' state, everything else should behave
the same as it did for the auto-graded quizzes
Change-Id: I8eb59cbbbbb4ccb65d3daa149c606c0168790509
Reviewed-on: https://gerrit.instructure.com/125409
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
QA-Review: Leo Abner <rabner@instructure.com>
Product-Review: Sidharth Oberoi <soberoi@instructure.com>
Tested-by: Jenkins
try to make sure that they're actually saving some data
but also don't explode on old invalid assessments
test plan:
* create an assignment with a rubric
* submit to the assignment
* use the assignment api show endpoint
(/api/v1/courses/X/assignments/Y)
and note the "rubric" object showing the criteria ids
* use the submissions api endpoint for
"Grade or comment on a submission"
and the "rubric_assessment" parameter
to save a rubric assessment, using the criteria ids
retrieved earlier
(e.g. "rubric_assessment[criteria_id][points]=5")
* try to use the same endpoint using
invalid criteria ids
* should receive a useful error instead of creating
a rubric assessment that can then break the
submissions api
closes #OUT-1416
Change-Id: Iedfdca8e8d871dcf49e3de1773fc7d74abc225d3
Reviewed-on: https://gerrit.instructure.com/125511
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Andrew Porter <hporter-c@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
test plan:
* have a blueprint course with an associated course
* add an outcome to the blueprint course
* it should copy over to the associated course
closes #MC-290
Change-Id: I7baf402be34541db55bc7291b6ad8d1d5c85aae6
Reviewed-on: https://gerrit.instructure.com/125039
Tested-by: Jenkins
Reviewed-by: Jon Willesen <jonw+gerrit@instructure.com>
QA-Review: Heath Hales <hhales@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
closes GRADE-157
this is currently hidden behind an environment variable until DocViewer
starts consuming this attribute and decides to expose it via a feature
flag
test plan:
* Setup the environment variable ANONYMOUS_INSTRUCTOR_ANNOTATIONS to
'true'
* Start Canvas
* Go to create an assignment and verify that it contains a checkbox to
anonymize instructor annotations for the new assignment
* Verify this checkbox works
* Edit the newly created assignment and verify the checkbox labelled
anonymize instructor annotations always accurately reflects the choice
made when saving the assignment
* Remove the ANONYMOUS_INSTRUCTOR_ANNOTATIONS environment variable
* Restart Canvas
* Go to create an assignment and verify it no longer contains a checkbox
to anonymize instructor annotations
* Edit the assignment you created earlier and verify it also no longer
contains a checkbox to anonymize instructor annotations
Change-Id: Ia43dee5c45ccd151319380e673d70dc509512ca8
Reviewed-on: https://gerrit.instructure.com/123646
Tested-by: Jenkins
Reviewed-by: Derek Bender <djbender@instructure.com>
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
QA-Review: Indira Pai <ipai@instructure.com>
Product-Review: Matt Goodwin <mattg@instructure.com>
Closes PLAT-2816
Test Plan
- Create a sub account
- In the sub account create a course and
install a plagiarism detection tool
- Create an assignment in that course and
verify the tool can be associated with
the assignment.
Change-Id: Ie4b6661c60f4832ba865658f28f8088fde00fa30
Reviewed-on: https://gerrit.instructure.com/125052
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Reviewed-by: Andrew Butterfield <abutterfield@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
closes GRADE-172
Test Plan:
1. Verify the New Gradebook History page results includes a "Current"
grade column. The current grade should behave in the following ways:
a) The points possible should be shown if the assignment is currently
displaying grades as points and the current grade can be parsed as
a number.
b) If a current grade is not available (like if the submission has
been destroyed), the current grade should be displayed as "N/A".
Change-Id: Ie1b753962eec10933be8a3be3829c1e2419a643f
Reviewed-on: https://gerrit.instructure.com/124834
Tested-by: Jenkins
Reviewed-by: Derek Bender <djbender@instructure.com>
Reviewed-by: Jeremy Neander <jneander@instructure.com>
QA-Review: Indira Pai <ipai@instructure.com>
Product-Review: Matt Goodwin <mattg@instructure.com>
This currently does not expose a dropped mobile_teacher_state because
that concept isn't currently exposed in any meaningful way.
See also: GRADE-16
This API is undocumented by design.
closes: GRADE-168
Test Plan
=========
Base Case
---------
- Given an assignment with at least one submission
- When fetching the submissions API:
`/api/v1/courses/1/assignment/1/submissions`
- Then the fields `mobile_student_label` and `mobile_teacher_state`
are not present
Mobile Student Label Use Cases
---------------
Resubmitted:
- Given a submission that is resubmitted
- When fetching the submissions API with the string
'mobile_student_label' in the `include` query parameter:
/api/v1/courses/1/assignment/1/submissions?include[]=mobile_student_label
- Then the submission JSON includes a field 'mobile_student_label'
with the value 'resubmitted'
Missing:
- Given an assignment that is past due with no student submission
- When fetching the submissions API with the string
'mobile_student_label' in the `include` query parameter
- Then the submission JSON includes a field 'mobile_student_label'
with the value 'missing'
Late:
- Given an assignment that was submitted but was after the due date
- When fetching the submissions API with the string
'mobile_student_label' in the `include` query parameter
- Then the submission JSON includes a field 'mobile_student_label'
with the value 'late'
Submitted:
- Given an assignment that has as submission
- When fetching the submissions API with the string
'mobile_student_label' in the `include` query parameter
- Then the submission JSON includes a field 'mobile_student_label'
with the value 'submitted'
Unsubmitted:
- Given an assignment without a submission
- When fetching the submissions API with the string
'mobile_student_label' in the `include` query parameter
- Then the submission JSON includes a field 'mobile_student_label'
with the value 'unsubmitted'
Mobile Teacher State Use Cases
---------------
Excused:
- Given an assignment with an excused submission
- When fetching the submissions API with the string
'mobile_teacher_state' in the `include` query parameter:
/api/v1/courses/1/assignment/1/submissions?include[]=mobile_teacher_state
- Then the submission JSON includes a field 'mobile_teacher_state'
with the value 'excused'
Needs Review:
- Given a quiz with an essay question that needs review and student
submission for said quiz
- When fetching the submissions API with the string
'mobile_teacher_state' in the `include` query parameter
- Then the submission JSON includes a field 'mobile_teacher_state'
with the value 'needs_review'
Needs Grading:
- Given an assignment submission that hasn't yet been graded
- When fetching the submissions API with the string
'mobile_teacher_state' in the `include` query parameter
- Then the submission JSON includes a field 'mobile_teacher_state'
with the value 'needs_grading'
Graded:
- Given an assignment submission that has been graded
- When fetching the submissions API with the string
'mobile_teacher_state' in the `include` query parameter
- Then the submission JSON includes a field 'mobile_teacher_state'
with the value 'graded'
nil:
- Given an assignment submission that has been graded
- When fetching the submissions API with the string
'mobile_teacher_state' in the `include` query parameter
- Then the submission JSON includes a field 'mobile_teacher_state'
with the value null
Also test with quiz submission
Change-Id: Icbc784b47ecc3baecb770703a9515b52b326e347
Reviewed-on: https://gerrit.instructure.com/123007
Reviewed-by: Spencer Olson <solson@instructure.com>
Tested-by: Jenkins
Reviewed-by: Shahbaz Javeed <sjaveed@instructure.com>
QA-Review: Taylor Wilson <twilson@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
fixes CNVS-36185
test plan:
- record/upload video file through tinymce "Record/Upload Media" button
- before recording/uploading the the media, enter text into the Title field
- finish recording/uplading the media and the dialog will dismiss adding
your recording to tinymce
- switch view to HTML edit mode and verify that the alt tag has your title
- save the comment/page/whatevs
- refresh the page and inspect the thumbnail button
- verify the alt text is included on the anchor tag
- edit the page/comment/whatevs and verify the alt text carries into the edit
- rejoice!
Change-Id: I5ab76688315c668b3c0fe1d06f7ff642650fc4e0
Reviewed-on: https://gerrit.instructure.com/122074
Tested-by: Jenkins
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: brian kirkby <bkirkby@instructure.com>
Closes PLAT-2779
Test Plan:
- Create an assignment with a plagiarism detection tool
associated. Set the 'Show originality report to students'
to 'Never'.
- Create an originality report for a submission and
verify it is not visible to the student on the submission
details page or grades summary page. It should still be
visible to the teacher.
- Edit the assignment and change the visibility option to
'After the due date'. Also set the due date to a date/time
in the past.
- Verify the originality report is now visible to the student in
the submission details page and grade summary page (note that
you may need to flush redis).
- Create a new assignment associated with a plagiarism detection
tool and set the visibility option to 'After the assignment
is graded'.
- Create a submission and an originality report.
- Verify that the student cannot view the originality report
until the assignment has been graded by the teacher.
- Edit the assignment and change report visibility
to Immediately. Verify that the student can still
view the originality report.
Change-Id: I35a4e87275577b5b5d9cc0c1ce3501a5ae048a79
Reviewed-on: https://gerrit.instructure.com/123766
Reviewed-by: Andrew Butterfield <abutterfield@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Tested-by: Jenkins
Product-Review: Jesse Poulos <jpoulos@instructure.com>
so we don't constantly refetch the same data when running
progressions
test plan:
* module progressions with assignment overrides
should work as before
closes #CNVS-38735
Change-Id: If85cb5f6d736eaebdcd84a5e16fcf1b243ec42aa
Reviewed-on: https://gerrit.instructure.com/123268
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Heath Hales <hhales@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
closes GRADE-171
There are some edge cases where if the assignment went from points
based to non-points based and vice versa, grades will not show up
with points possible or they show up as the non-points based type
with a points possible. Examples are "100" alone and "A/100".
Test Plan
1. Grade some points based assignments.
2. Grade some non-points based assignments.
3. Check the history page; the points based assignments show a points
possible that the assignment was out of. The non-points based
assignments do not show points possible.
4. Change the points possible on a points based assignment.
5. Re-grade that assignment.
6. Check the history page; the new entries from Step 5 show up with
the new points possible. The old entries from before Step 4 show
with the old points possible.
Change-Id: Id7a4e20622daf021047e378815dea2f8ed6ace9c
Reviewed-on: https://gerrit.instructure.com/122817
Reviewed-by: Brian Park <bpark@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
Tested-by: Jenkins
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Matt Goodwin <mattg@instructure.com>
Fixes: SIS-2912 and SIS-2915
Test plan:
- Enable SIS feature options
- Navigate to a course
- Confirm you can create an assignment with post_to_sis checked
- Confirm you can create an assignment without post_to_sis
checked
- Edit the assignment
- Check post_to_sis and add a due date for Everyone Else
- Confirm the assignment saves
Change-Id: I921343525713747e3a1fb7a0242ae62826c163f8
Reviewed-on: https://gerrit.instructure.com/122693
Reviewed-by: Michael Brewer-Davis <mbd@instructure.com>
Product-Review: Brad Humphrey <brad@instructure.com>
Tested-by: Jenkins
QA-Review: Mark McDermott <mmcdermott@instructure.com>
closes CNVS-38670
test plan:
- perform a search with the recipient search api
(/api/v1/search/recipients)
- result should include full_name for users
Change-Id: I1ac89ac35448bf3ca68b754ca5fefb794e97d4e3
Reviewed-on: https://gerrit.instructure.com/122709
Tested-by: Jenkins
QA-Review: Tucker McKnight <tmcknight@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Brent Burgoyne <bburgoyne@instructure.com>
fixes gh-1095
test plan
- api should have restrict_enrollments_to_section_dates
Change-Id: I4b3eb38bafefe09c1fbaccc95cd4450c425a821a
Reviewed-on: https://gerrit.instructure.com/122770
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Tucker McKnight <tmcknight@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
closes CNVS-38354
test plan:
- hit the CommMessages api
- it should return `from` and `from_name`
Change-Id: Ie06a09e778a3f0098a1ae80cd5bfc237014715bb
Reviewed-on: https://gerrit.instructure.com/120316
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
closes CNVS-38163
test plan:
- run Setting.set('content_migrations_expire_after_days', '1')
- create some content imports if you don't already have any
- ContentMigration.where(id: ContentMigration.last.id).
update_all(created_at: 2.days.ago)
- visit the course content import page
- it should show as unavailable
Change-Id: I0491a1f1e292c0d9ded2ca202bd2cd997839a4bf
Reviewed-on: https://gerrit.instructure.com/118714
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
there is a measurable cost associated to this step of api content
transformation, so only run it on types of url attributes that might
actually need to be rewritten (ignore mathml href's)
fixes CNVS-38442
test plan:
- create a submission with a lot of <p> tags
- request it from the API
- performance should be better
- now create a link/image to something root-relative in canvas
- request it from the api
- it should come back as absolute
Change-Id: I21fc42db25e84e70a0d19db7dc271cfd46801ecb
Reviewed-on: https://gerrit.instructure.com/122400
Tested-by: Jenkins
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
QA-Review: Tucker McKnight <tmcknight@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
fixes GRADE-75
test plan:
* Create a Quizzes.Next quiz
* Complete the quiz as 2 different students
* As the teacher, access the quiz in speed grader
* Adjust the fudge points for the first student
* Navigate to the second student and then back to the first student
* The quiz should still be visible
Change-Id: I4cd9d743f8a2c0c5b511f8f5615c8ed0edc81991
Reviewed-on: https://gerrit.instructure.com/122041
Reviewed-by: Brian Park <brian@siimpl.io>
Reviewed-by: Shahbaz Javeed <sjaveed@instructure.com>
Tested-by: Jenkins
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
closes: GRADE-133
Test Plan:
1. Navigate to gradezilla
2. Change some late policy values in settings cog menu
3. Observe that upon clicking 'Update' in the menu,
all late and missing assignments are updated to show
the new grades.
- Late submission deductions are applied when enabled
- Late submission deductions are updated when penalty
value is changed
- Late submission deductions persist when late
deductions are turned off
- Missing submission grades populated when policy set
- Does not affect existing grades!
- Missing submission grades unchanged when policy unset
- Submissions in closed grading periods are unaffected
by any late or missing policy changes
Change-Id: I6d0f759a1653ab58a749a9d7b0b95eff453a432c
Reviewed-on: https://gerrit.instructure.com/119148
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Tested-by: Jenkins
Reviewed-by: Neil Gupta <ngupta@instructure.com>
QA-Review: Indira Pai <ipai@instructure.com>
Product-Review: Matt Goodwin <mattg@instructure.com>
refs FALCOR-544
refs FALCOR-539
Test plan
- Create some grading items and some discussions/announcements
- Ensure they are not showing up with the new_activity flag
- in the API yet
- Ensure they do not show new_activity for submissions
- Grade or add feedback to the grading items
- Reply to the discussion/announcements
- Ensure that the api now does show new_activity
Change-Id: I8cf448c3296c21057aba9a9006b8efd8044986bd
Reviewed-on: https://gerrit.instructure.com/120658
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: David Mirabile <dmirabile-c@instructure.com>
Product-Review: Christi Wruck
refs PLAT-2708
Test Plan:
- Create a developer key through the Canvas UI and
verify that a new vendor code text input is
available and optional.
- Verify each of the following:
* If a vendor is associated with a devloper key they
must use one of the associated developer keys
when registering.
* If a vendor is associated with a developer key
they may not register without using a
developer key.
* If a vendor is associated with a developer key
they may not use a developer key other than
one they are associated with to register.
* If a vendor is not associated with a developer key
they must register without a developer key.
Change-Id: I9c9974706f542c1442988634790656da1c407cb8
Reviewed-on: https://gerrit.instructure.com/118592
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Nathan Mills <nathanm@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Tested-by: Jenkins
Product-Review: Jesse Poulos <jpoulos@instructure.com>
fixes CNVS-38231
test plan
- delete an admin
- admin should be gone from every where
- admin should not have permissions to do stuff
Change-Id: I56c90a12b2be879c5d646c1ab6980693ff161673
Reviewed-on: https://gerrit.instructure.com/119220
Reviewed-by: Tyler Pickett <tpickett@instructure.com>
Tested-by: Rob Orton <rob@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
Change-Id: I2f4ca4a671a0e5bdcfbeb90b4714465ec34acc9f
Reviewed-on: https://gerrit.instructure.com/120891
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
adds sorting to the 'Courses' and 'SIS ID' columns of the Courses tab
and the 'Name' and 'Last Login' columns of the People tab
closes CNVS-33425
test plan:
- turn on Account Course and User Search feature flag
- go to /accounts/1/search/courses
- make sure Courses and SIS ID columns are clickable and sortable
- make sure that keyboard interaction and a11y looks good
- go to /accounts/1/search/people
- do the same for the Name and Last Login columns of the People tab
add sorting by Teacher column in courses
add sorting by first alphabetical teacher to
the 'Teacher' column of the Courses tab
test plan:
- turn on Account Course and User Search feature flag
- go to /accounts/1/search/courses
- make sure the Teacher column is clickable and sortable
- make sure that keyboard interaction and a11y look good
add sorting by Enrollments column in courses
add sorting by number of students enrolled to
the 'Enrollments' column of the courses tab
test plan:
- turn on Account Course and User Search feature flag
- go to /accounts/1/search/courses
- make sure the Enrollment column is clickable and sortable
- make sure that keyboard interaction and a11y look good
add sorting by Email and SIS ID columns in People
add sorting by 'Email' and 'SIS ID' columns of
'People' search tab
test plan:
- turn on Account Course and User Search feature flag
- go to /accounts/1/search/people
- make sure the Email column is clickable and sortable
- make sure the SIS ID column is clickable and sortable
- make sure that keyboard interaction and a11y look good
change UserPane to extend React.Component
change UserPane.js to be a class that extends React.Component
instead of using the old React.createClass
test plan:
- go to /accounts/1/search/people
- make sure the user search feature works the same as before
fix queries and lint warnings
fix SQL queries based on Tyler's suggestions
and fix some lint warnings throughout
test plan:
- go to /accounts/1/search/courses
- make sure sorts still work
- make sure queries are as correct and efficient
- go to /accounts/1/search/people
- do the same
- make sure Gergich is relatively happy
sort teachers in course and lint fixes
change course search so that teachers are sorted alphabetically
within a course (if it has multiple teachers). also a few lint
fixes here and there.
test plan:
- go /accounts/1/search/courses
- make sure that teachers are sorted within a course
Change-Id: I710878bd8ce98ba2fa4eb0c357721864df338939
add a sortable column for subaccounts to course search
add a new column to course search for subaccount
make it sortable like the other columns
test plan:
- turn on Account Course and User Search feature flag
- go to /accounts/1/search/courses
- make sure the correct subaccounts are showing
- make sure the subaccount column is clickable and sortable
- make sure that keyboard interaction and a11y look good
Change-Id: Ic8b8f258c27c16982a450286f6b715c9e04d425e
fix focus for keyboard navigation in Course Search sorting
prevent the CoursesList from rerendering sometimes on sorts
so that it doesn't lose focus
test plan:
- turn on Account Course and User Search feature flag
- go to /accounts/1/search/courses
- make sure keyboard interaction doesn't lose focus
Change-Id: I6236c92f6e71596d3dc38ef756e6ac808e9e99c2
fix invalid email sorting in User Search
fix the sorting of invalid emails in User Search
so that invalid emails (that don't show up) come last
test plan:
- turn on Account Course and User Search feature flag
- go to /accounts/1/search/courses
- make sure that invalid blank emails are sorted last
Change-Id: I56e6b1e57a1d494e7667c3cfc7b14a10976ec52e
fix invalid emails showing in User Search
fix User Search so that invalid emails don't display when
the "Load More..." button is pressed
test plan:
- turn on Account Course and User Search feature flag
- go to /accounts/1/search/courses
- have more than 10 users so "Load More..." is there
- click "Load More..." and make sure invalid emails don't display
for the newly-loaded users
Change-Id: I5bc23c616ae88da73f8632699c3bde1bffee994d
fix IE11 User Search sorting issue
fix User sorting in IE11 so that it doesn't go back to the
Courses tab when trying to sort
test plan:
- use IE11
- turn on Account Course and User Search feature flag
- go to /accounts/1/search/people
- make sure sorting works (doesn't take you to Courses tab)
Change-Id: I63491ca0b08812e21ed0ed2eb2f8a4bd1b791b89
fix add user in User Search bug where email doesn't show up
fix User Search so that when a user is added, their email
shows up without refreshing the page
test plan:
- turn on Account Course and User Search feature flag
- go to /accounts/1/search/people
- add a new user with a valid email
- make sure it displays before refreshing
Change-Id: Ib339bab3ea858c7c1ab18a6065ef4936941cb24b
remove debugger
Change-Id: Ibf88893ea35d795d8966c7580100ac135c8cfe93
Reviewed-on: https://gerrit.instructure.com/120294
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Andrew Katsanevas <akatsanevas@instructure.com>
closes CNVS-38022
test plan:
* regression test Gradezilla with grading periods, especially:
* filtering by grading periods
* sorting by grading periods
* grade locking (closed grading period grade protection)
Change-Id: Ic03e00cbe428e57bd0df7f29f1193deb1945d4a4
Reviewed-on: https://gerrit.instructure.com/119438
Tested-by: Jenkins
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Pert Eilers <peilers@instructure.com>
Fixes: SIS-2869, SIS-2768
Notes: This commit is also for Mastery Paths.
Repeat the first six steps for Mastery Paths.
However, instead of a section override create
a Mastery Path override. If you need help
setting up Mastery Paths ping me.
Test plan:
- Enable the new SIS integration settings
- Check the `Require due date` setting
- Navigate to a course with more than one section
- Navigate to the assignments tab
- Create an assignment with one section override and
add a due date
- Confirm the assignment saves
- Repeat the same steps with two section overrides
- Confirm the assignment saves
Change-Id: I4ce249f24e381fb14698a784b6cf80d4dc839c31
Reviewed-on: https://gerrit.instructure.com/115330
Reviewed-by: Brad Humphrey <brad@instructure.com>
Product-Review: Brad Humphrey <brad@instructure.com>
QA-Review: Mark McDermott <mmcdermott@instructure.com>
Tested-by: Jenkins
Change-Id: Ieef3d3447cfa2b22c9c9f6662688a40ae48a726c
Reviewed-on: https://gerrit.instructure.com/119730
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
Replace crocodoc_ids with moderated_grading_ids
Both canvadocs and crocodoc can use the ids now
refs RD-4238
Test Plan:
With a course that has one teacher, 2 TAs, and a student
- Create an assignment, check the moderated grading check box
- as the student submit the assignment
- as a TA, pull up the submission in speed grader, annotate and grade it
- as the Other TA, open the submission in speed grader
- make sure you cant see the first TAs comments
Change-Id: I886af3e21f9276866ea4be8d5de6574b32e5f122
Reviewed-on: https://gerrit.instructure.com/117360
Tested-by: Jenkins
Reviewed-by: Shahbaz Javeed <sjaveed@instructure.com>
Product-Review: Caleb Guanzon <cguanzon@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Reviewed-by: Derek Bender <djbender@instructure.com>
Change-Id: I6beefb3ca636e1915e9cdd173c04d3aa4bac07bc
Reviewed-on: https://gerrit.instructure.com/118923
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
Change-Id: I7ffe15c36ba0699d704f568590a6b6afe4916fd9
Reviewed-on: https://gerrit.instructure.com/118680
Tested-by: Jenkins
Reviewed-by: Dan Minkevitch <dan@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
closes: CNVS-37839
Test Plan:
1. As a teacher, navigate to SpeedGrader for an
assignment with at least one late submission
2. Switch student to one that has a late, penalized submission
3. Observe that:
- Unpenalized grade is displayed in input field
- Penalty is displayed below input field
- Modified grade is displayed below input field
4. Repeat 1-3 for assignments of all `grading_type`s
- Known issue: 'pass_fail' assignments do not
display the points correctly if they have an
existing late deduction. To be addressed in
future ticket.
5. Repeat with provisional grading
- Observe thate late penalty stuff doesn't apply
to provisional grades
Change-Id: Ie0acc835d9565faa9226c6969c70b4e8c5d0220e
Reviewed-on: https://gerrit.instructure.com/117217
Tested-by: Jenkins
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Reviewed-by: Sheldon Leibole <sheldon@siimpl.io>
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Matt Goodwin <mattg@instructure.com>
refs FALCOR-453
Test plan
- Ensure that planner overrides can have dismissed
- attributes added both during update and create
- Ensure the dismissed attribute shows up in the
- planner items api
- Ensure the dismissed attribute shows up in the
- missing submissions api, if you include overrides
Change-Id: I28faa856b65ecf6b931761c89eb6ac337848e25c
Reviewed-on: https://gerrit.instructure.com/117965
Reviewed-by: Dan Minkevitch <dan@instructure.com>
Tested-by: Jenkins
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Mysti Sadler <mysti@instructure.com>
test plan:
- in a course, create appointment groups with both
individual and group signup
- as a student, sign up for both
- ensure that, when you click the appointments as a student,
you don't see the "Group Options" and "Delete" buttons
- ensure that a teacher does see this in both places
fixes CNVS-37047
Change-Id: I5b31cfd4587db9365fd9a0ddafdb920035eade3f
Reviewed-on: https://gerrit.instructure.com/118180
Tested-by: Jenkins
Reviewed-by: James Williams <jamesw@instructure.com>
QA-Review: David Tan <dtan@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
Remove documentation for accepted_at on submissions, because it is
going to get replaced by seconds_late. Also, no longer return the
accepted_at attribute in the submissions API. Finally, rename
duration_late to seconds_late, because in the change to replace
accepted_at with seconds_late, that method will no longer return
a Duration; it will return an integer number of seconds.
closes CNVS-38000
Test Plan:
1. Verify responses from the submissions API no longer return the
accepted_at field on submissions.
2. Verify responses from the submissions API now return a field named
seconds_late instead of duration_late
3. Verify the submissions API documentation no longer includes
information about the accepted_at field, and documentation for
duration_late has been renamed to seconds_late.
Change-Id: I903dedd45bcb822109d78ff815d6cecd2feb2a8d
Reviewed-on: https://gerrit.instructure.com/117657
Reviewed-by: Shahbaz Javeed <sjaveed@instructure.com>
Tested-by: Jenkins
Reviewed-by: Derek Bender <djbender@instructure.com>
QA-Review: KC Naegle <knaegle@instructure.com>
Product-Review: Neil Gupta <ngupta@instructure.com>
fixes CNVS-37888
test plan
- run a sis import with more than 50 errors
- should have all the errors in the error file
and not just the first 50
Change-Id: Ib927b0aef1367ca7a7d21040d8eecdb80d341301
Reviewed-on: https://gerrit.instructure.com/117762
Tested-by: Jenkins
Reviewed-by: Tyler Pickett <tpickett@instructure.com>
QA-Review: Tucker McKnight <tmcknight@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
Fixes CNVS-37395
Test plan:
* Create a course with 2 students
* Create an assignment with a due date for everyone
* Create a differentiated assignment with a due date for only 1 student
* In rails console:
* Run `DueDateCacher.for_course(course_id)
* Make sure `Submission.count` is 3
* Make sure the first assignment has 2 placeholder submissions
* Make sure the second assignment only has one placeholder submission
Change-Id: I5c8084d4fb0138f65e4c117dcc97638cf8d4f49d
Reviewed-on: https://gerrit.instructure.com/114573
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Shahbaz Javeed <sjaveed@instructure.com>
Product-Review: Neil Gupta <ngupta@instructure.com>
QA-Review: Neil Gupta <ngupta@instructure.com>
Fixes FALCOR-422
Fixes FALCOR-426
Test Plan:
* As a student
* In a course with Student Planner enabled
* And existing Planner Notes
* GET, PUT, POST, and DELETE from the `api/v1/planner_notes`
endpoint
* The responses should all be JSON formatted correctly and
return string IDs when the `Accept:
application/json+canvas-string-ids` header is passed
* The `GET` index/list endpoint should not return deleted notes
Change-Id: I2435d62e8794aacbd4bb2d9484f9e89170187f4e
Reviewed-on: https://gerrit.instructure.com/116980
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Dan Minkevitch <dan@instructure.com>
fixes CNVS-37717
test plan
- run sis import that would generate errors
- the json for the import api should have an
errors_attachment object
- the ui should have a download file option
Change-Id: I2c6f94b601be5777b8a57f4b5b56f9f2215869ec
Reviewed-on: https://gerrit.instructure.com/116523
Tested-by: Jenkins
QA-Review: Tucker McKnight <tmcknight@instructure.com>
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
Closes PLAT-2686
Test Plan:
- As a student create submissions for several assignments
- Retrieve gradebook history via the api for that student:
/api/v1/courses/<id>/gradebook_history/feed?user_id=<id>
- Verify that an n+1 query does not occure for originality
reports. (the repeating query we want to avoid look something like this:
SQL OriginalityReport Load (4.1ms) SELECT "originality_reports"
.* FROM "originality_reports" WHERE "originality_reports"
."submission_id" = 55487625)
Change-Id: Id5ba23772bc3eaa3b7ac253b4e6c61a8744ed6b3
Reviewed-on: https://gerrit.instructure.com/116270
Tested-by: Jenkins
Reviewed-by: Andrew Butterfield <abutterfield@instructure.com>
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
refs FALCOR-333
Test plan
- Create a quiz planner override for a quiz/announcement in Canvas
- POST /api/v1/planner/overrides -d 'plannable_type=quiz'
- POST /api/v1/planner/overrides -d 'plannable_type=announcement'
- Call GET /api/v1/planner/items and ensure the override
- shows up for that quiz/announcement
- Create a overrides on discussion topics/wiki pages
- or other types of items that could be graded
- and ensure they show up in the planner items override
Change-Id: I1bc18b7d80199bdad0cb59f7f27ab44c08442e64
Reviewed-on: https://gerrit.instructure.com/116015
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
QA-Review: Dan Sasaki <dsasaki@instructure.com>
Product-Review: Mysti Sadler <mysti@instructure.com>
Closes FALCOR-375
Test Plan:
* As a student
* In a course with Student Planner enabled
* With various learning objects with associated
todo_dates, due dates, posted dates, etc
* GET /api/v1/planner/items
* The response should contain a `plannable_date` for each
object, with the date reflecting (in order of presence)
todo_date, due_at, posted_at, or created_at
Change-Id: I3058f265cd91ef4e4f41b1266958a6cc049f213b
Reviewed-on: https://gerrit.instructure.com/116233
Tested-by: Jenkins
Reviewed-by: Mysti Sadler <mysti@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Dan Minkevitch <dan@instructure.com>
Closes FALCOR-325
Fixes FALCOR-361
Test Plan
Date Range Testing:
* With "Student Planner" enabled
* As a student
* Make a GET request to /api/v1/planner/items
with ?start_date=YYYY-MM-DD&end_date=YYYY-MM-DD&filter=new_activity
* The response should only contain results with new activity
between those time ranges (test with dates and dates with times)
Pagination Testing:
* With "Student Planner" enabled
* As a student
* Make a GET request to /api/v1/planner/items
with some combination of start_date, end_date, and filter
* Include a a `per_page` param
* The response should only contain only `per_page` number of
results
* The response should contain a `Link` header with links to the
current, next, and previous pages (you should see a URL with
a `page=bookmark:[bunch of characters]`)
* Copy the `page` param from the `Link` header for the next
page of results
* Make a request with the newly copied `page=bookmark:[stuff]`
parameter added to the request
* You should get the next page of results in the response
* The previous and next URLs in the `Link` response header should
return the previous and next page of results
Regression Testing:
* Full regression test of "New Student Planner"
Change-Id: Ie6352aec71f5de3c60981aaeee65119cc43ed6f7
Reviewed-on: https://gerrit.instructure.com/114848
Reviewed-by: Steven Burnett <sburnett@instructure.com>
Tested-by: Jenkins
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Dan Minkevitch <dan@instructure.com>
test plan:
- set an account to default post_to_sis on
- create an assignment via the api with post_to_sis = false
- verify that the assignment was created with post_to_sis = false
fixes SIS-2871
Change-Id: I0eda67788445ad3899f80acf3e1a768dd3b63f3e
Reviewed-on: https://gerrit.instructure.com/115859
Reviewed-by: Nick Houle <nhoule@instructure.com>
QA-Review: Mark McDermott <mmcdermott@instructure.com>
Tested-by: Jenkins
Product-Review: Brad Humphrey <brad@instructure.com>
Closes FALCOR-361
Test Plan:
* With "Student Planner" enabled
* As a student
* Make a GET request to /api/v1/planner/items
with ?start_date=YYYY-MM-DD&end_date=YYYY-MM-DD&filter=new_activity
* The response should only contain results with new activity
between those time ranges (test with dates and dates with times)
Change-Id: I575d99fba4128b695f38bb552c82ad9414137fca
Reviewed-on: https://gerrit.instructure.com/116101
Reviewed-by: Steven Burnett <sburnett@instructure.com>
Tested-by: Jenkins
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Dan Minkevitch <dan@instructure.com>
fixes gh-1055
test plan
- Execute API call to get a list of external tools associated with a group:
GET /api/v1/groups/2921/external_tools?include_parents=true
- Examine the headers on the response. The Link header for retrieving more pages should point at:
/api/v1/groups/2921/external_tools?include_parents=true&page=2&per_page=10
Change-Id: Ied9bdb3ea36384faa2148f199047bebe87837aed
Reviewed-on: https://gerrit.instructure.com/115211
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
closes CNVS-31861
test plan:
* Create a course without any modules and ensure it has at least
two assignments and two students enrolled in it
* Create a course with two modules and at least two assignments
in each module and an additional two assignments outside of
any modules
* Go to Gradezilla for Course 1
* Verify that the "View > Arrange By" menu does not show any way
to sort by modules
* Go to Gradezilla for Course 2
* Verify that the "View > Arrange By" menu shows two new options
labelled
- "Modules - First to Last"
- "Modules - Last to First"
* Choose "View > Arrange By > Modules - First to Last"
* Verify that the assignment columns are arranged in the same
order as they are on the modules page
* Verify that all assignments not in any modules show up at the
end of the assignment columns
* Verify that all assignments not in any modules show up in the
same order as they are on the assignments page
* Choose "View > Arrange By > Modules - Last to First"
* Verify that the assignment columns are arranged in the reverse
order of the one they are in on the modules page
* Verify that all assignments not in any modules show up at the
front of the assignment columns
* Verify that all assignments not in any modules show up in the
same order as they are on the assignments page
* Go to the Modules page and drag/drop the assignments and
modules to different locations and verify those orders are
preserved when you go to Gradezilla and arrange assignment
columns by modules.
* Go to the Assignments page and drag/drop the assignments and
verify those orders are preserved when you go to Gradezilla
and arrange assignment columns by modules
Change-Id: I4a4b56f18c7a24272d6c11590bdc8a0d9d55c356
Reviewed-on: https://gerrit.instructure.com/114485
Tested-by: Jenkins
Reviewed-by: Spencer Olson <solson@instructure.com>
QA-Review: KC Naegle <knaegle@instructure.com>
Product-Review: Christi Wruck
Closes FALCOR-332
Test Plan:
* As a student
* In a course with the new Student Planner enabled
* With assignments that have submissions
with comments/feedback, as well as unread
discussion topics
* GET /api/v1/planner/items?filter=new_activity
* It should respond with only those items that have
unread/unviewed activity
* Additionally, the `submitted` key in the `submissions` object
should be `true` for items with submissions
Change-Id: I776ef9113e6c29f9958c8a22ff86227daf88239c
Reviewed-on: https://gerrit.instructure.com/114730
Tested-by: Jenkins
Reviewed-by: Mysti Sadler <mysti@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Dan Minkevitch <dan@instructure.com>
Closes FALCOR-345
Test Plan:
* As a student
* In a course with "Student Planner" enabled
* With missing submissions for the current user
* And planner overrides created for at least one
of the missing assignments
* GET /api/v1/user/:user_id/missing_submissions
* The endpoint should return missing submissions
* Repeat the request with `?include[]=planner_overrides` passed
as a parameter/query string
* The response should be the same as above, but include a
`planner_override` key that contains the JSON data for the
associated planner override
Change-Id: Ibcd809a6344c5ceef7018fdf9027da1f4b1d784e
Reviewed-on: https://gerrit.instructure.com/115179
Reviewed-by: Steven Burnett <sburnett@instructure.com>
Tested-by: Jenkins
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Dan Minkevitch <dan@instructure.com>
closes OUT-1317
Test plan:
1. Create a course in Canvas
2. Visit
domain.canvas/api/v1/courses/<course_id>
3. Verify that "uuid" field is present in JSON
response
Change-Id: I4a504061a0af55ce635be13e71fa873abd88748c
Reviewed-on: https://gerrit.instructure.com/114839
Tested-by: Jenkins
Reviewed-by: Matt Berns <mberns@instructure.com>
QA-Review: Leo Abner <rabner@instructure.com>
Product-Review: Michael Brewer-Davis <mbd@instructure.com>
Closes PLAT-2544
Test Plan:
- Create a course with a student and a tool that allows
the student to return an ltiLaunchUrl as an outcomes
service message.
- Submit to the assignment as the student
- Go to the gradebook and click the comment bubble to open a modal
- Verify the submission URL does the LTI launch
returned when the submission was created.
Change-Id: I61bf8d0cb9205d3bef864b64f0ebe392c118ded1
Reviewed-on: https://gerrit.instructure.com/114303
Tested-by: Jenkins
Reviewed-by: Andrew Butterfield <abutterfield@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>