Commit Graph

9257 Commits

Author SHA1 Message Date
Joel Hough 824085c07c send appointment group notifications to observers
fixes CNVS-27519

test plan
- ensure that observers observing students who would normally
 receive the following notifications receive them also:
 - appointment reserved by user
 - appointment cancelled by user
 - appointment group published
 - appointment group updated
 - appointment group deleted

Change-Id: I344fbafc425bbd523511950193b295aa28ff469e
Reviewed-on: https://gerrit.instructure.com/75344
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Joel Hough <joel@instructure.com>
2016-05-06 20:46:29 +00:00
Pedro Fajardo 50ecdbb4dd spec: Skip broken spec.
Change-Id: Id243a9bbea655a7b17c6ca588eca7e0a08f5838c
Reviewed-on: https://gerrit.instructure.com/78946
Reviewed-by: Robert Lamb <rlamb@instructure.com>
Tested-by: Jenkins
Product-Review: Matt Fairbourn <mfairbourn@instructure.com>
QA-Review: Matt Fairbourn <mfairbourn@instructure.com>
2016-05-06 16:45:12 +00:00
Jeremy Stanley 2032b33bfd spec: once-ler some duplicated work
Change-Id: I9608189765981ac667208fdb6216ff66a181bfc4
Reviewed-on: https://gerrit.instructure.com/78924
Tested-by: Jenkins
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
2016-05-06 13:32:23 +00:00
MFairbourn 10d0789aaf spec: fix fragile spec in assignments_external_tool_spec.rb
Test Plan:
- Specs Pass
- Code Review

Change-Id: I5df4124585c2fbcdc535000dc9ff988399053e4c
Reviewed-on: https://gerrit.instructure.com/78896
Tested-by: Jenkins
Reviewed-by: Pedro Fajardo <pfajardo@instructure.com>
Product-Review: Matt Fairbourn <mfairbourn@instructure.com>
QA-Review: Matt Fairbourn <mfairbourn@instructure.com>
2016-05-05 23:46:27 +00:00
Steven Burnett 79fa758339 Fix right side scroll issues
closes: CNVS-26493

For some pages like Syllabus, in legacy the right side would stick to
the bottom of the page as you scroll large content. In new ui, we
disable this, and the sidebar sticks to the top, no matter its content
height.

Test Plan:
- See ticket for full test setup
- Go to Syllabus with long content, long sidebar, see how you can
now scroll down the page just fine, no jumping
- Go to Syllabus with short content, long sidebar, see same
- Legacy UI remains the same

Change-Id: I746f6c6e41865e5cd20b96bf3e7a518190055294
Reviewed-on: https://gerrit.instructure.com/78098
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins
Product-Review: Colleen Palmer <colleen@instructure.com>
QA-Review: Heath Hales <hhales@instructure.com>
2016-05-05 23:25:09 +00:00
Amber Taniuchi ce5935df72 add a11y flash message for what-if grade changes
Previously on the Grades page of a course, if a student
using a screen reader clicked on the 'Show Saved "What-If"
Scores' button, there was no indication that anything on the
page had changed. The same happened for the "Revert to Actual
Score" button (which appeared once the "Show Saved" button
was pressed). Now there is a screereader-only flash message
that is read to indicate scores have been changed to reflect
what-if scores/original score. Focus should also be returned
to the what-if/revert button on the right pane.

fixes CNVS-27858

Test Plan:
1. Using VoiceOver in Safari, navigate to the Grades page
of a course as a student
2. Click on the "Show Saved 'What-If' Scores" button on
the right
3. The screenreader should now read "Grades are now
showing what-if scores"
4. Click on the "Revert to Actual Score" button
5. Screenreader should now read "Grades are now
reverted to original scores"
6. Ensure each time the buttons are clicked that the
focus is set back onto the button.

Change-Id: Iad31491a4de08cd3a16444c398b2e87373d6a95f
Reviewed-on: https://gerrit.instructure.com/76192
QA-Review: Nathan Rogowski <nathan@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
Product-Review: Aaron Cannon <acannon@instructure.com>
Tested-by: Jenkins
2016-05-05 23:04:26 +00:00
Steven Burnett 461a1d6f39 validate external feed url not blank pre-save
also improve how single vs multiple errors are handled in error boxes
and in the screenreader flash message list.

