Commit Graph

15130 Commits

Author SHA1 Message Date
Matthew Berns 5ffd520004 make new outcome details popover accessible
- Adds separate OutcomeDialogView to be responsible for the accessible
  popover content.
- Updates handling of OutcomeLineGraph initialization / rendering so
  that OutcomePopoverView & OutcomeDialogView are responsible, not
  OutcomeView.

fixes CNVS-19345

test plan:
- create some outcomes in a course and give them different calculation methods
- align them with some assignments
- submit to assignments as a student (for at least 1 assignment, do not have any
  student submission and just grade it so there will be no 'submitted at' time)
- go to student learning mastery gradebook and enable screenreader
- navigate to an outcome group, expand it, then go to the more info icon on the
  right side of the outcome
- screenreader should say 'click for more details on this outcome'
- simulate click events in the different SRs. (cntl+opt+space in mac VO, space in
  NVDA). modal should open and be navigable
- all fields should properly read out their respective information
- hit escape or click close button, focus should return to 'more info' icon
- modal should open when hitting enter or escape regardless of browser or SR
  used, even if not simulating a click event as above, to accomodate keyboard
  only users. Once open, behavior should still be as it is above

Change-Id: I99355c624de71573f6f9b78685bb10091340615b
Reviewed-on: https://gerrit.instructure.com/50701
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Adam Stone <astone@instructure.com>
Tested-by: Matt Fairbourn <mfairbourn@instructure.com>
2015-04-02 19:50:39 +00:00
Matthew Berns 9a5b825835 Upgrade MediaElement.js to 2.16 to address video player accessibility issues
fixes CNVS-19179

note: tab only navigation on submission details modal not fully functional,
issue is unrelated and being handled in another commit

test plan:
- create an assignment with media submissions and submit an audio/video reply
- as the teacher, go to speedgrader and make some audio/video comments
- use keyboard nav to get to the student media submission in speedgrader
- you should be able to open it and use keyboard controls
- you should be able to navigate away from the video and return to it and still
  have access to the video controls
- go to screenreader gradebook and select the student and assignment
- use keyboard nav to get to the teacher comments, you should be able to expand
  the video and navigate the controls
- you should be able to navigate away from the video within the modal, then
  navigate back and still have access to the video controls
- click the minimize video link below it, it should collapse as expected and
  return to the "click here to view" text.

Change-Id: Id7df89a26199d3c88eb8eb06e753e36476ba732b
Reviewed-on: https://gerrit.instructure.com/51252
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Nathan Rogowski <nathan@instructure.com>
Product-Review: Aaron Cannon <acannon@instructure.com>
2015-04-02 18:48:24 +00:00
Ryan Taylor 73e0729719 Restores Aria-label template for matching question types
Prevents page error on matching question load.

Closes CNVS-19656

Test Plan:
  - Confirm that matching question containing quiz renders properly
  - Confirm that SR tickets (CNVS-19262, CNVS-18681, and CNVS-19265) are
    all working fine.

Change-Id: I5cd1246db09506ec4aef129173434e98cd173fab
Reviewed-on: https://gerrit.instructure.com/51450
Reviewed-by: Cameron Sutter <csutter@instructure.com>
Tested-by: Jenkins
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Cameron Sutter <csutter@instructure.com>
2015-04-02 17:16:12 +00:00
Jeremy Stanley f477bdf11c skip broken files when downloading a zip
instead of freezing indefinitely

(with better file browsing off)

also fix progress reporting, which was completely broken and
always read 5%

test plan:
 - with better file browsing turned _off_
 - have a course with several files (on the order of 100)
 - break one of the files in the console, like so
     att = Attachment.find(...)
     att.update_attributes(root_attachment_id: nil, filename: 'broken!')
 - try to download a zip file containing course files
   - the progress bar should function
   - you should get a zip file containing all the files
     except the one you broke

fixes CNVS-19635

Change-Id: I75bdb80129401d55dddbc12c2367239fb99f18b7
Reviewed-on: https://gerrit.instructure.com/51434
Tested-by: Jenkins
Reviewed-by: James Williams  <jamesw@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2015-04-02 16:52:48 +00:00
Aaron Cannon 71093fb060 Files: Changed A11y role of "Select All" to not be a column header
Fixes CNVS-19649

Test plan:
- Open new files.
- Using a screen reader, navigate from column to column until the first
  column is reached (the one with checkboxes).
- Verify that the cell at the top of this column (select all) is not read as
  the column header, unlike the rest of the columns.

Change-Id: I0ad9dab123590211417878a0aa9692ecbec54286
Reviewed-on: https://gerrit.instructure.com/51426
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
2015-04-02 16:08:42 +00:00
Jesse Poulos 12cb38e23d Appends "and lock" in 'Use Default' in Permissions menu to make UI consistent
Fixes CNVS-8848

In the permissions drop down menu (when you select a specific permission), the
last 'Use Default link' does not have the phrase 'and lock'. For consistency,
we need to add this in.

