refs QUIZ-4583, QUIZ-4626
Must be tested in conjunction with QUIZ-4415
Provides visual indicators in assignment list for the Importing, and
Failed to import states. Allows for the user to remove a failed
assignment import from the list.
Test Plan:
- Do a Common Cartridge or QTI import, enabling Quizzes.Next importing
- Monitor state transitions in Canvas Assignment views.
- Ensure they move from Importing to a finished stated.
Change-Id: I6f07ecae7b5a93dadd5309bb54bf15724f512c16
Reviewed-on: https://gerrit.instructure.com/151026
Reviewed-by: Omar Khan <okhan@instructure.com>
Tested-by: Jenkins
QA-Review: David Tan <dtan@instructure.com>
Product-Review: Kevin Dougherty <jdougherty@instructure.com>
Refs MBL-10482
Test Plan:
- Create a super observer connected to a student
- Student should be enrolled in a course
- Create a threshold for `assignment_missing` for that student
- POST /api/v1/users/observer_alert_thresholds
- {
student_id: :student_id,
threshold: {
alert_type: 'assignment_missing'
}
}
- Create an assignment that is due in the course for a minute
or two in the future
- Wait at least 5 minutes
- As the observer hit /api/v1/users/self/observer_alerts/:student_id
- There should be an alert for that user
Change-Id: If2dea94052ff932c866a7382a2119a3287350c28
Reviewed-on: https://gerrit.instructure.com/152073
Reviewed-by: Cameron Sutter <csutter@instructure.com>
Product-Review: Cameron Sutter <csutter@instructure.com>
Tested-by: Jenkins
QA-Review: Taylor Wilson <twilson@instructure.com>
closes MBL-10643
test plan:
- use the new endpoint to generate a pairing code
for a student
- use the endpoint as the student, a teacher, or an admin
- if the user is not a student, it should error
- if the one making the api call is not a teacher/admin
or the same user, it should error
endpoint:
POST /api/v1/:user_id/observer_pairing_codes
Change-Id: I8b6df83bb592b72c169ca9eaaa83278c7b6623c7
Reviewed-on: https://gerrit.instructure.com/152627
Tested-by: Jenkins
Reviewed-by: Matthew Sessions <msessions@instructure.com>
Product-Review: Matthew Sessions <msessions@instructure.com>
QA-Review: Matthew Sessions <msessions@instructure.com>
closes: GRADE-1125
test plan:
- enable the anonymous moderated marking feature flag
- create an anonymously graded assignment
- create a text submission for this assignment
- in speedgrader, score the submission
- the score should update on the page (not revert back!)
- the response object should not contain user_id (including
in the submission_history)
- toggle off the anonymoud grading for the assignment
- in speedgrader, rescore the submission
- the score should update
- the response object should not contain anonymous_id anywhere
Change-Id: I2911d5e09a25be4a7ab58404eed209002b6cfbce
Reviewed-on: https://gerrit.instructure.com/148896
Reviewed-by: Adrian Packel <apackel@instructure.com>
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
QA-Review: Adrian Packel <apackel@instructure.com>
Tested-by: Jenkins
Product-Review: Sidharth Oberoi <soberoi@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 CORE-1475
test plan:
- use the users pandata_token endpoint, but with
`/api/v1/users/self/pandata_token`
- it should still work
Change-Id: I6ef8723d564cab4035821761817809033461c18c
Reviewed-on: https://gerrit.instructure.com/152117
Tested-by: Jenkins
Reviewed-by: Cameron Sutter <csutter@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@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>
fixes CORE-1397
fixes CORE-1398
test plan
- run sis import that changes workflow_states of objects
- restore the sis import
- the states should be restored
- rake doc:api should work
Change-Id: I4fb401699d53d4d8309c986ae27eefea99e93d53
Reviewed-on: https://gerrit.instructure.com/150113
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Rohan Cheeniyil <rcheeniyil@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
fixes CORE-931
test plan
- migrations should run
Change-Id: I0e836bb4db2ab19fd7763864bea02c8c9dcbe552
Reviewed-on: https://gerrit.instructure.com/139665
Tested-by: Jenkins
Reviewed-by: James Williams <jamesw@instructure.com>
QA-Review: Rohan Cheeniyil <rcheeniyil@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
closes MBL-10124
test plan:
- create an observer alert (probably in the rails console)
- use the new endpoint to mark it read
- create another observer alert
- use the new endpoint to dismiss it
endpoint:
/users/:user_id/observer_alerts/:observer_alert_id/:workflow_state
:workflow_state should be either 'read' or 'dismissed'
Change-Id: I44e06a703e059d8188a841259846b088bb9b1c68
Reviewed-on: https://gerrit.instructure.com/150730
Reviewed-by: Matthew Sessions <msessions@instructure.com>
Product-Review: Matthew Sessions <msessions@instructure.com>
QA-Review: Matthew Sessions <msessions@instructure.com>
Tested-by: Jenkins
Refs MBL-10125
Test Plan:
- From the rails console
- Create a student and an observer and link them
with a UserObservationLink record
- Create an ObserverAlertThreshold pointing to that
link for any alert_type (ie: assignment_grade_high)
- Create an ObserverAlert that points to that threshold
and the link with a workflow_state of 'unread'
- Create an ObserverAlert that points to that threshold
and the link with a workflow_state of 'read'
- Create another UserObservationLink for the same parent
but pointing to a different student
- Follow the same instructions of creating a threshold and 2 alerts
for this link
- hit /api/v1/users/self/observer_alerts/unread_count as the observer
- You should have a count of 2
- hit /api/v1/users/self/observer_alerts/unread_count?student_id=:id
using the id of one of the students you've created
- You should have a count of 1
Change-Id: Id13c87f2f59f8058a0aaee4e7f1b8afa542c8c08
Reviewed-on: https://gerrit.instructure.com/150787
Tested-by: Jenkins
Reviewed-by: Cameron Sutter <csutter@instructure.com>
QA-Review: Cameron Sutter <csutter@instructure.com>
Product-Review: Matthew Sessions <msessions@instructure.com>
closes: GRADE-894
test plan:
- enable the anonymous moderated marking feature flag
- create an anonymously graded assignment
- create a text submission for a student
- in speedgrader, the submission previews correctly
- toggle anonymously graded off for the assignment
- in speedgrader, the submission previews correctly
- also test for file uploads, images
Change-Id: I030a741668d30b763626e1a247fb355c4ec0a8da
Reviewed-on: https://gerrit.instructure.com/148708
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Adrian Packel <apackel@instructure.com>
Tested-by: Jenkins
QA-Review: Adrian Packel <apackel@instructure.com>
Product-Review: Sidharth Oberoi <soberoi@instructure.com>
Refs MBL-10126
Test Plan:
- In the rails console, create a
UserObservationLink and an ObserverAlertThreshold
- Create an alert that links to both
- Create another alert that links to both but has
a created_at set to more than 6 months ago
- Run ObserverAlert.clean_up_old_alerts
- Run ObserverAlert.all
- You should only have 1 alert
Change-Id: I23f4723574cde01135ddafb9926c06029266d07d
Reviewed-on: https://gerrit.instructure.com/150324
Reviewed-by: Cameron Sutter <csutter@instructure.com>
Product-Review: Cameron Sutter <csutter@instructure.com>
Tested-by: Jenkins
QA-Review: Kausty Saxena <ksaxena@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>
we discovered that direct string comparision of xlog locations can give
invalid results in some situations, where second part of the xlog
location value "wraps" from 7 hex characters to 8
Change-Id: I62215e5fcc3f9655643aab9fc99f55ddbb37e8ac
Reviewed-on: https://gerrit.instructure.com/150385
Tested-by: Jenkins
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@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 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
fixes problems when run on relations that are using `from()`
Change-Id: I528dfb7e6885b4ce276900a53d9b2f8adfabafe5
Reviewed-on: https://gerrit.instructure.com/149795
Reviewed-by: Rob Orton <rob@instructure.com>
Tested-by: Jenkins
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
closes CORE-1245
recent internal changes in rails (released in 5.1.6) make it more
difficult for our module prepend to work, because column information is
no longer referenced lazily when checking on attribute defaults (see
changes to model_schema.rb). this means that we would need to tie in at
a lower level so that _default_attributes excludes the dropped column,
but in looking at that, Rails 5 added support for ignoring columns,
which ties in at the right level and should solve the same use case we
have.
see http://api.rubyonrails.org/classes/ActiveRecord/ModelSchema/ClassMethods.html#method-i-ignored_columns-3D
Change-Id: I1f76e9d0894551f90232a36f5d48f27f8989c3a1
Reviewed-on: https://gerrit.instructure.com/145723
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Tucker McKnight <tmcknight@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
refs ADMIN-278
Test plan
- Specs pass
- /calendar and /calendar2 route both
still work and calendar shows up as
expected
Change-Id: Ic17a203417c354dbeaf7a5c68cc47e845c091850
Reviewed-on: https://gerrit.instructure.com/148061
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins
Reviewed-by: Carl Kibler <ckibler@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Mysti Sadler <mysti@instructure.com>
To help support close out issues, add a support helper that runs the
DueDateCacher and then recalculates grades for a course.
closes GRADE-1120
test plan:
- access /api/v1/support_helpers/due_date_cache/course?course_id=6
to make sure it kicks off a new DueDateCacher run. It should send
you a success email.
- make sure that endpoint is only accessible when you are logged in as
a site admin user
Change-Id: Ida5f7db0484cfd4e33e1094244a3b8c00b523c6a
Reviewed-on: https://gerrit.instructure.com/148694
Tested-by: Jenkins
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Jeremy Neander <jneander@instructure.com>
QA-Review: Shahbaz Javeed <sjaveed@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
We're planning to make API calls to Canvas from Quizzes.Next to notify
it that an assignment has finished duplicating. But making API calls to
Canvas is hard, as it requires lots of configuration, an oauth dance,
and a fair amount of luck.
To ensure that assignments don't get stuck in the "duplicating" state if
Quizzes.Next -> Canvas communication breaks down, this commit adds a
periodic job to transition assignments to the "failed_to_duplicate"
state if they have been duplicating for more than 5 minutes.
Refs QUIZ-3764
Test plan:
- Create a Quizzes.Next assignment
- Go to the canvas assignments page
- Click on the kebab menu for the assignment, click "Duplicate"
- Wait 10 minutes
- Refresh the page
- Check that the new assignment displays a "failed to duplicate" message
Change-Id: Ibaf8c16117bc7ab7fc24007944943c3090ba7041
Reviewed-on: https://gerrit.instructure.com/148001
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Product-Review: Omar Khan <okhan@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: CORE-1331
We want to make it so our build tasks to do i18 strings for JavaScript
Don’t need to run ruby rake tasks or know anything about rails first.
But the english strings were actually using some rails or i18n gem
defaults that you could only find out about by doing (in ruby):
I18n.backend.send(:translations)
This commit just copies those keys that it would put in the generated
config/locales/generated/en.yml file Into config/locales/en.yml
Test plan:
* date pickers and calendar date display should be the same as it was
before for English users.
Change-Id: I3cf3ec90621897c57515691825d4cd80481866b8
Reviewed-on: https://gerrit.instructure.com/147887
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
rails uses callbacks internally to manage dirty state tracking. in
a recent update, skipping these callbacks when saving a new object
breaks any future updates to that object (because id_from_database is
not populated, which is then used as `nil` when trying to do
a subsequent update). see:
6932998fc7 (diff-1a091d0f7eb7b0b2ca95c82f5ba0e1fb)
Because of that I feel like saving without any callbacks is somewhat
dangerous. I think if you have to do it, use one of the built in active
record methods that skips callbacks:
http://guides.rubyonrails.org/active_record_callbacks.html#skipping-callbacks
Or use our active_record-suspension gem to skip specific app-level
callbacks.
test plan: tests pass
Change-Id: I7bfb87e328317430fb2a77edca56cace2cd372b5
Reviewed-on: https://gerrit.instructure.com/146139
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
closes MBL-8783
test plan:
- send a DELETE request to /api/v1/users/self/communication_channels/push
with {push_token: <user's device push token>}
- it should return {success: true} and that notification_endpoint should
be deleted
Change-Id: Iac4d63cb7040acfcde48751dc3f0ead5351d7f0b
Reviewed-on: https://gerrit.instructure.com/143762
Reviewed-by: Steven Burnett <sburnett@instructure.com>
Tested-by: Jenkins
QA-Review: Tucker McKnight <tmcknight@instructure.com>
Product-Review: Cameron Sutter <csutter@instructure.com>
we never want to just increment the last migration version number by 1,
it's too likely to generate conflicts
Change-Id: If6c95470b9fae257cc40c45a3eac0e1d871fb657
Reviewed-on: https://gerrit.instructure.com/145952
Reviewed-by: Rob Orton <rob@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
fixes CORE-1240
test plan
- run account report using parallel runner
- it should work
Change-Id: Ib0e8480e53d65b7e5b7f4d3c3f2f36c7d283fb52
Reviewed-on: https://gerrit.instructure.com/145605
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
test plan:
- render API docs
- view documentation for the "permissions" endpoint in the
Accounts controller
- hit api/v1/accounts/<id>/permissions and verify:
- if permissions[]=read_roster&permissions[]=manage_students
(for example) are supplied, those permissions are returned as
JSON keys, with a value of true if the caller has the permission
- 'self' can be used for the account id to hit the root account
- a 401 error is returned if:
- the calling user isn't authenticated
- the calling user doesn't have an account role
or an enrollment in the course in the account
refs ADMIN-826
Change-Id: Ia01ea79279bdeb51e9e3bcf7a8c4b0ac0577dd4f
Reviewed-on: https://gerrit.instructure.com/145315
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Tested-by: Jenkins
Reviewed-by: James Williams <jamesw@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
Also adds some additional dashboard helpers
Closes ADMIN-898
Test Plan:
* Regression test the user dashboard
* User dashboard should work as before
Change-Id: I74405ef88891008c64181d53febb636f4cfe964a
Reviewed-on: https://gerrit.instructure.com/145136
Tested-by: Jenkins
Reviewed-by: Mysti Sadler <mysti@instructure.com>
QA-Review: Mysti Sadler <mysti@instructure.com>
Product-Review: Dan Minkevitch <dan@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>
closes MBL-9792
test plan:
- make a request to /api/v1/users/:id/pandata_token
with param 'app_key' of value 'IOS_pandata_key'
- make the same call with a value of 'ANDROID_pandata_key'
- both should return a 200 code
and a json object with a 'token' and a 'expires_at'
Change-Id: If993ad3c49b89a61ef8caa91d5f347250998070b
Reviewed-on: https://gerrit.instructure.com/144535
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
QA-Review: Tucker McKnight <tmcknight@instructure.com>
Product-Review: Cameron Sutter <csutter@instructure.com>
Change-Id: I67b0b7b9baa41d76a34f37e2b33541cb10760dc6
Reviewed-on: https://gerrit.instructure.com/145006
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
closes COMMS-769
closes GH-1079
Test Plan:
1. As an instructor or administrator create a conference and join the
session. Click on the recording button and after a few seconds
logout from BBB.
2. The recording has to be processed, so wait for some minutes and
refresh the page. More recordings can be created in the meanwhile
following step 1.
3. When the recording is ready, the conference (long lasting running or
ended) title can be expanded. The recording (or recordings) should
be shown, one per row. At the left the new button "Delete" should be
shown.
4. Click on delete and the delete message will be sent to BBB. If successful,
the row is deleted.
Change-Id: Ib1ce29bcf786eb35805c4df77becc6e4c9c88893
Reviewed-on: https://gerrit.instructure.com/139457
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Steven Burnett <sburnett@instructure.com>
Product-Review: Matt Goodwin <mattg@instructure.com>
Tested-by: Jenkins
QA-Review: Anju Reddy <areddy@instructure.com>
refs CORE-1196
* avoid calling saving in an after_save callback. things just get weird
* enable logging of deprecation warnings in specs (so that you can
use the log to figure out which spec caused it)
Change-Id: I64804f7b02e4edee0650caa6346cc58bcbe69628
Reviewed-on: https://gerrit.instructure.com/144667
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
also do it 4x daily rather than 1x daily
Change-Id: I328091586226e334c48bfe96b57b0a601bb22ef2
Reviewed-on: https://gerrit.instructure.com/143678
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
fixes PLAT-3176
fixes PLAT-3179
fixes PLAT-3181
fixes PLAT-3177
Test plan:
* Create a DeveloperKey
* Create an AccessToken
* Ensure that everything can be accessed as normal
* Set require_scopes to true on the DeveloperKey
* Ensure that nothing can be accessed
* Add some scopes to the AccessToken from the list of available scopes
TokenScopes::SCOPES
* Ensure that the endpoints associated with those requests work but that
others don't
* Ensure that HEAD requests work for GET endpoints
* Ensure all api endpoints behave normally when scopes are not turned on
for developer key
Change-Id: I0e7c1758ae2d51743490f243cfa21714255c8109
Reviewed-on: https://gerrit.instructure.com/143026
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
Reviewed-by: Nathan Mills <nathanm@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Karl Lloyd <karl@instructure.com>
Closes: CORE-1154
There are 2 feature flags here. One a specific user (internal
employees, sales people, contractors, etc) can turn on to see where we
are and what would still need to be done. And the other is for an
account to be able to turn on to let the users in their account that
have their language set to an RTL language (eg: Arabic, Farsi or Hebrew)
see the interface in RTL
This commit is part of a chain of commits. you'll need to apply the ones
that follow-on after this to see most of the actual Right To Left
features, this commit is mainly just to create the feature flag.
Test plan:
* go to your user settings page
* you should see a feature option for Force RTL Layout”
* it should show that it is “in development”
* it should should be hidden: eg: only appears for site admins and not
For normal users
* turn it on
(if you have this checked out along with the others that follow beind
this commit)
* navigate around canvas, most things on most pages should be RTL
* you should be able to get an idea of how much more work and what
Kind of changes we’d still need to make to get it 100%
* now turn off that user feature flag, and go to your account's settings
* turn on the "allow users from RTL languages to see RTL layout"
account-level feature flag.
* nothing should change for you, it should be LTR like normal
* set your language to either Arabic, Farsi or Hebrew
* now the interface should all be in right to left.
(again, you'll need to have the follow-on commits to this to see all
of the RTL changes)
* without either of the feature flags turned on, absolutely nothing
should be different at all anywhere in the interface.
Change-Id: Ia78d86fa46d2d289b1913c5d1340546d7f6c3a1f
Reviewed-on: https://gerrit.instructure.com/143891
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins
Even though this is a patch level version bump, it made a subtle change
that broke some workflows we had (see https://xkcd.com/1172/).
The second argument to Zip::File.open is a `create` flag, which
determines whether the zip file is created if it does not exist. Prior
to 1.2.1, the expectation was that `Zip::File::CREATE` was passed as the
argument if creation was desired. However, internally the library was
inconsistent about checking the passed flag against `Zip::File::CREATE`
vs just checking truthiness.
In practice, what this meant is that if you passed a different truthy
value, like `Zip::File.open(filename, 'w')` (like we did in several
places), the file would still be created if it did not exist, BUT,
critically, it would not be saved if nothing was put into the archive.
1.2.1 changed this flag to always check "truthiness", meaning empty zip
archives started to be saved. Unfortuantely, our mime type evalutation
rules don't correctly identify an empty zip file as a zip file, but
instead as just a binary file. These two things combined to create
problems.
see https://github.com/rubyzip/rubyzip/compare/v1.2.0...v1.2.1
and particularly fc23f68f77
closes CNVS-41711
test plan:
- test course copy and export/import workflows (both canvas and standard
common cartridge formats), especially in "sparse" cases where, for
example, no associated files would be copied.
Change-Id: If0033f6c0ede7f7a6e8c26031371ae2bd24cd1fb
Reviewed-on: https://gerrit.instructure.com/143744
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
Closes PLAT-3208
Test Plan:
- For all new endpoints verify the the user must have the manage
developer key permission for the requestd account.
CREATE
- In a root account create a developer key.
- Using the new binding create endpoint create a developer key
account binding:
POST
{
"developer_key_account_binding": {
"workflow_state": "on"
}
}
- Verify a DeveloperKeyAccountBinding was created with a workflow
state of 'on', an account id pointing to the root account, and
a develoepr key pointing to the root account developer key.
- Create a developer key in a sub account.
- Repeate the above process but create a binding for the
sub account and sub account developer key.
- Verify you cannont create a binding using the root
account id and the sub account develope key id.
UPDATE
PUT
{
"developer_key_account_binding": {
"workflow_state": "off"
}
}
- Verify you can use the update endpoint to modify
the workflow_state of the DeveloperKeyAccountBinding
create previously in the root account.
- Do the same for sub accounts.
INDEX
- Verify the endpoint lists all DeveloperKeyAccountBindings
from the account specified by the account_id param.
- Verify the endpoint lists all DeveloperKeyAccountBindings
from any parent accounts.
- Verify the endpoint lists all DeveloperKeyAccountBindings
from the site admin account.
Change-Id: Id81b1d5ef0eb1d6a62ca180b66be6f92a285c3de
Reviewed-on: https://gerrit.instructure.com/143908
Tested-by: Jenkins
Reviewed-by: Stewie aka Nicholas Stewart <nstewart@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
Update: Copyright years now reflect the year that the file was first
committed.
Refs: PLAT-3200
Test Plan: jenkins is still happy and specs pass!!
Change-Id: Ic26463defe41fc52cf4da8020976394c641f51d5
Reviewed-on: https://gerrit.instructure.com/143545
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>
(Canvas won't even boot with an older version)
so remove conditionals for older features
Change-Id: Ied601ef97f527ac93d386a650a1bd23f198dcf04
Reviewed-on: https://gerrit.instructure.com/143634
Reviewed-by: Rob Orton <rob@instructure.com>
Tested-by: Jenkins
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
refs gh-1229
also make clear how the collator is configured, vs. the defaults
also also document each of our three uses of ICU to point to each
other if you change anything in the future
Change-Id: Ib911302a96a9d9a667923793ebb2be095b62d8ab
Reviewed-on: https://gerrit.instructure.com/142772
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
fixes CORE-1069
refs CORE-1026
test plan
- have 2 users with conflicting submissions
one with grade one with submission
- merge them
- split them and it should be restored
Change-Id: Id645ddcc0c5182a825e513de7e7d05e6fa50f254
Reviewed-on: https://gerrit.instructure.com/142004
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
QA-Review: Tucker McKnight <tmcknight@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
this is just used to fail the delayed job, so it retries. if it fails
it's max retries, the error details are logged on the submission
Change-Id: If1f7da5dd5331ad153d78c323526eac22afd01c5
Reviewed-on: https://gerrit.instructure.com/143174
Tested-by: Jenkins
Reviewed-by: Nathan Mills <nathanm@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
fixes RECNVS-352
the list of context types in `VALID_CONTEXT_TYPES` corresponds to
possible contexts at all calls to api_attachment_preflight
test-plan:
- have inst-fs enabled and set up
- upload a file as a submission comment
- upload works
Change-Id: Iaa3371a1c9c5cf55196f2b43b134ae863e804017
Reviewed-on: https://gerrit.instructure.com/142890
Tested-by: Jenkins
Reviewed-by: Andrew Huff <ahuff@instructure.com>
QA-Review: Collin Parrish <cparrish@instructure.com>
Product-Review: Jacob Fugal <jacob@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>
This reverts commit 2b9853c82d
but replaces the googlusercontent url that doesn't exist on the
internet with one that will continue to exist:
aka: https://du11hjcvx0uqb.cloudfront.net/dist/images/email_signature-ea0b2cda73.png
Change-Id: I82ba0bb3cc5ae3ef4749f1fcaabe783775dcfc78
Reviewed-on: https://gerrit.instructure.com/143074
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins
test-plan:
- without any other plugin defining `#account` on delayed jobs,
`job.account` should still exist and should return Account.default
- with some other plugin already defining `#account` on delayed jobs,
`job.account` should still use the plugin defined behavior
Change-Id: I5c74febd4525b4196e38c632cfb737a97090f704
Reviewed-on: https://gerrit.instructure.com/143005
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Michael Jasper <mjasper@instructure.com>
QA-Review: Michael Jasper <mjasper@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
fixes COMMS-939
Test Plan:
- send any email in canvas
- notice the footer image is there
- inspect the html source, and notice that the host is
your local Canvas install
- enable CDN config, run `node_modules/.bin/gulp rev`,
and `rake canvas:cdn:upload_to_s3`
- send another enable
- notice the footer image is still there
- inspect the html source, and notice that the host
is the CDN
Change-Id: Ieaed838dee02168a2aa67f3448d8d68fb6f5b701
Reviewed-on: https://gerrit.instructure.com/142889
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Landon Gilbert-Bland <lbland@instructure.com>
QA-Review: Gentry Beckmann <gbeckmann@instructure.com>
Product-Review: Gentry Beckmann <gbeckmann@instructure.com>
closes: QUIZ-3861, QUIZ-4113
Test-Plan:
- QA-CR because it's not hooked up yet
Change-Id: I9028c91f485b63bc8ca8d2c70567c78945c2a848
Reviewed-on: https://gerrit.instructure.com/142304
Reviewed-by: James Williams <jamesw@instructure.com>
Tested-by: Jenkins
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Jayce Higgins <jhiggins@instructure.com>
and rename that suite of methods to make more sense
test-plan: N/A
Change-Id: Iffc520ea55141ac47da669663838a4d3c3d8712c
Reviewed-on: https://gerrit.instructure.com/142486
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
QA-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>
should still copy rules correctly even if the referenced
assignments are not included in the copy
test plan:
* create a blueprint course
* have an assignment group with assignments and
a dropping rule that excludes one of the
assignments
* sync to an associated course
* change the rule on the group
* re-sync
* it should still exclude the correct assignments
in the associated course group
closes #ADMIN-801
Change-Id: I60e2a691426364ca0b93a1f67b29d1ab05d18e8a
Reviewed-on: https://gerrit.instructure.com/141655
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>