finally, put screenreader flash messages in a div instead of a span,
because our form validation can add p tags to this area (because there
may be several error messages to display) and VO doesn't handle block
elements inside of span's very well.

fixes CNVS-20800

test plan:
- try to save a blank external feed url
- it should give you an error before trying to make a request to the
  server
- try it with a screenreader (with a blank url, text that is not a url,
  and a valid url)
- screenreader messages should be intelligible

Change-Id: I0a7a16253c128c2f62e87bc4b2e1d6e9b08f3d56
Reviewed-on: https://gerrit.instructure.com/64134
Tested-by: Jenkins
QA-Review: Pierce Arner <pierce@instructure.com>
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Steven Burnett <sburnett@instructure.com>
2016-05-05 22:04:04 +00:00
Rob Orton 4a5f37a76c only update cached due dates for students
fixes CNVS-29170

test plan
 - update workflow_state of non student users
 - it should not make a due date cacher job

Change-Id: Ia7ab7dc7ef0ce93434d9a2e63496883b5ae6d007
Reviewed-on: https://gerrit.instructure.com/78836
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Tested-by: Jenkins
Reviewed-by: Cameron Matheson <cameron@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
2016-05-05 19:29:36 +00:00
Jon Jensen 21c6f3ae1f spec: remove unnecessary page loads
these also happen in go_to_checklist, so they are redundant

Change-Id: I93d9e0f78c3ee1f577d699a18e343b2d75b68a05
Reviewed-on: https://gerrit.instructure.com/78829
Tested-by: Jenkins
Reviewed-by: Landon Wilkins <lwilkins@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2016-05-05 19:19:17 +00:00
MFairbourn 405756ae04 spec: fix fragile collaboration spec for chrome
Test Plan:
- Tests pass
- Code review

Change-Id: I6df6e8815d35d83dd940a18f71761449dddfb7e7
Reviewed-on: https://gerrit.instructure.com/78870
Tested-by: Jenkins
Reviewed-by: Pedro Fajardo <pfajardo@instructure.com>
Product-Review: Matt Fairbourn <mfairbourn@instructure.com>
QA-Review: Matt Fairbourn <mfairbourn@instructure.com>
2016-05-05 18:02:58 +00:00
James Williams 4e7e4f2339 only show group discussion sub-topics for DA groups
test plan:
* create a group set with two groups
* create a graded group discussion topic
and assign it only to one of the groups
* the root discussion topic page should only list a
 link to the group the topic is assigned to

closes #CNVS-27979

Change-Id: I8e3864d1d377620c2a88902ed112b3f347208d77
Reviewed-on: https://gerrit.instructure.com/78691
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2016-05-05 18:00:41 +00:00
James Williams a9d2c9c529 fix this other weird yaml thing
Change-Id: I651643b7e67ba83b95cfbbc83db2654b835b6145
Reviewed-on: https://gerrit.instructure.com/78834
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2016-05-05 16:55:34 +00:00
Ethan Vizitei 72735330ad Keep eportfolio content on rce save
fixes CNVS-29066

TEST PLAN:
 1) use remote RCE
 2) edit eportfolio with rich content
 3) save eportfolio
 4) refresh eportfolio
 5) edited content should be present

Change-Id: I86b1cd058fcd51c4838f6c82fbf6f73975f1fd85
Reviewed-on: https://gerrit.instructure.com/78678
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2016-05-05 15:58:32 +00:00
Rob Orton fab58aea7b remove enrollment.sis_user_id since it can't be trusted
refs CNVS-29138

test plan
 - specs should pass

Change-Id: Ie2b703cbc61198dd44a2f9cebe351bc28df1db01
Reviewed-on: https://gerrit.instructure.com/78718
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
2016-05-05 15:55:51 +00:00
Cody Cutrer f2b0bc129d rename oauth scopes param to the standard scope
and it's space separated, not comma separated

refs gh-807

note that the old form - scopes - is still accepted for now

Change-Id: I98e038125c3491abd54eb50c99d6efdf3e25acd7
Reviewed-on: https://gerrit.instructure.com/77412
Reviewed-by: Rob Orton <rob@instructure.com>
Tested-by: Jenkins
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2016-05-05 15:49:53 +00:00
Alex Boyd 67a9886cf0 Fix drag and drop onto minical
Fixes CNVS-26396