Change-Id: I48e4dc0a5828208fb7f0d76d00c23753e17b1af6
Reviewed-on: https://gerrit.instructure.com/49825
Tested-by: Jenkins
Reviewed-by: James Williams  <jamesw@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Hilary Scharton <hilary@instructure.com>
2015-04-02 15:59:08 +00:00
Nathan Mills 25d3bbe2ca add values fom tool settings to launches
fixes PLAT-951

test-plan:
install the lti2 test tool and set some default tool settings
do a launch, it should include the default tool settings as params

Change-Id: I9685059299697260f579f745b53777f121fd11e8
Reviewed-on: https://gerrit.instructure.com/50771
Reviewed-by: Brad Humphrey <brad@instructure.com>
Tested-by: Jenkins
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Nathan Mills <nathanm@instructure.com>
2015-04-02 15:27:49 +00:00
Ryan Taylor 607a6eb8c0 Prevents OQAAT questions from giving anything at the QSQ index API
OQAAT is a complexity we aren't prepared to tackle at this time.  This
prevents any OQAAT quiz from providing any information to a student.

Closes CNVS-17522

Test Plan:
  - Begin a OQAAT quiz
  - Confirm that /api/v1/quiz_submission/:id/questions gives 401 not
    authorized message.
  - Confirm that teacher can see data however.

Change-Id: I0ab99e78c415d92b6607728bbbec2b602b02e332
Reviewed-on: https://gerrit.instructure.com/51251
Tested-by: Jenkins
Reviewed-by: Cameron Sutter <csutter@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Ryan Taylor <rtaylor@instructure.com>
2015-04-02 14:51:01 +00:00
Transifreq 5c78582d99 Updated fr translation
Change-Id: I4d111d3e4cfc4f96e8f9b101a4710ab0efc27dd1
2015-04-02 05:13:28 -06:00
Cameron Matheson 29ce182956 csv upload: properly set new assignment titles
fixes CNVS-19654

Test plan:
  create new assignments in the gradebook csv, make sure their titles
  are correct

Change-Id: I2800e151188803d8657e4de6f39d762924fd877e
Reviewed-on: https://gerrit.instructure.com/51437
Reviewed-by: Josh Simpson <jsimpson@instructure.com>
Tested-by: Jenkins
Product-Review: Matt Fairbourn <mfairbourn@instructure.com>
QA-Review: Matt Fairbourn <mfairbourn@instructure.com>
2015-04-02 04:10:07 +00:00
Cameron Matheson 527cec4c19 csv upload: don't offer unpublished assignments as candidates
we missed this s/active/published during draft state.  unpublished
assignments aren't gradeable.

Test plan:
  * make an unpublished assignment in a course
  * add a new assignment to a gradebook.csv
  * import the csv
  * the new assignment shouldn't let you change it to the unpublished
    assignment

Change-Id: I4056afcf0317b1d9004df5c26357759203471c27
Reviewed-on: https://gerrit.instructure.com/51445
Reviewed-by: Josh Simpson <jsimpson@instructure.com>
Tested-by: Jenkins
Product-Review: Matt Fairbourn <mfairbourn@instructure.com>
QA-Review: Matt Fairbourn <mfairbourn@instructure.com>
2015-04-02 04:09:59 +00:00
Cameron Matheson 2b38df4744 csv upload: don't grade unrecognized/ignore assignments
Test plan:
  * Add an assignment (with grades) to a gradebook CSV file.
  * Make some changes to grades on another assignment.
  * When you upload it, choose to ignore the new assignment.
  * The assignment you chose to ignore should be ignored.

Change-Id: I5db980ab3921c68d9bc6d43c71ef50f07a278d05
Reviewed-on: https://gerrit.instructure.com/51444
Reviewed-by: Josh Simpson <jsimpson@instructure.com>
Tested-by: Jenkins
Product-Review: Matt Fairbourn <mfairbourn@instructure.com>
QA-Review: Matt Fairbourn <mfairbourn@instructure.com>
2015-04-02 04:09:42 +00:00
Matthew Berns 294512d0d4 fixes inability to edit assignments with submissions attached to a deleted group
fixes CNVS-16702

test plan:
- Create a course group, student, and group assignments associated to the group
  set. (create a graded discussion, ungraded discussion, and regular assignment)
- As the student in the course, submit to the assignment and discussion assignments
- Delete the group set that the assignments are associated to
- go to the edit pages for the assignment and discussion assignments
- both should show the name of the deleted group in a disabled select field
- you should be able to edit and save all other settings, aside from group settings
- the submissions made by the student should still be associated with the
  assignments in speedgrader (note: this should be true for online url and text
  submissions. File submissions will go to an error page due to an unrelated issue)
- assignments without submsissions with an active group select dropdown should
  not show the deleted group as an option
- assignments not associated with a group or associated with an active group
  should show all expected behaviors

