Commit Graph

28103 Commits

Author SHA1 Message Date
Keith Garner 6c6f18930f update new gradebook feature flag
This patchset updates the new gradebook feature flag to 1) allow
teachers to enable the new gradebook for a course (if the admin has
set new gradebook to allow) and 2) disable the ability to turn off the
new gradebook for a course if backwards incompatible features are
used. For now, the features that would stop a move backwards are
enabled late or missing policies, or any submission that had a
late_policy_status manually set.

closes GRADE-691

test plan:
 - As an admin, in the account settings set new gradebook to allow
 - Create a course with a teacher, a ta, a student, and an assignment
 - As a ta, go the course settings and confirm you can't configure new
   gradebook
 - Perform the following actions as a teacher unless otherwise
   specified
    - go to the course settings and enable the new gradebook
    - in the gradebook, configure a late policy
    - go the course settings and confirm you can't turn off new
      gradebook
    - as an admin, go to the course settings and confirm you can't
      turn off new gradebook
    - in the gradebook, turn off the late policy and configure a
      missing policy
    - go the course settings and confirm you can't turn off new
      gradebook
    - as an admin, go the course settings and confirm you can't turn
      off new gradebook
    - in the gradebook, turn off the missing policy
    - go the course settings and confirm you can turn off new
      gradebook (but leave it enabled)
    - as an admin, go the course settings and confirm you can turn off
      new gradebook (but leave it enabled)
    - go into the gradebook, set a missing or late status on the
      assignment for the student
    - go the course settings and confirm you can't turn off new
      gradebook
    - as an admin, go the course settings and confirm you can't turn
      off new gradebook

Change-Id: Ibfde1398c60254de1fd2b9697e8155fabbb1b781
Reviewed-on: https://gerrit.instructure.com/134521
Tested-by: Jenkins
Reviewed-by: Shahbaz Javeed <sjaveed@instructure.com>
Reviewed-by: Derek Bender <djbender@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
2017-12-08 17:30:15 +00:00
Jeremy Stanley 51f7ebe9b7 escape title / meta text in HtmlContentExporter
test plan:
 - have assignments and wiki pages with unclosed html tags in their names
   (e.g., <style> and no corresponding </style>)
 - these items should copy correctly via course copy
   or export/import. in particular, check:
   1. the HTML tags appear literally in the names
      (they are not filtered out)
   2. all items are copied
   3. item body text is also copied

fixes ADMIN-583

Change-Id: Ic1fc006fca0c1e0af0dec05ebf7cff2041c179f3
Reviewed-on: https://gerrit.instructure.com/134720
Tested-by: Jenkins
Reviewed-by: James Williams  <jamesw@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2017-12-08 17:15:16 +00:00
Brent Burgoyne d642fb6609 upgrade canvas-rce to version 2.6.2
closes CORE-673

test plan:
- ensure rcs flag is enabled
- run latest RichContentService locally w/ flickr api key
- insert a flickr image
  - should be linked to image on flickr website
- test with a wiki page
- test uploading an image from the images tab in the sidebar
  - it should have the place to enter alt text or decorative
- save the page
  - it should render image and have correct alt text
- edit wiki page
- test uploading a pdf from the files tab
- save the page
- the inline preview should work (canvadocs plugin must be enabled)
- smoke test common rce workflows

Change-Id: Ia8c9c020d4318729cc0f15bd60a05672614863ec
Reviewed-on: https://gerrit.instructure.com/134639
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Brent Burgoyne <bburgoyne@instructure.com>
2017-12-08 16:22:50 +00:00
Transifreq 936e803f8e update nn translation
Change-Id: I0ba446416f80da8864d896136134228e9415073c
2017-12-08 06:04:29 -07:00
Cameron Matheson 2cd166238e graphql: allow filtering course users by id
closes RECNVS-107

Test plan:
  use the userIds param of the Course usersConnection property

Change-Id: I12b82da24106be35590fc162b2b005aa8dc3f6c6
Reviewed-on: https://gerrit.instructure.com/134970
Tested-by: Jenkins
Reviewed-by: Jacob Fugal <jacob@instructure.com>
QA-Review: Collin Parrish <cparrish@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
2017-12-07 23:15:03 +00:00
Pam Hiett a89a5b1b44 update "ignore x" on recent activity to give it context
Fixes: UIDEV-137

test plan:
- as a user turn on recent activty for dashboard view
- using vo, jaws, nvda... ensure the "ignore x" reads properly
  so there is context as to what is being ignored