Test plan:
 - Create a calendar event
 - Drag it onto a different day on the minical
 - Ensure it moves
 - Reload the page
 - Ensure it's still on the new date

Change-Id: I407bf2dc9f28b469a96fbd4f65937e80bbd3a786
Reviewed-on: https://gerrit.instructure.com/73658
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Heath Hales <hhales@instructure.com>
Product-Review: Alex Boyd <aboyd@instructure.com>
2016-05-04 21:15:42 +00:00
Jacob Fugal d1211c0fb9 don't initialize sidebar that won't be used
fixes CNVS-28964

test-plan:
 - have an RCS instance running
 - turn on RCS (remote editor) feature flag
 - open browser network panel to watch requests made
 - as a *student*, visit the course syllabus page
 - should not see initial requests from the sidebar to the RCS
 - repease as a *teacher*
 - should see those initial requests after page load, even if you
   haven't yet hit the edit button

Change-Id: Ie23c0a74113111bb0e1094eff8cfefc2cc2eadc6
Reviewed-on: https://gerrit.instructure.com/78406
Tested-by: Jenkins
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
2016-05-04 21:02:49 +00:00
Ryan Shaw b1cf0ca937 cleanup some js spec code
a couple things:
* our spec matcher was matching spec files in some of our
  bower components and so it tried running those
  tests, which obviously failed
* removed some cruft leftover from the switch from
  testem to karma a long time ago

Change-Id: I61dc400bbfae0a679c698a90c7bcddd4fcf9fecc
Reviewed-on: https://gerrit.instructure.com/77908
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2016-05-04 20:47:03 +00:00
Brent Burgoyne 2134a9b430 Generate JSON file for brand configs
Refs CNVS-28275, closes CNVS-28885

Generate a json file to go along with the scss file for each brand config.
The intention is that the json file for each brand config will be pushed
to the cdn. One difference from the scss file is that it includes all
variables, even if they are not specified in the brand config. Variable
that have not been customized will use the default value.

In addition to generating a json file for each brand, a json file for that
inclues all default values is generated so other services don't need to
know the defaults if no brand config is available.

To allow for long term caching the filename of the json file includes a
hash of the current defaults (including fingerprinted urls for default
images). This way when the defaults change (or a default image) it will
point to a new file even if the brand config didn't change.

Test plan:

- Save a new brand config.
- Look in public/dist/brandable_css/[brand config hash]/
- There should be a [hash of defaults].json file
  - Should include custom values from brand config
  - Should include default values not specified in the brand config
- Run rake brand_configs:clean && rake brand_configs:write
- Should generate json file for all brand configs
- Open console in browser
  - ENV.active_brand_config_json_url should be path the current brand json file
- Go back to the default brand
  - ENV.active_brand_config_json_url should be path to default json file
- Test with a real s3 bucket for the CDN
  - JSON files should be uploaded to the CDN
  - ENV.active_brand_config_json should work when used with ENV.ASSET_HOST

Change-Id: Ibcaf54a2bff324f419a7614a8d3906c0c49aed9e
Reviewed-on: https://gerrit.instructure.com/77427
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2016-05-04 19:18:28 +00:00
Rob Orton 4b41be86ee remove unused method
refs CNVS-29138

test plan
 - specs should pass

Change-Id: I4782f6c50535548665a6c0d69798e6611a90d4d8
Reviewed-on: https://gerrit.instructure.com/78712
Tested-by: Jenkins
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2016-05-04 19:12:41 +00:00
Andrew Butterfield bee6437f5a Adjust variable substitution for membership service
fixes PLAT-1450

Test plan:
* Using the test tool https://lti-tool-provider-example.herokuapp.com/
  set up some XML for a tool that has a 'collaboration' placement and
  custom variable with the following variable substitution
    $Canvas.api.membershipServiceUrl
* Ensure that on a course collaboration launch the membership service
  url is of the following form
    /api/lti/courses/:course_id/membership_service
* Ensure that on an account group collaboration or course group
  collaboration launch the membership service url is of the following
  form
    /api/lti/groups/:group_id/membership_service