Change-Id: Ia3fb168b7a671a7df309883a381bc62d282960b2
Reviewed-on: https://gerrit.instructure.com/46411
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
Reviewed-by: John Corrigan <jcorrigan@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Hilary Scharton <hilary@instructure.com>
2015-04-01 22:29:33 +00:00
Clay Diffrient 88f97b223c Makes inbox header buttons have better meaning for screenreaders
This makes it so they have a better understanding of what will be
deleted or archived.

fixes CNVS-12801

Test Plan:
  - Using a screenreader, go to /conversations
  - Select one message or several
  - Navigate using the screenreader to the delete and archive
    buttons in the top header.
  - They should read as Delete Selected and Archive Selected
    respectfully.

Change-Id: If55f49e2d45cb34505a6dbe27bf4dd1b4d28ff97
Reviewed-on: https://gerrit.instructure.com/51235
Tested-by: Jenkins
Reviewed-by: Matt Berns <mberns@instructure.com>
Product-Review: Aaron Cannon <acannon@instructure.com>
QA-Review: Nathan Rogowski <nathan@instructure.com>
2015-04-01 22:03:59 +00:00
Cameron Matheson 34a716b554 handle gradebook uploads in the background
closes CNVS-4238
fixes CNVS-3718

Test plan:
  Gradebook uploads should work in large courses (and small courses)

Change-Id: I9b8bb2d859ca1545d382679cc39788246006e4d4
Reviewed-on: https://gerrit.instructure.com/50590
Tested-by: Jenkins
Reviewed-by: Josh Simpson <jsimpson@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Josh Simpson <jsimpson@instructure.com>
2015-04-01 21:46:13 +00:00
Cody Cutrer 9c1e2a539c clean up render :action/:template calls
specific forms of :template were deprecated, and you don't even
need to specify that as the option (it's the default first
argument)

Change-Id: I8db2860cdaf46b105b2f981ed3e0bd923af4ef89
Reviewed-on: https://gerrit.instructure.com/51389
Tested-by: Jenkins
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2015-04-01 20:27:50 +00:00
Nathan Mills 8ecee6cab4 update ContentItemSelectionResponse to new name and format
fixes PLAT-966

This message type was changed last-minute with
the official spec, so update it to new spec

Test Plan:
 * Install Commons
 * adding items to Commons should still work

Change-Id: I98d57f5c3c69d34369cdaa445facb30951237154
Reviewed-on: https://gerrit.instructure.com/51249
Tested-by: Jenkins
Reviewed-by: Brad Humphrey <brad@instructure.com>
QA-Review: Nathan Mills <nathanm@instructure.com>
Product-Review: Nathan Mills <nathanm@instructure.com>
2015-04-01 20:22:22 +00:00
Simon Williams abdb796641 comments from submission details page should be hidden if muted
fixes CNVS-16054

test plan:
- as a teacher, create an assignment
- as a student, submit the assignment
- as a teacher, mute the assignment
- as a teacher, leave a comment from both the speedgrader and the
  submission details page:
  /courses/:course_id/assignments/:assignment_id/submissions/:user_id
- both comments should be hidden from the student on the assignment and
  submission pages

Change-Id: I29531163922eff0c190ab83a067f15bdf57f1158
Reviewed-on: https://gerrit.instructure.com/51258
Tested-by: Jenkins
Reviewed-by: Josh Simpson <jsimpson@instructure.com>
QA-Review: Robert Lamb <rlamb@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2015-04-01 19:49:35 +00:00
Jeremy Stanley 01b8bae52d use BigDecimal to compute numeric error margin
test plan:
 - create numeric answer questions with error margins
 - copy the course
 - in the copied quiz, the error margins should match the
   original course (show as 0.0001 and not something like
   0.00009999999999889)

fixes CNVS-19615

Change-Id: Iba9e40f9e37323310e6414794139c68d0f1c061c
Reviewed-on: https://gerrit.instructure.com/51334
Reviewed-by: James Williams  <jamesw@instructure.com>
Tested-by: Jenkins
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2015-04-01 18:51:25 +00:00
Colleen Palmer 84215a4e09 Add background color section to styleguide
fixes: CNVS-19443

This adds background color documentation to our styleguide under
Colors. It also makes our primary color palette meet our contrast
ratios when it's being used with the same background color.

Test Plan:
- Go to /styleguide > Colors
- There should now be a Background colors section near the end
- These should meet contrast our contrast ratios of 3:1 and 4:5:1

Screenshot:
3:1 - http://cl.ly/image/091J021a2b3a
4:5 - http://cl.ly/image/3A0i2Q3d161P

Change-Id: Ic925cc9b5a263b7fde59eee510c48dc1191347b0
Reviewed-on: https://gerrit.instructure.com/51226
Tested-by: Jenkins
Reviewed-by: Chris Hart <chart@instructure.com>
Product-Review: Chris Hart <chart@instructure.com>
QA-Review: Nathan Rogowski <nathan@instructure.com>
2015-04-01 17:40:46 +00:00
Matthew Berns aeacdddff1 adds aria text to indicate course selection is required for conversations
fixes CNVS-19240