Change-Id: Ia1699ea657425b40f72176a714091475bfd3eddc
Reviewed-on: https://gerrit.instructure.com/134702
Tested-by: Jenkins
Reviewed-by: Stephen Jensen <sejensen@instructure.com>
QA-Review: Dan Sasaki <dsasaki@instructure.com>
Product-Review: Pam Hiett <phiett@instructure.com>
2017-12-07 23:06:39 +00:00
Indira Pai 8fbef91a75 Selenium Helper Additions
refs QA-417

Test Plan:
--- Passes Jenkins

Change-Id: I3a7a3857bdac48d61e3c15963197e6e7e0d4cbf3
Reviewed-on: https://gerrit.instructure.com/134808
Tested-by: Jenkins
Reviewed-by: Leo Abner <rabner@instructure.com>
Product-Review: Leo Abner <rabner@instructure.com>
QA-Review: Leo Abner <rabner@instructure.com>
2017-12-07 22:25:49 +00:00
Jon Willesen f7afe556c5 make unread discussion topics have new_activity
Discussion topics can be unread even without replies if the user hasn't
looked at the topic yet. This is why it was showing up in the
new_activity filter. This makes the new_activity flag consistent with
the filter.

fixes ADMIN-564

test plan:
* In the student planner, unread discussion topics with no replies
should have the blue dot for new activity and be consistent with the new
activity filter in the api.

Change-Id: Iba112043c8544c4bc73fac5ecd579187969e9a57
Reviewed-on: https://gerrit.instructure.com/134441
Tested-by: Jenkins
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Jon Willesen <jonw+gerrit@instructure.com>
2017-12-07 18:13:05 +00:00
Ed Schiebel acf2c6a841 Improve planner items in calendar editing tests
We were missing tests for planer notes on course calendars.

fixes: ADMIN-120

test plan:
  - the selenium tests in calendar2_with_planner_notes_spec.rb succeed
  - QA is satisfied test coverage is adequate

Change-Id: Ic1523fc1489f64af2218a0c2d62e3a720d0b2ae5
Reviewed-on: https://gerrit.instructure.com/134908
Tested-by: Jenkins
Reviewed-by: Robert Lamb <rlamb@instructure.com>
Product-Review: Robert Lamb <rlamb@instructure.com>
QA-Review: Robert Lamb <rlamb@instructure.com>
2017-12-07 17:48:29 +00:00
Ryan Shaw ad2b78110a [eslint] relax ‘one-var’ to allow `let foo, bar`
…but still force `let foo=1, bar=2` to be:
let foo=1
let bar=2

I don’t actually find any value in enforcing this rule at all and think
we could ignore it altogether but rather than advocating we remove it 
completely, this commit just makes it so you can combine uninitialized
variable declarations at the top.

I frequently see this in spec files where we do something like

let subject, result, whatever
//and then in a ‘beforeEach()’ we assign values to those
//and then in each test(..) they are used

What say ye all?

Test plan:
* look at follow-on commit to this that changes MessageStudentsSpec.js
* it should not have eslint errors about:
  `error  Split 'let' declarations into multiple statements`

Change-Id: I7aafac3a395bac221e9e9b3111a82d0af4671ddb
Reviewed-on: https://gerrit.instructure.com/134822
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2017-12-07 16:50:32 +00:00
Ryan Shaw edbf02115c eslint —fix MessageStudentsSpec.js
Change-Id: I7aa436a3fb4d420a56ed6d0f17a8603f81203cd6
Reviewed-on: https://gerrit.instructure.com/134823
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2017-12-07 16:50:20 +00:00
Ryan Shaw 06ae2f2287 add eslint rules to lint Qunit specs
We just had a thing where a commit made it through that added an
.only(…), which made it so Jenkins would only run that one test.
This should help prevent that.
And it should help us write more helpful tests too.