Change-Id: I38ce63ba0d95a12963e99251c2abf660573e9c7b
Reviewed-on: https://gerrit.instructure.com/78276
Reviewed-by: Nathan Mills <nathanm@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Product-Review: Andrew Butterfield <abutterfield@instructure.com>
2016-05-04 18:57:04 +00:00
James Williams 7f81d18477 show test students to account admins who are also observers
test plan:
* have a test student in a course
* enroll an account admin in the course
 as an observer
* the gradebook page should still work
 for the admin

closes #CNVS-28960

Change-Id: I4d0940ee33058a147e206a39bb3dc0a79c5d013d
Reviewed-on: https://gerrit.instructure.com/78582
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2016-05-04 18:40:08 +00:00
Alex Boyd c299bd1ab4 DRY up filename computation and make names path safe
Fixes CNVS-28419, CNVS-28880

Test plan:
 - Turn on content exports
 - Make a course whose name is "foo / bar baz"
 - Pull up /epub_exports
 - Generate or regnerate a course export
 - Ensure the export succeeds
 - click "Download Associated Files"
 - Ensure the downloaded file's name is "foo-bar-baz-*.zip",
   where * is a timestamp of the form
   yyyy-mm-dd_hh-mm-ss

Change-Id: If232e588841955c0ad851905fbbc3f904df302f0
Reviewed-on: https://gerrit.instructure.com/78144
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Alex Boyd <aboyd@instructure.com>
2016-05-04 17:36:45 +00:00
Alex Boyd 9ee46cacdf Expose calendar context information via the API
Fixes CNVS-28900

Test plan:
 - View the calendar
 - Uncheck a course or two on the sidebar. Make sure some are
   still checked.
 - Note the colors of the boxes next to each context
 - Hit /api/v1/calendar_events/visible_contexts
 - Verify that the result includes the same list of contexts you
   saw in the sidebar
 - Verify that the hex color codes for each context match up with
   what you saw in the sidebar
 - Verify that the "selected" key is true if you left that context
   selected and false if you didn't

Change-Id: Id20fcc84b2db061402a03520238a577a1d5223a5
Reviewed-on: https://gerrit.instructure.com/77684
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Alex Boyd <aboyd@instructure.com>
2016-05-04 17:36:26 +00:00
Deepeeca Soundarrajan b1c39593a1 spec: Add specs for conferences and conversations API
Change-Id: Ife17acb65c2b44133fe332ecabfd8ee7969a1164
Reviewed-on: https://gerrit.instructure.com/78644
Tested-by: Jenkins
Reviewed-by: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
2016-05-04 17:22:23 +00:00
Matthew Berns 1e4c469590 scale aggregate bank scores to parent outcome mastery
fixes CNVS-28147

test plan:
- create an outcome with a default 1/3/5 scale
- align the outcome to a question bank with 10 total points
- align the outcome to another 10 point bank, but set mastery
  at 70% rather than the default of 60%
- as a student, score 60% on both quizzes/banks
- go to the student view of learning mastery gradebook
- the alignment to the first question bank should show the score
  as 3/3, the alignment to the second bank should as 2.57/3
- return to the second quiz and score a 70% instead of a 60%
- mastery should now show as 3/3 for the alignment
- return to the secon quiz and score 100%
- mastery should now show as 5/3 for the alignment
- test some other outcome point scales and results to ensure consistency

Change-Id: I4a90c8f698c425311453b40e0a506d0a4e408b1c
Reviewed-on: https://gerrit.instructure.com/75381
Reviewed-by: Davis McClellan <dmcclellan@instructure.com>
Tested-by: Jenkins
QA-Review: Indira Pai <ipai@instructure.com>
Product-Review: Jason Sparks <jsparks@instructure.com>
2016-05-04 16:06:42 +00:00
KC Naegle 4261cf6d70 spec: add settings cog | view grading history spec
Change-Id: Ia75968cd767699f553cc58a95be3497f06865be4
164218: View Grading History - Link
Reviewed-on: https://gerrit.instructure.com/78574
Tested-by: Jenkins
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Reviewed-by: Gentry Beckmann <gbeckmann@instructure.com>
Product-Review: Gentry Beckmann <gbeckmann@instructure.com>
2016-05-04 15:17:51 +00:00
Jeremy Stanley 7108dadfd7 copy submitted files to the Submissions folder
test plan:
 - enable the Submissions Folder feature
 - as a student, upload some files via the Files page
 - submit an assignment and choose to
   "Click here to find a file you've already uploaded"
 - ensure the submission succeeds
 - go to the student's Files page and ensure the file
   was copied into the Submissions folder in a subfolder
   named after the course