note: selection is not mandatory for admins

test plan:
- as a non-admin, go to compose message in coversations
- course menu should read "A course selection is required before entering
  recipients"
- select a course, course menu should now read name of course
- return menu to 'Select course' default, the required statement should return
- required statement should not read out for admins

Change-Id: I1954ef1d48a77990b3dfa111935be3e788f0d0a5
Reviewed-on: https://gerrit.instructure.com/50959
Tested-by: Jenkins
Reviewed-by: Andrew Butterfield <abutterfield@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: Matt Berns <mberns@instructure.com>
2015-04-01 17:27:46 +00:00
Colleen Palmer b57d3dbb9c The to-do list check marks on the dashboard are super small in IE
fixes: CNVS-18313

Test Plan:

- Open up Canvas > make sure you have some to do items in dashboard
or course dashboard
- In IE the checkmark icons should now be bigger

Change-Id: I53f86413ee24b284b25ccc7ab70c30a06a1aecb3
Old: http://screencast.com/t/CyTDLfgrp
New: http://cl.ly/image/0t2W2T1x321i
Reviewed-on: https://gerrit.instructure.com/50951
Tested-by: Jenkins
Reviewed-by: Chris Hart <chart@instructure.com>
QA-Review: Derek Hansen <dhansen@instructure.com>
Product-Review: Colleen Palmer <colleen@instructure.com>
2015-04-01 17:21:00 +00:00
Jason Madsen ae7c4868e7 report num SQL read, write, cache calls to statsd
closes CNVS-19588

test plan:

  - enable statsd in config/statsd.yml
  - visit several various pages in canvas
    - create some things, update some things
    - reload a page or two

    - canvas should continue to function as expected
    - statsd request keys for controller actions should now have:
      - sql.read
      - sql.write
      - sql.cache

Change-Id: Ia71dc4db6ab6d4c99ecf375ad708e54553d59ed5
Reviewed-on: https://gerrit.instructure.com/51157
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
Tested-by: Jenkins
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2015-04-01 17:13:01 +00:00
Cody Cutrer a9703b951d don't allow SAML SLO requests to go to non-SAML endpoints
our SP metadata explicitly says they should only go to /saml_logout
via a GET request. so don't even allow a POST or DELETE to /saml_logout

Change-Id: I5543f043b618801b780a71ed3257637cc49b93ff
Reviewed-on: https://gerrit.instructure.com/51295
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
Tested-by: Jenkins
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2015-04-01 17:05:25 +00:00
James Williams 22b2c7fa7f still add verifiers to public syllabus content for authed users
test plan:
* create a course with a public syllabus and a link to an
unlocked file in the syllabus content
* should already be able to view the syllabus and download the
file when not logged-in
* should also be able to view the syllabus and download the
 files when logged-in (but not belonging to the course)

closes #CNVS-19585

Change-Id: I69adc4a8758a7deb2562229e20b057bcd0ad1971
Reviewed-on: https://gerrit.instructure.com/51353
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2015-04-01 17:03:04 +00:00
Nick Houle 4ade4bc026 Allows differentiated assignments to no longer trigger date error in modal
Fixes SIS-855

Change-Id: I93c99faecfb6356ceea4a88e2b6583075a0510f4
Reviewed-on: https://gerrit.instructure.com/50656
Tested-by: Jenkins
Reviewed-by: Tyler Pickett <tpickett@instructure.com>
QA-Review: Kausty Saxena <kausty@instructure.com>
Product-Review: Tyler Pickett <tpickett@instructure.com>
2015-04-01 16:52:59 +00:00
Clay Diffrient 5a05239c3e Upgrades react-modal to the latest version in bower
fixes PLAT-944

Test Plan:
  - Go to external apps
  - Add an app
  - The modal should appear
  - Press shift+tab
  - Focus should not leave the modal
  * Make sure the modal isn't borked in other places such as the
    course wizard and new files preview.

Change-Id: Ibeec9d6182086e4e542996e1c646bb49bef8fad0
Reviewed-on: https://gerrit.instructure.com/51312
Tested-by: Jenkins
Reviewed-by: Jonathan Featherstone <jfeatherstone@instructure.com>
QA-Review: Nathan Rogowski <nathan@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
2015-04-01 16:51:11 +00:00
Jesse Poulos f4fcae1008 Course conclude message lies and punctuation missing after the guides link
Fixes CNVS-11516

The Course Conclude warning message says that "Concluding the course will
prevent you from modifying grades and accessing course content."

This is a lie because, in fact, you can still access course content.