Test plan:
* change a test from “test(” to “Qunit.only(“, eslint should print an
  error.

Change-Id: If43640a74cadbe88ed8d49a9c66232356a339104
Reviewed-on: https://gerrit.instructure.com/134893
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2017-12-07 16:46:34 +00:00
Shahbaz Javeed f070ad4180 always show an accurate count of current students in an override
closes GRADE-368

test plan:
* Create and publish a course and enroll five students in it
* Create and publish an assignment and add an override with a due date
  that includes all five students
* Go to the assignment details page
* Verify it shows one override with its corresponding due date and the
  description "5 students"
* Conclude the enrollment of one of the students and go back to the
  assignment details page
* Verify it now shows one override with its corrseponding due date and
  the description "4 students"
* Deactivate another student and go back to the assignment details page
* Verify it now shows one override with its corrseponding due date and
  the description "3 students"
* Restore the enrollment of both students and go back to the assignment
  details page
* Verify it now shows one override with its corrseponding due date and
  the description "5 students"

Change-Id: I260260e27078583849022aa129c986ba76069d04
Reviewed-on: https://gerrit.instructure.com/132510
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
QA-Review: Indira Pai <ipai@instructure.com>
Reviewed-by: Derek Bender <djbender@instructure.com>
Tested-by: Jenkins
Product-Review: Keith T. Garner <kgarner@instructure.com>
2017-12-07 15:28:23 +00:00
Derek Bender 66c8ca19b4 fix autogrowing textarea submit interaction
this commit removes jquery.elastic from speed_grader.js and replaces the
auto growing behavior with an instructure-ui TextArea component that has
this behavior built-in.

I attempted to also remove jquery.elastic from canvas but it appears
that this will take more consideration for the two remaining places in
the Conversations project area.

fixes: GRADE-669

Test Plan:
- Given a course with at least one student and a graded assignment
- Given speedgrader
- Given some text in the comment box
- Given adjusting the comment box size to a larger size
- Given clicking inside the comment box to give it focus
- When clicking submit
- Then the comment successfully submits

Change-Id: I5061252e319fa50f8db4fad0b781bd316791216b
Reviewed-on: https://gerrit.instructure.com/134009
Tested-by: Jenkins
Reviewed-by: Shahbaz Javeed <sjaveed@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
QA-Review: Indira Pai <ipai@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
2017-12-06 23:46:56 +00:00
Ryan Shaw f67cf5feb4 Fix so it runs all qUnit tests, not just this
Because of this line, Jenkins has only been running this one test since
Yesterday at 4pm

I’ll see if I can add a separate commit to add a linter for this

Test plan:
* look at the linters and js build and it should have a lots of tests,
  not just one

Change-Id: I9b01496d205f49a97f27066a3a3da8f225b9214d
Reviewed-on: https://gerrit.instructure.com/134885
Reviewed-by: Brad Horrocks <bhorrocks@instructure.com>
Reviewed-by: Jon Willesen <jonw+gerrit@instructure.com>
Tested-by: Jenkins
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2017-12-06 23:40:01 +00:00
Shahbaz Javeed e0c96ddaab ensure DueDateCacher kicks off after commit for consistency
closes GRADE-701

test plan:
* Create and publish a course and enroll five students in it
* Create and publish an assignment and add an override with a due date
  that includes all five students
* From the Rails console, verify all students have the same due date

  # a is the Assignment you created above
  a.reload.submissions.map(&:cached_due_date)

* Go to the assignment details page
* Verify it shows one override with its corresponding due date and the
  description "5 students"
* Conclude the enrollment of one of the students and go back to the
  assignment details page
* Verify it now shows one override with its corresponding due date and
  the description "4 students"
* Change the due date of the override to a different date
* From the Rails console, verify all students have the same due date
  except the concluded student, who should still have their old due
  date

  # a is the Assignment you created above
  a.reload.submissions.map(&:cached_due_date)

* Deactivate another student and go back to the assignment details page
* Verify it now shows one override with its corresponding due date and
  the description "3 students"
* Change the due date of the override to a different date
* From the Rails console, verify all students have the same due date
  except the concluded student, who should still have their old due
  date.  The inactive student should have their due date updated to the
  one you just entered

  # a is the Assignment you created above
  a.reload.submissions.map(&:cached_due_date)

* Restore the enrollment of both students and go back to the assignment
  details page
* Verify it now shows one override with its corresponding due date and
  the description "5 students"
* Change the due date of the override to a different date
* From the Rails console, verify all students have the same due date
  including the student who was previously concluded but was just
  unconcluded

  # a is the Assignment you created above
  a.reload.submissions.map(&:cached_due_date)

Change-Id: Ifd64afcfffb5924f29710545d403e53470241a41
Reviewed-on: https://gerrit.instructure.com/134158
Reviewed-by: Derek Bender <djbender@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
Tested-by: Jenkins
QA-Review: Indira Pai <ipai@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
2017-12-06 22:34:15 +00:00
Marc Alan Phillips 7e33b245a6 Allow Text Entry Online with Plagiarism Tools
closes PLAT-2927

Test Plan:
 - Under an assignment creation, select online
 - Click only the Text Entry box
 - The plagiarism Review section should appear
 - Save the submission
 - As a student, submit the assignment after entering text in the
   field
 - Submission should submit with the body to the TP

Change-Id: Ice010860a8bc89e0ead02c257baaad1bc4e91b23
Reviewed-on: https://gerrit.instructure.com/134430
Tested-by: Jenkins
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Karl Lloyd <karl@instructure.com>
2017-12-06 22:22:25 +00:00
Rob Orton f10473ee1f allow changing integrations_ids with sis_import
fixes CORE-659

test plan
 - docs should generate
 - should allow removing integration_ids via sis

Change-Id: Ib7aaf4a5901f7e29f2f1330bf5ae50f99c416f52
Reviewed-on: https://gerrit.instructure.com/134457
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
QA-Review: Tucker McKnight <tmcknight@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2017-12-06 22:18:15 +00:00
Clay Diffrient 7b34a04156 Return preview_urls for groups
closes CORE-358

This makes it so files uploaded to groups via the sidebar
get the proper attributes to allow inline preview options
to show up in the RCE.

Test Plan:
  - Go to a group and create a page
  - On that page use the sidebar to upload a file
  - Click on the link that appears in the RCE
  - Click the link button in the RCE toolbar
  - You should see 2 checkbox options related to inline previews

Change-Id: Ic046e737a6ef05c7dc7b7fcc92267832a161d566
Reviewed-on: https://gerrit.instructure.com/134320
Tested-by: Jenkins
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
QA-Review: Tucker McKnight <tmcknight@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
2017-12-06 21:46:57 +00:00
Ryan Shaw 1ad9fa2771 [webpack] build both dev/prod for ?optimized_js=0
Closes: CORE-720

We have this thing where you can add ?optimized_js=0 to the url of any 
page and it will try to serve the dev js bundles. But at deploy time
we weren’t actually building the dev bundles so they weren’t available.
(You can see this by going to a page right now in prod and adding 
?optimized_js=0 to the url and seeing all the 404s for the js bundles).

This makes it so we build both so if you do the ?optimized_js=0 thing,
they will exist and it will work.


Test plan:
* run RAILS_ENV=production bundle exec rake canvas:compile_assets
* start a server in prod mode
* go to a page, all the js should be minified
* go to the same page with ?optimized_js=0 at the end of the url
* all the js should work and should be the same as what you see in dev
  mode
* the selenium Jenkins build should not take any longer than it normally
  Does since it should not build both bundles.

Change-Id: I612222cfc4ef5282a986a2467e76d70ffcf30629
Reviewed-on: https://gerrit.instructure.com/134107
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2017-12-06 21:22:21 +00:00
Robert Lamb f6893c0f8f spec: fixes race condition in Moderation spec
fixes spec in ModerationActionsSpec.coffee

Change-Id: Ic4bbc7ffc7f8afe767e85693a0117f317b6981d2
Reviewed-on: https://gerrit.instructure.com/134805
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2017-12-06 21:13:22 +00:00
Matt Taylor 9bd0936399 gradebook export and import localized CSV
fixes GRADE-271

Test Plan:
  1. Modify a local copy of config/locales/is.yml, adding
     the following translation key:
       csv:
         column_delimiter: ";"
  2. Change Canvas settings to Íslenska (Icelandic):
     - root account settings
     - user profile
     - course settings
  3. Create at least two students and at least two
     assignments for a course.
     - name at least one assignment with non-ASCII
       Icelandic characters such as "ð"
     - name at least one assignment with multi-byte
       Unicode characters, such as "文章"
  4. Grade the assignments, covering the following:
     - decimal grade (with comma as decimal separator)
     - integer grade
     - empty grade
  5. Go to (old) gradebook, export grades and download it
  6. Configure Microsoft Excel for Icelandic language
  7. Open the download in Excel. Verify that rows and
     columns are interpreted correctly, and that non-
     ASCII characters are displayed correctly.
  8. Import the download in Google Sheets, specifying
     semicolon as the custom delmiter.  Repeat the
     verification from (7)
  9. Repeat steps 3-8 using new gradebook.
  10. Repeat steps 3-8 using US English for all
     language settings.
  11. Copy the Icelandic and English grade exports and
     modify some student grades
  12. Import the modified Icelandic export file, while
     configured for US English.  Verify that student
     grades are updated.
  13. Import the modified English export file.  Verify
     that student grades are updated.

Change-Id: Icf7fcdadae5b22fad524a224d956fd93c2438b57
Reviewed-on: https://gerrit.instructure.com/128786
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
Tested-by: Jenkins
QA-Review: Indira Pai <ipai@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
2017-12-06 21:03:48 +00:00
Spencer Olson 91b090b1f2 release late policies
Removes the develompent flag protection around the Late Policies
feature in New Gradebook. This means users of New Gradebook will now
be able to create Late Policies for their courses.

closes GRADE-332

Test Plan:
1.  Start a server without passing the GRADEBOOK_DEVELOPMENT flag.
2.  Enter the Gradebook in a course with New Gradebook enabled and
    without any late submissions.
3.  Click the settings cog. Verify the Late Policy content is available.
4.  Verify there is not an alert in the modal stating 'Changing the late
    policy will affect previously graded submissions.'
5.  In the same course, create an assignment and make it due in the
    past. Submit late to the assignment as a student. Do not grade the
    late submission.
6.  Go to Gradebook and click the settings cog to bring up the Late
    Policy information.
7.  Verify there is not an alert in the modal stating 'Changing the late
    policy will affect previously graded submissions.'
8.  Give the late submission a grade, and reload the Gradebook.
9.  Click the settings cog to bring up the Late Policy information.
10. Verify there is an alert in the modal stating 'Changing the late
    policy will affect previously graded submissions.'

Change-Id: I19dfe24ef5ccab427b15fc58dc09b01ab8dfd0de
Reviewed-on: https://gerrit.instructure.com/134487
Tested-by: Jenkins
Reviewed-by: Indira Pai <ipai@instructure.com>
Reviewed-by: Derek Bender <djbender@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
2017-12-06 20:37:12 +00:00
James Williams 6e2486bd1f master courses: copy front wiki page settings
test plan:
* have a blueprint course with a course home
 set to a wiki front page
* sync it to an associated course (with settings)
* create another page in the blueprint
 and set it to the front page
* sync settings over to the associated course
* it should set the new page as the front page
 in the associated course

closes #ADMIN-582

Change-Id: Id449bc39b267986bd3278622be4ebbed6e6c09b4
Reviewed-on: https://gerrit.instructure.com/134634
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2017-12-06 20:10:59 +00:00
James Williams 8ad3f46b3d don't check for insecure uri if ip filter setting is blank
Change-Id: If4e49744d41e9baa54f1575e8f60e236a00e6b4c
Reviewed-on: https://gerrit.instructure.com/134747
Tested-by: Jenkins
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2017-12-06 20:10:36 +00:00
Cody Cutrer b28bb3d486 ensure root_account is always preloaded on SIS import
Change-Id: Ia76a74a28dd955506b30ab22d2bc0b4c19cecd87
Reviewed-on: https://gerrit.instructure.com/134772
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2017-12-06 20:09:46 +00:00
Anju Reddy 747c891d57 spec: correct test_id for Grade Detail Tray -> Final grade
Change-Id: Ic527f28c8ae5e7ca5d4a7117148386aba9d96907
Reviewed-on: https://gerrit.instructure.com/134787
Tested-by: Jenkins
Reviewed-by: Indira Pai <ipai@instructure.com>
Product-Review: Anju Reddy <areddy@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
2017-12-06 18:39:09 +00:00
Deepeeca Soundarrajan 15a66ed6c8 spec: Add specs for editing planner notes in calendar
Test Plan:
 -- Passes Jenkins

Change-Id: I337c6580c69ad92ff1fdcfc8f85fad446be8c5c8
Reviewed-on: https://gerrit.instructure.com/134505
Reviewed-by: Robert Lamb <rlamb@instructure.com>
Product-Review: Robert Lamb <rlamb@instructure.com>
QA-Review: Robert Lamb <rlamb@instructure.com>
Tested-by: Jenkins
2017-12-06 18:25:39 +00:00
Anju Reddy 77d1c2a751 spec: add spec for switching grade-type in assignment header menu
Change-Id: I8db96b5d0a12934fe4336b9edb70dc1f75959b71
fixes: GRADE-305
Reviewed-on: https://gerrit.instructure.com/134757
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Tested-by: Jenkins
Reviewed-by: Indira Pai <ipai@instructure.com>
Product-Review: Anju Reddy <areddy@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
2017-12-06 17:52:53 +00:00
James Williams a4d2b5295f add a secondary id order to wiki pages api index
titles should theoretically be unique but apparently
sometimes they aren't

closes #ADMIN-588

Change-Id: I1510494a63bc9d440ba4f0007223ad6d33e93865
Reviewed-on: https://gerrit.instructure.com/134746
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2017-12-06 16:23:17 +00:00
Transifreq 93bdf60bf9 update es translation
Change-Id: Ie45bbdba34e3612f81d2d94be6306c62a0a73515
2017-12-06 05:19:18 -07:00
Omar Khan 1e3888ac44 Handle non-utf8 answers in fill multiple blanks
Quiz submission data in serialized columns is sometimes stored in binary
format (see https://github.com/ruby/psych/issues/278). This tends to
happen when strings contain non-printing control characters like `\b`
(backspace). When retrieved from the database, these strings are given
the encoding ASCII_8BIT, even if they are valid UTF-8. This causes the
quizzes history page to fail with a 'incompatible character encodings'
error when a quiz contains a fill multiple blanks question.

This commit fixes the issue by forcing all serialized quiz submission
data back to UTF-8 before rendering.

Fixes QO-288
Refs CNVS-40243
Refs CNVS-39936
Refs CNVS-38869
Refs CNVS-37031
Refs CNVS-36209
Refs CNVS-36202
Refs CNVS-36148

Test plan:

- Create a Quizzes 1 quiz
- Add a 'fill in multiple blanks' question that contains 1 blank and at
  least 1 non-ASCII character
- Take the quiz using IE 11 on Windows
- Type or paste 1 or 2 non-ASCII characters (e.g. 你好) into Notepad.
  It's important not to insert more than 2 characters, as the heuristic
  that psych uses to determine whether to encode a string as binary
  depends on the string length.
- In Notepad, press ctrl+backspace. You should see a small square appear
  alongside the 1 or 2 characters inserted in the previous step. This
  square is actually an ASCII backspace character
- Select the text in Notepad and copy-paste it into the blank space in
  the quiz question
- Submit the quiz
- Check that the quiz results are displayed without error

Change-Id: I0df5b5b2296f8c436ec219e1d53c9dd5da57c622
Reviewed-on: https://gerrit.instructure.com/133733
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Michael Hanks <mhanks-c@instructure.com>
Tested-by: Jenkins
Product-Review: Omar Khan <okhan@instructure.com>
2017-12-05 23:58:01 +00:00
Matthew Berns d863c4a445 allow extra credit on criterion levels
closes OUT-1719

test plan:
- create an assignment and attach a rubric
- go to speedgrader
- as the teacher, open the rubric and give the student
  points that exceed the max points possible
- save the rubric - the score should show immediately
  and also persist after save
- change the score to 0
- the score should show immediately and immediately
  persist upon reload
- remove the score entirely
- the score should be removed immediately and the
  removal should persist after reload

Change-Id: Ib0c6784592c58194620e5a2e61762aff9322f84b
Reviewed-on: https://gerrit.instructure.com/134421
Tested-by: Jenkins
Reviewed-by: Michael Brewer-Davis <mbd@instructure.com>
Reviewed-by: Neil Gupta <ngupta@instructure.com>
QA-Review: Andrew Porter <hporter-c@instructure.com>
Product-Review: Sidharth Oberoi <soberoi@instructure.com>
2017-12-05 23:34:56 +00:00
Jeremy Neander 64bd1bc76c load paginated submissions in old and new gradebook
fixes GRADE-699

test plan:
 1. Create a Course with more than 10 Students
 2. Visit the Course in New Gradebook
 3. Verify all Student Submissions are loaded
 4. Visit the Course in Old Gradebook
 5. Verify all Student Submissions are loaded

Change-Id: I70a9c6f03364d1f5bdd03cf35fd734e52aaa5537
Reviewed-on: https://gerrit.instructure.com/134534
Tested-by: Jenkins
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Derek Bender <djbender@instructure.com>
QA-Review: Indira Pai <ipai@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
2017-12-05 23:01:31 +00:00
Cameron Matheson 14fbdc8b80 graphql: return null scores when no scores exist
refs RECNVS-105

before we returned null for the whole grades object but that is
worse because then you can't access the htmlUrl

Test plan:
  - set up a course with no assignments
  - make sure you can query the grades for student enrollments (the
    grades should be null, but the htmlUrl should work

Change-Id: I459f97193595ebaac52e063063d88b41301922fd
Reviewed-on: https://gerrit.instructure.com/134561
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
Reviewed-by: Neil Gupta <ngupta@instructure.com>
Tested-by: Jenkins
QA-Review: Collin Parrish <cparrish@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
2017-12-05 22:09:34 +00:00
Cameron Matheson 6d95157da9 graphql: update grades for course_score property
Change-Id: I2d9bd9ccf409b654ef6a1764d7d91a053b1cd472
Reviewed-on: https://gerrit.instructure.com/134538
Tested-by: Jenkins
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
QA-Review: Collin Parrish <cparrish@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
2017-12-05 22:09:29 +00:00
Felix Milea-Ciobanu e069f3ebef setup redux app for new announcements page
refs COMMS-554

test plan:
- in a course, create some announcements
- navigate to the announcements page and note it loads the old page
- turn on section specific announcements feature flag at the account
  level
- navigate to the announcements page
- note that you see a 'Announcements (2) items on page x' with
the number in the parens matching the number of announcements
in that course

Change-Id: I6982aa2b20864f96ae61a052b33948f65bf549e2
Reviewed-on: https://gerrit.instructure.com/134425
Reviewed-by: Steven Burnett <sburnett@instructure.com>
QA-Review: Venk Natarajan <vnatarajan@instructure.com>
Tested-by: Jenkins
Product-Review: Aaron Kc Hsu <ahsu@instructure.com>
2017-12-05 21:31:59 +00:00
Simon Williams e3e94e68a1 whitelist the 'controls' attribute for 'audio' html tags
fixes gh-1159

test plan:
- try to create an audio tag with the controls attribute
- it should persist across save

Change-Id: I84ec4ce6fecacdbaff91d8d53e8dde4b7ab5c736
Reviewed-on: https://gerrit.instructure.com/133028
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2017-12-05 21:05:27 +00:00
Pam Hiett 56ac350f63 Remove background color/circle within course image upload modal
Fixes: UIDEV-135

note: while here... updated text for consistency and to align
with what design wanted

test plan:
- as an admin, ensure that account allows adding course images
  to the dashboard cards
- navigate to a course, select "settings" from the sub-nav
- on the first tab "course details" if there isn't an image
  currently... click the "choose image" button _or_ if there
  is an image select the "choose image" option from the cog
- the full-screen modal should now have a close button without
  a background color/shape
  example: https://screencast.com/t/Jml37Nx3Z

Change-Id: Iade89bd0098cc064c19807fe84352fae0944c03e
Reviewed-on: https://gerrit.instructure.com/133910
Tested-by: Jenkins
Reviewed-by: Stephen Jensen <sejensen@instructure.com>
QA-Review: Dan Sasaki <dsasaki@instructure.com>
Product-Review: Kyle Follett <kfollett@instructure.com>
2017-12-05 19:37:48 +00:00
Aaron Kc Hsu 987391ed3c Allows accessing CYOE when editing discussions within group
fixes OUT-1688

Test Plan
 * Make sure Mastery Paths is all setup using the README in
the Mastery Paths Repository
 * Make sure Course has Mastery Paths on it
 * Create a Discussion topics that is tied to a group
 * Go to the page for that group
 * Try to access mastery paths from the cog within a group
 * Check to make sure correct permissions are unchanged for
Teacher, Student, and Admin For Accessing Course Edit Page
 * Verify that there is no error in error_reports

Change-Id: Ic9fc62378dcafc03ab00c56b6297a9bd6aa0d219
Reviewed-on: https://gerrit.instructure.com/133537
Tested-by: Jenkins
Reviewed-by: Michael Brewer-Davis <mbd@instructure.com>
QA-Review: Leo Abner <rabner@instructure.com>
Product-Review: Sidharth Oberoi <soberoi@instructure.com>
2017-12-05 18:05:44 +00:00
Transifreq 53da327ae1 update tr translation
Change-Id: I3fa25c6d50cc7f283275023f4a34bc45e65f9f7a
2017-12-05 06:00:33 -07:00
Transifreq c18a42e4c0 update fa translation
Change-Id: Ia42821df3419d4eaf4a48ed48e18ace030094410
2017-12-05 05:56:52 -07:00
Felix Milea-Ciobanu 4ee49e640e fix safari-11 webcam capture depracation issue
fixes COMMS-567

test plan:
- test in Safari 10 and 11
- enable user avatars
- go to /profile/settings and click the edit button on the user avatar
- select the "Take a Picture" tab
- note that webcam picture capture works

Change-Id: I54a117a9629e11225944288cfaffa90c119187cf
Reviewed-on: https://gerrit.instructure.com/134362
Tested-by: Jenkins
Reviewed-by: Venk Natarajan <vnatarajan@instructure.com>
QA-Review: KC Naegle <knaegle@instructure.com>
Product-Review: Felix Milea-Ciobanu <fmileaciobanu@instructure.com>
2017-12-04 22:51:13 +00:00
Cody Cutrer be1ba3bed4 handle broken attachments in make_childless
Change-Id: Idfbfa5d1ffdcb6d46cb981931b434545b48e3a81
Reviewed-on: https://gerrit.instructure.com/134565
Reviewed-by: Rob Orton <rob@instructure.com>
Tested-by: Jenkins
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2017-12-04 22:16:49 +00:00
brian kirkby 804c5a6959 tex encoding to mathman now uses encodeURIComponent sans escape
fixes CORE-45

test plan:
- config local canvas to use local mathman
- in equation editor, paste the pound symbol: £
- save the equation
- verify the pound symbol is rendred in the image

Change-Id: I24cfc8788de784e21214c39b65c919b4b2117ff9
Reviewed-on: https://gerrit.instructure.com/132330
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: brian kirkby <bkirkby@instructure.com>
QA-Review: Collin Parrish <cparrish@instructure.com>
Tested-by: Jenkins
2017-12-04 21:15:42 +00:00
Marc Alan Phillips 08b1df3440 Enable Person.name.display as an option
Allows for lti launch where you can expand the display name of
a user in lti tools for use.

closes PLAT-2776

Test Plan:
 - Create an lti config that uses Person.name.display
 - Do an lti launch and verify that the expanded value as a param
 - For LTI 2, create a tool proxy that includes the Personl.name.display
  capability
 - Repeat step 2

Change-Id: I7f919bb9af2bb1efb42d8a3bd76cfb3b69378152
Reviewed-on: https://gerrit.instructure.com/134518
Tested-by: Jenkins
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Marc Alan Phillips <mphillips@instructure.com>
2017-12-04 21:07:03 +00:00
Aaron Kc Hsu e57fbf3b9c Move select checkbox focus in conversations to the correct spot
fixes COMMS-538

Test Plan
* Go to conversations page
* Check and uncheck a box
* Check to make sure the checkbox retains focus

Change-Id: I2bcbdfbefa55ad4f30c3f051cbe5b563e3439c2f
Reviewed-on: https://gerrit.instructure.com/134187
Reviewed-by: Felix Milea-Ciobanu <fmileaciobanu@instructure.com>
Tested-by: Jenkins
QA-Review: Nathan Rogowski <nathan@instructure.com>
Product-Review: Steven Burnett <sburnett@instructure.com>
2017-12-04 21:04:38 +00:00
Cody Cutrer e8443f2802 parse string dates in tDateToString and tTimeToString
fixes CORE-676

also, always fudge dates coming in to these helpers, so that you don't have to
remember to fudge them if you already have a date object.

oh, and switch a broken call to tTimeToString to use tDateToString (medium
isn't a valid time format)

test plan:
 * enable page views
 * change your time zone in canvas to something that doesn't match your
   computer/browser
 * view your users page, with page views
 * the timestamps should be in the canvas time zone, not the computer's
   time zone
 * ditto for checking audit logs
 * ditto for editing calendar events

Change-Id: I7771bbea59fec94945c34cdcff88605697209d51
Reviewed-on: https://gerrit.instructure.com/134123
Tested-by: Jenkins
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2017-12-04 20:56:18 +00:00
Jared Crystal a526d76ab4 force access code prompt on quiz resume for chrome
see https://bugs.chromium.org/p/chromium/issues/detail?id=720283
and https://bugs.chromium.org/p/chromium/issues/detail?id=490015

Basically, chrome is preventing us from using Navigator.sendBeacon
to clear the accessCode. Since it seems there is code already in
place as a backup to Navigator.sendBeacon, seems reasonable to just
use that code in all cases.

fixes QO-99

test plan:
 - take a quiz with an access code in chrome (version 60 or greater)
 - leave in the middle of the quiz (close the tab)
 - open up the quiz again and attempt to resume it
 - should be prompted to put in the access code again
 - also test in all other supported browsers to make sure an access
   code is required any time you attempt to resume a quiz

Change-Id: I67c75bc37ce4d53151f4f218297e78b97ed0da66
Reviewed-on: https://gerrit.instructure.com/134325
Tested-by: Jenkins
Reviewed-by: Davis Lynn McClellan <dmcclellan@instructure.com>
QA-Review: David Tan <dtan@instructure.com>
Product-Review: Kevin Dougherty <jdougherty@instructure.com>
2017-12-04 20:32:28 +00:00
Matthew Berns 85443ddeb3 fix hidden pages showing in mastery path progression
fixes OUT-1675

test plan:
- in a course with CYOE enabled, create a quiz
  - for ease of testing, ensure quiz is set up
    for retakes and using the latest score
- create some assignments and lock them to mastery paths
- create at least one wiki page, and also enable
  the 'mastery paths' checkbox on them (found under
  the textbox for editing content)
- add the assignments and page(s) to mastery paths on
  the quiz. Ensure the page(s) are on their own tiers
  for ease of testing
- create a module, add the quiz as the first item, the page(s)
  immediately following it, then the other assignments
- on the quiz, get a score that does NOT unlock the tier
  that the page(s) exist on
- the 'next' button for progressions should skip the still
  locked page (once paths finish processing or you make any
  necessary path selections, based on how you set things up)
- retake the quiz, and get a score that DOES unlock the page(s)
- the next page should appear as expected as the next item in
  the path progression one paths finish calculating
- teachers should not experience any changes in behavior,
  this should only impact students

Change-Id: Ibd2dd664723e1006944a1d9410ce3b442ae6ade7
Reviewed-on: https://gerrit.instructure.com/132873
Tested-by: Jenkins
Reviewed-by: Neil Gupta <ngupta@instructure.com>
QA-Review: Leo Abner <rabner@instructure.com>
Product-Review: Sidharth Oberoi <soberoi@instructure.com>
2017-12-04 19:29:25 +00:00