fixes CNVS-28139

Change-Id: I64bb604a54d9c4b3708a8f1a4f8c1f9a8779fe21
Reviewed-on: https://gerrit.instructure.com/78253
Tested-by: Jenkins
Reviewed-by: James Williams  <jamesw@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2016-05-04 14:11:37 +00:00
Jeremy Stanley c378afc033 upload submissions to submissions folder if feature is enabled
test plan:
 - enable the submissions folder feature
 - create an assignment that accepts file submissions
 - submit the assignment by uploading a file
 - ensure it is uploaded to the read-only Submissions folder
 - repeat this test with a group assignment

 (NOTE: submitting an assignment by choosing an alredy-uploaded
        file will not yet copy the file into the Submissions
        folder; this is coming up in another commit)

closes CNVS-28138

Change-Id: I836b26324cfa87d9a3ea62ca80569bcdfbb3b671
Reviewed-on: https://gerrit.instructure.com/77922
Tested-by: Jenkins
Reviewed-by: James Williams  <jamesw@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2016-05-04 14:11:25 +00:00
Jeremy Stanley 59821b6302 remove direct-upload capability from SubmissionsController#create
this code hasn't been used in 5+ years AFAICT

test plan: regression test submitting files to assignments
 (including group assignments and multiple files per submission)

refs CNVS-28138

Change-Id: I8bb50c2b022faabdfaffe79a75df6225bf29d00b
Reviewed-on: https://gerrit.instructure.com/78156
Tested-by: Jenkins
Reviewed-by: James Williams  <jamesw@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2016-05-04 14:11:17 +00:00
MFairbourn 94c0691fc0 spec: fix p2 spec in account_admin_state_outcomes_spec.rb
Test Plan:
- Specs should pass
- Code review

Change-Id: I68a55c1b1f7a4944e1292f59237fb22969a2a0e5
Reviewed-on: https://gerrit.instructure.com/78675
Tested-by: Jenkins
Reviewed-by: Pedro Fajardo <pfajardo@instructure.com>
Product-Review: Matt Fairbourn <mfairbourn@instructure.com>
QA-Review: Matt Fairbourn <mfairbourn@instructure.com>
2016-05-04 02:44:59 +00:00
gbeckmann c7fee597de Spec: fix discussions override spec selectors
Test Plan:
Review code

Change-Id: Id780b381a2c23b58fae6593d6f4183db41b74af7
Reviewed-on: https://gerrit.instructure.com/78653
Reviewed-by: Matt Fairbourn <mfairbourn@instructure.com>
Tested-by: Jenkins
Product-Review: Gentry Beckmann <gbeckmann@instructure.com>
QA-Review: Gentry Beckmann <gbeckmann@instructure.com>
2016-05-03 23:25:57 +00:00
Alex Boyd a444454e27 Move selected calendar context tracking server-side
Fixes CNVS-28899

Test plan:
 - In a normal browser window, view the calendar
 - Uncheck some of the courses on the right so that only some are
   visible
 - Switch to an incognito user
 - Log in as the same user
 - View the calendar
 - Verify that the same set of courses are checked

Change-Id: I7649394e510e28f47639868bf198a006ed8127aa
Reviewed-on: https://gerrit.instructure.com/77680
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Alex Boyd <aboyd@instructure.com>
2016-05-03 23:05:03 +00:00
Matthew Berns 655da72018 fix calculation int not persisting visually after refresh
fixes CNVS-27824

test plan:
- create a new outcome for n number of times
- set n number of times calculation int to 3
- reload the page and return to the outcome
- 3 should still be displayed as the calculation int

Change-Id: I5b1823248a5a6af3d35fb44e84e7b39c09f8274e
Reviewed-on: https://gerrit.instructure.com/78528
Reviewed-by: Ryan Taylor <rtaylor@instructure.com>
Product-Review: Jason Sparks <jsparks@instructure.com>
Tested-by: Jenkins
QA-Review: Michael Hargiss <mhargiss@instructure.com>
2016-05-03 21:28:20 +00:00
John Corrigan ff88fca588 refactor logic in #assignment_overrides_json
fixes CNVS-28632