Change-Id: I79c6503de17dc05619fa65796f99a0f99b001189
Reviewed-on: https://gerrit.instructure.com/49826
Tested-by: Jenkins
Reviewed-by: James Williams  <jamesw@instructure.com>
QA-Review: Erin Hallmark <erin@instructure.com>
Product-Review: Hilary Scharton <hilary@instructure.com>
Product-Review: Erin Hallmark <erin@instructure.com>
2015-04-01 16:25:36 +00:00
James Williams 566495a52f improve locked module item prerequisite fetching
test plan:
* create a module with two assignment or discussion items
* add them both as requirements
* require students to move in sequential order
* as a student, try to visit the second (locked) item
* the lock message should load smoothly
 (shouldn't show a link briefly and hide it)

closes #CNVS-19400

Change-Id: I2ef9946486371c95095be8516acb1ef381f000bd
Reviewed-on: https://gerrit.instructure.com/51306
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2015-04-01 16:21:55 +00:00
James Williams e031b5b53b add context route to files api show
and use it when possible for data-api-endpoints

this will work around API authentication problems
caused by incorrect file namespacing

test plan:
* should be able to see file information
 by visiting /api/v1/courses/X/files/Y

closes #CNVS-19150

Change-Id: I4291b1101303f76bb3512dddbf2ddcf16073ae10
Reviewed-on: https://gerrit.instructure.com/51300
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
2015-04-01 12:42:20 +00:00
Spencer Olson 0f53b9f7a7 add workflow state to grading period groups and grading period grades
add workflow state to grading period groups and grading period grades.
also add a default value of 'active' and a not-null constraint for
workflow state on grading periods, grading period groups, and grading
period grades. also add a validate method for grading period group
that ensures the group belongs to either a course or account. add a
not-null constraint for grading period group id on grading periods. add
an index for workflow_state on grading period groups, grading periods,
and grading period grades.

closes CNVS-18995

test plan:

run migrations. in rails console:
  $ bundle exec rake db:migrate
  $ bundle exec rake db:migrate RAILS_ENV=test

Grading Period Groups:
  - you should not be able to create a Grading Period Group without
    assigning it either a course or account. If you don't supply a
    workflow state when you create a grading period group, it should
    default to 'active'.

    $ g = GradingPeriodGroup.create
    $ g.valid? #should return false

    $ g = Account.default.grading_period_groups.create
    $ g.valid? #should return true
    $ g.workflow_state #should return 'active'

    $ new_course = Course.create
    $ g = new_course.grading_period_groups.create
    $ g.valid? #should return true
    $ g.workflow_state #should return 'active'

  - when you delete a grading period group, it should do a 'soft delete',
    which means it should set its workflow_state to 'deleted' instead of
    actually deleting it from the database

    $ g = Account.default.grading_period_groups.create
    $ g.destroy
    $ g.workflow_state #should return 'deleted'

  - when you delete a grading period group, it should also soft delete
    any grading periods that belong to it.

    $ gp_group = Account.default.grading_period_groups.create
    $ gp = gp_group.grading_periods.create(
        start_date: Time.now,
        end_date: 1.month.from_now)
    $ gp_group.destroy
    $ gp_group.workflow_state #should return 'deleted'
    $ gp.workflow_state #should return 'deleted'

Grading Periods:
  - you should no longer be able to create a grading period without
    giving it a grading_period_group id. also, if you don't give it
    a workflow_state, it should default to 'active'. when you
    delete a grading period it should do a 'soft delete'.

    $ g = GradingPeriod.create(start_date: Time.now, end_date: 1.month.from_now)
    $ g.valid? #should return false

    $ gp_group = Account.default.grading_period_groups.create
    $ gp = gp_group.grading_periods.create(
        start_date: Time.now,
        end_date: 1.month.from_now)
    $ gp.valid? #should return true
    $ gp.workflow_state #should return 'active'
    $ gp.destroy
    $ gp.workflow_state #should return 'deleted'

  -  when you delete a grading period, it should also do a 'soft delete'
    on any owned grading period grades. Enrollments are tricky to make
    via the rails console, so i'm just grabbing one here that was already
    made -- you should be able to do the same. if you don't have any
    enrollments created, create one via Canvas and then come back to
    the rails console.

    $ gp_group = Account.default.grading_period_groups.create
    $ gp = gp_group.grading_periods.create(
        start_date: Time.now,
        end_date: 1.month.from_now)
    $ enrollment = Enrollment.first
    $ gp_grade = gp.grading_period_grades.create(
        enrollment_id: enrollment)
    $ gp_grade.workflow_state #should return 'active'
    $ gp.destroy
    $ gp.workflow_state #should return 'deleted'
    $ gp_grade.workflow_state #should return 'deleted'

Grading Period Grades:
  - these should now 'soft delete' as well. they require a grading period
    and an enrollment to be created (no change here, this has always been
    the case).

    $ enrollment = Enrollment.first
    $ gp_group = Account.default.grading_period_groups.create
    $ gp = gp_group.grading_periods.create(
        start_date: Time.now,
        end_date: 1.month.from_now)
    $ gp_grade = gp.grading_period_grades.create(
        enrollment_id: enrollment)
    $ gp_grade.workflow_state #should return 'active'
    $ gp_grade.destroy
    $ gp_grade.workflow_state #should return 'deleted'

Change-Id: Ic397a03beca4782c0c80e486673c7cfef59d38e5
Reviewed-on: https://gerrit.instructure.com/49754
Reviewed-by: Josh Simpson <jsimpson@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
QA-Review: Robert Lamb <rlamb@instructure.com>
Tested-by: Jenkins
Product-Review: Spencer Olson <solson@instructure.com>
2015-04-01 00:07:44 +00:00
Benjamin Porter 4cb68ec577 Don't show announcement comments to non-students
When the user is not logged in, or is not enrolled in the course, don't
show student comments on announcements.

Fixes CNVS-19270

Test Plan:
    - Create an announcement in a *public* course as a teacher
    - As a student, leave a reply on the announcement
    - Verify that the reply shows up for students in the course, as well
      as the teacher and account admins
    - Log out, and verify that the comments are not visible to
      a non-user
    - Create an announcement in a non-public course and ensure that
      student and teacher and admin can all see them properly

Change-Id: Ide381f6271a1de66ac85f6c7b0e2a2557190991d
Reviewed-on: https://gerrit.instructure.com/50595
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
Reviewed-by: Mike Nomitch <mnomitch@instructure.com>
QA-Review: Adam Stone <astone@instructure.com>
Product-Review: Benjamin Porter <bporter@instructure.com>
2015-03-31 23:28:18 +00:00
Simon Williams 5608e3c90b students with multiple enrollments show up once in quiz moderate
fixes CNVS-3626

test plan:
- in a course with multiple sections, enroll a student in >1 section
- create a quiz, publish it, and go to the quiz moderate page
- the student should only be listed once

Change-Id: I4fe46b859f02f94a2b81647050182d5715eea15a
Reviewed-on: https://gerrit.instructure.com/51159
Tested-by: Jenkins
Reviewed-by: Ryan Taylor <rtaylor@instructure.com>
QA-Review: Nathan Rogowski <nathan@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2015-03-31 23:12:55 +00:00
Nathan Mills 16719ca234 Fix a11y issues in add apps dialog.
fixes PLAT-945

test-plan:
the configuration type selector on the add external tools page should
have the correct label associated for it when using the screen reader

Change-Id: If0ad646948b1a14e8a0fef4fdc0a49990c6a43a1
Reviewed-on: https://gerrit.instructure.com/51042
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Aaron Cannon <acannon@instructure.com>
2015-03-31 22:29:00 +00:00
Jeremy Stanley c51d0cc04b exclude hidden files from new-files student exports
test plan:
 - enable better file browsing
 - put some regular, unpublished, and hidden files in it
 - perform an export of the folder by a student
   and confirm the unpublished and hidden files are not in the
   downloaded zip file

fixes CNVS-19597

Change-Id: Ia1b15a78879d2a3caf4b49350ee9e13f058a8268
Reviewed-on: https://gerrit.instructure.com/51208
Tested-by: Jenkins
Reviewed-by: James Williams  <jamesw@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2015-03-31 21:53:22 +00:00
Brad Horrocks 3afde74846 Google Drive speed grader previews
Ended up having to replace out encoding from the mime type when we save
the file

Fixes PLAT-980

Pre-conditions:
Set up Google Drive plugin on an account

Steps to Reproduce:
1. As a teacher, create an assignment with file uploads submission type
and publish it
2. Log in as a student and take the assignment, submitting a Google Doc
from the Google Doc tab.
3. Log back in as the teacher and head to the speedgrader to view the
student's submission.

Change-Id: I0a1663d09c44c43a484a3c87040a9502a42c2c97
Reviewed-on: https://gerrit.instructure.com/51299
Tested-by: Jenkins
Reviewed-by: Brad Humphrey <brad@instructure.com>
Product-Review: Brad Humphrey <brad@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
2015-03-31 21:51:32 +00:00
Simon Williams f1e0adc3ca allow bundler 1.9.2
Change-Id: Icf5255ac2c484d88d466c9ff714c0eeb913fbb58
Reviewed-on: https://gerrit.instructure.com/51314
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
2015-03-31 21:42:59 +00:00
Cameron Matheson d3b5e5a584 enrollments api: get grades for grading period
closes CNVS-18152

Scope:
  When passing a grading_period_id to the enrollments api, the api will
  return grading information for that grading period instead of the
  entire course

grading period support in enrollments api

Change-Id: I3b1e8eaa29de4e74dbbbe5b614241872401be216
Reviewed-on: https://gerrit.instructure.com/51269
Reviewed-by: Spencer Olson <solson@instructure.com>
Tested-by: Jenkins
Reviewed-by: Josh Simpson <jsimpson@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Josh Simpson <jsimpson@instructure.com>
2015-03-31 21:40:42 +00:00
Joel Hough 942fec22cf better push notification endpoint handling
fixes CNVS-19286

test plan
- regression test push notifications

multi-user (endpoint stealing) test
- sign up for push notifications with one user
- ensure that they receive push notifications
- sign up for push notifications with another user
- ensure that the new user receives push notifications
- ensure that the first user no longer receives push notifications

Change-Id: I6ffacc065cb0b3c54e5224350a2e7c93c595b8df
Reviewed-on: https://gerrit.instructure.com/50622
Tested-by: Jenkins
Reviewed-by: Andrew Butterfield <abutterfield@instructure.com>
Reviewed-by: Matthew Wheeler <mwheeler@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: Joel Hough <joel@instructure.com>
2015-03-31 21:09:06 +00:00
Nick Houle 816eba41ac Moves Post Grades button down into gradebook toolbar
Fixes SIS-768

Change-Id: I35d45e109ef5a5be8f4874f692c16a1a5fe82874
Reviewed-on: https://gerrit.instructure.com/51276
Reviewed-by: Jayce Higgins <jhiggins@instructure.com>
Reviewed-by: Ken Romney <kromney@instructure.com>
Tested-by: Jenkins
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Tyler Pickett <tpickett@instructure.com>
2015-03-31 21:04:18 +00:00
Jonathan Featherstone d9df20ffb0 Added code to hide recipient fields when appropriate
Test Plan
 * Compose a new conversation as a teacher
 * New message modal should work as it has (class not required)
 * Compose a new conversation as a student
 * Notice that to field controls are hidden

Note that changes described in CNVS-19240 are required to
match requirements specified in ticket.

Closes CNVS-19241
Refs CNVS-19240

Change-Id: I48b62baedeef4e621001457f856a15e70bfff06f
Reviewed-on: https://gerrit.instructure.com/50994
Reviewed-by: Matt Berns <mberns@instructure.com>
Tested-by: Jenkins
Product-Review: Aaron Cannon <acannon@instructure.com>
QA-Review: Nathan Rogowski <nathan@instructure.com>
2015-03-31 20:50:58 +00:00
Brad Horrocks d7c36b531f Site admins can register google drive as a user service
Fixed a bug cause by incorrectly registering a user service (not call
UserService.register). Google Drive will now call the appropriate
method.

Fixes PLAT-950

Test Plan

Pre-Conditions:
1. Have GoogleDocs and Google Drive plugins set up on account
2. Have a site admin that does not have Google Drive services registered
in their user settings.

Steps to Reproduce:
1. Log in as a site admin.
2. Click Settings.
3. Click on the Google Drive icon under Other Services and authorize it
when the prompt appears.
4. Notice a green banner displays, saying it's been authorized, but the
Google Drive service does not appear under the Registered Services
section below.
5. Navigate to Collaborations and click "Start a new collaboration."
6. Select Google Docs under "Collaborate using"
7. Click "Authorize Google Drive Access" and accept the prompt.

Change-Id: If7008fcfea093f2869ceb06c2b8f8cd1832e7b29
Reviewed-on: https://gerrit.instructure.com/51237
Tested-by: Jenkins
Reviewed-by: Brad Humphrey <brad@instructure.com>
Product-Review: Brad Humphrey <brad@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
2015-03-31 20:33:42 +00:00
Jeremy Stanley 7293b94a5c add missing i18n
test plan: the "Log Out" button on the confirm-logout dialog
(/logout) should be internationalized

fixes CNVS-19580

Change-Id: If4c251a702d37d0a651dbe0dd4bae61aeb6fe60e
Reviewed-on: https://gerrit.instructure.com/51150
Tested-by: Jenkins
Reviewed-by: James Williams  <jamesw@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2015-03-31 19:46:04 +00:00
Ethan Vizitei f8d1370ac4 BYOTS: custom ticketing connector
closes CNVS-18534
closes CNVS-18532

When the TicketingSystem plugin registers
itself, it now also registers two other plugins.

One will send emails to a configured address for
any error report, and another will do the same
with a web post (instead of email) to a configured
endpoint.

This also provides a decent framework for other
more vendor-specific plugins to hook into if
they want to build their own ErrorReport connector.

TEST PLAN:
 - Select email as the configuration option
    for the ticketing system plugin
 - Go configure the Canvas Ticketing Email
    Plugin
 - make sure when an error report gets created
    an email is shipped off to the configured address
 - Select web post as the configuration option
    for the ticketing system
 - Go configure the Canvas Ticketing Web Post
    Plugin (maybe point it at a local server?)
 - make sure when an error report gets created
    an HTTP POST is shipped off to the configured
    endpoint (and that an email is NOT sent now)

Change-Id: I6de9dce1ad4cdb34dc0052b331e521b79f62af59
Reviewed-on: https://gerrit.instructure.com/51048
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2015-03-31 18:51:53 +00:00
Matthew Berns b1c5c6307f adding calculation method details to screenreader gradebook
fixes CNVS-19350

- Updates GradebooksController#set_js_env so that `:full` is passed to
  the outcome group links API endpoint.
- Updates ScreenreaderGradebookController#selectedOutcomeResult so
  that mastery level is included in output, and adds #calculationDetails
  to return an outcome's calculation_method, and example data.
- Updates CaclulationMethodContent to accept either a backbone model or
  a vanilla js object, so that it can be shared between the Ember and
  Backbone areas of the app.

test plan:
- As a teacher, navigate to the gradebook, and select the individual
  view, then select the `Learning Mastery` tab.
- In the `Content Selection` section, select a student, then an outcome
  for which that student has alignemnts.
- In the `Result` section, observe the students' current mastery level
  is displayed in the form: `<student_score> out of <mastery_score>`.
- In the `Outcome Information` section, observe that example information
  for the outcome's calculation method is present, including the name of
  the calculation method itself, a description of the calculation method,
  possible scores, and a possible final score.

Change-Id: Ic8402f1cd364b027f7f7c5cb14472eb7e3023ff4
Reviewed-on: https://gerrit.instructure.com/50578
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Adam Stone <astone@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2015-03-31 18:47:19 +00:00
Ethan Vizitei 86a2c0f38b Stop error report creation from failing on encoding mismatch
fixes CNVS-19610

On several development machines (but not production apparently) the
request.env hash has strings in it that are ASCII_8BIT
which is usually not a big deal.  However,
in ErrorReport we serialize part of that hash, and we have
some code in "gems/utf8_cleaner" that makes sure we don't bomb on writes
because of bad UTF8 characters by force-encoding things we're going to
serialize.  The problem is that the strings in the request env hash are
(rightfully) frozen.  To make this not bomb, we need to deep-copy
everything we take directly from that hash, which this commit does
(after first writing a spec to expose the problem)

Change-Id: I53ef27ba2ea1fca9a3e5bd91c2840479bdb45fe3
Reviewed-on: https://gerrit.instructure.com/51247
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2015-03-31 18:26:30 +00:00
Cody Cutrer dc8ad964f5 don't allow Attachment.do_notifications to gum up the strand on failure
it will re-queue soon enough anyway

Change-Id: I875c8368ebf9449a97a38ed6ad7e19a772f551e8
Reviewed-on: https://gerrit.instructure.com/49229
Tested-by: Jenkins
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2015-03-31 18:17:58 +00:00
Jonathan Featherstone 7147b8f2db Added label for already selected recipients
Test plan
 * Create a new conversation
 * Add a few recipients
 * Navigate to field to verify that screenreader
   reads existing recipients
 * Remove recipients to make sure that changes are reflected

Fixes CNVS-19260

Change-Id: I2f8e66e6e7c9ee1995fd5b662b625d0926a519cd
Reviewed-on: https://gerrit.instructure.com/51091
Reviewed-by: Matt Berns <mberns@instructure.com>
Tested-by: Jenkins
QA-Review: Nathan Rogowski <nathan@instructure.com>
Product-Review: Jonathan Featherstone <jfeatherstone@instructure.com>
2015-03-31 16:47:50 +00:00
Jeremy Stanley c5037b1f38 store placeholder for host in materialized view
and then replace it with the request host when
serving the content from the API

test plan:
 - create one or more /etc/hosts file entries to point at
   your canvas instance with different names
 - reply to a discussion and include embedded images
   and attached files in the reply
 - view the discussion as a user pointing at a different
   hostname.  confirm that the attachments and embedded
   images work.
 - use the "Get the full topic" API endpoint to retrieve
   the topic and replies via the API. do this with more than
   one hostname. confirm that the URLs for the attached file
   and embedded images match the name of the host you
   are hitting the API with

fixes CNVS-17708
fixes CNVS-19125

Change-Id: I055235b3e785946e5999bf522ea4cad592f0f7f7
Reviewed-on: https://gerrit.instructure.com/50360
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Jon Willesen <jonw@instructure.com>
2015-03-31 16:32:08 +00:00
Strand McCutchen 851d092dc1 make focus accessible for srgb set default grade modal
fixes CNVS-19218

When a user clicks "set default grade" in the individual gradebook
view the focus is set on the close modal button, and when they
click on "set default grade" in that modal, the focus returns to
the "set default grade" button on the page. When they click the
close button in that modal, focus returns to the "set default grade"
button on the page.

Test Plan:

1. In individual view gradebook, select an assignment.
2. Click "set default grade" and confirm focus is on the close
    button.
3. Click "set default grade" in that modal and confirm that focus
    returns to the "set default grade" on the page.
4. Click "set default grade" and then the close button and confirm
    that focus returns to the "set default grade" on the page.

Change-Id: I6cd16c581c7c6a1d428be5a4ef91d85b4d777a83
Reviewed-on: https://gerrit.instructure.com/51051
Tested-by: Jenkins
Reviewed-by: Jonathan Featherstone <jfeatherstone@instructure.com>
QA-Review: Nathan Rogowski <nathan@instructure.com>
Product-Review: Strand McCutchen <smccutchen@instructure.com>
2015-03-31 16:09:25 +00:00