non_empty_elements were stripped from the configuration
in 44efa212cd
test plan:
- create a media comment in (old) RCE
- save the page
- edit the page
- the media comment placeholder should still be there
fixes LA-702
Change-Id: I7547345d6faff0b1ab2746d8b56df6475e4690e3
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/228178
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
QA-Review: Ed Schiebel <eschiebel@instructure.com>
Product-Review: Gentry Beckmann <gbeckmann@instructure.com>
closes TALLY-565
This is entirely a search+replace of gradezilla with gradebook, merging
folders in a couple of places. There is nothing here which poses a risk
to the stability of the code. Assuming Jenkins is happy, it can be
merged.
test plan:
* Verify Jenkins passes
Change-Id: Id35bd0fc54ff580c2e2b1513b4e34c4f76d92920
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/227231
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Adrian Packel <apackel@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Keith Garner <kgarner@instructure.com>
QA-Review: Jeremy Neander <jneander@instructure.com>
Product-Review: Keith Garner <kgarner@instructure.com>
flag = none
Test plan:
on portal2 or with prod assets:
- create quiz
- on quiz show page, open "show rubric" option
- verify that dialog loads properly
- create rubric with outcomes
- reload page
- verify that dialog loads properly when
rubric exists
Change-Id: Ic132750654fe35b6bd55dfdb7722665638afc949
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/226828
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
QA-Review: Brian Watson <bwatson@instructure.com>
Product-Review: Michael Brewer-Davis <mbd@instructure.com>
fixes TALLY-55
flag = none
test plan:
Note: There is an issue with editing a grading scheme
on the course settings page more than once. It is a
known issue on master, separate from this change.
1. Visit the course settings page
2. Ensure "Enable course grading scheme" is checked
3. Click "view grading scheme"
4. Edit the grading scheme
5. Set a value with two decimal places
6. Save the scheme
7. Ensure the scheme preserves your change
Change-Id: I2cb414999ed6276bbcbf9ad9912de63da694554b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/227051
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Nick Pitrak <npitrak@instructure.com>
Reviewed-by: Adrian Packel <apackel@instructure.com>
QA-Review: Adrian Packel <apackel@instructure.com>
Product-Review: Spencer Olson <solson@instructure.com>
closes TALLY-563
flag = none
...obviously
test plan:
* Smoke test New Gradebook
* Smoke test Grade Summary
Change-Id: I0bf7f962f5e910002b69d727666464356a1e3ccf
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/225876
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Adrian Packel <apackel@instructure.com>
Reviewed-by: Gary Mei <gmei@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Keith Garner <kgarner@instructure.com>
fixes TALLY-41
flag = none
test plan:
1. Enable "Filter SpeedGrader by Student Group"
in the account settings
2. Create a course with enough students
to make SpeedGrader time out
3. Create an assignment
4. Load that assignment in SpeedGrader
* ensure that SpeedGrader times out
5. Verify the error message includes a link to
the course settings and mentions the
"Large Course" setting
6. Disable "Filter SpeedGrader by Student Group"
in the account settings
7. Load that assignment in SpeedGrader
* ensure that SpeedGrader times out
8. Verify the error message does not include a link
to the course settings
Change-Id: I2bd6909429730193ce1c59797309a811f451abb3
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/226132
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Adrian Packel <apackel@instructure.com>
QA-Review: Jeremy Neander <jneander@instructure.com>
Product-Review: Jonathan Fenton <jfenton@instructure.com>
Make the RCE menus execute the same commands as the toolbar instead of
Tiny's internal commands. Add menu items for things only currently found
in the toolbar.
closes LA-468, LA-403
flag=rce_enhancements
test plan:
- Play around with the RCE menus. They should generally do the same
things as the corresponding toolbar options.
- Check the new "Horizontal line" menu item in the Insert menu
Change-Id: If9abce772496c89cd0a2ec64540aaaf86c77b418
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/226164
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Jon Willesen <jonw+gerrit@instructure.com>
fixes TALLY-199
flag = none
test plan:
* Use Chrome to verify, as only Chrome is affected
* If you have DevTools open, turn off
"Disable cache (while DevTools is open)"
1. Create a course with multiple sections
2. Create a published assignment
3. Visit SpeedGrader for the assignment
4. Click the assignment link
5. Navigate back using either:
* the browser Back button
* finger swipe (same thing)
6. Ensure SpeedGrader displays no unexpected alerts
7. Repeat steps 4–6 a few times to be sure
Change-Id: I8d261d0301517ea99cc24bf5752f94732c1c9028
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/226055
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Adrian Packel <apackel@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
QA-Review: Jeremy Neander <jneander@instructure.com>
Product-Review: Spencer Olson <solson@instructure.com>
closes LA-560
flag=rce_enhancements
test plan:
- from /plugins/kaltura
- check "disable this plugin" and click Apply
- edit something witn an RCE
- click on Media toolbar button
> expect the Upload/Record media menu item not to be there
- return to /plugins/kaltura
- uncheck "disable this plugin"
- fill in the rest if not already and click Apply
- edit something with an RCE
- click on Media toolbar button
> expect the Upload/Record media menu item to be first in the list
Change-Id: Iac680c9e8cb4af1cfae8b212c22e387f025f834a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/225195
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
Reviewed-by: Jon Willesen <jonw+gerrit@instructure.com>
the allowed list of elements removed by canvas should never get
past the RCE
closes LA-526
flag=rce_enhancements
test plan:
- using the html view, create some content in the RCE with
disallowed elements (like main, form, select, button, script)
- switch out of html view and back
> expect the disallowed elements to have been removed, changed
to something else, or html encoded
- not sure how to test this, but canvas should never have to
remove any elements from content created by the RCE
Change-Id: I89c1149e8b24451fc59e9a879b13e549504e1704
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/224717
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jon Willesen <jonw+gerrit@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
flag = none
fixes TALLY-468
Test plan:
- Create a new ePortfolio
- Take note of its ID
- Add a new section (call it, e.g., "MySection")
- Add a page with an HTML component (call it, e.g., "MyPage")
- Add HTML content like so:
<div class="user_content unenhanced">
<div class="tabs enhanceable_content">
<ul>
<li><a href="https://somesite.com">some site</a></li>
</ul>
</div>
</div>
(The destination and inner text of the link may be whatever you like,
but the rest of the content needs to have the structure shown above.)
- Save the page
- Examine your new page from the following vantage points:
- The "preview" view of the main ePortfolio
- http://<host>/eportfolios/<id>?view=preview
- The view of the section
- http://<host>/eportfolios/<id>/MySection
- The view of the specific page you added
- http://<host>/eportfolios/<id>/MySection/MyPage
- In all cases, the content you entered above should continue to appear
as a list containing links, and *not* be automagically transformed
into jQuery tabs that then attempt to load said links
Change-Id: I98cab671bfb37f8be2a92ba6caa5a7e58ec8047f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/224877
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Jeremy Neander <jneander@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Spencer Olson <solson@instructure.com>
Closes PLAT-5378
flag=process_multiple_content_items_modules_index
Test Plan:
- Disable the new feature flag
- Launch a 1.3 tool from the module index page. Verify
the accept multiple claim is false.
- Verify tools cannot return multiple content items from
the module index page
- Enable the new feature flag
- Launch a 1.3 tool from the module inex pave. Verify
the accept multiple claim is true.
- Verify tools can return multiple content items from
the module index page
Change-Id: Ifadeefb7b0094c74c383fca1989ff74470c4abd9
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/225392
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
Reviewed-by: Clint Furse <cfurse@instructure.com>
QA-Review: Clint Furse <cfurse@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
closes PLAT-5262
flag = none
Test Plan:
- setup and run the latest version of the LTI 1.3 Test Tool
- verify the test tool has "Link Selection placement setup with
LtiDeepLinkingRequest set as the MessageType for that placement
(you do this in the DeveloperKey config)
- In a course, choose or create a module
- For that module, click the "+" button to add Item
- In the dropdown, select "External Tool"
- Click the LTI Test Tool
- In the Test Tool iframe, select Content Item Type = "LTI Resource
Link"
- Check the box to "Return multiple Content Items"
- Click Submit
- Module page should now reload and show 3 new modules items under the
selected modules
Change-Id: I2eb71c30e640f5177492e53d38db1efed0e33324
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/224562
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Clint Furse <cfurse@instructure.com>
flag = new_gradebook_plagiarism_indicator
closes TALLY-245
Test plan:
Note that this patchset only updates the icons in the right frame (next
to the grade input field and the list of attachments). The icons in the
left frame will be dealt with separately.
- Have a course with New Gradebook enabled and at least 6 students
- Create an assignment that accepts text entry submissions (A1)
- Create an assignment that accepts attachments (A2)
- Fake some originality data (see APPENDIX)
- Turn the New Gradebook Plagiarism Indicator root account flag ON
- Open each relevant submission in SpeedGrader and check:
- For A1, check that the following appear next to the grade text input:
- "Error" status: an exclamation point (aka "warning") icon
- "Pending" status: a clock icon
- Scored, score above 60%: a solid circle icon
- Scored, between 20 and 60%: a half-filled circle icon
- Scored, below 20%: a green "certified" (spiky check) icon
- The scored icons should all display the score next to the icon
- For A2:
- Check that attachments with originality data show the originality
score in the attachment list (instead of next to the grade), and
behave according to the above rules
- Turn the New Gradebook Plagiarism Indicator root account flag ON
- Check that the above icons have reverted to their old wedge appearance
APPENDIX: creating originality data
You can use the following to set up the parameters for each report:
error_params = {workflow_state: "error"}
pending_params = {workflow_state: "pending"}
high_score_params = {workflow_state: "scored", originality_score: 70}
avg_score_params = {workflow_state: "scored", originality_score: 40}
low_score_params = {workflow_state: "scored", originality_score: 10}
For the assignment with text entry submissions:
- Identify five submissions you want to use for testing
- For each one, upload a text entry submission
- Add originality reports for each one in a console:
> <submission1>.originality_reports.create!(**error_params)
> <submission2>.originality_reports.create!(**warning_params)
> <submission3>.originality_reports.create!(**high_score_params)
> <submission4>.originality_reports.create!(**avg_score_params)
> <submission5>.originality_reports.create!(**low_score_params)
For the assignment with attachments:
- Identify five submissions you want to use for testing
- For each one, submit an attachment
- Add originality reports for each one in a console, and connect them to
the attachment:
> <submission1>.originality_reports.create!(
**error_params,
attachment_id: <submission1>.attachments.first.id
)
> <submission2>.originality_reports.create!(
**warning_params
attachment_id: <submission2>.attachments.first.id
)
> <submission3>.originality_reports.create!(
**high_score_params
attachment_id: <submission3>.attachments.first.id
)
> <submission4>.originality_reports.create!(
**avg_score_params
attachment_id: <submission4>.attachments.first.id
)
> <submission5>.originality_reports.create!(
**low_score_params
attachment_id: <submission5>.attachments.first.id
)
Change-Id: If38115869e818ad50fa112766c96c4188ac8ba60
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/223095
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
QA-Review: Spencer Olson <solson@instructure.com>
Product-Review: Spencer Olson <solson@instructure.com>
closes LA-536
flag=rce_enhancements
test plan:
- open a page with the rce
- click the Media toolbar button
> expect "Upload/Record Media menu item to be available
- go to /plugins, click on kaltura, check the
"Hide the video icon in Rich Content Editor." checkbox
and click Apply
- return to a page with the rce
- click the Media toolbar button
> expect "Upload/Record Media menu item to be absent
Change-Id: I7c7d89c18115c8d2970da4db736614d252a3661a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/224823
Reviewed-by: Steven Burnett <sburnett@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
test plan:
- before checking out this patch set, put the following text in
a wiki page:
<a class="external_url_link" href="#"
data-item-href="javascript:alert('hi')">XSS</a>
(note that reproducing the issue depends on a race condition;
the page text must be present before the domready callbacks in
context_modules.js run)
- check out the patch set and note that clicking the link
takes you to about:blank instead of running javascript
- use the wiki pages API to try to inject the text from step 1
into a page. the data-item-href attribute should be stripped
fixes LA-499
flag=none
Change-Id: I1ce377c9a386332ae336fc4ffe7a2bf257364a11
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/224051
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jon Willesen <jonw+gerrit@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
closes QO-555
test plan:
- create an old quiz with 90+ questions with time limit, and
multi-attempts is allowed
script to create a 100-question quiz:
lqq = Quizzes::QuizQuestion.find(2)
(2..100).each do |i|
qq = lqq.dup
qq.assessment_question_id = i
qq.save!
end
- take the quiz as a student multiple times (and reload it
from chrome)
- make sure quiz timer runs well
Change-Id: I93c524206b8e50cb110247218076cebb8c86973a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/223524
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Laura Gonzalez-Horwitz <lgonzalez-horwitz@instructure.com>
QA-Review: David Tan <dtan@instructure.com>
Product-Review: Kevin Dougherty <jdougherty@instructure.com>
fixes TALLY-211
flag=none
Test plan:
You should test this in Firefox, as it was the only browser known to
actually execute the uploaded CSV.
- Have a course with New Gradebook and some students
- In Gradebook, create a custom column or enable the "Notes" column
- Export grades as CSV
- Edit the CSV so that at at least one student has a custom column
containing Javascript that can be executed, e.g.:
"test""><svg/onload=alert(document.location)>"
- Import the new CSV file
- On the confirmation page, you should see the bogus value you entered
above
- It should *not* be executed as Javascript (i.e., you shouldn't see
an alert displaying the current URL)
Change-Id: I3f1304f362df9e987dbf051e594d26ac04e868f4
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/222625
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Gary Mei <gmei@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
QA-Review: Spencer Olson <solson@instructure.com>
Product-Review: Spencer Olson <solson@instructure.com>
test plan:
- enable new sis integrations feature flag
- check "sis syncing" and "default sis sync" in account settings
but do not check "require assignment due date"
- create a new assignment on the modules index
- edit the assignment and notice that sis syncing is enabled
- check the account setting to require due dates
- create another assignment on the modules index
- it should create successfully, but not use sis syncing
fixes LA-162
flag=new_sis_integrations
Change-Id: Ibcf4674f46475d00ab2683fd2c81171074d292d7
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/222115
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: James Williams <jamesw@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
fixes QO-479
Previously, when making a change to a quiz score in speedgrader, then
navigating to another student, then back to the student with modified
scores, the modified scores were shown, but clicking |Update
Scores| resulted in no changes to the final score. This change ensures
that clicking |Update Scores| correctly sets the changed scores.
Test Plan
---------
- Create an (old) quiz
-- Ensure that the quiz creation flow continues to work as expected
- Take that quiz with two or more students
-- Ensure that the take experience continues to work as expected
- Navigate to speedgrader for that quiz
- Input a score change to one or more questions and click to the next
student, then back to the original student
- The changes to question scores should remain intact
- Click |Update Scores|
- The changes input earlier should be applied to the final quiz score
-- (Shown on the top of the page as "Score for this quiz X out of X")
Change-Id: I316fa985146d2b39241adfc17c3c8bc1b20566ef
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/222295
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Stephen Kacsmark <skacsmark@instructure.com>
QA-Review: Brian Watson <bwatson@instructure.com>
Product-Review: Kevin Dougherty <jdougherty@instructure.com>
* when LTI tool (eg Dropbox, Studio) is embedded in the More tab for
assignment submission, it used to fail unless the assignment was set up
to allow URL submissions as well as files
* now the assignment can be submitted with just file submission, from
the More tab or from the Studio/Dropbox/etc tab correctly
closes PLAT-4978
test plan:
* disable the `assignments_2_student` feature flag by setting its state in
development to hidden, since this is an assignments 1 problem
* install studio (arc), box, and dropbox as LTI tools
* arc installation docs are here:
https://gerrit.instructure.com/plugins/gitiles/tweed/+/master/README.mdhttps://instructure.atlassian.net/wiki/spaces/ARC/pages/118882393/Add+Arc+as+a+LTI+tool+to+Canvas
* box and dropbox can be installed from www.eduappcenter.org
* set up an assignment that accepts only file submissions
* masquerade as a student and submit the assignment
* studio should be present in the More tab, submit using a studio video, should succeed
* submit using dropbox, should succeed
* remove box from the LTI tools
* submit the assignment again, studio should have its own tab
* submit using studio, it should succeed
* submit using dropbox, it should succeed
Change-Id: Ie874d555f86089974e57420d0c48af3f1742e6a1
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/222137
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Marc Phillips <mphillips@instructure.com>
QA-Review: Tucker Mcknight <tmcknight@instructure.com>
Product-Review: Xander Moffatt <xmoffatt@instructure.com>
Commit 39d77b5e added an "attempt" parameter so plagiarism platform
providers can reliably set and update scores for online_text_entry
submissions with multiple attempts. However Canvas also needs to provide
a way for the user to access the report for a given attempt number,
rather than always showing the report for the first submission attempt.
closes PLAT-5232
flag=none
Test plan:
- As in https://github.com/instructure/canvas-lms/commit/39d77b5e test
plan, make an assignment that accepts online_text_entry, and as a
student, submit to it twice (making two attempts).
- As before, make originality score for each attempt using the API, this
time also sending `resource_url`s
curl -H "Authorization: Bearer MYTOKEN" http://web.canvas-lms.docker/api/lti/assignments/39/submissions/27/originality_report --data 'originality_report[attempt]=1&originality_report[originality_score]=11&originality_report[tool_setting][resource_type_code]=originality_reports&originality_report[tool_setting][resource_url]=http://example.com/eleven'
(Note: if you comment out `raise Canvas::Security::TokenExpired` in
lib/canvas/security.rb, you can use an old token from your Plagiarism
Platform test tool)
- Go to the places in the UI where links to the report appear and make
sure all links now point to a URL with an `attempt=1` (etc.) query
param. Make sure the attempt number matches up. The four places are:
1. In speed grader on the right side
2. In speed grader on the left side of the page -- this is in a
partial which is shown in other places like when the student clicks
details for a submission
3. In student grades -- as an instructor, go to gradebook and click on
a student's name. In the table with assignments, on the right, there
will be a red or green bubble -- clicking that takes you to the
report. (You can only the last attempt's report here).
4. In old gradebook there is a link too. In new gradebook there is
not. (I didn't change gradebook stuff due to new gradebook
uncertainty)
- Click the link, which should forward to an LTI 2 launch URL. For me,
this page doesn't work (and didn't for me on Jesse's test account
either) but you can get the `resource/XXXXX/` parameter in the URL and
look up the URL by something like `Lti::Link.find_by(resource_link_id:
'ec2fa300-2c64-432f-83db-8af709059a7c').resource_url`. Make sure this
matches up to the correct URL you sent for that attempt.
- Optionally, resubmit originality reports using the API, using new
scores and report URLs. Again click a link in the UI and get the
resource_link_id (that shouldn't have changed) and check that the URL
`Lti::Link.find_by(resource_link_id: '...').resource_url` did change.
Change-Id: Ifc8828b4d4486adc2988b7b71cb712821b2b42c2
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/221399
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
QA-Review: Weston Dransfield <wdransfield@instructure.com>
Product-Review: Evan Battaglia <ebattaglia@instructure.com>
test plan:
* with the commons favorites flag turned on,
the modules index placement and assignment index placement
should send the same launch parameters as before
(but not send all the module/group data in the iframe url)
flag=commons_favorites
closes #LA-389
Change-Id: I133ef62c7542c3e6ab236f459e5bd22ef759eb3b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/221293
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Carl Kibler <ckibler@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
closes LA-300
flag=direct_share
test plan:
- When FF is enabled, on the quizzes show page, the direct share options
should be available in the kabob menu.
- The direct share features should work.
- The kabob menu should receive focus when the direct share modal/tray
is closed.
- When the feature flag is disabled, the direct share options are not
displayed.
Change-Id: Idece77707e87ec4c13b8f4d0d8868e76ab6a2d39
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/219856
Tested-by: Jenkins
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Carl Kibler <ckibler@instructure.com>
This reverts commit e345966aa1.
STEPS:
Launch Commons Fav Tray from Modules Index Menu
Verify that you are able to 'Create New' module in the tray. The dropdown should allow this.
REFS: LA-366
Change-Id: Ie974c0581bb2559e3e771a01bf189061ab30e987
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/220547
QA-Review: Anju Reddy <areddy@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Tested-by: Jenkins
Product-Review: James Williams <jamesw@instructure.com>
Reviewed-by: Carl Kibler <ckibler@instructure.com>
fixes LA-362
flag=none
Test plan
- On the calendar, try to delete an assignment
- Ensure the confirmation dialogue has a red
delete button instead of brand color
- Do the same with an event. It should
still be brand color
Change-Id: I9745623029949a4da6713b2be389ee297da98cab
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/220472
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Tested-by: Jenkins
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Mysti Lilla <mysti@instructure.com>
Test Plan:
- Start up CSP logging service
- Add a few violations to the CSP service by posting
to that service
- Enable CSP feature flag in Canvas
- Go to /accounts/XX/settings and click on the security
tab
- Click "View Violations Log" in the whitelist header
- A log should appear showing the violations
- Click the "Add to Whitelist" button for a violation
- It should show up in the whitelist.
- It should disappear from the violation log
- A flash message should also indicate success
closes USERS-63
flag = javascript_csp
Change-Id: I0e2a4a33e9cab27298d29f392920fd5c6d87cb26
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/217882
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Tested-by: Jenkins
Reviewed-by: Charley Kline <ckline@instructure.com>
QA-Review: Steve Shepherd <sshepherd@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
Module import has problems, this quick,temporary fix
removes the options that cause errors.
Test plan: Open favorites tray from module index and group,
index should only show 'module' type,
while group should show every type except for canvas and module
flag=commons_favorites
fixes CM-1330
Change-Id: I67b855718898c8e27a92ca336768c8029ed1e3fa
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/219373
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Tested-by: Jenkins
Reviewed-by: Mysti Lilla <mysti@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Tamas Petroczi <tpetroczi@instructure.com>
Previously, the Submit Quiz button would never be activated (blue) if
the quiz had any spacers. This changes `li:not(.answered)` to
`li:not(.answered, .text_only)` in order to solve this.
closes#1501
Test Plan:
- Make a quiz with one question and one spacer. Ensure that the Submit
Quiz button is activated when the question has an answer.
Change-Id: I5034f5af442ec550f2b39b893688b89daf22c195
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/218204
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Tested-by: Jenkins
QA-Review: Mark McDermott <mmcdermott@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
Reviewed-by: Bryan Petty <bpetty@instructure.com>
test plan:
* configure a tool with a
module_group_menu placement
(similar to the module_index_menu type)
* enable the "Import Commons Favorites" feature
* should launch the tool though a cog dropdown
for a specific module into a tray
* the selected resources posted to the tool
should only list the one module you selected
* closing the tray after a message has been posted
should cause the page to refresh
flag=commons_favorites
closes #LA-286
Change-Id: Idbaa746fc98d4ac4097da8488b7120a6acedc23f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/218212
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Tested-by: Jenkins
Reviewed-by: Carl Kibler <ckibler@instructure.com>
QA-Review: Carl Kibler <ckibler@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
test plan:
* configure a tool with an module_index_menu placement
(similar to the wiki_index_menu type)
* enable the "Import Commons Favorites" feature
* should launch the tool though a cog dropdown
in the header of the modules page into a tray
* closing the tray after a message has been posted
should cause the modules page to refresh
flag=commons_favorites
closes #LA-71 #LA-72
Change-Id: I4ab15bf71da574482b107cbbba295cb4557f4fa8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/217828
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Tested-by: Jenkins
Reviewed-by: Carl Kibler <ckibler@instructure.com>
QA-Review: Carl Kibler <ckibler@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
closes OUT-2543
Test plan:
- with user with multiple submissions
- create eportfolio
- add submission to page (highlight submission
title, click "Select Submission")
- change selected submission, verify that only
one submission (last selected) is shown
- save page, reload, verify that correct submission
is shown
- edit page and change selected submission again, verify
that only one the last selected submission shows
Change-Id: I90c382799be84401c8f7e33bc74c68c2940a4ac9
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/217207
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Tested-by: Jenkins
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
QA-Review: Augusto Callejas <acallejas@instructure.com>
Product-Review: Jody Sailor
refs LA-18
flag=commons_import
test plan:
- add 'wiki_page_menu' and 'wiki_index_menu' placements to
lti-test-provider
- edit lti-test-provider to send a postMessage with the
'lti.resourceImported' event
- on Pages Index, open tray and close it. Page will not refresh
- Open tray, send postMessage, and clsoe it. Page will refresh
- launch LTI from the per-item kabob menu on a wiki page. Ensure
it loads in a full-page reload. This fixes a recent regression
Change-Id: I5660acf144927e84366cea356e769b228072c0e5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/216257
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Tested-by: Jenkins
Reviewed-by: Jon Willesen <jonw+gerrit@instructure.com>
QA-Review: Jon Willesen <jonw+gerrit@instructure.com>
Product-Review: Carl Kibler <ckibler@instructure.com>
Submissions without grades, but with comments from instructors, will
now be postable.
closes APG-102
Test Plan
- Enable the Allow Postable Submission Comments feature flag.
- Create a manually posted assignment (NORMAL).
- Create a peer review, manually posted assignment (PEER).
- Create a group, manually posted assignment (GROUP).
NORMAL
- Verify that the option to post grades for the assignment is
disabled, in both Gradebook and SpeedGrader.
- As a teacher, leave a comment on a student's submission.
- Reload the Gradebook.
- Verify that the option to post grades is available for both
Gradebook and SpeedGrader.
- Verify posting grades works.
- Verify hiding grades works.
- After hiding grades, post grades for Graded only.
- Verify that the submission with a comment is posted.
- Verify that submissions with no comments and no grades remain
unposted.
- Hide grades.
- Change the manually posted assignment to be automatically posted.
- Verify posting grades works.
- Verify hiding grades works.
- Disable the Allow Postable Submission Comments feature flag.
- Verify that submission comments on a manual posting assignment are
not enough to allow posting of the assignment.
PEER
- Set up peer reviews between two students.
- Submit to the assignment for each student.
- Comment as students for self, and for the peer review.
- Verify that the option to post grades is not available for both
Gradebook and SpeedGrader.
- Comment as a teacher on one of the submissions.
- Verify that the option to post grades is available for both
Gradebook and SpeedGrader.
GROUP
- Set up a group with at least 2 students.
- Set up a group assignment.
- As one student, submit to the assignment and leave a comment.
- As the other student in the group, leave a comment.
- Verify that the option to post grades is not available for both
Gradebook and SpeedGrader.
- Comment as a teacher on one of the submissions.
- Verify that the option to post grades is available for both
Gradebook and SpeedGrader.
Change-Id: Ia33b757d6c0acdb8cb915f980e81b3b485abc61a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/208747
Tested-by: Jenkins
Reviewed-by: Adrian Packel <apackel@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
QA-Review: Adrian Packel <apackel@instructure.com>
Product-Review: Jonathan Fenton <jfenton@instructure.com>
My original solution reopened the external item in the same
tab/window each time the user opened it, but on adding
rel=noopener, the item will always open in a new tab/window
see https://html.spec.whatwg.org/#the-rules-for-choosing-a-browsing-context-given-a-browsing-context-name
Security vs. user experience
The changes to instructure.js there because I had made changes, then
undid them, but eslint then demanded I fix the errors before commiting.
closes LA-156
AKA COREFE-354
test plan:
- in a course create a module with some module items
- one of the module items should be an external URL,
with the "Load in a new tab" checkbox checked.
- click on the external url item
> expect the URL to be opened in a new tab
- return to the canvas tab
> expect it to be on the module item's page
> expect the previous and next buttons to take
you to the corresponding module items
- after clicking prev(next) on the module item's
page, click next(prev) on that page to return
to the external url item's page
> expect the external URL to automatically open again
Originally, expected this:
> expect it to open the preexisting tab containing
the external url
but rules for opening new windows with rel="noopener"
require a new window each time.
Change-Id: Ia9b1b5fa391e42579443452f6f32f0268da7d22e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/212632
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
Fixes OUT-3312
Test Plan:
- Create an assignment with a long enough description to create a scroll
bar when viewing the assignment.
- Attach a rubric to the assignment.
- In Safari 12 / 13:
- scroll to the bottom of the assignment
- wait 30s
- verify that the scroll position has not reset to the top of the
page
Change-Id: Ic4b93b8aa600be767bdd7e5815b8a857fdad4483
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/216061
Tested-by: Jenkins
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
QA-Review: Michael Brewer-Davis <mbd@instructure.com>
Product-Review: Frank Murphy <fmurphy@instructure.com>
reverts 003f28e1f4
we aren't going to support direct share with modules or module items on
initial release
closes LA-12
flag=direct_share
test plan:
- with direct share feature flag on, the kabob menu on modules and
module items should not have the "copy to" or "send to" menu items
Change-Id: I5bccae079070606e94ec7a28c7eb9b8f1bcbe113
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/215792
Tested-by: Jenkins
Reviewed-by: Carl Kibler <ckibler@instructure.com>
QA-Review: Carl Kibler <ckibler@instructure.com>
Product-Review: Jon Willesen <jonw+gerrit@instructure.com>
Test plan:
* if you have streaming on you should see that the xhr request
To get assignment info happens sooner on /courses/x/modules
Change-Id: I55fbcd03b087edeaa489106689bcaf9bdc9f32ad
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/215017
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
closes COREFE-315
test plan:
- load a page with the RCE and have a video in it
- click on the video
> expect the Options popup toolbar button
- click it
> expect the video options tray to open
> expect the title to default to the video's file name
> expect the default size to be Large (400px on the long side)
- delete the title
> expect the Done button to be disabled
- set a new title
- change the size to Custom
- delete the width or height
> expect an error message and the Done button to
be disabled
- enter a new size, or select one from the dropdown
- click Done
> expect the video to be resized to the new size
- if you're using a screenreader, expect the video
to be announced as "Video player for {your title}"
Change-Id: Id7e29520cc91c02645b92d666216e64f6619bbbb
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/211355
Product-Review: Lauren Williams <lcwilliams@instructure.com>
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
fixes: COREFE-390
This reverts commit 986ca47f2e.
this is to try to fix COREFE-390. I could not repro the bug locally
even when I if I created a quiz with 100 questions but this is the
only commit that we could see would have caused the original bug
so since it was a perf-only change we are going to revert it and see
if it fixes it on beta
test plan:
* see repro steps in COREFE-390
* note, even if you did those steps locally, I could not repro so
the best test plan would be to try it on beta at the url in that
jira and see if it is fixed there. I confirmed that it does NOT
work on beta currently so if it does start working with this change,
then this is it.
Change-Id: Id7d72833c260423b908569e633e34385828b815e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/214997
Tested-by: Jenkins
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
QA-Review: Brent Burgoyne <bburgoyne@instructure.com>
Product-Review: Brent Burgoyne <bburgoyne@instructure.com>
closes: COREFE-388
This should make the webpack bundle for it smaller
Test plan:
* set your language to Spanish
* go to canvas in an environment that is has i18n turned on (like prod
Mode or a portal)
* go to watch a video on a canvas page
* make sure the control buttons say stuff in Spanish like:
"Control deslizante de volumen” and “Reproductor de video"
Change-Id: I203d0721054d7ff41de48b4730ddd1ab2281b91b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/214787
Tested-by: Jenkins
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Allow numberHelper to return numbers with embedded 'e's, but make sure
they're not run through the number localizer on output (as it gets
unexpected results and scientific notation is expected to be in english
format anyway)
Test Plan:
- Make a quiz with a numeric question
- Set the answer to 1e21 or higher using e notation
- See it save properly
- Take the quiz, entering the correct answer
- Expect it to display and grade correctly
Closes QO-526
Change-Id: I8173532db87e77dee925528f30225256344b69f3
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/213295
Reviewed-by: Jonathan Holt <jholt@instructure.com>
Tested-by: Jenkins
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Kevin Dougherty <jdougherty@instructure.com>
This code is functionally the same, just delays doing some work after
It does the .not() checks
Test plan:
* external links should work the same as before but be a little faster
Change-Id: Icdd2232f0d0e56be5564707b76aae5d7ca959d65
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/214270
Tested-by: Jenkins
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
Refs PLAT-5046
Test Plan:
Verify the "requestFullWindowLaunch" post message
works as before
Change-Id: Ifcf4b7d863137ad29017e2fced6a806d323745d2
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/213334
Reviewed-by: Evan Battaglia <ebattaglia@instructure.com>
Tested-by: Jenkins
QA-Review: Evan Battaglia <ebattaglia@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
See this: https://cl.ly/2e5079270279 ?
that is a bunch of fetch requests,
each of them has a call to $.cookie to read the csrf token from
document.cookie but $.cookie is surprisingly slow. Each one taking up
To 7ms.
This should make that part a lot faster, those now take 0.2-0.9ms
https://cl.ly/cb5d831e5fde
Test plan:
* things that read cookies and all ajax requests that expect to have
a csrf token set should still work the same as before
* but the javascript should run faster
* if you want a specific example to test, go to:
/courses/x/assignments/syllabus
Change-Id: Ic0446f0e0df56b747360d05b8c7d5f9d77159fec
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/213455
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
QA-Review: Brent Burgoyne <bburgoyne@instructure.com>
Product-Review: Brent Burgoyne <bburgoyne@instructure.com>
Tested-by: Jenkins
this would break in browsers that don’t have requestIdleCallback.
It is fine to write `window.propertyThatDoesntExist` but not just
`propertyThatDoesntExist` the latter will say
“Uncaught ReferenceError: propertyThatDoesntExist is not defined”
I just barely added this 4 days ago so if we merge it before branching
Beta we won’t need to warmfix it
Test plan:
* breadcrumbs should resize fine in non browsers that don’t support
requestIdleCallback (https://caniuse.com/#search=requestIdleCallback)
eg: safari and edge
Change-Id: I711410e54af5e73afab2d5dcbaa9a7e0c778ae4d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/213785
Tested-by: Jenkins
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
QA-Review: Brent Burgoyne <bburgoyne@instructure.com>
Product-Review: Brent Burgoyne <bburgoyne@instructure.com>
if we do a bunch of work, only do the breadcrumb resizing at the end.
And only schedule one
Test plan:
* if you look a page load profile you should only see the code
For resizing the breadcrumbs run once
* resizing the page should feel faster and less janky
Change-Id: Ibdfc157000810199d07790b51a0bba41af272950
Reviewed-on: https://gerrit.instructure.com/213154
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
On every page we had a line that tried to find
$(“#breadcrumbs li:visible:first”).height() for our thing that puts
ellipsis in the breadcrumbs and makes sure it stays all on the same line
and that :visible check causes a forced recalculate styles/layout of the
whole page which slows every pageload down.
See: https://cl.ly/781011484255
But that value never changes (unless we purposely make changes to our
css) so we can just hardcode it
Test plan:
* breadcrumbs should work the same
* pages should load faster
Change-Id: Iff0911671c6c146ae3d4c1e1f7be05d29e66988e
Reviewed-on: https://gerrit.instructure.com/213067
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
Test Plan:
- Using the new RCE:
- Hover over the plug icon
- The tooltip should say Apps
closes COREFE-341
flag = rce_enhancements
Change-Id: I8e40b034b24991af0a132a0776efd9b330ddc475
Reviewed-on: https://gerrit.instructure.com/212101
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
This also adds things in this directory to the whitelist
to make sure nothing ugly gets introduced.
Test Plan:
- Automated tests pass
- Make a non-pretty change in a js file within public/javascripts
- Commit it
- Notice it has been prettierfied
refs COREFE-347
flag = none
Change-Id: I554c5fd455ebc5690aa88b3b9858adbc11e2a966
Reviewed-on: https://gerrit.instructure.com/212575
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
refs PLAT-4993
Test Plan:
- deploy with live event lti change
- force canvas to display a footer (masquerading should do it)
- save buttons should no longer be hidden behind footer
Change-Id: I908a1b546dec59a415c49fab0b242b9c34fe57f1
Reviewed-on: https://gerrit.instructure.com/212109
Tested-by: Jenkins
Reviewed-by: Evan Battaglia <ebattaglia@instructure.com>
QA-Review: Tucker Mcknight <tmcknight@instructure.com>
Product-Review: Oxana Jurosevic
Test Plan:
- Create a bank with at least one question
- Set the course language to french (or similar locale with localized
numbers)
- Create a new quiz
- Click "Find Question" (the third button with a magnifying glass)
- Select the existing bank and select "[New Group]" (the last item in
the drop down)
- in the new dialog that appears, enter localized points, like `1,5` or
similar
- expect it to save correctly
Closes QO-517
Change-Id: Ia87e451ec066da3fd1ac6a6db5aaceb816d18f5b
Reviewed-on: https://gerrit.instructure.com/211645
Tested-by: Jenkins
Reviewed-by: Stephen Kacsmark <skacsmark@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Kevin Dougherty III <jdougherty@instructure.com>
part 1: avoid a “recalculate styles” in modules index
this gets rid of this “recalculate styles” from this profile:
https://cl.ly/0ec18e375e64
Test plan:
* go to the modules index page for a course
* on a module item, click the hamburger menu and select the “Duplicate”
option.
* it should work
* you shouldn’t be able to see that for quiz module items
part 2:
remove code that was used for the goSlow branch of code, nothing used it
test plan:
* expand and collapse a module
* it should work exactly the same as it did before
Change-Id: Icace0a7907c8e0c1d8b54338ac82ab9fb9895e1c
Reviewed-on: https://gerrit.instructure.com/211387
Tested-by: Jenkins
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
QA-Review: Ed Schiebel <eschiebel@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
This will only happen if the assignments_2_student feature flag is
enabled and it is an assignment that will be rendered by the new A2
student view.
Test Plan:
- Enable the assignments_2_student feature flag
- Create an online_upload assignment
- As a student, submit the assignment multiple times. Leave a comment
on each submission attempt
- As a teacher, pull up speedgrader for that assignment and student
- Select different submission attempts, and notice that the comments
based on what attempt is being displayed.
- Leave comments on different attempts, and notice that they are only
displayed on the attempt that you left the comment for
- Disable the assignments_2_student feature flag, and notice that all
the comments from student and teacher are now displayed on every
attempt
fixes COMMS-2404
flag = assignments_2_student
Change-Id: I06d4474c6189749226af11643e2676daff859734
Reviewed-on: https://gerrit.instructure.com/210419
Tested-by: Jenkins
QA-Review: Steven Burnett <sburnett@instructure.com>
Reviewed-by: Steven Burnett <sburnett@instructure.com>
Product-Review: Landon Gilbert-Bland <lbland@instructure.com>
turns: https://cl.ly/1fbc488be8f7 (125ms)
into: https://cl.ly/238f081ae0bd (7ms)
test plan:
* things that link to an external site should still get styled
with the “links to an external site” indicator as they did before
Change-Id: Ia005a36bdf3cd13596acff0883d645b4d305670d
Reviewed-on: https://gerrit.instructure.com/210540
Tested-by: Jenkins
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
QA-Review: Ed Schiebel <eschiebel@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
test plan:
* go to the login screen
* search devtools source panel (command + p) for any of those ^
filenames, they should not appear
Change-Id: I4346887cf8d45dba2294f80680affc6ada3f80b4
Reviewed-on: https://gerrit.instructure.com/211237
Tested-by: Jenkins
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
we’re not loading all of tinymce on the login page (aka everywhere)
but we are loading RichContentEditor.js, tinymce.config.js,
ExternalToolsPlugin.js, etc. we shouldn’t need to do that
test plan:
* go to the login screen
* search devtools source panel (command + p) for any of those ^
filenames, they should not appear
Change-Id: I0dc53b804e215416d5bbd581a4dfd7751a7b8a3a
Reviewed-on: https://gerrit.instructure.com/211236
Tested-by: Jenkins
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
QA-Review: Ed Schiebel <eschiebel@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
refs PLAT-4973
Test Plan:
- deploy with associated LE-LTI change
- on the edit form, the save/exit buttons should scroll when the
main window scrolls
Change-Id: I260c31114c8c9837c5022a49b0ee9b9ca26f2d7f
Reviewed-on: https://gerrit.instructure.com/210566
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
Tested-by: Jenkins
Product-Review: Oxana Jurosevic
If the SpeedGrader student group filter is enabled, attempt to use some
semi-intelligent heuristics to select a student group if the user
accesses SpeedGrader with none selected, or attempts to directly access
a student who isn't part of the current group. If user tries to open
SpeedGrader with an empty group or jump directly to a student who isn't
in a group, instead show the first group containing any students. (This
may change.)
closes GRADE-2295
Test plan:
"Open SpeedGrader without a student selected" means you should open
SpeedGrader directly for an assignment without a student_id parameter:
- /courses/1/gradebook/speed_grader?assignment_id=1
Note that, in the following plan, "open SpeedGrader for a student" means
that you should open SpeedGrader directly, using that student's ID,
e.g.:
- /courses/1/gradebook/speed_grader?assignment_id=1&student_id=<id>
If the assignment is anonymous, use anonymous_id=<anon_id> instead.
For a course with "Launch SpeedGrader Filtered by Student Group" on:
- Create a non-anonymous assignment and an anonymous assignment
- For the non-anonymous assignment:
- Create at least one group set, and some groups within the set
- Have at least one group with no students
- Leave at least one student unassigned to any groups
- Without selecting a group in gradebook, open SpeedGrader directly
for an assignment in the course, without a student selected
- It should automatically select a group (in this case, the first
non-empty group in the course) and display a flash alert to that
effect
- Open new Gradebook and check that it is filtered by the group that
was automatically selected just above
- Open SpeedGrader for a student NOT in your selected group
- It should automatically select a group containing the student you
are accessing, and display a flash alert to that effect
- In new Gradebook, select a group containing no students
- Open SpeedGrader without a student selected
- It should automatically select the first non-empty group in the
course, and display a flash alert to that effect
- Open SpeedGrader for the student who is in NO groups
- It should clear the selected group and display a flash alert
saying that the selected group has been cleared because this
student isn't part of any groups
- For the anonymous assignment:
- Test that accessing specific students in SpeedGrader by their
anonymous_id selects a group for that student as appropriate, as
described above
For a course with said setting *not* enabled:
- Use SpeedGrader as normal
- It should not attempt to filter by student group even if you select
one in New Gradebook (although sections are still allowed) or any
other unpleasant surprises
Change-Id: Ieed0618bc30ca6d50be976f9bd4f0e948939af8a
Reviewed-on: https://gerrit.instructure.com/202747
Tested-by: Jenkins
Reviewed-by: Nick Pitrak <npitrak@instructure.com>
Reviewed-by: Jeremy Neander <jneander@instructure.com>
QA-Review: Jeremy Neander <jneander@instructure.com>
Product-Review: Jonathan Fenton <jfenton@instructure.com>
refs CNVS-47040
test plan:
- create a wiki page with an image
- save it
- load the page with cache disabled
- load the page with cache enabled
- both should show the image
Change-Id: I20725690030942b3225b227c097465e61b098789
Reviewed-on: https://gerrit.instructure.com/210893
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Brent Burgoyne <bburgoyne@instructure.com>
fixes CNVS-47040
test plan:
- create a wiki page with an image in it
- save it
- set network throttling to 3g in dev tools
- reload the page
- the image should still render
Change-Id: I471499185cef9a73b20538724a1295457a7f5004
Reviewed-on: https://gerrit.instructure.com/210883
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
Closes: COREFE-302
This will actually start executing the JS as soon as it comes in
the <head> instead of waiting until after the </html> for it to start.
What this means is that for any page that is streamed, we will start
running our javascript sooner, as soon as the <head> is sent to the
browser. So we can begin executing code while the server is still
working on sending back the rest of the document.
Note: this change makes it necessary for any endpoint that is streamed
to have a check for DOMContentLoaded before doing anything that assumes
elements will be there. I added this `@instructure/ready` helper do to
that in all the places I could see. If the DOM is already loaded,
`@instructure/ready` run the callback immediately (not in a setTimeout)
so theoretically load/execution order should be _exactly_ the same for
any response that is not streamed, even if it is wrapped
in a “ready(…)” callback
QA test plan:
* click around in prod mode, especially on pages that are streamed
make sure there are no thrown javascript errors or pages that
fail to render
* try both on a fast network as well as simulating a slow network with
browser caching turned off (if you don’t know how to change your
network speed simulation settings in Chrome, I can show you)
* specifically look at pages that are streamed
(like courses/x/discussions/y, /courses, courses/x/modules)
Change-Id: I49a74ab480095e50cfa08dca8e074848dce12012
Reviewed-on: https://gerrit.instructure.com/203198
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
closes PLAT-4811
Test Plan:
- setup an assignment to use the plagarism tool
- have a student create a submission
- force an error on the submission by inserting data into
submission.turnitin_data (see JIRA comment)
- open the submission in speedgrader and click the "!" icon
- the resubmit button should no longer appear
Change-Id: I54420f3c8bea45715bb8c862cd1f0ca4cda83b0e
Reviewed-on: https://gerrit.instructure.com/209286
Tested-by: Jenkins
Reviewed-by: Marc Phillips <mphillips@instructure.com>
Reviewed-by: Adrian Packel <apackel@instructure.com>
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
Product-Review: Jesse Poulos <jpoulos@instructure.com>
Test plan:
* With this checked out run:
NODE_ENV=production yarn webpack --display-optimization-bailout
* You shouldn’t see any bailout warnings about these files
Change-Id: If7d5223938a8055a720cd6a35815d37d1ade78e6
Reviewed-on: https://gerrit.instructure.com/209598
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
if the deferred that we are waiting on in disableWhileLoading is already
fulfilled, then we never actually disable anything which means we never
actually re-enable anything. So we don’t need to keep track of what the
$spinHolder.css(‘display’) was before. And that saves us a
“Recalculate Style” since $.fn.css(‘display’) would force a one.
Test plan:
in the console type
d = new $.Deferred();
setTimeout(() => d.resolve(), 3000);
$('#content').disableWhileLoading(d)
It should disable the #content element for 3 seconds with a spinner and
And then reenable it
Now type
d = new $.Deferred();
d.resolve()
$('#content').disableWhileLoading(d)
It should not disable the #content element and if you are profiling,
There should not be a “Recalculate Style” in the profile graph
Change-Id: I97413bdececed562d4768a194fa1a5517112bad8
Reviewed-on: https://gerrit.instructure.com/209722
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
Test plan:
* flash notifications should work the same as they did before
* specifically, do: $.flashError('whatever')
* it should appear and disappear exactly as it did before
Change-Id: Id34c4e7ac101d5f382b9473083d775c7558f9d9e
Reviewed-on: https://gerrit.instructure.com/209653
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
fixes: PLAT-4914
This should have never worked, because it was trying to access a
`const` variable before it was initialized but babel erroneously made it
work because it transpiled those `const`s down to `var`s.
Test plan:
* you should not get errors about
ReferenceError: Cannot access 't' before initialization
When you run this code
Change-Id: Id669b931c985a9874b9f391971452b3c83a99f58
Reviewed-on: https://gerrit.instructure.com/209654
Tested-by: Jenkins
Reviewed-by: Marc Phillips <mphillips@instructure.com>
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
QA-Review: Tucker Mcknight <tmcknight@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
If using New Gradebook, filter the list of students by selected section
on the server since we have the relevant preference avialable in the
user's gradebook settings. (If using Old Gradebook, too bad.)
closes GRADE-2350
Test plan:
- Have a course using New Gradebook with some students and sections
- Have a section (S1) containing some students but not all
- Have a section (S2) containing no students
- Open SpeedGrader for an assignment in the course
- Using the student dropdown menu, select a section
- For S1, SpeedGrader should show only students in that section
- Using your browser's relevant network tool thing, confirm that
the JSON blob from the server contains only those students
- For S2, SpeedGrader should show the usual "could not find any
students, falling back to all sections" message and reload with
no section selected (this is the same behavior as before)
- Switch the above course to Old Gradebook (or create a similar course)
- Check that the SpeedGrader behavior wrt sections is the same
- ...with the exception that the JSON blob still loads all students
instead of being smart and filtering them
Change-Id: Iceafe48604b53b396ba5f28e93503174a3f2166f
Reviewed-on: https://gerrit.instructure.com/206395
Tested-by: Jenkins
Reviewed-by: Gary Mei <gmei@instructure.com>
Reviewed-by: Jeremy Neander <jneander@instructure.com>
QA-Review: KC Naegle <knaegle@instructure.com>
Product-Review: Keith Garner <kgarner@instructure.com>
closes COREFE-253
test plan:
- in a class with some LTI tools enabled,
open a page with the rce
- click on the external tools toolbar button
> expect the Select App modal to open
> expect the tools to be listed aphabetically
> expect the icon, tool title, and first line
of the tools's description displayed
> expect that clicking on the description expands so
you can read it all
> expect the 'x' and Cancel buttons to close the modal
- click on an app
> expect the modal to close and the app's modal to open
- select content from the app
> expect it to be added to the rce's content
> expect that you can open the modal and do it all again
- in a course with no installed apps
> expect the external tools toolbar button not to appear in the rce
Change-Id: I6d798d08c4449f1c1e3a373057edb89af236a81e
Reviewed-on: https://gerrit.instructure.com/208422
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
fixes OUT-3257
test plan:
- in a course, create a rubric with a total
number of points not equal to 5
- in the same course, create an assignment
- add the course rubric to the assignment
- confirm that when the rubric is added to
the assignment, the total points at the
bottom of the rubric match the total number
of expected points, without having to refresh
the page
Change-Id: I27569f8f3ae6d537d135227158699b4f187319cf
Reviewed-on: https://gerrit.instructure.com/209159
Tested-by: Jenkins
Reviewed-by: Michael Brewer-Davis <mbd@instructure.com>
Reviewed-by: Patrick Renner <prenner@instructure.com>
QA-Review: Patrick Renner <prenner@instructure.com>
Product-Review: Jonathan Fenton <jfenton@instructure.com>
closes PLAT-4836
Test Plan:
- use a tool that will call the 'requestFullWindowLaunch' without
parameters.
- the tool should now launch correctly
Change-Id: I161de06d14b2d80549bdc9f638b82d402a491908
Reviewed-on: https://gerrit.instructure.com/208538
Tested-by: Jenkins
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
QA-Review: Weston Dransfield <wdransfield@instructure.com>
QA-Review: Mark Valentine <mvalentine@instructure.com>
Product-Review: Mark Valentine <mvalentine@instructure.com>
Make sure we re-render the "post/hide grades" menu in SpeedGrader when a
submission is graded so the post/hide options are enabled according to
the current state of the submissions (as opposed to their state on
loading the page).
fixes GRADE-2396
Test plan:
Note that this does *not* work for comments at present (even when they
should cause a submission to post) because we specifically only check
for graded submissions when deciding whether a submission is postable.
- Have a course with New Gradebook and Post Policies enabled
- Create an auto-post assignment and open SpeedGrader
- Observe that the "Hide Grades" option in the eye menu is disabled
- Issue some grades
- The "Hide Grades" option should now be enabled and should work as
expected
- Create a manual-post assignment and open SpeedGrader
- Observe that the "Post Grades" option in the eye menu is disabled
- Issue some grades
- The "Post Grades" option should now be enabled and should work as
expected
- Have a course with OLD Gradebook
- Smoke test giving some grades in SpeedGrader
- Nothing should be affected
Change-Id: I29cd99b32212518d08ede9f160204d6bcae8cd9e
Reviewed-on: https://gerrit.instructure.com/207083
Tested-by: Jenkins
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Reviewed-by: Gary Mei <gmei@instructure.com>
QA-Review: Gary Mei <gmei@instructure.com>
Product-Review: Keith Garner <kgarner@instructure.com>
Bonus, fixed default data for formula questions
Test Plan:
- Given a quiz with a formula question
- And a formula that requires at least 1 decimal answer and has a wide
margin or error
- Switch the language to pt_BR or another language that flips . and ,
- Take the quiz
- Expect correct answers to be correct and incorrect to be incorrect
Closes QO-525
Change-Id: If9c49fe1bcc98bfe1af4e7c2842efaacf57640fc
Reviewed-on: https://gerrit.instructure.com/208725
Reviewed-by: Stephen Kacsmark <skacsmark@instructure.com>
Reviewed-by: Connor Williams <cowilliams@instructure.com>
Tested-by: Jenkins
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Kevin Dougherty III <jdougherty@instructure.com>
from profiling, it looks like when we call trackEvent, google analytics
Executes synchronously in the middle of all our other javascript and
Blocks it for a few ms while it does its thing
see: https://cl.ly/a94a028037d2
This will make it so it waits until we are done before letting GA run
Change-Id: Iff7275c1428c7ebcec04ccc1d4d46f56131c9b79
Reviewed-on: https://gerrit.instructure.com/208616
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
This took 7ms while testing (https://cl.ly/2fbf815cc539).
Mostly because of the :visible check.
Since usually there are no “math” elements on the page, doing a
Simple document.getElementsByTagName('math') is faster
Test plan:
* mathML should work the same as it did before but the check on pages
That don’t have it should be faster
Change-Id: I34e989519919d3921c83351f0f00b31dbd914211
Reviewed-on: https://gerrit.instructure.com/208614
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
when the user first inserts an image from the tray, constrain its size.
closes COREFE-241
test plan:
- load a page with the rce
- have a relatively large image in the course images
- insert the image into the rce
> expect it's size to be constrained so neither edge is > 320px
- select the image, and click Options
> expect the Custom image size should reflect the correct current
size of the image
- change the image size and click Done
> expect the image to be resized
- add the image again
- save what you're working on
> expect the images to keep their set sizes
- edit again
- in html view, add a style attribute, and any other attributes
to the <img> element
- flip back to rich view
> expect the image to look like you'd expect, given what you just did
- change the image size in the tray
> expect your custom style and other attributes to be preserved
- upload landscape image that's wider than 320px
> expect the grey placeholder box to be right-sized to 320 wide
> expect the image to be right-sized when it replaces the placeholder
- repeat, uploading a landscape file taller than 320px
Change-Id: I4aa3893eda846e82775c658fd51b7b8d796b2ec0
Reviewed-on: https://gerrit.instructure.com/207492
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
closes: COREFE-209 COREFE-207 COREFE-230
this should help bugs, spec flakiness, and bundle sizes
test plan:
* make sure that the pages that are still using the old 5.x one from
@instructure/ui-core still work, namely:
app/jsx/account_course_user_search/components/CoursesToolbar.js
app/jsx/blueprint_courses/components/CourseFilter.js
app/jsx/grade_summary/SelectMenu.js
* make sure themeing of instUI components still works and picks up
theme editor settings
* make sure bundle sizes are smaller, not bigger
* check tinymce-a11y-checker that it still works the same
(With the rce-enhancements feature both on and off)
Perf test plan:
* make sure tree shaking is working
load it up in one of the webpack bundle visualizers to see
* make sure we are not loading *all* of the icons
this commit also updates the instUI6 version we use from 6.9 6o 6.10
which has fix for <Alert> unmounting that ed fixed:
Test plan:
* you should see less console arrows about react unmounting nodes
Associated with the CanvasSelect component
Change-Id: Ied2ff1d1521b0900126136170f103dea27bc554a
Reviewed-on: https://gerrit.instructure.com/204545
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
There are no specs around these changes, as there are no
existing specs upon which to build. The overhead of adding
specs to the Gradebook change might be too much to justify
for these bugfixes.
fixes GRADE-2387
fixes GRADE-2388
fixes GRADE-2389
test plan:
A. Setup
1. Select or create a course
* New Gradebook disabled!
* otherwise typical course
3. Add a SIS LTI
B. Verify with New SIS
1. Turn on "Enable new SIS integration settings"
* in account settings
2. Visit Old Gradebook
3. Click the "Export" button to expand the menu
4. Click the sync button for the LTI
* the Sync Grades modal will open
5. Verify focus is on the close button of the modal
6. Verify the modal heading is level 2
* it will have aria-level="2" among its properties
7. Close the modal
8. Verify focus returns to the "Export" button
B. Verify with Old SIS
1. Turn off "Enable new SIS integration settings"
* in account settings
2. Visit Old Gradebook
3. Click the "Sync Grades" button to open the modal
4. Verify focus is on the close button of the modal
5. Close the modal
6. Verify focus returns to the "Sync Grades" button
C. Verify with multiple SIS
1. Add another SIS LTI
* can be same LTI—just click to confirm when asked
2. Visit Old Gradebook
3. Click the "Sync Grades" button to expand the menu
4. Click the sync button for either LTI
* the Sync Grades modal will open
5. Verify focus is on the close button of the modal
6. Close the modal
7. Verify focus returns to the "Sync Grades" button
D. Verify with New Gradebook
1. Enable New Gradebook
2. Visit New Gradebook
3. Click the "Actions" menu button
4. Click the menu option for either LTI
* the Sync Grades modal will open
5. Verify focus is on the close button of the modal
6. Close the modal
7. Verify focus returns to the "Actions" menu button
Change-Id: Ief866f107ae9dbfc309a3e82780e561cd55b8896
Reviewed-on: https://gerrit.instructure.com/206948
Reviewed-by: Gary Mei <gmei@instructure.com>
Reviewed-by: Adrian Packel <apackel@instructure.com>
QA-Review: Gary Mei <gmei@instructure.com>
Tested-by: Jenkins
Product-Review: Nathan Nuclear <nathan@instructure.com>
fixes COREFE-190
- our tinymce config included plain old html elements in the list of
extended_valid_elements. Because they didn't include the "-" flag,
they were not permitted to be empty, and were removed from the content
as it was being parsed on saving. This broke handling out of order
li & ul. I removed all them, except where attribute lists were
specified, and in the case of `ul[compact]`, I added the '-' prefix
so it would remain in the markup.
test plan:
- in an rce, flip to html mode
- insert "<li>whatever</li><ul></ul>"
- flip to editor mode
> expect it to work and not throw an exception
Change-Id: I3cc3dc2c93ebd932e3d5e085112248daa3068258
Reviewed-on: https://gerrit.instructure.com/203667
Tested-by: Jenkins
Product-Review: Ed Schiebel <eschiebel@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Fixes bug where lowest rating range would not scale when adjusting
total points. Also fixes a bug where changing a rubric's total points
and resetting to the initial value would not scale points evenly.
Fixes OUT-3074, OUT-3239
Test plan:
- Create a ranged rubric with ratings 100-75, 75-50, 50-0.
- Update total points in the rubric to 200.
- Ensure lowest range scales from 100-0.
- After saving, change total points to 0 for the same rubric.
- Reset rubric total points to 200.
- Ensure each range scales evenly and adjusts from 0. New values
should be 200-100, 100-0, 0.
- Ensure ratings display properly in other languages (one that
uses colons instead of decimal points, for example).
Change-Id: Iddc2078e49cf1202dcbf111c0deeece8949ea464
Reviewed-on: https://gerrit.instructure.com/205295
Tested-by: Jenkins
Reviewed-by: Michael Brewer-Davis <mbd@instructure.com>
QA-Review: Michael Brewer-Davis <mbd@instructure.com>
Product-Review: Michael Brewer-Davis <mbd@instructure.com>
When a teacher updates a quiz score in SpeedGrader and we subsequently
re-fetch submission data, merge the fetched data into the existing
submission object for the student by calling setOrUpdateSubmission,
rather than just setting the student's submission to point to the new
object. The latter approach leaves references to the outdated
submission data in place elsewhere, which could result in the un-updated
score erroneously being displayed after some actions (e.g.,
posting/hiding grades).
fixes GRADE-2367
Test plan:
- Have a course with New Gradebook and Post Polices
- Create a graded quiz with at least one question
- Set the quiz to be manually posted
- As a student, take the quiz
- As a teacher, open the submitted quiz in SpeedGrader
- Change the score to one or more questions and click "Update Scores"
- On submitting, the updated score should be displayed in the grade
input on the right-hand side
- Post grades for the quiz
- Confirm that the grade input does *not* revert to the submission's
pre-update score, but instead keeps displaying its current value
- Hide grades for the quiz
- Confirm that the input once again does not revert
Change-Id: I01cd58445929e7dbafbb2d41209aaa8c88e6cada
Reviewed-on: https://gerrit.instructure.com/206288
Tested-by: Jenkins
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Reviewed-by: Gary Mei <gmei@instructure.com>
QA-Review: Jeremy Neander <jneander@instructure.com>
Product-Review: Keith Garner <kgarner@instructure.com>
This is the result of running:
jscodeshift -t ../js-codemod/transforms/arrow-function.js .
see: https://github.com/cpojer/js-codemod#arrow-function
Transforms callbacks only when it can guarantee it won't break this
context in the function.
Also transforms function() { }.bind(this) calls to () => {}.
jscodeshift -t js-codemod/transforms/arrow-function.js <file>
Change-Id: I04d20c818002b3dce5a43d8e91f01d904f966706
Reviewed-on: https://gerrit.instructure.com/205785
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
Tested-by: Jenkins
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
closes GRADE-1980
Test Plan
- Create a moderated assignment with at least 2 graders.
- With three users (TA, admin, teacher as final grader):
- Grade a student as the TA.
- Verify that the grade is not selected.
- Grade the student as the admin.
- Verify that the grade is not selected.
- Grade the student as the final grader.
- Verify that the grade is auto selected.
Change-Id: Ice2e7181f18f89333fb356edb05fb53bb9ec416c
Reviewed-on: https://gerrit.instructure.com/205791
Tested-by: Jenkins
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Reviewed-by: Adrian Packel <apackel@instructure.com>
QA-Review: Jeremy Neander <jneander@instructure.com>
Product-Review: Sidharth Oberoi <soberoi@instructure.com>
test plan:
- create modules A and B
- set A as a prerequisite of B
- rename module A
- module B should show the current name of module A
in its list of prerequisites
- after reloading the page, this should also be correct
- the word "Prerequisites" should remain translated after
editing a module (check with LOLCALIZE=1)
flag=none
fixes ADMIN-2825
Change-Id: I528b609823903517d28825631f663d97eb56f70f
Reviewed-on: https://gerrit.instructure.com/205160
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 PLAT-4791
Test Plan:
- Launch a tool that is setup to require a cookie and
will send the required postMessage
- Verify that a new window opens and the cookie is set
correctly
Change-Id: I9eb17c219dfce2da060e82829a19c0e24504b406
Reviewed-on: https://gerrit.instructure.com/205712
Tested-by: Jenkins
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
QA-Review: Weston Dransfield <wdransfield@instructure.com>
Product-Review: Jesse Poulos <jpoulos@instructure.com>
fixes COMMS-2308
Test Plan:
- words change to country or region from country
Change-Id: I4de93657c923c17445df2d39553806eaa6ebba0b
Reviewed-on: https://gerrit.instructure.com/205557
Tested-by: Jenkins
Product-Review: Steven Burnett <sburnett@instructure.com>
Reviewed-by: Landon Gilbert-Bland <lbland@instructure.com>
Reviewed-by: Matthew Lemon <mlemon@instructure.com>
QA-Review: Ben Nelson <bnelson@instructure.com>
This takes care of most of the boiler plate for the new closed caption
uploading tab. Using this as a base we can start to add the functional
upon this.
This commit also adds jest tests and the boiler plate around that.
Test Plan:
- Create an A2 assignment with the type of media upload
- Visit the assignment as a student
- Click on the `Record/Upload` button
- Navigate to the `CC/Subtitles` tab
- Make sure that it matches designs
- Notice that all the languages are gotten from canvas.
* Note, due to a bug with instui, the Select Language drop down will
be pretty slow to open on the first click when running webpack in
dev mode. This shouldn't be a problem in production.
- Make an old meida recording, and make sure that the add closed
caption languages are still properly displayed in there.
fixes COMMS-2292
flag = assignments_2
Change-Id: Id3247a459c62b2219a93bcbec868ae7317200488
Reviewed-on: https://gerrit.instructure.com/205136
Reviewed-by: Steven Burnett <sburnett@instructure.com>
Tested-by: Jenkins
QA-Review: Landon Gilbert-Bland <lbland@instructure.com>
Product-Review: Landon Gilbert-Bland <lbland@instructure.com>
Closes PLAT-4717
Test Plan:
- Configure a default external tool for the account
- Create an assignment in a course of that account
- Verify the tool can return a content item back
to Canvas
- Verify the UI changes to reflect that content
was retrieved
- Verify saving the assignment launches to the
URL sent in the content item
Change-Id: I97fb34346ba49ad58bdafa972f6c3537b665f26d
Reviewed-on: https://gerrit.instructure.com/204525
Tested-by: Jenkins
Reviewed-by: Marc Phillips <mphillips@instructure.com>
QA-Review: Tucker Mcknight <tmcknight@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
After updating Total Points for a rubric, all ratings should
follow the same adjusting behavior as when the rubric is
first created.
Fixes OUT-3052
Test plan:
- Example scenarios are found in OUT-3052.
- Create a rubric with two other ratings (outside of full and
no marks).
- When adjusting the 'total points' value for a rubric,
all ratings should update based on the initial values.
Currently, when you decrease the total points value,
the rating directly to the right of the full marks value
will not always follow the initial adjusting behavior.
- As an exmaple, create a rubric with values
{100 (full mark), 75, 50, 0 (no mark}).
When changing the total point rating from 100
to 10, the second rating will be truncated to 8 instead of
7.5.
Change-Id: Ia88321db45fa5a93f6c48640c15296d02adcaae1
Reviewed-on: https://gerrit.instructure.com/204271
Tested-by: Jenkins
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
Reviewed-by: Michael Brewer-Davis <mbd@instructure.com>
QA-Review: Augusto Callejas <acallejas@instructure.com>
Product-Review: Jonathan Fenton <jfenton@instructure.com>
rolls back https://gerrit.instructure.com/c/canvas-lms/+/197254
closes COREFE-185
when a TD is not given a size, setting max-width causes it to shrink.
whatever issue this originally intended to address, we'll fix when
the image sizing work is completed.
test plan:
- in the rce add a table with a couple columns
- put text in one column, and an image in the other
- in html edit mode, remove the style="width: 50%;" (or similar)
- return to rich text mode
> expect the image to be it's natural size, and not shrunken down
to almost nothing.
Change-Id: Ib7df4c1d28f4827fe004b313aff51f6eb232aafc
Reviewed-on: https://gerrit.instructure.com/204569
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
Closes PLAT-4696
Test Plan:
- Install a tool that uses content item
at the assignment_selection placement
- Specify a default_assignment_tool_name in your
root account settings.
- Specify a default_assignment_tool_url. This url
must pasth the URL associated with the tool's
assignment_selection placement launch url.
- Navigate to /course/:id/assignments/new for a
course in the root account
- Verify the default tool shows up as an option in
the submission type select element
- Verify clicking the "Add a question set"
button launches the tool in a modal
Note that returning content from the launch will not
work yet. Also, work to allow cusomizing the info
alert and button text will be done in the future.
Change-Id: Iba1187dd9af64819d8dfc446fa246cd4ec8e9473
Reviewed-on: https://gerrit.instructure.com/204187
Reviewed-by: Marc Phillips <mphillips@instructure.com>
Tested-by: Jenkins
QA-Review: Tucker Mcknight <tmcknight@instructure.com>
Product-Review: Jesse Poulos <jpoulos@instructure.com>
closes OUT-3111
Test plan:
- create graded discussion
- add a rubric from discussion view page
- select "Use this rubric for assignment grading"
- ensure the total points on the rubric is a decimal
- click "Update rubric"
- verify that "This is a graded discussion: N points possible"
in the header of the discussion has precision 2
Change-Id: I7ab6927dd2c565d88ec72b976d3b59a3b38c0992
Reviewed-on: https://gerrit.instructure.com/203954
Tested-by: Jenkins
Reviewed-by: Frank Murphy III <fmurphy@instructure.com>
QA-Review: Brian Watson <bwatson@instructure.com>
Product-Review: Michael Brewer-Davis <mbd@instructure.com>
Test Plan:
- Create a quiz with at least one numeric and one formula question
- Set points, numbers, answers to include decimals or be over 1000 in
several combinations
- Change locale to one with known thousand/decimal separators
(French uses comma for decimals and space for thousands)
- Take the quiz and ensure that numbers and dates are properly localized
all the way through
Closes QO-505
Change-Id: I1bba47e5db666bcf7eb7c477422b1b49ebf8328e
Reviewed-on: https://gerrit.instructure.com/203001
Tested-by: Jenkins
QA-Review: Tyler Burraston <tburraston@instructure.com>
Product-Review: Kevin Dougherty III <jdougherty@instructure.com>
Reviewed-by: Bryan Petty <bpetty@instructure.com>
`axios-cache-adapter`’s “browser” field in package.json says to use
A “dist” file that is prebuilt with webpack to handle old browsers
(github.com/RasCarlito/axios-cache-adapter/blob/master/dist/cache.js)
That means it has a copy of `regenerator-runtime` in it for the async
functions it uses. That is wasteful and is bytes that our users
shouldn’t need to download.
Test plan:
* the CSP stuff on the account settings page should work the same
* but the webpack js bundle should be smaller
Change-Id: I671f2eb60b57c43e002b9a62fd92feb5c96cd00b
Reviewed-on: https://gerrit.instructure.com/204252
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
…before running all the code to ellipsis it.
this will be a bit faster on pages like the dashboard
test plan:
* the breadcrumbs should work the same as before
Change-Id: I53d18183ab1ba2887157c78949c60a0dc3a8dd20
Reviewed-on: https://gerrit.instructure.com/204349
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
Test Plan:
- Given a quiz with an i18n'd number locale
- Create a question group
- Set points to 1,5 or similar
- See it save, fill in when rediting, etc
Closes QO-507
Change-Id: I71f09d06d59b1225d42ab74798870e57183fbf73
Reviewed-on: https://gerrit.instructure.com/203760
Tested-by: Jenkins
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Kevin Dougherty III <jdougherty@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
Bonus: found a missing number in the student details on the show page
Test Plan:
- Given a course with a student
- Made a quiz with decimal points (say 5.5)
- Take the quiz as a student
- Switch to French (or similar) and view the moderate page
- See points properly localized
Closes QO-445
Change-Id: I3dc797ecbdd22af8478fd847924759f4554a40e0
Reviewed-on: https://gerrit.instructure.com/203900
Tested-by: Jenkins
Reviewed-by: Jim Simon <jsimon@instructure.com>
QA-Review: Jonathan Holt <jholt@instructure.com>
Product-Review: Kevin Dougherty III <jdougherty@instructure.com>
closes: ADMIN-2781
flag: direct_share
test plan:
- NOTE: the modules page is cached, so you might have to wait a minute
or refresh a couple times in order for changes to show up after you
change the flag.
- teacher view of modules should have new menu items only when the
feature flag is on
- This applies to both modules and module items
- Should also work when modules is the course home page
Change-Id: I5db1ff3c5ffffaaef19b01e9f6e1f54fa3b6026b
Reviewed-on: https://gerrit.instructure.com/203460
Tested-by: Jenkins
Reviewed-by: Mysti Lilla <mysti@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Jon Willesen <jonw+gerrit@instructure.com>
now that we have streaming working, by loading google analytics
like this in the <head> it will load sooner but not block any of our
scripts from running.
this commit also upgrades us to use the analytics.js instead of the
legacy ga.js library.
it also actually imports it as a named export instead of just relying
on it being on the jQuery global `$` object
note: I actually took the time to set this up with a testing google
analytics account and verified that it got all the page views recorded
as before. Doing so even exposed one place where we were currently
sending PII to google analytics (in the “Act As” page) and I fixed that
https://cl.ly/e869a25266fc
test plan:
* in the console do: Setting.set('google_analytics_key', 'testing123')
but replace “testing123” with a real valid google analytics account id
* google analytics tracking data should post to your google analytics
account exactly the same as it did before this commit
Change-Id: I3ca51642c622ce72992159646f9d9338c58b44ba
Reviewed-on: https://gerrit.instructure.com/203581
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
QA-Review: Steven Burnett <sburnett@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
For a couple reasons:
1. It is wasteful and slows down a lot of page loads. We only actually
need it after someone clicks the “view terms of service” link on
one of these pages. No point in querying it until then
2. with streaming, we want to move to where we can start running our js
sooner, instead of waiting until after the end of the </html>.
That means that we will not be able to js_env from <view>.html.erb
files.
Test plan:
* the terms of service stuff should work exactly as it did before
* but if you notice, if you simulate a slow internet connection,
There will be a small moment where it says “loading…” while it is
Loading the custom terms of service
Change-Id: Id3df52c3a802899819dc9d25d0778b09239e11cb
Reviewed-on: https://gerrit.instructure.com/203252
Tested-by: Jenkins
Reviewed-by: James Williams <jamesw@instructure.com>
Reviewed-by: Steven Burnett <sburnett@instructure.com>
QA-Review: Steven Burnett <sburnett@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
There was code in the RCE to map an editor instance to the instance of a
context toolbar, but since context toolbars are only displayed when the
editor has focus with the cursor in the object, only one can be
displayed at a time making it unnecessary and we can use a css selector
to find it.
closes COREFE-102
test plan:
- have an rce
- add a course document, an image, and a table
- you could even put a document link or image inside a table cell
- put the cursor w/in each and the corresponding context toolbar
will open
- press alt-f7
> expect focus to be put on the first button of the context toolbar
Change-Id: I8a52b09d593a2af846bf7ff9e15729a7f75bdb1d
Reviewed-on: https://gerrit.instructure.com/203329
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
Fixes: COREFE-183
See existing spec coverage in:
spec/javascripts/jsx/authentication_providers/AuthTypePickerSpec.js
And
spec/selenium/accounts_spec.rb
TEST PLAN:
1) go to the authentication providers config page
2) add several authentication providers
3) you should always be scrolled down to your new
form when you add a new one
Change-Id: I45d044b5b45b5a901a6dc5c759031efcf771d185
Reviewed-on: https://gerrit.instructure.com/202179
Reviewed-by: Steven Burnett <sburnett@instructure.com>
Tested-by: Jenkins
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
Test plan:
* these pages should look the same as the do now
Change-Id: Ia99436b26a687dd23c177fb9e82b9c5be11dc9d1
Reviewed-on: https://gerrit.instructure.com/203305
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
closes CORE-3192
the easiest way to test this is by using the Assignments 2
TeacherView page, since the RCE will fold up and disappear
when it blurs. This change fixes a bug where what wouldn't
happen once a dialog was opened.
test plan:
- enable Assignment 2 and open an assignment (this should put
you in the Assignments 2 Teacher View)
- click on the pencil to edit the description
- from the rce toolbar, select Links > external links
- set the text and url and click Done
> expect the dialog to close, focus to return to the RCE, and for
the RCE to still be visible
- tab until you leave the RCE
> expect the RCE to disappear and be replaced by the description
- click in the description to get the RCE back
- put the cursor in the link and select Links > Edit Link, the close
the dialog
> expect focus to return to the RCE, and for the RCE to still be
visible
- tab out of the RCE
> expect the RCE to disappear.
- edit the description again
- select Documents > Upload Document
- select a file and click "Submit"
> expect the dialog to close, focus to return to the RCE, and for
the RCE to still be visible
- tab out of the rce
> expect the rce to disappear
- edit the description again
- select Documents > Course Documents
- click on a document
> expect the tray to close, focus to return to the RCE, and for
the RCE to still be visible
- tab out of the RCE
> expect the RCE to disappear
Change-Id: I8c5cfdd85fc7e460180256cd2453091284710661
Reviewed-on: https://gerrit.instructure.com/201585
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Fixes: COREFE-189
Something is going on where, if these are using the old form of
I18n.t where you pass an explicit key as the first argument it is not
working. We can avoid the issue by just using the auto-generated keys
Test plan:
* run canvas in a translated environment, eg:
`RAILS_ENV=production JS_BUILD_NO_UGLIFY=1 bundle exec rake canvas:compile_assets`
Then:
`RAILS_ENV=production bundle exec rails s`
* Have your Canvas instance or course set to another language.
* Navigate to the old Gradebook in your course.
* Hover over the assignment title and click the options button when
it appears.
* Select the option to message students who.
* the options for who you are messaging should not all be in English,
But rather the language set in the course.
Change-Id: Ifb932d7af2b9aec12d64d6bb78831f3ad94a9b76
Reviewed-on: https://gerrit.instructure.com/203322
QA-Review: Ed Schiebel <eschiebel@instructure.com>
Tested-by: Jenkins
Product-Review: Ryan Shaw <ryan@instructure.com>
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
fixes COMMS-2210 COMMS-2211 COMMS-2212 COMMS-2148
Test Plan:
- To test this feature you either need your own test instance of slack
or need to join the one andrew huff created. Ask Steven Burnett
for an invite to the test one (its probably easier that way) make sure
whatever account you register with is an instructure based email address
- First configure notification_service.yml
(ask steven to zerobin you the creds and config
so that you can connect to NS edge)
- Restart your server once the config is updated
- Go to the account with the user you want to test with
- navigate to the account settings
http://localhost:3000/accounts/1/settings
- navigate down to where it says Slack Api Key
- enter in the api key from either your test instance or the one in the
channel description of andrew huff #test channel
- click update settings at the bottom
- go to your user in that account now
- click "add other communication method"
- click slack
- click add an *instructure based email* otherwise you won't get
anything since we blacklist no inst emails
- click add
- notice you got a slack message
- thats it
Change-Id: I91c82438ab9ab787176f587a11c13d650c5da6f4
Reviewed-on: https://gerrit.instructure.com/200390
Tested-by: Jenkins
Reviewed-by: Landon Gilbert-Bland <lbland@instructure.com>
QA-Review: Ben Nelson <bnelson@instructure.com>
Product-Review: Steven Burnett <sburnett@instructure.com>
Fixes: GRADE-2311
Test plan:
- Given a new role based on the Teacher role without the "Grade - Edit"
permission
- Given a course with a Teacher without the "Grade - Edit" permission
- Given a student enrolled in the course
- Given an assignment with a submission from the student
- When visiting SpeedGrader as the Teacher
- Then SpeedGrader functions normally and the the error message
"Crocodoc is still processing this document" is not present
Change-Id: I4b41e7088f39cd0ba74faea720f8221e3d023e9b
Reviewed-on: https://gerrit.instructure.com/201704
Tested-by: Jenkins
Reviewed-by: Adrian Packel <apackel@instructure.com>
Reviewed-by: Gary Mei <gmei@instructure.com>
QA-Review: Derek Bender <djbender@instructure.com>
Product-Review: Keith Garner <kgarner@instructure.com>
when the user sets a course to end at midnight, a warning icon with a
tooltip appears warning that this might not be what you expected.
The tooltip is not screenreader accessible. This change adds
screenreader text to the icon and links it to the input via
aria-describedby
closes ADMIN-2668
test plan:
- go to /courses/:id/settings
- fire up your screenreader
- change the course end time to any date at 12:00am
> expect the ! warning icon to appear
> expect the screenreader to warn the user with the same
message as what's in the tooltip
Change-Id: Iff73b14fc5966d98e8f554bc16c7dc636e778f52
Reviewed-on: https://gerrit.instructure.com/201394
Tested-by: Jenkins
Reviewed-by: Mysti Lilla <mysti@instructure.com>
QA-Review: Daniel Sasaki <dsasaki@instructure.com>
Product-Review: Daniel Sasaki <dsasaki@instructure.com>
closes QO-499
Test Plan:
- On Windows, With JAWS, With Firefox
- Take a quiz with a multiple choice question as a student
- Tab until focus is on the area that says, "Flag this question..."
- Use the down-arrow key to navigate through the question title, point
value, and question description
- Use the arrow keys to view the possible answers
- Use the space bar to select a possible answer
- Use the arrow keys to view other possible answers for that question
- It should say the next answer.
Change-Id: I156fd241225e321dd2a1c0d2054d11f07df4a899
Reviewed-on: https://gerrit.instructure.com/201891
Tested-by: Jenkins
QA-Review: Han Yan <hyan@instructure.com>
Product-Review: Kevin Dougherty III <jdougherty@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
Test Plan:
- Given a course in french (or similar locale)
- Create a quiz with a formula question
- Enter "[x] plus ten" and set decimal places to 2
- Generate 3 solutions and save the question
- Ensure those solutions exist when re-editing it
- Add "0,25" as the error margin, regenerate, and save
- Ensure solutions exist when re-editing
Closes QO-508
Change-Id: I2264b54694f9a72195d8ad2e15ffe5f1e2c2a263
Reviewed-on: https://gerrit.instructure.com/202339
Tested-by: Jenkins
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Jacob Burroughs <jburroughs@instructure.com>
Product-Review: Kevin Dougherty III <jdougherty@instructure.com>
closes GRADE-2293
test plan:
A. Setup
1. Enable Post Policies
2. Create an assignment
3. Set grades to post automatically
B. Verify Before Grading
1. Visit SpeedGrader for the assignment
2. Open the Post Grades menu
3. Verify the post action reads "No Grades to Post"
4. Verify the hide action reads "No Grades to Hide"
5. Visit New Gradebook
6. Open the column options menu for the assignment
7. Verify the post action reads "No Grades to Post"
8. Verify the hide action reads "No Grades to Hide"
C. Verify Before Hiding
1. Grade 1 student for the assignment
2. Visit New Gradebook (unless still on page)
3. Open the column options menu for the assignment
4. Verify the post action reads "All Grades Posted"
5. Verify the hide action reads "Hide Grades"
6. Visit SpeedGrader for the assignment
7. Open the Post Grades menu
8. Verify the post action reads "All Grades Posted"
9. Verify the hide action reads "Hide Grades"
D. Verify After Hiding
1. Hide grades for the graded student
2. Visit SpeedGrader for the assignment (unless still on page)
3. Open the Post Grades menu
4. Verify the post action reads "Post Grades"
5. Verify the hide action reads "All Grades Hidden"
6. Visit New Gradebook
7. Open the column options menu for the assignment
8. Verify the post action reads "Post Grades"
9. Verify the hide action reads "All Grades Hidden"
Change-Id: Ia6915f4b28945f16bea55445796121fc6ab8a4b1
Reviewed-on: https://gerrit.instructure.com/201582
Tested-by: Jenkins
Reviewed-by: Gary Mei <gmei@instructure.com>
Reviewed-by: Adrian Packel <apackel@instructure.com>
Reviewed-by: Derek Bender <djbender@instructure.com>
QA-Review: Jeremy Neander <jneander@instructure.com>
Product-Review: Jonathan Fenton <jfenton@instructure.com>
closes QO-495
test plan:
- In a course, make a quiz and enable the "Let students see the
correct answers" option
- Add a Matching question type with at least one answer and one
additional distractor(Can be more possible answers or more distractors)
- Add one of the following questions types and save the quiz:
Multiple choice, True/False, Multiple Answers and Multiple Dropdown answers
(Make sure this is the last question listed)
- Preview or take the quiz as a student
- Answer the Matching question incorrectly (This is important. If only
one possible answer was created then select the distractor to get
this marked as incorrect)
- Pick the wrong answer for the last question. Notice that the "Correct Answer"
label does not show for Multiple Choice and T/F questions and
Multiple Answers/Dropdown does not show the label for the last possible
answer (When multiple possible are included)
(see QO-495 for sample quiz, and https://cl.ly/dae5de62e9b9 for video)
Change-Id: I94a2bf89f71f50f6dc16a14c3a82d0afd3dd7637
Reviewed-on: https://gerrit.instructure.com/202234
Tested-by: Jenkins
Reviewed-by: Tyler Burraston <tburraston@instructure.com>
QA-Review: Jacob Burroughs <jburroughs@instructure.com>
Product-Review: Kevin Dougherty III <jdougherty@instructure.com>
This isn't working in prod due to web server differences between
development and production
Closes: GRADE-2235
Test plan:
- fake out the server by causing the speed_grader.json
endpoint to sleep for more than 60 seconds
Change-Id: Id633500d93534f520cfcbcd1cb11a62c1f0f543f
Reviewed-on: https://gerrit.instructure.com/197402
Reviewed-by: Gary Mei <gmei@instructure.com>
Reviewed-by: Adrian Packel <apackel@instructure.com>
Tested-by: Jenkins
QA-Review: Derek Bender <djbender@instructure.com>
Product-Review: Derek Bender <djbender@instructure.com>
closes GRADE-2247
test plan:
1. Create a super large course
2. Visit SpeedGrader
3. Verify the error alert appears
4. Verify the message links to the large course setting
Change-Id: I153561675a04886950ca45748fc34017eaf34300
Reviewed-on: https://gerrit.instructure.com/201932
Tested-by: Jenkins
Reviewed-by: Gary Mei <gmei@instructure.com>
Reviewed-by: Adrian Packel <apackel@instructure.com>
QA-Review: Jeremy Neander <jneander@instructure.com>
Product-Review: Jonathan Fenton <jfenton@instructure.com>
closes CORE-3193
test plan:
- disable enhanced rce
- load a page with the RCE
(e.g. /courses/55/discussion_topics/new?is_announcement=true)
> expect the RCE to initialize and work
- enable enhanced rce
- load a page with the RCE
> expect the toolbar to include the Documents button
Change-Id: Icd1a8015d44fb161522c027965f96128974266d4
Reviewed-on: https://gerrit.instructure.com/201526
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins
All float_value inputs in questions will now properly support localized
strings, converting them before and after submission to the backend.
Test Plan:
- Given a quiz with one of each question
INCLUDING numerical and formula
- Edit it in french and check that all inputs support localized numbers
(like "3,45" and "1 234") when saving and onBlur
- Do NOT expect formula computations to use this format (yet)
Closes QO-443
Closes QO-444
Closes QO-506
Change-Id: I97cd6d16fb46332c449bbe90afa3ecbb188417a7
Reviewed-on: https://gerrit.instructure.com/199930
Reviewed-by: Vidya Subramaniam <vsubramaniam@instructure.com>
Tested-by: Jenkins
QA-Review: David Tan <dtan@instructure.com>
Product-Review: Kevin Dougherty III <jdougherty@instructure.com>
Closes: CORE-3190
This time in a way that will still work when webpack minifies it.
There is some bug in webpack/minify in the prod build where
`jqueryui/mouse` was not loaded by the time `jquery-ui-touch-punch`
was loaded, even though right on the previous line it has
`jqueryui/draggable-unpatched` and that file has:
```
import $ from 'jquery'
import 'jqueryui/core'
import 'jqueryui/mouse'
import 'jqueryui/widget'
```
Right at the top of it.
Test plan:
* in a production webpack build (with minified js and stuff)
* go to /login/canvas on a mobile device
* click the “forgot password” link
* it should work
Change-Id: I7e5708ff270ea7102f65d53708768f5ba60d7595
Reviewed-on: https://gerrit.instructure.com/201294
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
closes: CORE-3178
right now, we send 2 copies of underscore/lodash to browsers. that is
wasteful and slow because it causes browsers to download and execute
more JS than they need to. we should use the most recent version of
lodash for everything and have everything just share that one.
Using the old version of lodash.underscore is also preventing us from
upgrading backbone to the latest version (because backbone relies on
using a newer lodash/underscore). and we want to upgrade backbone to
the latest version so we can use the
`https://backbonejs.org/#Model-preinitialize` method which was
specifically made to help people upgrade things to es6 classes and
avoid the "trick babel to allow `this` before `super` hacks" that we
have in our code & need to get rid of before we can drop ie11
but to make upgrading to lodash 4 easier, I made this commit which
avoids using it in a lot of places (so upgrading is a non-issue) and
uses the method alias names that are both present in the old underscore
we use and lodash 4.
some of this was done by:
https://github.com/cpojer/js-codemod#underscore-to-lodash-native
see https://github.com/lodash/lodash/wiki/Migrating for what is
different between underscore and lodash
test plan:
* automated tests should pass
Change-Id: Ieefc0be36d277fc115974aa06c03e46a37b9f426
Reviewed-on: https://gerrit.instructure.com/200550
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
closes: CORE-3174
test plan:
cherry-pick this on top of the commit that drops IE 11 (g/197827)
run any spec that touches moment_formats, like:
`yarn jspec spec/coffeescripts/calendar/EditAssignmentDetailsSpec.js`
you should not get any errors like:
TypeError: Cannot read property 'escapeSubStrings' of undefined
at i18nToMomentFormat (...public/javascripts/moment_formats.js?:131:30)
at Function.map (...javascripts/vendor/lodash.underscore.js?:2618:25)
at Object.eval (...javascripts/moment_formats.js?:101:55)
Change-Id: Id339b3fce1ca2268bd2e6facbde021910de9df06
Reviewed-on: https://gerrit.instructure.com/200348
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
fixes GRADE-2292
test plan:
- Have a course with an assignment and a few students
- In the rails console, delete the submission object for one of the
students.
- Note that speedgrader loads normally
Change-Id: I14949ba8e1f033475afd0b9d8e9ffdf39d12e2c7
Reviewed-on: https://gerrit.instructure.com/201125
Tested-by: Jenkins
QA-Review: Keith Garner <kgarner@instructure.com>
Product-Review: Keith Garner <kgarner@instructure.com>
Reviewed-by: Gary Mei <gmei@instructure.com>
Reviewed-by: Adrian Packel <apackel@instructure.com>
closes CORE-3185
Test Plan:
- Create a global announcment
- Try adding another one
- The RCE should appear when you add the second one
Change-Id: Idaacd111507997179b8f823e725b6630a35348bf
Reviewed-on: https://gerrit.instructure.com/201049
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
Tested-by: Gentry Beckmann <gbeckmann@instructure.com>
fixes PFS-13047
test plan
- check documentation for login importer
- import a login
- it should work
- user importer should work
Change-Id: I0e72aa75d1abd26b7b00a1d416401bc1cbc8732a
Reviewed-on: https://gerrit.instructure.com/198678
Tested-by: Jenkins
Reviewed-by: James Williams <jamesw@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
fixes: CORE-3083
Test plan:
* Enable the Content Security Policy feature option on the root account.
* Go to any course in the instance.
* From the settings page of the course, scroll to the bottom and
select more options.
* Observe there is not a message that says:
"Setting failed to load, try refreshing."
* the “Disable Content Security Policy” checkbox should appear & work
Change-Id: I22bd60397d81e85bbb47eaf40049111328384abf
Reviewed-on: https://gerrit.instructure.com/199846
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
According to https://v8.dev/blog/cost-of-javascript-2019#json
If you use JSON.parse instead of object literals for large objects like
our i18n strings, it is faster.
Testing this locally in prod mode it made the time to evaluate main.js
go from 783ms (https://cl.ly/371ceb866fe4)
to 607ms (https://cl.ly/c2ce9eb82f7e)
Test plan:
* i18n strings should work the same as they always have
* pages should load a tiny bit faster in prod
Change-Id: Icc3dbd07e87f60d40e523d454917f865fdb39d7d
Reviewed-on: https://gerrit.instructure.com/199209
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
Test Plan:
- Given a quiz in a locale with different number formatting
- Change the points of a question to '1234.5' in that locale
- See it accept and format points correctly on the question and the
header
Closes QO-442
Change-Id: I75c353716718377bb26c1088a4db58aaa7c8f721
Reviewed-on: https://gerrit.instructure.com/198543
Tested-by: Jenkins
Reviewed-by: Jonathan Holt <jholt@instructure.com>
QA-Review: David Tan <dtan@instructure.com>
Product-Review: Kevin Dougherty III <jdougherty@instructure.com>
Sadly, in an attempt to fix the test problem, + a change in how embedded
documents were going to work, this change started from scratch, losing
the history of the tray code that is a modification of earlier work from
CORE-2665 and https://gerrit.instructure.com/c/canvas-lms/+/197101
closes CORE-2698
test plan:
- edit or create an assignment
External Links
- from the rce toolbar, select Links > External links
> expect the insert/edit link dialog
- fill in the form and click Save
> expect a link with your provided url and text,
target='_blank' and rel='noopener noreferrer'
- put your cursor in the link
> expect the Links toolbar button to be highlighted
- click Links > Edit Link
> expect the links dialog
- change something and save
> expect your change to be reflected in the link
Course Links
- from the toolbar select Links > Course Links
> expect the canvas content tray to open, set to Links
- expand one of the sections
- click on a course item
> expect the tray to close
> expect a link to the item in the rce
> expect a yellow box to temporarily highlight the link
- from the toolbar select Links > Edit Link
> expect the edit link dialog
- change the text and save
> expect the link to reflect your change
Course Documents
- from the toolbar select Documents > Course Documents
> expect the canvas content tray to open, set to Files/Documents
- click on a document
> expect the tray to close
> expect a link to the file in the rce, filename as the visible text,
class="instructure_file_link",
if it's a previewable type, class includes instructure_scribd_file and
the link has target="_blank" rel="noopener noreferrer"
- put the cursor in the link
> expect the Options button to appear and the Links toobar button to highlight
- click on either Options or Links > Edit
> expect the Link Options tray to open
> if the file is a previewable type, expect to see the Display Options checkboxes
if not, all you see is Text and Link textboxes
- change the Text and click Done
> expect to see the new text
- edit the link again
- check the Disable inline preview checkbox
> expect the Automatically open... checkbox to be hidden
- click Done
> expect the resulting link class name to include "disable_preview"
- edit the link again
- uncheck the Disable checkbox
> expect the Automatically open.. checkbox to appear
- check it and click Done
> expect the resulting link class name to include "auto_open" and not
"disable_preview"
- back in the tray, when you check/uncheck the disable checkbox, the
other checkbox remembers its state
Uploaded files:
- from the toolbar select Documents > Upload document
- upload a previewable document (a pdf works)
> expect a link to the document to appear in the rce
- click on the link, then Options
> Expect the tray to open with the Display Options visible
> expect this link to behave just like a course document wrt tray
settings
The content created a good view
- save the assignment
> expect the view mode to have an "external link icon" icon text to the external link
> for a previewable file expect a "preview icon" next to a link to a previewable course document
> for a previewable file with "auto open preview", expect the preview
to have opened
> for a previewable file with "disable preview", expect there to be no
preview icon next to the link
> expect clicking on the external link or course document to open in a new browser
window|tab (except that some course documents will download. this is
is an outstanding issue that needs to be dealt with in canvas)
> expect clicking on a course link to open in the current tab
> an uploaded file is a course file, so it should behave the same
* pdf is one. see packages/canvas-rce/src/rce/plugins/shared/Previewable.js for the
complete list
Change-Id: I5c7295ab02e4e87aab18f1b916b29cb7f18269b1
Reviewed-on: https://gerrit.instructure.com/198234
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Lauren Williams <lcwilliams@instructure.com>
test plan:
- have an assignment that a student has submitted to
more than once
- in the A2 students table, click the links for
"Attempt 1" and "Attempt 2"
- they should take you to that attempt in SpeedGrader
- once in SpeedGrader, clicking away to another student
should take you to their newest submission
fixes ADMIN-2736
Change-Id: Id7047ce070344946ff41bba4a377b9617dd4fc38
Reviewed-on: https://gerrit.instructure.com/198695
Tested-by: Jenkins
Reviewed-by: Carl Kibler <ckibler@instructure.com>
QA-Review: Carl Kibler <ckibler@instructure.com>
Product-Review: Carl Kibler <ckibler@instructure.com>
fixes PLAT-4490
Test Plan:
- Setup an Deep Linking LTI tool for submission on an assignment
- Move VO focus to the "partner provided" notice
- ctrl-option-right arrow should now go down to the
iframe instead of the h1
Change-Id: I1254f9bbf1ea6354901412c21f1b08522fcad638
Reviewed-on: https://gerrit.instructure.com/198092
Reviewed-by: Marc Phillips <mphillips@instructure.com>
Tested-by: Jenkins
QA-Review: Tucker Mcknight <tmcknight@instructure.com>
Product-Review: Tucker Mcknight <tmcknight@instructure.com>
Closes PLAT-4296, PLAT-4559, PLAT-4558
Test Plan:
- Create a text entry submission
- Create an originality report for the submission
- Resubmit the assignment
- Create an originality report with a different
score for the resubmission
- Verify the gradebook submission details dialog
shows the correct report for each submission
version
- Create a text entry submission with an originality report
- Verify the report can be viewed in speedgrader
- Resubmit the assignment and create a new originality report
- Verify speed grader shows the correct originality score for
each submission
- Verify speed grader correctly displays originality reports
tied to an attachment
- Verify speed grader correctly dispalys originality reports
from tii plugin
Change-Id: I433be93083a501cb03cbaa04bb2329c50bbfffca
Reviewed-on: https://gerrit.instructure.com/196697
Tested-by: Jenkins
Product-Review: Jesse Poulos <jpoulos@instructure.com>
QA-Review: Kai Bjorkman <kbjorkman@instructure.com>
Reviewed-by: Marc Phillips <mphillips@instructure.com>
refs CORE-2654
test plan:
* Hope for the best
Change-Id: I593c778cc311af8086c99240f3d57f87c69dde48
Reviewed-on: https://gerrit.instructure.com/197254
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
QA-Review: Jeremy Neander <jneander@instructure.com>
Product-Review: Jeremy Neander <jneander@instructure.com>
closes CORE-2665
test plan:
1. Upload a document to the course
2. Open a page with CanvasRCE
3. Open the documents tray
4. Add the document to the editor
5. Click or select the link
6. Verify the "Options" button appears in a popover
7. Click the "Options" button
8. Verify the Embedding "Options" tray appears
9. Click the "Close" or "Done" button
10. Verify the tray closes
11. Verify focus returns to the "Options" button
Change-Id: I82e55489b583df5c66d952624f4d791ecb355ae4
Reviewed-on: https://gerrit.instructure.com/197101
Tested-by: Jenkins
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
QA-Review: Ed Schiebel <eschiebel@instructure.com>
Product-Review: Jeremy Neander <jneander@instructure.com>
test plan:
* try to create a global notification with a title
longer than 255 characters
* should show immediate error before submitting
closes #CORE-3066
Change-Id: I8f1efce365e3b8704c8763c3f5c86f9b1f360bad
Reviewed-on: https://gerrit.instructure.com/197196
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
Fixes: CORE-2936
Test Plan:
Login as student.
Must be participant of the any group.
Open group.
Open pages of the group.
Create (or edit existent) page with following content:
<p>
<a id="module_prerequisites_lookup_link"
href="https://test.ddv.in.ua/xssCanvasJSON.php"></a>
</p> <div class="spinner"></div>
Save.
Wait until page loaded and click XSS link.
You should NOT See alert with your cookie & domain.
Change-Id: I9f89ad13e6ae9fdc2efce703500ba1065a7ad176
Reviewed-on: https://gerrit.instructure.com/194849
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Steven Burnett <sburnett@instructure.com>
Note: this does not handle LTI icons. We are only displaying the title
of the tool for now until we implement the dialog we'd like.
fixes CORE-2988
test plan:
- If there are no external tools configured, there should not be a plug
icon in the rce toolbar.
- If there is at least one external tool configured, there should be a
plug icon dropdown menu in the toolbar that contains all the
configured lti tools.
- Clicking on a tool should open up the existing LTI dialog and it
should be able to embed the tool into the rce.
Change-Id: Ibbfb412b1485a459e74cdc52ea903507b8ab2fd1
Reviewed-on: https://gerrit.instructure.com/196827
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Jon Willesen <jonw+gerrit@instructure.com>
This commit moves findLinkForService and getUserServices out of
`public/javascripts/jquery.instructure_misc_helpers.js`, which is
included and loaded on every page before anything else is ran, into
a spot where just the 2 things that actually use it can load it and
no other page has to. There is no actual code changes other than moving
these 2 methods.
Test plan:
* the select content dialog should work the same as it always has
* the “main” javascript webpack entry should be smaller
Change-Id: Ie2f35812fd6d473fc16c44ad1c2bdd986a441bdf
Reviewed-on: https://gerrit.instructure.com/194381
Tested-by: Jenkins
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
Reviewed-by: Steven Burnett <sburnett@instructure.com>
Fixes: CORE-3061
Safari doesn’t handle passing strings to `new Date(<string>)` like other
browsers do. When you pass a string like that to `new Date()` in Safari,
it gives you back `Invalid Date` So for this method to continue working
like it historically did, in safari, we need to fall back to Date.js’s
nonstandard monkeypatched version of Date.parse(<string>).
Test plan:
Dev test:
*run `yarn jspec-watch spec/coffeescripts/instructureDateAndTimeSpec.js`
* when the chrome browser opens, copy the url in the url bar and then
open that in Safari
(it’ll be something like: http://localhost:9876/?id=87294339)
* all the tests should run in safari and they all should pass
Manual test:
* in Safari
* upload a file to your course
* go to /courses/x/files
* the page should load properly and the `Date Created` and
`Date Modified` columns for that uploaded file should be correct and
the same as what you see when you load the page in chrome
Change-Id: I11bf5291617d881254fc34c4555ec640a623e733
Reviewed-on: https://gerrit.instructure.com/196896
Tested-by: Jenkins
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
QA-Review: Brent Burgoyne <bburgoyne@instructure.com>
Product-Review: Brent Burgoyne <bburgoyne@instructure.com>
The hidden count in the PostAssignmentGradesTray checks for lack of
posted, but the rules for whether a grade is hidden should be if it
has a grade, but is not posted.
closes GRADE-2177
Test Plan
- Create an assignment with a manual post policy.
- Create an assignment with an automatic post policy.
- For the manual assignment:
- Grade a number of students.
- Submit for a number of students.
- Verify that the hidden count in the Post tray is the number of
students that have grades.
- Verify that those submissions have a Hidden pill in the Submission
Tray and SpeedGrader.
- Post all grades.
- Verify that the hidden count is gone, the eye indicator in the
column header is no longer orange, that the Submission Tray no
longer contains the Hidden pill, and that SpeedGrader no longer
contains the Hidden pill.
- For the automatic assignment:
- Grade a number of students.
- Submit for a number of students.
- Verify that nothing is currently hidden.
- Hide grades for a subset of the students.
- Verify that the hidden count in the Post tray is the number of
students that were hidden for, that also had a grade.
- Verify that those submissions have a Hidden pill in the Submission
Tray and SpeedGrader.
Change-Id: Iccc45b11fc356933db8082a739766b53b7c52494
Reviewed-on: https://gerrit.instructure.com/194836
Tested-by: Jenkins
Product-Review: Jonathan Fenton <jfenton@instructure.com>
Reviewed-by: Adrian Packel <apackel@instructure.com>
Reviewed-by: Derek Bender <djbender@instructure.com>
QA-Review: James Butters <jbutters@instructure.com>
See this? https://cl.ly/68e723db54c8 that’s a beforeuload in
page_views.js that is taking 335ms in prod to run _before_ the browser
can navigate to any other pages.
what we are trying to do there in page_views is log the last page view
And we can’t use an xhr to do so because it would get aborted when we
go to a new page. Where there is a browser API to solve that exact
problem:
https://developer.mozilla.org/en-US/docs/Web/API/Navigator/sendBeacon
This is a screenshot of after: https://cl.ly/fed0076a15eb
that sendBeacon call only takes 0.4ms
Oh, and we don’t need to do any of this unless ENV.page_view_update_url
Is set, so we can defer loading any of it unless that is present
Test plan:
* page views should work exactly as before
* turn on page views
* go to a page and sit there for more than 30 seconds
* clear your rails log and your browser log
* click to go to a new page
* you should see a request in your browser Network log to
page_views/xxxx-xxxx-xxx-xx-xxx?page_view_token=xxxx
* look at your rails server logs, you should see something like:
Processing by PageViewsController#update as */*
Parameters: {"interaction_seconds"=>"1005”, …
”id"=>"36bcbd62-3a11-44bc-8dd2-69410050ff74"}
Change-Id: Ie67cc01dd1524c75916a26fbeffa67a01f490adc
Reviewed-on: https://gerrit.instructure.com/196416
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
closes CORE-2972
The upload document menu item opens the UploadImage dialog modal.
This is a placeholder until I can generalize the dialog to
handle all the uploaded file types.
test plan:
- click the documents toolbar and select upload
> expect an alert lamenting the fact that you can't upload yet
- click the documents toolbar and select Course Docuemnts
> expect the content tray to open (don't expect any content yet)
Change-Id: I6c42002d5eb999cb108a1a95045906f4eedaa72d
Reviewed-on: https://gerrit.instructure.com/194570
Tested-by: Jenkins
Product-Review: Ed Schiebel <eschiebel@instructure.com>
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Clay Diffrient <cdiffrient@instructure.com>
Closes: GRADE-2202
Test Plan: specs pass with no tooltip proptype failures
Change-Id: Ide5a5ed134a7f429d4e42fe5e8a8078182d6ebe0
Reviewed-on: https://gerrit.instructure.com/192499
Tested-by: Jenkins
Reviewed-by: Keith Garner <kgarner@instructure.com>
Reviewed-by: Gary Mei <gmei@instructure.com>
QA-Review: Derek Bender <djbender@instructure.com>
Product-Review: Keith Garner <kgarner@instructure.com>
This delays loading google analytics until after all the important
Scripts and images on a page have downloaded and executed.
Test plan:
* with this applied on beta, pages should load faster as measured
In lighthouse or in the “performance” tab of chrome dev tools
Change-Id: I7c2d614668d38eab8b91f8e4f8cd3637f1d9edc3
Reviewed-on: https://gerrit.instructure.com/196306
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
QA-Review: Steven Burnett <sburnett@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
This feature detection would only ever return true for Old IE, but
Running it causes a “Recalculate Style” forced reflow to be ran. That
Is slow. So hardcoding it will speed things up
Test plan:
* nothing should actually change but pages should load a little faster
Change-Id: I0488d19984e972a368e4fafcb27430d28d296a81
Reviewed-on: https://gerrit.instructure.com/196175
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
closes CORE-3017
This was relying on './vendor/date’s monkey patched version of
Date.parse, which is really slow. This attempts to make it faster
By using the native Date() constructor instead.
Reviewers (aka, @jacob):
Do you know if we really were relying on Date.js’s non-standard
Date.parse here?
Test plan:
* go to a discussions page with lots of replies
* profile the load time before and after this commit
* it should be a lot faster with this commit
* and the dates that show up on the page should be exactly the same as
they were before
Change-Id: I7b9030266e418aa20086886d21d294e35a9a1100
Reviewed-on: https://gerrit.instructure.com/195237
Tested-by: Jenkins
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
QA-Review: Brent Burgoyne <bburgoyne@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
refs: CORE-3020
This line causes a forced “Recalculate Style” which takes my fast
macbookPro 5ms in prod. Since it’s only for ie9, we can remove it
Change-Id: I8ccdc8301c45edc2e49426b3203a8c3e5102c8e7
Reviewed-on: https://gerrit.instructure.com/195703
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
QA-Review: Steven Burnett <sburnett@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
Closes: CORE-2553
Test plan:
* Add some text to a wiki page
* Highlight the text and create a hyperlink to an external site with
the Link to URL tool in the RCE
* Save the page,
* then use a screen reader and listen to it NOT tell you that you are
on a link to an external site twice.
Change-Id: I1c38b758f0467a42c372299d4096fb958c813b18
Reviewed-on: https://gerrit.instructure.com/195388
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
closes: ADMIN-2666
test plan:
* go directly to: /accounts/x/settings#tab-reports
* it should show the account reports after loading
* go to /accounts/x/settings
* then click on the “reports” tab,
* it should show the account reports after loading
* Enable CSP feature flag
* go directly to /accounts/x/settings#tab-security
* You should initially see a spinner, then the page should show
fully loaded once it disappears.
* go to /accounts/x/settings
* clicking on the security tab should do the same
Change-Id: I7b17a723d96544179ae0024641a95be90856cca2
Reviewed-on: https://gerrit.instructure.com/195117
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
refs: ADMIN-2666
honestly, I’m not sure why this fixes it but maybe it was because
without the explicit content-type being set then rails would spend
forever looking up json or javascript partials. anyway, this makes
it a lot faster. the same as it was before CORE-2808
test plan:
* go to the /accounts/x/settings page
* click on the “reports” tab
* it should not take forever to load
Change-Id: Ia18bc78b11b6da7bb53ed2e1d1b21f9910855400
Reviewed-on: https://gerrit.instructure.com/195116
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins
Product-Review: Ryan Shaw <ryan@instructure.com>
by replacing $.extend(true I18n, {translations: …}), we can speed up
the amount of time we spend loading the i18n string files.
From profiling, a non-trivial amount of the javascript run time was
Spent just in these calls to $.extend(true, …)
Test plan:
* in a prod build
* set your language to something non-english like spanish
* everything should still be translated the same as before
* pages should load a little faster, especially on low powered devices
like mobiles
Change-Id: I9ac4a7b67cf14498ee1b972ba083db952ad7f314
Reviewed-on: https://gerrit.instructure.com/194234
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
fixes a ticket
Test Plan
- go record a video through the rce, (new, edit pages)
without turning on any feature flags and notice the
arc (modern) video recorder shows on chrome, ff
- record a video and notice it works
- try on all browsers and notice recording works
no matter if arc or the default recorder
Change-Id: Ic3d0e01554e016962259a60ab50a20d8e215840d
Reviewed-on: https://gerrit.instructure.com/194292
Tested-by: Jenkins
Reviewed-by: Landon Gilbert-Bland <lbland@instructure.com>
Reviewed-by: Ryan Norton <rnorton@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Steven Burnett <sburnett@instructure.com>
Closes: GRADE-1943
Test Plan:
- post or hide grades in speed grader
- the status change should be reflected immediately in speed grader
without needing to refresh the page
Change-Id: I4f2840dd1f24b8b919a69316343eb58c1854a915
Reviewed-on: https://gerrit.instructure.com/192495
Tested-by: Jenkins
Reviewed-by: Adrian Packel <apackel@instructure.com>
Reviewed-by: Gary Mei <gmei@instructure.com>
QA-Review: Adrian Packel <apackel@instructure.com>
Product-Review: Jonathan Fenton <jfenton@instructure.com>
This was only used in this one file. So instead of loading on every
Page in instructure_misc_helpers.js, I moved it to the one place that
actually uses it
Test plan:
* the page views page should still work the same as it always has
Change-Id: I916040f35bc08c77564de6c7104f4250a53a987e
Reviewed-on: https://gerrit.instructure.com/194380
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
QA-Review: Steven Burnett <sburnett@instructure.com>
Product-Review: Steven Burnett <sburnett@instructure.com>
Closes PLAT-4485
Test Plan
- Install a 1.3 tool that does dep linking at
assignment_selection and module items
- Attempt to create an assignment with the tool, but return
an image rather than an LTI link
- Verify an error is shown and the url field is not populated
- Verify you can create an assignment if an LTI link is
returned
- Verify the same for module items
Change-Id: I39390bbb570e14625e8ab92d5afa7a85d44376bf
Reviewed-on: https://gerrit.instructure.com/194113
Tested-by: Jenkins
Reviewed-by: Marc Phillips <mphillips@instructure.com>
QA-Review: Marc Phillips <mphillips@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
This also replaces our old react-tinymce package with the official
@tinymce/tinymce-react package.
closes CORE-2836
test plan:
- typing in the rce should update the word count in the status bar
- the html path of the current cursor position should also be shown in
the status bar
- generally test all the rce things because of the package replacement
Change-Id: Ibe2b182ff55ba2dc77988dcd4c1865a28667db95
Reviewed-on: https://gerrit.instructure.com/193154
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Ed Schiebel <eschiebel@instructure.com>
Tested-by: Jenkins
Product-Review: Jon Willesen <jonw+gerrit@instructure.com>
refs CORE-2902
test plan:
1. In an editor, enter and select some text
2. Verify the link context toolbar appears
3. Press Alt+F7
4. Verify the link context toolbar input receives focus
5. Press Escape
6. Verify the link context toolbar is dismissed
7. Verify the text area receives focus
Change-Id: I86e938f0e37ffe23b9d39c34a2797cac9cf134cb
Reviewed-on: https://gerrit.instructure.com/192708
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
fixes COMMS-2029
Test Plan
* On the Compose page, click on the Compose
New Message button in the top right (pencil on paper)
* Press Tab to move focus to the Course combo box
* Press Shift+Tab
* Press Tab
* Press Tab
* Press Shift+Tab
* Focus actually allows for navigation now
Change-Id: I1359960f847514e8f6c0b89da8c9ebb65bedd262
Reviewed-on: https://gerrit.instructure.com/192636
Reviewed-by: Michelle Simmons <misimmons@instructure.com>
Reviewed-by: Landon Gilbert-Bland <lbland@instructure.com>
Tested-by: Jenkins
Product-Review: Aaron Hsu <ahsu@instructure.com>
QA-Review: Landon Gilbert-Bland <lbland@instructure.com>
added ability to tag rspec examples with a custom timeout
fixes CORE-2940
test plan:
- go to the account settings page
- click the reports tab
- click configure by "Activity Report"
- the date fields in the modal should be a date picker
Change-Id: I6e5622e3f6362bf90fd38f8ffe6c4d3637b46c5f
Reviewed-on: https://gerrit.instructure.com/193185
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Brent Burgoyne <bburgoyne@instructure.com>
we needed to include the ‘instructure_condensed_plugin’ so the toolbar
Has all the condensed buttons that we had in the demo
Test plan:
* the left/right/center, bulletlist/numberlist, super/subscript, etc
buttons that we condensed into one in the demo should appear in
Actual canvas-lms pages like they do in the demo.
Change-Id: I9b0a1395c6712791b5359af5c44a9decfc0bb424
Reviewed-on: https://gerrit.instructure.com/192953
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
QA-Review: Steven Burnett <sburnett@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
closes: CORE-2923 CORE-2736
these are just low hanging fruit, because a bunch of different files
included in different chunks used the same i18n scope, that means that
all of those strings were included in multiple chunks even though they
weren't needed by that page.
test plan:
* in a canvas where you have run a weback build with translations
* as a user that uses a non-english language like spanish
* click around a few pages like gradebook and make sure they work the
same as before.
* you should also notice that our prod js webpack bundles are smaller
Change-Id: I937d3268769ca50ef3416e4cc05fcb33a42a0c17
Reviewed-on: https://gerrit.instructure.com/192684
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
Restore the functionality of the LTI app links in the "More" tab, and
ensure that submitting a file using said links succeeds.
This is a partial revert of f2e8e20d87,
which removed some code in submit_assignment.js that was necessary for
links in the "More" tab to function properly; it restores that code and
fixes it up to remove linting errors.
fixes GRADE-1679
Test plan:
Note: at the time of this writing, there are some not-inconsiderable
differences in behavior depending on whether the user submits a file
from the LTI app's specific tab or they use the app's entry in the
"More" tab. Although the file should successfully be uploaded in both
cases, submission comments the user has typed appear to be lost when
submitting from the app-specific tab. patchset makes no attempt to iron
out those differences; it only seeks to ensure apps can submit when
accessed from the "More" tab.
- Set up 4 or more LTI assignments for an account/course
- They can all be copies of a single app, e.g. Dropbox:
- https://www.eduappcenter.com/configurations/slv9zn9yk7ik5jpp.xml
is the configuration URL
- Create an assignment allowing file uploads
- As a student, open the assignment and click "Submit Assignment"
- Click the "More" tab
- Links for all your LTI apps should appear there
- When clicked, they should open a frame allowing you to select
a file as appropriate for the selected app
- Select a file and click "Submit Assignment"
- The submission process should complete without any hitches
- Make sure that submitting via the app-specific tabs continues to
save the file properly (but see the note above)
Change-Id: I92e8a60dfa86ceaf7373ecfa6f5d3fa5328a8795
Reviewed-on: https://gerrit.instructure.com/192458
Tested-by: Jenkins
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Reviewed-by: Keith Garner <kgarner@instructure.com>
QA-Review: Derek Bender <djbender@instructure.com>
Product-Review: Keith Garner <kgarner@instructure.com>
Closes OUT-3086
Test Plan:
- Create an outcome with some html in its description (e.g. bolded
text)
- Create a rubric:
- For one criteria, insert html into its long description, e.g.:
<img src=x onerror="alert(1)" />
- Align the above outcome to another criteria.
- Create an assignment, attach the above rubric.
- Open speedgrader.
- Open the long description for the XSS criteria, verify that the
html entered above is not executed.
- Open the long description for the outcomes criteria, verify that
the html is rendered properly (bolded text appears bold).
Change-Id: Ie00de6ad99a96624a3af33d542a88028a85da99e
Reviewed-on: https://gerrit.instructure.com/190752
Tested-by: Jenkins
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
QA-Review: Augusto Callejas <acallejas@instructure.com>
Product-Review: Frank Murphy III <fmurphy@instructure.com>
Places this should affect:
- assignment description edit
- text assignment submission form
- discussion topic description edit
- creating discussion replies
- creating replies to discussion replies
- editing discussion topic replies
- wiki page edit
- syllabus description
- quizzes description edit
- quiz question description edit
- quiz question right answer comments
- quiz question wrong answer comments
- quiz question general answer comments
- take quiz essay question
- syllabus description edit
- calendar event details
- outcome descriptions
Note: There are not automated tests in this commit because we are
researching a plan for browser testing. Tests will be added as a result
of that research.
closes CORE-2838
test plan:
- the html toggler in the status bar should work
- the original html toggler and keyboard shortcuts are gone above the
editor when the feature flag is on
- the original html toggler and keyboard shortcuts are there and still
works when the feature flag is off
- try to think of other places the rce is used that I missed
Change-Id: Ibac893f5c3db80ebbeb1866a35e83215aba640f5
Reviewed-on: https://gerrit.instructure.com/191734
Tested-by: Jenkins
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
QA-Review: Ed Schiebel <eschiebel@instructure.com>
Product-Review: Jon Willesen <jonw+gerrit@instructure.com>
Closes: CORE-2868 CORE-2869
This is needed because without
Doing that, our bundle sizes are going to blow up from the things we
Import from InstUI
Test plan:
* the result of a dynamic export will now give you a object grab bag
That has a “default” property. Not just the thing of whatever the
“default" export was.
* so to test this, go to some page that does a dynamic import (like
the dashboard page) and make sure that still works\
* run a prod build
* make sure that translations still work as before
Change-Id: I3dd1b32216052afd5fbc5d6cec40ea18264f65e9
Reviewed-on: https://gerrit.instructure.com/191578
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
these are all things that I need for the “use esMoudles” commit that
Follows this but are not strictly part of that change. They just need
To be fixed before we do that
Test plan:
* when ran in strict mode (aka when using real esmodules),
these files should work.
Change-Id: Ie1574d825dc344c3f727439c2b0ca3c3d1178f36
Reviewed-on: https://gerrit.instructure.com/192042
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
QA-Review: Steven Burnett <sburnett@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
This commit just converts AMD imports to ES module import/exports
Change-Id: I7bc912fd9ccb87f7477d13d58d52675fcfa1f5e2
Reviewed-on: https://gerrit.instructure.com/191731
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
QA-Review: Steven Burnett <sburnett@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
Allow cross-shard users to be present in the "Message Students Who"
dialog instead of disappearing with no explanation.
fixes GRADE-455
Test plan:
- Create a cross-shard user and enroll them as a student
- Or a user with a large ID: User.create(id: 19007199254740991)
- Open the "Message Students Who" dialog for the course
- Observe that the large-ID user is shown
- Confirm that they continue to be shown when applicable filters are
chosen, and that actually sending a message includes their ID in
the list of recipient IDs (recipient_ids) sent to the server
Change-Id: I95169a621b2552697d5b3ba7d29fdab2a29672c1
Reviewed-on: https://gerrit.instructure.com/190751
Tested-by: Jenkins
Reviewed-by: Derek Bender <djbender@instructure.com>
Reviewed-by: Gary Mei <gmei@instructure.com>
QA-Review: Adrian Packel <apackel@instructure.com>
Product-Review: Keith Garner <kgarner@instructure.com>
closes GRADE-2126
Test Plan
- Create an assignment assigned to one section of students.
- Open the Gradebook.
- Open the Post Grades Tray.
- Verify that the number of of unposted is equal to the number of
students in that section.
- Grade 1 student and post grades for graded only.
- Refresh the page and verify that the unposted count is now one less
than before.
- Post grades for everyone.
- Refresh the page and verify that the unposted count does not
appear.
Change-Id: I9d78c40218d5dd2d0a7879ac4a5d19adcf6ee588
Reviewed-on: https://gerrit.instructure.com/190647
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Reviewed-by: Adrian Packel <apackel@instructure.com>
Tested-by: Jenkins
QA-Review: Gary Mei <gmei@instructure.com>
Product-Review: Jonathan Fenton <jfenton@instructure.com>
If you had points with a decimal component, the highlight of the grade
changing wasn't being triggered if the score decreased but whole
number part of values didn't change. The code was specifically parsing
everything as an int, ignoring the decimal part.
fixes GRADE-2111
test plan:
- Have a course with a student and assignment with 5 points
possible.
- Score the student with 4.5
- Export the gradebook
- Edit the downloaded csv to give the student 4.3 points
- Import the gradebook
- Note that in the "middle" step where you approve the changes that
the score change is highlighted in red.
Change-Id: Ibcfd5e72d591d0e46123816b5593282721423554
Reviewed-on: https://gerrit.instructure.com/191428
Tested-by: Jenkins
QA-Review: Derek Bender <djbender@instructure.com>
Product-Review: Keith Garner <kgarner@instructure.com>
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Reviewed-by: Adrian Packel <apackel@instructure.com>
Render nothing, instead of 'undefined' when there is no submission
history.
closes GRADE-2074
Test Plan
- Create a Quizzes.Next assignment.
- Don't submit to it at all.
- As a teacher, open SpeedGrader for that assignment.
- Give a student a grade.
- Refresh the page.
- Verify there is no 'undefined' above where the grade input is.
Change-Id: I0ce3fd93581a2de5db3f2c494e35c7cdb7b39acf
Reviewed-on: https://gerrit.instructure.com/191461
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Reviewed-by: Adrian Packel <apackel@instructure.com>
Tested-by: Jenkins
QA-Review: Gary Mei <gmei@instructure.com>
Product-Review: Jonathan Fenton <jfenton@instructure.com>
Closes PLAT-4405
Test Plan:
- Create a submission and originality report. The
originality report should have an error_message
set.
- View the submission in speedgrader
- Verify a "!" icon is displayed.
- Click the "!" icon and verify the
error message from the originality
report is shown.
- View the submission using the submission API (
/api/v1/courses/:course_id/assignments/:assignment_id/
submissions/:user_id
)
- Verify the "turnitin_data" object contains the error message
set on the originality report
Change-Id: I7dca498f8f5377a1997785c6b0825ab5b81ba50d
Reviewed-on: https://gerrit.instructure.com/191427
Tested-by: Jenkins
Reviewed-by: Marc Phillips <mphillips@instructure.com>
QA-Review: Nathan Mills <nathanm@instructure.com>
Product-Review: Jesse Poulos <jpoulos@instructure.com>
fixes CORE-2640
Test Plan:
- add a bunch of external tools
- turn on rce feature flag
- notice all tools are under one drop down
and are interactable
Change-Id: I05f6055293b5ea3f1d767c4e9bc1cefa546ac923
Reviewed-on: https://gerrit.instructure.com/190559
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Steven Burnett <sburnett@instructure.com>
refs PLAT-3794
Test Plan:
At each deep linking placement verify an exception is not raised
if a non "LtiDeepLinkingResponse" post message is sent.
Change-Id: If4d4dd051dc4ceb87e69db6caa88fa7f1331d80b
Reviewed-on: https://gerrit.instructure.com/191187
Tested-by: Jenkins
Reviewed-by: Marc Phillips <mphillips@instructure.com>
QA-Review: Nathan Mills <nathanm@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
closes GRADE-48
Test Plan
- Enable Post Policies.
- Navigate to SpeedGrader.
- Verify that the Post Grades and Hide Grades trays are shown when
clicking on Post Grades and Hide Grades respectively.
- Verify that posting and hiding work.
Change-Id: I032991dcff2a919f37ac968937729d3c6dece819
Reviewed-on: https://gerrit.instructure.com/190162
Tested-by: Jenkins
Reviewed-by: Adrian Packel <apackel@instructure.com>
Reviewed-by: Jeremy Neander <jneander@instructure.com>
QA-Review: James Butters <jbutters@instructure.com>
Product-Review: Jonathan Fenton <jfenton@instructure.com>
fixes GRADE-2132
Test plan:
- Set up an assignment with file uploads
- As one student (S1), upload something
- View the attachment via submission details -> "View Feedback"
- (or set the attachment's viewed_at date via the console)
- As another (S2), don't upload anything
- Open the assignment in SpeedGrader
- Give both students a grade
- When navigating from S1 to S2, the "student viewed at" line should
be removed (i.e., it should not stick around and continue to show
S1's viewed-at time)
Change-Id: I98867f347541ec269a3fde02723af2449dcc056f
Reviewed-on: https://gerrit.instructure.com/189953
Tested-by: Jenkins
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Reviewed-by: Derek Bender <djbender@instructure.com>
QA-Review: James Butters <jbutters@instructure.com>
Product-Review: Jonathan Fenton <jfenton@instructure.com>
Update the student avatar when a new student is selected from the
dropdown menu, as opposed to only when navigating via the arrows.
fixes GRADE-2119
Test plan:
- Enable avatars on the root account
- Set up avatars for a couple students (leave at least one student
without an avatar)
- Open SpeedGrader for a non-anonymous assignment
- The selected student's avatar should appear next to their name
- The avatar should update as you change students:
- From selecting a new student via the dropdown
- From navigating to a new student via the arrows or keyboard
shortcuts
- The generic avatar should appear for students who haven't
uploaded one, as expected
- Avatars should still NOT appear in the following cases:
- An anonymously-graded assignment
- When "Hide student names in the SpeedGrader" is turned on
Change-Id: Ibf9f043edf27b0a2cafa36de683793cd0f2a928d
Reviewed-on: https://gerrit.instructure.com/189882
Tested-by: Jenkins
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Reviewed-by: Gary Mei <gmei@instructure.com>
QA-Review: James Butters <jbutters@instructure.com>
Product-Review: Jonathan Fenton <jfenton@instructure.com>
closes GRADE-1923
Test plan:
- Set up address book-type functionality
- Go to /accounts/<account ID>/plugins/address_book
- Create a config and choose not to disable the plugin
- Select "MessageableUser library" to answer queries
- (or set up the actual address book plugin if you really want to
for some reason)
- Have a course with some assignments and students
- Do not give all the students the same name
- In new Gradebook, open the Message Students Who dialog
- Student names should be sorted in alphabetical order
- They should remain alphabetically sorted when the list
of names changes (e.g., when you choose a different
messaging criterion)
Change-Id: I5b571e7eee3cda462d152fcd70f661f6fcec7e11
Reviewed-on: https://gerrit.instructure.com/188693
Tested-by: Jenkins
Reviewed-by: Gary Mei <gmei@instructure.com>
Reviewed-by: Jeremy Neander <jneander@instructure.com>
QA-Review: Gary Mei <gmei@instructure.com>
Product-Review: Jonathan Fenton <jfenton@instructure.com>
Closes PLAT-3794
Test Plan:
- Install an LTI 1.3 tool that does deep linking and
uses the assignment_selection placement
- Navigate to the assignment create page
- Choose "External Tool" as the submission type
- Click "Find" and select the tool
- Return an LtiResourceLink content item
- Verify the modal closes
- Verify the URL fields in the assignment
create UI are populated with the tool's
launch URL
- Verify an error is shown if you attempt to return
a a non lti resource link content item
Change-Id: I60ec5caa4db163a2cf67d0984dc2c579da777852
Reviewed-on: https://gerrit.instructure.com/189667
Tested-by: Jenkins
Reviewed-by: Nathan Mills <nathanm@instructure.com>
QA-Review: Nathan Mills <nathanm@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
fixes CORE-2808
test plan
- load settings page, it should work
- load reports tab, it should work
Change-Id: I0616b4c2b23189a28a82360202fb1e4f5512892b
Reviewed-on: https://gerrit.instructure.com/189873
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins
Product-Review: Rob Orton <rob@instructure.com>
closes GRADE-1939
Test plan:
- Have a course with post policies enabled
- Set an assignment to post manually
- Grade some students in SpeedGrader
- The "Hidden" pill should be present by default, and should not
disappear when you grade or leave a comment
- Post a submission for that student:
- assignment.post_submissions(submission_ids: [<submission id>])
- On reload, the pill should not appear for that submission
- Set an assignment to post automatically
- Grade some students in SpeedGrader
- The hidden pill should *not* appear
- Hide a submission for that student:
- assignment.hide_submissions(submission_ids: [<submission id>])
- On reload, the pill *should* appear for that submission
(but should disappear when you give out a new grade)
- Have a course with post policies disabled
- Make an assignment and open it in SG
- Grade some students
- You should see no trace of the hidden pill
Change-Id: I4ef8d6e4eb09052cc5dd5cf23c3754283829c0bf
Reviewed-on: https://gerrit.instructure.com/189279
Reviewed-by: Gary Mei <gmei@instructure.com>
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Tested-by: Jenkins
QA-Review: James Butters <jbutters@instructure.com>
Product-Review: Keith Garner <kgarner@instructure.com>
closes: CORE-2785
This is all stuff that needs to be ran on every page, but It is not
critical that it be ran before anything else. By moving this into
an async chunk, it will not block any of the critical javascript from
running if it is ready (downloaded) before this stuff is.
Test plan:
* all of these behaviors and things should still run
* but you should see that they load from their own webpack chunk file
In the network panel
* and you should see that while that chunk is downloading, the critical
JS is not blocked from executing
Change-Id: If47d966979238d68da14bb4b69cba32be7f87dcc
Reviewed-on: https://gerrit.instructure.com/189372
Tested-by: Jenkins
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
QA-Review: Steven Burnett <sburnett@instructure.com>
Product-Review: Steven Burnett <sburnett@instructure.com>
closes: CORE-2773
Testing locally, rendering the /accounts/1 spent 171ms in scoped i18n.t,
With this it spent 11ms
Change-Id: I67c84716e398bcb21f1b8e988a757e57936d0045
Reviewed-on: https://gerrit.instructure.com/189179
Tested-by: Jenkins
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
closes: CORE-2768
test plan:
* grep for chevronCrumbs or chevron_crumbs, see if you can find anything
* -2 this if you can
* our common.css file should be smaller
Change-Id: Ia7eef6df16d9db957097cc47e861c2916b211fb0
Reviewed-on: https://gerrit.instructure.com/189026
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
QA-Review: Steven Burnett <sburnett@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
closes: CORE-2756
now that we removed the legacy wikiSidebar stuff, there is nothing
left that uses this so we can safely delete it.
test plan:
* nothing in the app should change since nothing used this
* there should not be a section in /styleguide talking about jQueryUI
accordion components
* our common css bundle should be smaller
Change-Id: I2d6d03eca49fea15dd4239a9cb6078f283e4c7a8
Reviewed-on: https://gerrit.instructure.com/188868
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
QA-Review: Steven Burnett <sburnett@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
It looks like nothing uses these 3 files so we
Can safely delete them
Test plan
* automated builds pass
* try to see if you can find anywhere where these are still used
Change-Id: I0229b80d0aac7ac1b0ffa568d51c277b9c86444f
Reviewed-on: https://gerrit.instructure.com/188647
Tested-by: Jenkins
Reviewed-by: Jeremy Neander <jneander@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
Test Plan:
- Enable RCE Enhancements
- Load a page with an RCE
- You should see the image plugin
Change-Id: I4a23828fec58edbf62ed159ff7621bc7a5854e96
Reviewed-on: https://gerrit.instructure.com/188668
Tested-by: Jenkins
QA-Review: Brent Burgoyne <bburgoyne@instructure.com>
Product-Review: Brent Burgoyne <bburgoyne@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
closes: CORE-2745
This makes it so the external tools modal, and all its deps are not
included in the common webpack bundle
Test plan:
- the code for the external tools modal should not be in the common
Webpack bundle which blocks rendering on every page.
- have at least one external tool configured that has an editor icon
- i.e. the youtube tool
- edit a wiki page
- ensure the youtube icon shows in the editor toolbar
- click it
- the modal should work exactly as before
Change-Id: I1958e1a2c5603c6cec70d8c4fc416490e3afae15
Reviewed-on: https://gerrit.instructure.com/188321
Tested-by: Jenkins
QA-Review: Weston Dransfield <wdransfield@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
Closes: CORE-2599
Test plan:
* with the rce_enhancements feature flag turned off, nothing should
change
* turn on the rce_enhancements feature flag
* go to an editor
* it should load without throwing any errors
- note, you will see some “bomb” icons that we will need to update
And the formatting/styling of the toolbar will need some work.
But that is ok for this commit because it is all behind the feature
Flag and we will get address those in a future commit
Change-Id: If28167731b5b285005143861e19fdb2fc0c34def
Reviewed-on: https://gerrit.instructure.com/187179
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Only one thing used this and it only used one of it’s methods. So to
Have less cruft laying around we can delete it
Change-Id: I62cda1feeed31450403979f4d0b186ead12086fe
Reviewed-on: https://gerrit.instructure.com/188317
Tested-by: Jenkins
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
closes: CORE-2588 CORE-2591
This completely removes the legacy RCE codepath. So you will need to
Have an https://github.com/instructure/canvas-rce-api running to use
sidebar in any Rich Content Editors.
Test plan:
* smoke test to make sure that the editor and sidebar work as it did
When you had the RCS feature flag on.
* there should not be any more settings or feature flags around turning
on the RCS service
Change-Id: I1c3e7f5a45eed5e010d8e425ae561e45f739fd3a
Reviewed-on: https://gerrit.instructure.com/186525
Tested-by: Jenkins
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
The way that this was, it wasn’t actually delaying loading anything
Test plan:
* the badge counts should still show up on the menu items that have
new items for you to look at.
Change-Id: I0c019222e4989f946aa5931ddc6a354f9c70bd7c
Reviewed-on: https://gerrit.instructure.com/188319
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
closes GRADE-1940
Test plan:
- Enable post policies and open SG
- The muting icon should be replaced by a new icon
- If all submissions are posted, it should be the "eye" icon
- If any are unposted, should be the eye-slashed-in-two icon
- Clicking it should bring up a menu
- "Hide Grades" and "Post Grades", neither of which do anything
- Disable post policies and open SG
- The mute/unmute bell icon should be back and work as before
Change-Id: I8b91d7867bfd36672a1462cce49c8906d75a0ce5
Reviewed-on: https://gerrit.instructure.com/186744
Tested-by: Jenkins
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Reviewed-by: Gary Mei <gmei@instructure.com>
QA-Review: James Butters <jbutters@instructure.com>
Product-Review: Jonathan Fenton <jfenton@instructure.com>
This makes it so we show spinners until things have loaded. It also
makes it so that we begin to fetch the data sooner and rely on our
cache a bit more after. Not only should this increase speed perception,
but should also really enhance the speed and experience.
closes CORE-2324
Test Plan:
- Enable CSP feature flag
- Go to the security tab on an account/subaccount
- You should initially see a spinner, then the page should show
fully loaded once it disappears.
Change-Id: Ia0c4b556cfd6e1a364443fe8f800e8c9ac4e10c9
Reviewed-on: https://gerrit.instructure.com/182384
Tested-by: Jenkins
QA-Review: Tucker Mcknight <tmcknight@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
fixes OUT-2317
Test plan (in Edge 42):
1. Create an assignment in Canvas and attach a rubric
2. Scroll down on the assignment page and wait a few seconds
3. The page should not jump
4. Navigate to Speedgrader and grade a student
5. As the student, navigate to grades page and open the graded rubric
6. Scroll down and wait a few seconds
7. The page should not jump
Change-Id: I50ba5dfc97e9f9c9d4d45d6d1eb5cafa1a5b065e
Reviewed-on: https://gerrit.instructure.com/185698
Tested-by: Jenkins
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
QA-Review: Brian Watson <bwatson@instructure.com>
Product-Review: Neil Gupta <ngupta@instructure.com>
* send a CSP applying only to frames in the main page
* send a CSP applying to both frames and scripts with attachments
* tools only get included in the frame-src directive
* include the files domain in both for now
* search for course context on a file through submissions, if possible
Test Plan:
- Enable CSP feature flag
- Configure a csp_logging host in dynamic_settings.yml (see example)
- Have a files domain configured
- Turn whitelist on
- Upload html file containing a violation like
<script src="https://www.google.com/nonexistent.js/"></script>
- Preview the file
- The page should load, but your browser console should show that
the JS was blocked
- The browser network log should show a violation reported to the
violation service
- Embed an iframe in RCE stuff referencing some other site (like
YouTube)
- it should get blocked
- Turn the whitelist off
- Retry; the JS or iframe should (attempt) to load, but a violation
should still be reported
- Repeat all of the above, but this time be a student uploading an
html file as a submission for an assignment, and then view the
submission in speedgrader as a teacher/admin
Change-Id: I19823844b3d87fd19e43c17284cf7b987df26e74
Reviewed-on: https://gerrit.instructure.com/182000
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Reviewed-by: James Williams <jamesw@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Fixes: GOOF-701
Note:
- We are no longer using the `workflow_state` attribute form the
Attachment model. We are using AttachmentUploadStatus that is
joined to the Attachment model to retrieve the same results.
We are now using Redis to track the state of the Attachment
per Submission which will allow us to give a more accurate view
of the Attachment state as it is being processed.
Test plan:
- Compile assets for canvas
- Boot up the docker container
- Navigate to a course with the google lti installed
- As a student submit an assignment from google drive
- On the assignment detials, submission details and grade summary
pages (found on the invision links in the ticket) confirm you
see the progress widgets and the files correct upload status
- On the submission details page in the grade book confirm you
can see the icons
- In speedgrader confirm you can see the correct icons on the right
hand sidebar AND confirm they change accrodignly as you change
the submission selected from the dropdown if there are multiple
submissions
Change-Id: I6c1152cb7b450c3c2e3a2ca810233fc222c0967a
Reviewed-on: https://gerrit.instructure.com/180605
Tested-by: Jenkins
Reviewed-by: Joshua Orr <jgorr@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Jesse Poulos <jpoulos@instructure.com>
fixes GRADE-2058
Test plan:
NB: In the test plan below, "anonymized" refers to links of the form:
assignments/<assignment ID>/anonymous_submissions/<anon ID>
as opposed to the standard, "non-anonymized" form:
assignments/<assignment ID>/submissions/<user ID>
Note that the above format is solely for submissions and submission
comments: rubrics behave a bit differently, as described below.
Setup:
- Create the following assignments corresponding to test sections:
1. An assignment with anonymous peer reviews
2. An assignment with non-anonymous peer reviews
3. An assignment with anonymous peer reviews + a rubric
4. An assignment with non-anonymous peer reviews + a rubric
- For each assignment, assign some peer reviews
- Have the Network panel in your browser's developer tools handy so you
can see the requests being sent, as described below
Testing (1):
- As a peer-reviewer, open the assignment
- The 'Assigned Peer Reviews' links should be anonymized
- Select one to peer-review
- Check that leaving a comment sends an anonymized request
- As that student, open your own submission details page
- This URL should *not* be anonymized
- Leaving a comment should send a non-anonymized request
- As a grader, open the submission details page for a student
- The links should *not* be anonymized
Testing (2):
- As a peer-reviewer, open the assignment
- The peer review links and comment requests should *not* be
anonymized
- As a grader, open the assignment
- Same here; links should not be anonymized
Testing (3):
- Take a mighty breath and gird yourself for battle
- As a peer-reviewer, open the assignment
- Click "Show Rubric" and submit a rubric assessment
- Check that the parameters of the sent request include:
- rubric_assessment[anonymous_id]: <anonymous ID>
- They should *not* include rubric_assessment[user_id]
- Unlike with submissions, the URL will not change for
anonymous rubric assessments (since it includes no
data directly identifying the user)
- As a grader, open the assignment
- Submit a rubric assessment
- Check that the parameters of the sent request include:
- rubric_assessment[user_id] (i.e., same as before)
A note on testing rubrics: as far as I can tell, students can't edit a
peer review rubric after they've submitted it. To work around this in
testing, you can set the workflow_state of the relevant RubricAssessment
to 'assigned' (instead of 'completed') and it'll be editable again.
Testing (4):
- Same as (3), but in both cases we should send
rubric_assessment[user_id] as before
Finally:
- Do some smoke testing for assignments (3) and (4) in SpeedGrader to
make sure we haven't broken rubrics there
- Note that SpeedGrader will not currently attempt to anonymize
rubric assessments as described above even if anonymous grading
is enabled, which is fine for now since peer reviewers can't
access SpeedGrader
Change-Id: I25d9350a6a486fd5ba84b9c784017eac45d24098
Reviewed-on: https://gerrit.instructure.com/184406
Tested-by: Jenkins
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Reviewed-by: Gary Mei <gmei@instructure.com>
QA-Review: Gary Mei <gmei@instructure.com>
Product-Review: Jonathan Fenton <jfenton@instructure.com>
this prevents these things from being included in the common bundle
loaded on every page
test plan:
* you shouldn't see these modules in the common/vendor weback bundles
* everything should still work the same since they were not actually
used in the places that they were required here
Change-Id: Id30fb10e13507cd750ae660cd30262d7bc2bac1c
Reviewed-on: https://gerrit.instructure.com/184909
Tested-by: Jenkins
QA-Review: Steven Burnett <sburnett@instructure.com>
Product-Review: Steven Burnett <sburnett@instructure.com>
Reviewed-by: Steven Burnett <sburnett@instructure.com>
closes CORE-2255
Test Plan:
- Enable CSP feature flag
- As a teacher go to a course settings page.
- You should see a checkbox that is disabled
indicating the current status of CSP at the
course level. It is under the more options
at the bottom of the page.
- It should also show a tooltip explaining that
only admins can modify the setting.
- As an admin, look at the same page.
- You should be able to modify the checkbox.
Change-Id: Ifa3487594f6e0a48d989c57f36d3ac9ff99c1c24
Reviewed-on: https://gerrit.instructure.com/178036
Tested-by: Jenkins
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Reviewed-by: Steven Burnett <sburnett@instructure.com>
closes OUT-2965
Ideally, we would replace the clickable "li" element
with a "button" element, but the code that manages
the layout of the submissions ("jquery.inst_tree.js")
expects a "span" child element inside the "li" element.
test plan
- in a course, submit to any assignment as a student
- create an ePortfolio (Account icon in upper left, then
select ePortfolios)
- navigate to the submission list using KO keys
- when on a submission, confirm that clicking on the
title (Space/Enter button) opens up a dialog
- when on a submission link, confirm that clicking on the
link (Space/Enter button) opens a new tab with the submission
- enable VO
- confirm when navigating to a selection, that it announces
that's its a button and that using the VO keys, clicking
on the title opens a dialog
- navigate to the submission link, and confirm that clicking
on the link opens a new tab with the submission
Change-Id: I850ad9861612e24e5a4d050154e9cec7f1f49e9e
Reviewed-on: https://gerrit.instructure.com/184479
Tested-by: Jenkins
Reviewed-by: Neil Gupta <ngupta@instructure.com>
QA-Review: Brian Watson <bwatson@instructure.com>
Product-Review: Daniel Sasaki <dsasaki@instructure.com>
closes GRADE-2034
Test plan:
Setup:
- Have a course with students (we'll call them S1, S2, etc.)
- Take note of the students' IDs
- Create a non-anonymous assignment (A1) and an anonymous one (A2)
Overview:
Testing the non-anonymous assignment:
- Open SpeedGrader without specifying a student:
- ?assignment_id=<A1_id>
- This should go to the "default" student (the first
student with an ungraded submission) and appear as:
- It should also rewrite the URL as:
- ?assignment_id=<A1_id>&student_id=<a_student_id>
- Go to a particular student:
- ?assignment_id=<A1_id>&student_id=<S2_id>
- This should take you to S2 and appear as:
- Go to a student using the old anchored link:
- ?assignment_id=<A1_id>#{"student_id":"<S2_id>"}
- This should take you to S2 and rewrite the link in the
anchorless form
- Go to a non-existent student:
- ?assignment_id=<A1_id>&student_id=FRED
- This should go to the "default" student (see above) and
rewrite the URL accordingly
- Go to a non-existent student using the old anchored link:
- ?assignment_id=<A1_id>#{"student_id":"FRED"}
- Same idea here
- Navigate among the students (using the select menu, n/p, whatever)
- Switching students should update the URL with the new student's ID
- Your browser's back/forward buttons should switch between students
as you expect, and also update the URL as they do so
Testing the anonymous assignment:
- Repeat the checks listed above with the new assignment and ID
- It should work as described, with the sole difference being
that the anonymous_id parameter appears in the URL instead of
student_id (and is populated appropriately)
- Do some additional testing for group assignments, and possibly other
configs, to make sure they haven't broken
Change-Id: I5e0832b6c06dcd3325fdae45140cfff269d5ff31
Reviewed-on: https://gerrit.instructure.com/183210
Tested-by: Jenkins
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Reviewed-by: Gary Mei <gmei@instructure.com>
QA-Review: James Butters <jbutters@instructure.com>
Product-Review: Jonathan Fenton <jfenton@instructure.com>
Fixes OUT-1552
Test Plan
- Create an assignment with a peer reviewed rubric.
- Submit the assignment as one student. Assign another student as a peer
reviewer for that student.
- As the reviewer, submit the review. Verify that the "Save Comments"
button disappears, and is not shown when reloading the page.
Change-Id: Ia3efc9ecf579b08df97f1fcb5cefaa27a288ff19
Reviewed-on: https://gerrit.instructure.com/184117
Tested-by: Jenkins
Reviewed-by: Neil Gupta <ngupta@instructure.com>
QA-Review: Brian Watson <bwatson@instructure.com>
Product-Review: Frank Murphy III <fmurphy@instructure.com>
We really should only be writing eslint-ignore in files where we KNOW
We don’t want to do what it is suggesting.
If it is suggesting something that we probably should do, but it was
written before us so we want to be lazy and not do anything about it,
we should not just eslint-ignore it. We should fix it or leave it there
for someone else to fix.
Having an eslint-ignore in a file is a signal that someone who knew what
They are doing saw that error and said “no I want to do it anyway”
We really should not be having lots of cases where you need to even
write `eslint-ignore`. A rule should either be 99.9% always followed or
we should get rid of it (and as a side note, I think we are there now)
A lot of these were leftovers from before we did that ^
Change-Id: I1e515d486550ad3118d6d74e9c824d28ebf6e714
Reviewed-on: https://gerrit.instructure.com/183786
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
test plan:
- have a course with some modules
- set up a module with some prerequisites, and save
- edit the module and use a screenreader to read the prerequisites
section
- the X buttons should be labeled "Delete prerequisite (module name)"
- choose a different module from the dropdown, and the X button label
should be changed to reflect the new selection
- newly added prerequisites are labeled this way before save also
- if no module is selected, it is labeled "Delete prerequisite"
fixes ADMIN-2449
Change-Id: Ia304852370b9e2d787f0467d4195daf1feecba93
Reviewed-on: https://gerrit.instructure.com/183400
Tested-by: Jenkins
Reviewed-by: Mysti Lilla <mysti@instructure.com>
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
QA-Review: Ed Schiebel <eschiebel@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
test plan:
- edit a module that contains different kinds of things
- set up completion requirements
- the X button to delete a requirement shoul be labeled matching
the contents of the dropdowns
e.g. "Delete requirement Place Kitten (view the item)"
fixes ADMIN-2451
Change-Id: I8d8f48a6c464ccaa1a3fb0dd499db9d937ddba1d
Reviewed-on: https://gerrit.instructure.com/183401
Tested-by: Jenkins
Reviewed-by: Jon Willesen <jonw+gerrit@instructure.com>
QA-Review: Daniel Sasaki <dsasaki@instructure.com>
Product-Review: Daniel Sasaki <dsasaki@instructure.com>
closes OUT-2871
Rubric association options like "Use this rubric for assignment grading"
and "Hide score total for assessment results" should not be available
when editing a rubric from the rubrics page. These checkbox handlers
were making them visible again, so we ignore the handler logic if the
checkboxes are hidden.
test plan:
- navigate to a course rubrics page
- add a rubric
- attempt to edit it again
- confirm that no checkboxes appear above
the "Update Rubric" button, specifically:
* Use this rubric for assignment grading
* Hide score total for assessment results
- cancel the rubric edit
= Assignment 1 =
- create a course assignment
- create a rubric on that assignment, with no
checkboxes checked
- return to the course rubrics page
- edit the assignment rubric
- confirm that no checkboxes appear, like previously
mentioned above
- cancel the rubric edit
= Assignment 2 =
- create a course assignment
- create a rubric on that assignment, with the
checkbox "Remove points from rubric" checked
- return to the course rubrics page
- edit the assignment rubric
- confirm that no checkboxes appear, like previously
mentioned above
- cancel the rubric edit
Change-Id: Iff4b9692e92466f18fd7fe3132d862856138a1f4
Reviewed-on: https://gerrit.instructure.com/183560
Reviewed-by: Neil Gupta <ngupta@instructure.com>
Tested-by: Jenkins
QA-Review: Brian Watson <bwatson@instructure.com>
Product-Review: Augusto Callejas <acallejas@instructure.com>
refs GRADE-1934
test plan:
* Verify Jenkins passes
Change-Id: Ia1ff199d686af5618a54e306d151fcd6914c1e73
Reviewed-on: https://gerrit.instructure.com/183350
Tested-by: Jenkins
Reviewed-by: Adrian Packel <apackel@instructure.com>
Reviewed-by: Gary Mei <gmei@instructure.com>
QA-Review: Jeremy Neander <jneander@instructure.com>
Product-Review: Jeremy Neander <jneander@instructure.com>
This only removes code comments.
No functional change.
Change-Id: I439dceb4a9e642d86af7076efccc4c633912a7bf
Reviewed-on: https://gerrit.instructure.com/183291
Tested-by: Jenkins
Reviewed-by: Gary Mei <gmei@instructure.com>
QA-Review: Jeremy Neander <jneander@instructure.com>
Product-Review: Jeremy Neander <jneander@instructure.com>
When autoplay is prevented by chrome due to cross origin iframe MEI
rules it breaks the video viewing experience in Arc entirely and
prevents our chrome users from using our mejs player buttons.
If we provide the parent iframe autoplay permission the autoplay
permission on our Arc's embedded iframe now works and allows users to
play their videos again with our mejs controls.
test plan: existing tests, updated for new changes
Change-Id: Ice3568bf3eec93ffb56fbf401231f4eca569e471
Reviewed-on: https://gerrit.instructure.com/182680
Tested-by: Jenkins
Reviewed-by: Marc Phillips <mphillips@instructure.com>
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
QA-Review: Pedro Fajardo <pfajardo@instructure.com>
QA-Review: Kyle Rosenbaum <krosenbaum@instructure.com>
Product-Review: Peter Quaeck <pquaeck@instructure.com>
In a peer review assignment with rubrics, a student's rubric total
score data was pre-populating a rubric assessment for the teacher
when they would go to write their own.
closes GRADE-2024
Test Plan
- Create a peer review assignment.
- Attach a rubric to it.
- As Student 1, submit to the assignment.
- As Student 2, submit to the assignment.
- Assign the two students to peer review each other.
- As Student 1, peer review Student 2 using the rubric.
- As the teacher, load SpeedGrader.
- The rubric grading that Student 1 did should be visible.
- Click View Rubric.
- The rubric that shows for the teacher to use should not have a
total. Instead, it should start from scratch and be a 0.
Change-Id: I66c48b125368bbc3e4493447323b70f3cc0fa4f2
Reviewed-on: https://gerrit.instructure.com/182517
Tested-by: Jenkins
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Reviewed-by: Adrian Packel <apackel@instructure.com>
QA-Review: Indira Pai <ipai@instructure.com>
Product-Review: Jonathan Fenton <jfenton@instructure.com>
Set end and close dates for grading periods to 59 seconds, preventing
the possibility of having an awkward one-minute gap between the end of
one grading period and the start of the next.
fixes GRADE-1956
Test plan:
- Create or edit a grading period set for an account
- Using the date picker, enter values for the close and end dates
- (i.e., select them via the picker, don't enter them manually)
- Save the grading period
- In the Rails console, examine the grading period:
> gp = <grading period you just edited>
> [gp.start_date, gp.end_date, gp.close_date]
- The seconds value of end_date and close_date should be 59
- The seconds value of start_date should be 0
- Edit the grading period again
- Manually type in values for end/close dates and save
- (e.g., "Feb 28 11:58pm")
- As above, check in the console that the end and close dates have
seconds values ending in 59
(Note that the pre-existing "fancy midnight" behavior still applies to
end/close dates: a date set to midnight will be changed to 11:59:59pm
on the same day.)
Change-Id: Ifbf57b5c9d8420ea3e0ad271576f0ddf10b1449f
Reviewed-on: https://gerrit.instructure.com/182639
Tested-by: Jenkins
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Reviewed-by: Gary Mei <gmei@instructure.com>
QA-Review: Adrian Packel <apackel@instructure.com>
Product-Review: Keith Garner <kgarner@instructure.com>
refs CORE-2286
test plan:
- test content insertion workflow with tools that launch from the rce
- include a test with deep linking
- include a test with tools that use selection and editor contents
Change-Id: I22c317f46cd9ae075b050b89474078bb6d4bc068
Reviewed-on: https://gerrit.instructure.com/180542
Tested-by: Jenkins
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
QA-Review: Weston Dransfield <wdransfield@instructure.com>
Product-Review: Nathan Nuclear <nathan@instructure.com>
Fixes XSS vulnerability.
Fixes QO-472
Refs SEC-2153
Test plan:
- Login as teacher or admin
- Create a quiz
- Switch quiz instructions editor to raw html
- Add the following html:
<div id="quiz_details_wrapper" data-url="some-url"></div>
<p><a class="quiz_details_link">XSS</a></p>
- Save the quiz
- Click the "XSS" link
- Verify that no request is made to the url in the data attribute
- Repeat last 2 steps as student taking the quiz
Change-Id: I1849b0674bd8463eef587864c74dbe58db23ea7b
Reviewed-on: https://gerrit.instructure.com/179446
Tested-by: Jenkins
Reviewed-by: Michael Brewer-Davis <mbd@instructure.com>
QA-Review: Jonathan Holt <jholt@instructure.com>
Product-Review: Omar Khan <okhan@instructure.com>
test plan:
- create an ePortfolio
- add an HTML section
- put a <script> in there, e.g. <script>alert('!')</script>
- click "Preview" and ensure that script didn't run
- save the page and ensure the script doesn't run
- ensure the steps in SEC-2145 are no longer reproducible
(in particular, clicking "PREVIEW!" should do nothing)
fixes OUT-2954
Change-Id: If2b60689bd9e254df01754d106fff4bfc0603882
Reviewed-on: https://gerrit.instructure.com/179087
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
closes CORE-2404
Test Plan:
- In an HTML editor within Canvas put in this code:
<div class="link_holder">
<a class="file_preview_link" href="https://raw.githubusercontent.com/pfspence/execme/master/file.php">XSS</a>
</div>
- Save the assignment/discussion/page
- View the assignment/discussion/page
- Click the preview link
- Nothing should popup on the page... it should just be a blank preview
Change-Id: I5c63ad1e5bc570ba5acc70b666ff81d2b0a5f584
Reviewed-on: https://gerrit.instructure.com/179271
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Matt Miller <mmiller@instructure.com>
closes CORE-2253
Test Plan:
- Enable CSP settings
- Go to a sub-account's settings page
- You should see a security tab
- Go to the security tab
- CSP information should be displayed including a toggle
between Off, Inherited, and On.
- Behavior should match the description shown on the page.
Change-Id: If2a485cc3712f6af8d266401da67d4deaa845696
Reviewed-on: https://gerrit.instructure.com/177971
Tested-by: Jenkins
QA-Review: Tucker Mcknight <tmcknight@instructure.com>
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
closes QO-465
Test plan:
Create, take quiz as student
In speedgrader, assign fudge points
to student submission
Reload page
Verify that fudge points are displayed
correctly
Assign 0 fudge points to submission
Reload page
Verify that 0 fudge points are displayed
Change-Id: I9ce253a03a8bb5b3dfb903b0ccefd1b6028135f8
Reviewed-on: https://gerrit.instructure.com/177308
Reviewed-by: Aaron Griffin <agriffin@instructure.com>
Tested-by: Jenkins
QA-Review: Jacob Burroughs <jburroughs@instructure.com>
Product-Review: Michael Brewer-Davis <mbd@instructure.com>
closes QUIZ-5817
Test plan:
- create a quiz with some manually
graded questions and some automatically
graded questions
- take the quiz
- in speedgrader, select the gear icon
- select "options"
- select "Grade by question (beta)"
- verify that in nav bar, automatically
graded questions are grayed out and
manually graded are not
- assign a score to one of the manually graded
questions
- verify that the given question becomes grayed
out in the nav bar
- remove a grade from a question
- verify that the given question is no longer
grayed out
Change-Id: Ifd02ffd3d532eed68ef5d776e658d25c75bf0eba
Reviewed-on: https://gerrit.instructure.com/176725
Tested-by: Jenkins
Reviewed-by: Jonathan Holt <jholt@instructure.com>
QA-Review: Jacob Burroughs <jburroughs@instructure.com>
Product-Review: Michael Brewer-Davis <mbd@instructure.com>
fixes COMMS-1807
Test Plan
* Either wait till inst ui commit merges in or read code to see
where boolean is set
* Setup localhost:3000/plugins/kaltura
* Try to make a video only upload in the RCE using the upload modal
* Once the item is merged this will actually do somethign
Change-Id: I074d308bf41fd66141496500a865548220553dd0
Reviewed-on: https://gerrit.instructure.com/175803
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
QA-Review: Landon Gilbert-Bland <lbland@instructure.com>
Product-Review: Steven Burnett <sburnett@instructure.com>
The new Moderated Grading workflow means that the Copy to Final Mark
workflow is no longer used. One api endpoint has been removed.
closes GRADE-1373
Test Plan
- Generate the rails docs (rake doc:api).
- Navigate to the publuc/doc/api directory and open
moderated_grading.html.
- Verify that no mentions of copying a provisional grade exist.
- Create a moderated assignment and assign some provisional grades.
- In a rails console, grab the course, assignment, and provisional
grade ids.
- Attempt to his this endpoint:
/api/v1/courses/:course_id/assignments/:assignment_id/
provisional_grades/:provisional_grade_id/copy_to_final_mark
and verify that it is unsuccessful.
- Open Speedgrader and verify that no mentions of copying to final
mark exist.
- Verify that moderating an assignment works using the sidebar.
- Open the moderation page and verify that moderating works from
there.
Change-Id: Id975c0c3afb3589729b921406b696471e75bca25
Reviewed-on: https://gerrit.instructure.com/176694
Tested-by: Jenkins
Reviewed-by: Keith Garner <kgarner@instructure.com>
Reviewed-by: Adrian Packel <apackel@instructure.com>
Reviewed-by: Derek Bender <djbender@instructure.com>
QA-Review: Indira Pai <ipai@instructure.com>
Product-Review: Keith Garner <kgarner@instructure.com>
fixes COMMS-1781
Test Plan
* Make sure to run bundle exec rake db:migrate
* Trigger the confirm_email_communication_channel or
confirm_registration event on the Communication Model
* We can do this by adding a comm channel in the console
going over to the channels and adding an email on the
account
* notice that when its added it will attempt to send
a confirmation
* We can look at rails c and notice that the new
confirmation_sent_count column will be incremented
Change-Id: I5a2af0fa1e2cff3949c9fbc4a93550f20abeb810
Reviewed-on: https://gerrit.instructure.com/176233
Reviewed-by: Steven Burnett <sburnett@instructure.com>
Tested-by: Jenkins
QA-Review: Landon Gilbert-Bland <lbland@instructure.com>
Product-Review: Aaron Hsu <ahsu@instructure.com>
fixes: ADMIN-2304
Test-Plan:
- create new course
- create module in course
- create assignment in module
- ensure module and assignment are not published
- click publish on the module
- make sure the module and assignment show as published
Change-Id: I10f4cf7b3ce1f088b67e023dabd16471c170de2d
Reviewed-on: https://gerrit.instructure.com/176149
Tested-by: Jenkins
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
QA-Review: Ed Schiebel <eschiebel@instructure.com>
Product-Review: Rex Fleischer <rfleischer@instructure.com>