test plan:
- Create a Practice Quiz
- Assign the Quiz to everyone with a due date
- Create an ovverride of any type (adhoc, section, or group) with a
  different due date
- Save
- Attempt to Edit the quiz

Change-Id: I2bd118fb580e95465781440b0ed4c2f565ae4ab0
Reviewed-on: https://gerrit.instructure.com/76796
Reviewed-by: Marc Alan Phillips <mphillips@instructure.com>
QA-Review: Indira Pai <ipai@instructure.com>
Tested-by: Jenkins
Product-Review: Chris Wang <cwang@instructure.com>
2016-05-03 20:40:52 +00:00
Jon Jensen 717680037e spec: rework negative dom assertions
fixes SD-1063, speeds up :allthethings:

negative DOM assertions are 💩, but if we must have them, make them
more tolerable. the old way:

  expect(f(".something-that-should-be-gone")).to be_nil
  expect(fj("buhleeted:visible")).to be_nil
  expect(fln("Can't Click Here Anymore").to be_nil

the new way:

  expect(container).not_to contain_css(".something-that-should-be-gone")
  expect(container).not_to contain_jqcss("buhleeted:visible")
  expect(container).not_to contain_link("Can't Click Here Anymore")

(you can of course use these new matchers for positive assertions as well)

although it's a tad more verbose, the new way is better because:

1. it's smart enough to bail once the assertion is met (versus the old way
   which would take 10-20 seconds to not find the thing and *then* run the
   assertion)
2. it requires them to be scoped, to reduce the likelihood of false
   positives (e.g. if the page is totally broken, then of course the
   assertion would pass)

also reworked the various flash message assertions... see the new
expect_flash_message and expect_no_flash_message

this should remove over an hour of linear time off the build (10 sec per
old assertion, except fj ones which took 20 sec)... so like a minute of
actual time, cuz parallelization :P

a consequence of this change is that f/fj/ff/ffj now raise if nothing is
found, so you really have to go out of your way to do it the bad way. so
don't :)

Change-Id: I0fe6e8500947c27d748b70bb2cda585edf71e427
Reviewed-on: https://gerrit.instructure.com/78420
Tested-by: Jenkins
Reviewed-by: Landon Wilkins <lwilkins@instructure.com>
Product-Review: Landon Wilkins <lwilkins@instructure.com>
QA-Review: Landon Wilkins <lwilkins@instructure.com>
2016-05-03 20:05:46 +00:00
Nathan Mills 206ade7f82 adjust homework submission content-item params to be more useful
fixes PLAT-1470

test plan:
For all homework submission content-item launches the parameter
'accept_presentation_document_targets' should include 'window' if
the assignment has the submission type of 'online_url'

For all homework submission content-item launches the parameter
'accept_presentation_document_targets' should include 'none' if
the assignment has the submission type of 'online_upload'

For all homework submission content-item launches the parameter
'accept_media_types' should eq '*/*' unless only 'online_upload'
is the submission type and there are file type restrictions

Change-Id: I3f54aea5ae7ca26917455a6e3739f06761a959ba
Reviewed-on: https://gerrit.instructure.com/78272
Tested-by: Jenkins
Reviewed-by: Brad Horrocks <bhorrocks@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Nathan Mills <nathanm@instructure.com>
2016-05-03 18:46:52 +00:00
Simon Williams 7be36aea64 only send password reset emails to pseudonyms on the active domain
fixes CNVS-28547

test plan:
- create two root accounts that trust each other
- create a user with a pseudonym in each account with different email
addresses
- request a forgot password email from 1 of the domains
- you should only get an email at the address associated with the
pseudonym in that account

Change-Id: I68af8f516739a5c23dbbd4082f229fe4f4651aa2
Reviewed-on: https://gerrit.instructure.com/78312
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2016-05-03 16:47:00 +00:00
Davis McClellan 42e96465ab Fix the issue where firefox won't delete the access code
fixes CNVS-24622

test plan:
use case 1
- make a quiz with multiple attempts and an access code
- enter the access code, take and submit the quiz
- attempt to take the quiz again
- notice that the access code is requested again
use case 2
- make a quiz with multiple attempts and an access code
- enter the access code, and start the quiz
- navigate away from the quiz
- resume the quiz
- notice that the access code is requested again

Check on all supported browsers, each browser treats this issue
slightly differently. It never can be easy can it?

Change-Id: I31ade2501fc20945b8ff13f7f5a5071aca6d896e
Reviewed-on: https://gerrit.instructure.com/73582
Tested-by: Jenkins
Reviewed-by: Matt Berns <mberns@instructure.com>
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Product-Review: Jason Sparks <jsparks@instructure.com>
2016-05-03 16:44:56 +00:00
Joel Hough 1415d7bc7d render calendar events as paginated data is fetched
fixes PFS-3691

note that the event source caching does not update as pages are fetched
 so switching between calendar pages while pages are fetching clears any
 already loaded events and effectively reverts to unpaginated rendering.

the changes to fullcalendar are unfortunate but if they are removed (in
 an upgrade, for example) then the calendar will revert to unpaginated
 rendering. also, the api is unchanged for anyone who does not want to
 use paginated rendering.

test plan
- have enough calendar events to have multiple pages of them.
 default page size is 50, but you can set per_page in the
 render_events_for_user Api.paginate call to lower that for
 testing
- view the calendar
- ensure that events are rendered as the pages are fetched. you
 can add a sleep statement to the calendar_events_api index action
 to make page loads more obvious for testing.
- regression test calendar

Change-Id: I758dfc0eda7f3ec93bcf1b9401b1024e8a8c6303
Reviewed-on: https://gerrit.instructure.com/74029
Reviewed-by: Kacey Roberts <kroberts@instructure.com>
Reviewed-by: Felix Milea-Ciobanu <fmileaciobanu@instructure.com>
Tested-by: Jenkins
QA-Review: Heath Hales <hhales@instructure.com>
Product-Review: Allison Weiss <allison@instructure.com>
2016-05-03 16:08:56 +00:00
Matthew Wheeler dabd3407e1 Sessionless launch uses correct resource_link_id for assignment launches
Fixes PLAT-1396

We were not setting the link_code before initializing
the LtiOutboundAdapter, so it was defaulting to the
resource_link_id for the course.

The sessioned version of this launch already works
correctly. The implementation is in application_controller.rb:~1351,
and is tested in application_controller_spec.rb:~430.

Test Plan:
As an assignment tool to a course and create an assignment for it.
Use the api to generate a sessionless launch url.
That request looks like:
canvas.docker/api/v1/courses/1/external_tools/sessionless_launch?assignment_id=1&launch_type=assessment
In firefox (not chrome), open browser dev tools and
follow the link that was returned in the api request.
Notice in the POST to the lti tool that the
resource_link_id is no longer the same as the context_id.

Change-Id: I71cd944a38eb92dbd38f31d74b38e3117e5b67f9
Reviewed-on: https://gerrit.instructure.com/78240
Tested-by: Jenkins
Reviewed-by: Andrew Butterfield <abutterfield@instructure.com>
Reviewed-by: Nathan Mills <nathanm@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Karl Lloyd <karl@instructure.com>
2016-05-03 16:05:52 +00:00
Michael Brewer-Davis ca63fdc0e4 add temporary conditional release popup to assignments
refs: CYOE-74

Test plan:
View conditional content on assignment, quiz, and discussion topic
edit pages.
- Button should be disabled before assignment has saved (though some
  assignments save before first edit)
- Button should be enabled after save
- Clicking button should bring up a modal (with an error page loaded
  in it)
- For discussion topics, saving here means "saved as a graded topic"

Change-Id: I3faed62567488c71067f94ff911b57ca71de9648
Reviewed-on: https://gerrit.instructure.com/77677
Tested-by: Jenkins
Reviewed-by: Matt Berns <mberns@instructure.com>
Reviewed-by: Christian Prescott <cprescott@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Matt Goodwin <mattg@instructure.com>
2016-05-03 16:00:24 +00:00
James Williams 8efaeeb3a4 spec: cleanup temp directories afterwards
Change-Id: I31d9c548faed196a970a3f24e1b251a87b08127b
Reviewed-on: https://gerrit.instructure.com/78451
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2016-05-03 12:46:59 +00:00
James Williams 3cefdc1fdb don't show invitation on student first visit if auto-accepted
test plan:
* disable "Invitation Previews" on the root account
* create a course and invite a student
* if they visit the course, it should auto-accept
 the enrollment, and not show the "accept/reject"
 dialog at the top

closes #CNVS-7079

Change-Id: If1ef8ba544aa089fb3120940cd23e04e05eb90b3
Reviewed-on: https://gerrit.instructure.com/78500
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2016-05-03 12:46:43 +00:00
Cody Cutrer f64a73a99f display app name in page view output
closes CNVS-28788

test plan:
 * enable page views
 * use an app (such as Canvas for iOS) to interact with your
   Canvas, and record page view (particularly ones that count
   as "participations")
 * look at the page views for the user
 * instead of listing a browser for the user agent, it should
   list the name of the developer key for the app

Change-Id: Id07b293db333e44db7110fc2620409535927f915
Reviewed-on: https://gerrit.instructure.com/77409
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2016-05-02 21:25:54 +00:00
Ethan Vizitei 8bcf87b311 use textarea content if behind HTMLEditor
fixes CNVS-29010

TEST PLAN:
 1) use canvas with RCS
 2) edit wiki
 3) edit page in HTML editor rather than RCE
 4) save
 5) it should save your changes

Change-Id: I01f87a56f9ea1ab6921de04189c3501f05f94158
Reviewed-on: https://gerrit.instructure.com/78204
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2016-05-02 20:42:07 +00:00
Tyler Scott 326173d037 update student name link in react gradebook
In React Gradebook, clicking on a student's name should take you to the
grades page for that student. Previously, it navigated to the student
enrollment page. It now navigates correctly.

closes CNVS-27715

test plan:
1. Create a course with a student
2. As a teacher, visit the default gradebook
3. Click on a student's name
4. Verify that the link navigates to that student's grades page

Change-Id: I3ac2c508f0a3760d1f0510f9e0e67993dd6d2214
Reviewed-on: https://gerrit.instructure.com/77243
Tested-by: Jenkins
Reviewed-by: Shahbaz Javeed <sjaveed@instructure.com>
Reviewed-by: Derek Bender <djbender@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Christi Wruck
2016-05-02 18:31:01 +00:00
Simon Williams 87c52d7ca1 remove notification service load test setting
closes CNVS-28905

test plan: message delivery should still work with or without the
service

Change-Id: I9207bd51d839029977988116ee95bb100f56160a
Reviewed-on: https://gerrit.instructure.com/77700
Tested-by: Jenkins
Reviewed-by: Jonathan Featherstone <jfeatherstone@instructure.com>
QA-Review: Gentry Beckmann <gbeckmann@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2016-05-02 15:32:16 +00:00
Cody Cutrer 860bdb823d pass SAML name ID attributes exactly as specified to LogoutRequest
fixes CNVS-28844

test plan:
 * configure SAML against ADFS 3.0 (including a *proper* log out url)
 * log in, and log out. both Canvas and ADFS sessions should have
   been destroyed

Change-Id: Idfe190b43ab30eb63aa4878486eb12352fa5e3da
Reviewed-on: https://gerrit.instructure.com/78101
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2016-05-02 14:32:44 +00:00
Keith Garner 3899ae44ff allow teachers to see inactive enrollments for grade summaries
GradeSummaryPresenter will now return enrollments for inactive
students if the user requesting the enrollment has permissions to
manage or view grades for the course.

closes CNVS-28387

test plan:
 - Create a course with a teacher, an active student, and an inactive
   student
 - Ensure that the active student can see their grades page
 - Ensure that the inactive student receives an unauthorized message
   when trying to visit the grades page directly by URL.
 - Ensure that the teacher can see both the active and inactive
   students grade page.

Change-Id: Ie68c2f6ea38273077d119f6dc579cde9d0594d98
Reviewed-on: https://gerrit.instructure.com/78268
Tested-by: Jenkins
Reviewed-by: Derek Bender <djbender@instructure.com>
Reviewed-by: Jeremy Neander <jneander@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Christi Wruck
2016-04-30 01:55:35 +00:00