Commit Graph

23646 Commits

Author SHA1 Message Date
James Williams 773921f38d don't copy only_visible_to_overrides without copied overrides
ignore the attribute if we're only copying over a
non-masterypaths assignment with overrides

test plan:
* create an assignment and assign it to a section or student
* copy the assignment
* the new copy should default to being available to everyone

closes #CNVS-34176

Change-Id: Id7134d38b0ec32f0edbf7051a957d5bc2f9e8861
Reviewed-on: https://gerrit.instructure.com/99023
Reviewed-by: Dan Minkevitch <dan@instructure.com>
Tested-by: Jenkins
QA-Review: Heath Hales <hhales@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2017-01-12 13:38:55 +00:00
Jeremy Stanley a2b728e8b6 spec: fix fragile assignment spec
Change-Id: Ie1e2d25328a947782b9c47695c9678dec9a2cb3d
Reviewed-on: https://gerrit.instructure.com/99298
Tested-by: Jenkins
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2017-01-12 02:56:47 +00:00
Ed Schiebel 88f75b16e1 Add new enroll dialog
fixes: CNVS-32487

Test plan:
Prep
  - create user1 and user2 with the same email address
  - create user3 with a different email address
  - create a course with a few sections

test
  - navigate to the course and select People
  - click the "+ People" button
  > the "Add People" modal dialog should open
  > the available Roles should be listed in the dropdown
  > the course's sections should be listed in the dropdown,
    sorted by section name
  > the "Next" button is disabled

  - click "Cancel"
  > the dialog should close

  - click "+ People"
  > the dialog should re-open

  - click on the email, login id and sis id radio buttons
  > the example text above the textarea should change to reflect
    your choice

  - select "Email Address"
  - start typing in the text area
  > the "Next" button should become enabled

  - enter the unique email address of user3
  - click "Next"
  > you should see a network request to /courses/:courseid/user_lists.json
  > The dialog should show "The following users are ready" panel with
    your user's name and institution displayed.  The SIS ID is only
    displayed if you assigned one.  The email is only displayed if you
    searched by email (you did and it should be there). The Login ID is
    only displayed if you searched by login id.

  - clicak "Start Over"
  > The search panel of the dialog is redisplayed

  - enter the 2 email addresses for the users you created,
    plus one you didn't
  - select a Role
  - select a Section
  - click "Next"
  > The dialog should show a panel with two sections, duplicates and
    missing
  > the "Next" button is disabled
  > The "there were several possible matches" table should show the
    info from user1 and user2, plus a row to create a new user, plus a
    row to skip this user.
  > The "unable to find matches" secton should show the third email
    address with a link to add a name

  - Click the "Back" button
  > the search panel should redisplay with all your previous inputs

  - Click "Next"
  > the panel with duplicates and missing emails is redisplayed

  - Click user2's radio button
  > the "Next" button is enabled

  - Click the link or checkbox to "add a name"
  > the table row changes to include 2 text boxes for name and email
  > the email textbox is pre-populated with the email address you
    searchd for

  - Click "Next"
  > you should see a network request for /courses/:courseid/invite_users
  > "the following users are ready to be added" panel is displayed
  > the table includes user, the user name and email of the new user
    you invited

  - Click "Start Over"
  > The search panel is displayed, reset to default values

  - enter the email address for users 1 and 2
  - click "Next"
  > the panel showing the 2 users with this email address is displayed
  > the "Next" button is disabled

  - click the radio button for "Don't add this user for now"
  > the "Next" button is enabled

  - click "Next"
  > "The following users are ready" panel is displayed, with no users
    in the table

  - click "Start Over"
  - enter the email address for users 1, 2 and 3 and an email for a
    user that doesn't exist
  - click "Next"
  - click the radio button or link to "create a new user for.."
  > the row gets 2 text boxes for name and email
  > the "Next" button is disabled

  - enter a name and email address
  > the "Next" button is enabled

  - click the button or link "click to add a name" for the missing email
  > the "Next" button becomes disabled

  - enter a name and email
  > the "Next" button becomes enabled

  - click "Next"
  > the "following users are ready" panel is displayed with user3 and
    the two users you just created.

  - click "Add Users"
  > there should be a network request to /courses/:courseid/enroll_users
  > the dialog closes
  > there's a network request to /api/v1/courses/:courseid/users
  > the 3 users are listed in the People page's table.
  > the roles and sections are what you chose in the search panel of
    the dialog

Change-Id: I1a66aae52e2a5e20839dff278de2e8196d07b24e
Reviewed-on: https://gerrit.instructure.com/93732
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: McCall Smith <mcsmith@instructure.com>
2017-01-11 23:40:15 +00:00
Jon Jensen 8258f2d5bf spec: fix brittle spec
sometimes it refreshes the page before one of the mark-as-read ajax calls
gets triggered, canceling it

Change-Id: Iaa2ac4e47d24c002148e757a039201ed2dc7c0e3
Reviewed-on: https://gerrit.instructure.com/99385
Tested-by: Jenkins
Reviewed-by: Landon Wilkins <lwilkins@instructure.com>
Product-Review: Landon Wilkins <lwilkins@instructure.com>
QA-Review: Landon Wilkins <lwilkins@instructure.com>
2017-01-11 23:18:38 +00:00
Shahbaz Javeed d3c9bd6e25 add a popover menu to Assignment column headers for future work
closes CNVS-31607

test plan:
* Create a course with four assignments: one regular but with a
  really long name, one that is muted (you'll have to use regular
  gradebook to mute it), one that has no points and one that
  does not count towards the final grade
* Go to the course gradebook and ensure the header for the
  assignment column shows the assignment name and the number of
  points it's out of
* Ensure all assignment headers show a "more" icon which, when
  clicked, shows three dummy menu items to choose from.
* Ensure assignments with long names show as much of the name
  as possible and adds ellipses for the rest
* Ensure assignments that have any points associated with them
  show a second line indicating the total points
* Ensure assignments that have zero points don't show the total
  points on a second line
* Ensure muted assignments show a muted icon and have an
  appropriate tooltip
* Ensure assignments that don't count towards the grade show a
  warning icon and have an appropriate tooltip
* Move an assignment column to a different position and ensure
  its options menu stays the same

Change-Id: Iefdda2e2f05b1824c6d6f125583df4892c78f851
Reviewed-on: https://gerrit.instructure.com/99042
Reviewed-by: Derek Bender <djbender@instructure.com>
Tested-by: Jenkins
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
QA-Review: KC Naegle <knaegle@instructure.com>
Product-Review: Christi Wruck
2017-01-11 21:19:35 +00:00
Christian Prescott ec2681a331 Fix negative needs_grading_count
closes OUT-426

Test Plan
1. Prepare an assignment accepting submissions.
2. As teacher and admin, ensure todo list on course home page appears
   correctly for the assignment.
   a. When a submission is made, it should appear "needs grading"
   b. When more submissions are made, it should appear only once and
      show count of pending submissions.
   c. When a submission is graded, the count should decrement until
      there are no pending submissions remaining.
   d. When a user with a pending submission unenrolls, the count should
      decrement. When the user is reenrolled, their submission should
      reappear.
3. As a TA with limited visibility to a section, ensure todo list
   appears correctly and only counts submissions that should be visible.
4. Ensure graded quizzes have the same behavior.

Change-Id: I5eca4d0d9d008b2ce1ae39660f29709c509bed22
Reviewed-on: https://gerrit.instructure.com/96241
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
QA-Review: Alex Ortiz-Rosado <aortiz@instructure.com>
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Christian Prescott <cprescott@instructure.com>
2017-01-11 20:55:41 +00:00
Cameron Sutter 2ea00858f1 progress bar
closes OFFW-46

test plan:
- from the modules page, click the Download Course Content button
- when the Offline Course Downloads page loads,
  you should see a progress bar that increases as progress is made
- when the progess is completed, it should disappear and
  and after a delay that export should be added to the list above

Change-Id: Ibc87040c8ed1c7c962774b8d3de848f108032eae
Reviewed-on: https://gerrit.instructure.com/98815
Tested-by: Jenkins
Reviewed-by: Mysti Sadler <mysti@instructure.com>
QA-Review: Nathan Rogowski <nathan@instructure.com>
Product-Review: Cameron Sutter <csutter@instructure.com>
2017-01-11 20:39:57 +00:00
Neil Gupta 7abf23f8da Restore deleted scores instead of trying to make duplicate ones
Fixes CNVS-34276

Test plan:
* As a teacher, create an assignment
* As a student, create a submission
* As a teacher, grade the student
* Delete the student from the course
* In rails console, find the student's enrollment and set its
  workflow_state back to 'active'
* As the student, submit for the assignment again if needed
* As a teacher, grade the student again
* You should be able to see the new score (this crashed before)

Change-Id: I0eb62a4be1df7e568b9f761232d4c42ff835e534
Reviewed-on: https://gerrit.instructure.com/99288
Tested-by: Jenkins
Reviewed-by: Shahbaz Javeed <sjaveed@instructure.com>
Reviewed-by: Jeremy Neander <jneander@instructure.com>
QA-Review: KC Naegle <knaegle@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
2017-01-11 20:24:22 +00:00
Michael Brewer-Davis a78cc8b2a5 ensure cyoe only references fully graded, non-muted assignments
- add muted and grading_complete fields to live events

refs: OUT-577

Test alongside g/97097

Test plan:
- Partially graded items
    1.  Create a quiz with some automated and some manually graded
        content.  Apply mastery paths rules to trigger other assignments.
    2.  As student, take the quiz, such that your score on the
        automatically graded content would trigger a mastery path rule
    3.  Verify that no content is released
    4.  As teacher, grade the remaining questions of the quiz such that
        master paths content should be released.
    5.  Verify that the appropriate content is released to the student.

- Muted items
    1.  Create an assignment with mastery paths rules
    2.  As student, submit the assignment
    3.  As teacher, mute the assignment
    4.  Grade the submissions such that master paths content should be
        released
    5.  As student, verify that no content has been released
    6.  As teacher, unmute the assignment
    7.  As student, verify that the appopriate content has been released.

Change-Id: I312aba018ca262a907c6a23a938af739842e28ae
Reviewed-on: https://gerrit.instructure.com/97098
Reviewed-by: Matt Berns <mberns@instructure.com>
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
QA-Review: Cemal Aktas <caktas@instructure.com>
Tested-by: Jenkins
Product-Review: Michael Brewer-Davis <mbd@instructure.com>
2017-01-11 20:21:40 +00:00
Chris Hart 1e798ee31a Fix awkward wrapping in To-Do and Event lists
Fixes: CNVS-33935

Test plan:

- Words in the To-Do, Coming Up, and Recent Feedback
  lists should no longer break awkwardly

- Long words and links in the right sidebar To-Do,
  Coming Up, and Recent Feedback lists should now
  be handled by hiding the overflow and fading them
  out with a white gradient:
  http://www.screencast.com/t/b19RGB4F7v

- The spacing and line-height of the To-Do, Coming
  Up, and Recent Feedback lists should look better.

Change-Id: I96486077c57c24d18a991394c0747c6cf4f98c7d
Reviewed-on: https://gerrit.instructure.com/99234
Tested-by: Jenkins
Reviewed-by: Pam Hiett <phiett@instructure.com>
QA-Review: Dan Sasaki
Product-Review: Kyle Follett <kfollett@instructure.com>
2017-01-11 19:57:43 +00:00
James Williams 1b5391d5d7 don't double align account outcome links on banks on copy
test plan:
* create an account outcome
* create a course with an outcome group
* import the account outcome into the group
* link the outcome with a question bank
* copy the course
* it should not create an outcome link in the copied course's
 root outcome group

closes #CNVS-34196

Change-Id: I23171bc8270121889c3bf2ae71c2d1e59c81ecc0
Reviewed-on: https://gerrit.instructure.com/99103
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Chris Ward <cward@instructure.com>
Tested-by: Jenkins
2017-01-11 16:44:53 +00:00
Jeremy Stanley fac8cd118e restrict calendar events
closes MC-26

Change-Id: I6ee171e7a15e9fc883d4fb0295be66d51237262f
Reviewed-on: https://gerrit.instructure.com/98602
Tested-by: Jenkins
Reviewed-by: James Williams  <jamesw@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
2017-01-11 15:04:10 +00:00
Transifreq eda08160a3 update sv translation
Change-Id: I2f6dc86b4f009a0eb11356a2b6b917d90d571ad7
2017-01-11 05:31:39 -07:00
Transifreq ac521288f6 update ru translation
Change-Id: I75a9a6c094534f77e7ea5cc9811b3afd2fbaf975
2017-01-11 05:30:36 -07:00
Transifreq a89b1e7c28 update pt-BR translation
Change-Id: Icd4ea7127515b86913e8a38b1fcca7992f00224e
2017-01-11 05:29:27 -07:00
Transifreq 8595c17d51 update pt translation
Change-Id: Idd2c0be8d6090968da163872d59d684a8d9068ae
2017-01-11 05:28:21 -07:00
Transifreq e6d4efd314 update pl translation
Change-Id: I1427c288d3cc99bc24fbfef0bced78e0b05d7479
2017-01-11 05:27:16 -07:00
Transifreq 55cc837a9c update nl translation
Change-Id: I8576a66b25572d09b0e94912c8726e5873e187c7
2017-01-11 05:26:14 -07:00
Transifreq 9757a80e7b update nb translation
Change-Id: Ib98373d8684435a6669094e5c5380bb0681eec63
2017-01-11 05:25:11 -07:00
Transifreq 12a6dbc54a update fr-CA translation
Change-Id: Ic5d252452c8f8e86585fe5512189d01e51eb8475
2017-01-11 05:22:15 -07:00
Transifreq 3008c20d8f update fr translation
Change-Id: I89e4a07b1b1ab6c6a49d0f7408e44f2bb1f2885f
2017-01-11 05:21:17 -07:00
Transifreq bb58dc49d8 update es translation
Change-Id: Ie50310534fcd4424d9bfe9d8d1088fd4a7fae39a
2017-01-11 05:20:14 -07:00
Transifreq 8a3505f46a update en-GB translation
Change-Id: Ie4d0d16c285543f6041e17b1d305a80065be6ed8
2017-01-11 05:18:25 -07:00
Transifreq aa057d6b7f update de translation
Change-Id: I403b69994f268d96023126f7cc4a22cc69d3f3cf
2017-01-11 05:16:32 -07:00
Brad Horrocks c0fa1ffd8e Submission auto submit to canvadocs
Non auto submitted submissions will set annotation true when loaded in speed grader
Cloud Assignment submissions will auto submit to canvadocs

refs: RD-3449

Test plan:

Create a cloud assignment
As a student submit the cloud assignment
As a teacher open the assignment in speed grader
Observe the ability to annotate the cloud assignment

Change-Id: I6ddff84a4a97d920d17dcb26933fcc02c5e59026
Reviewed-on: https://gerrit.instructure.com/99196
Reviewed-by: Josh Orr <jgorr@instructure.com>
Tested-by: Jenkins
Product-Review: Caleb Guanzon <cguanzon@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
2017-01-10 23:42:09 +00:00
James Williams f58544fc35 strong params part C
refs #CNVS-32574

Change-Id: I272579bba8c1993fc5af872abe685f21318833a2
Reviewed-on: https://gerrit.instructure.com/94567
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2017-01-10 23:36:46 +00:00
Spencer Olson e97eb5c29e only restore scores for enrollment being restored
When an enrollment in restored, only scores with
that enrollment id will now be restored.

closes CNVS-34232

test plan:
1) Create two student enrollments in a course.
2) Go to the gradebook and grade each student
   for at least one assignment.
3) Open a rails console and get the course scores
   for the enrollments.

   $ first_score = Score.find_by(enrollment_id: enrollment1,
       grading_period_id: nil)
   $ second_score = Score.find_by(enrollment_id: enrollment2,
       grading_period_id: nil)

4) Destroy both scores.

   $ [first_score, second_score].each(&:destroy)

5) Destroy one of the enrollments and then restore it. Verify
   the score associated with that enrollment has been restored.
   Verify the score not associated with that enrollment is still
   deleted.

   $ enrollment1.destroy
   $ enrollment1.restore
   $ Score.find_by(enrollment_id: enrollment1,
       grading_period_id: nil).workflow_state
     => 'active'
   $ Score.find_by(enrollment_id: enrollment2,
       grading_period_id: nil).workflow_state
     => 'deleted'

Change-Id: I6fccd079b42dbc50c1be9b1c47aca9ebf80d3f71
Reviewed-on: https://gerrit.instructure.com/99146
Reviewed-by: Neil Gupta <ngupta@instructure.com>
Reviewed-by: Derek Bender <djbender@instructure.com>
Tested-by: Jenkins
QA-Review: KC Naegle <knaegle@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
2017-01-10 23:25:39 +00:00
Simon Williams 472ce5ecaa refactor LinkedIn::Connection
cleaner interface, with the bonus of making it easier to avoid mocking
`any_instance` on this class.

closes CNVS-33856

test plan:
- register linked in as a user service
- it should work

Change-Id: I158e132314569dd960e04c6c863db90146b8062a
Reviewed-on: https://gerrit.instructure.com/97542
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
Tested-by: Jenkins
2017-01-10 22:41:32 +00:00
Jon Jensen 95e74317d8 spec: fix selinimum capture finalization
in aws-sdk v2, this `.read` doesn't take a block, so the files were empty

verified manually by (re-)finalizing 42613b97

Change-Id: I07fecc2fba31b46de891a000ab16c298cf9a9cc1
Reviewed-on: https://gerrit.instructure.com/99250
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins
Reviewed-by: Landon Wilkins <lwilkins@instructure.com>
2017-01-10 22:34:07 +00:00
Stephen Jensen e70be4ed34 Change description text in Underline Links user feature option
Closes: CNVS-33647

Test Plan:
- Navigate to your user settings

- The text for the Underline Links feature option should now
  read as follows:

  Underline Links displays hyperlinks in navigation menus,
  the Dashboard, and page sidebars as underlined text. This
  feature option does not apply to user-generated content
  links in the Rich Content Editor, which always underlines
  links for all users.

- The text 'underlined text' in the description should be
  underlined

  https://www.screencast.com/t/xwYkSRknrs7B

Change-Id: I24fd76012f728238ffad2086d8c01594ef986601
Reviewed-on: https://gerrit.instructure.com/98857
Reviewed-by: Pam Hiett <phiett@instructure.com>
Tested-by: Jenkins
QA-Review: Dan Sasaki
Product-Review: Kyle Follett <kfollett@instructure.com>
2017-01-10 22:21:47 +00:00
Landon Wilkins 5480e02eb2 lint: fix linter for eslint
Change-Id: I187bec5bd794d0e4d2469d1135b8552e10105d55
Reviewed-on: https://gerrit.instructure.com/99257
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Landon Wilkins <lwilkins@instructure.com>
QA-Review: Landon Wilkins <lwilkins@instructure.com>
Tested-by: Jenkins
2017-01-10 22:00:27 +00:00
James Williams 05a534f533 strong params part G-L
refs #CNVS-32574

Change-Id: Ied89f6194ea3f63c546b50d056fe7cbe3a038609
Reviewed-on: https://gerrit.instructure.com/94678
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2017-01-10 20:58:10 +00:00
Cody Cutrer 1339e44130 fix autoextend detecting nested modules from autoloading
fixes CNVS-34248

Change-Id: I8b4c899568f06886354d66f1a1462141a557d3da
Reviewed-on: https://gerrit.instructure.com/99225
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2017-01-10 20:52:15 +00:00
Clay Diffrient fec3811d5c Make eslint avoid the campsite cleanup rule
closes CNVS-34242

This makes dr_diff have an option to avoid checking
lines surrounding changes.  It also sets up eslint
to take advantage of this rule.

Test Plan:
  - Automated Tests Pass
  - Eslint only flags errors on changed lines
    (when run through Gerrit/Jenkins/Gergich or
     via script/eslint)
Change-Id: I900430f21c4c925e8fd87bd62e75b271fa84d08e
Reviewed-on: https://gerrit.instructure.com/99048
Tested-by: Jenkins
Reviewed-by: Landon Wilkins <lwilkins@instructure.com>
Product-Review: Landon Wilkins <lwilkins@instructure.com>
QA-Review: Landon Wilkins <lwilkins@instructure.com>
2017-01-10 20:44:24 +00:00
Rob Orton fdd616fdbe rescue on parallel sis import
if the sis import fails to find the sis_batch on
update progress it will continue and update the
progress on next run.

fixes CNVS-34250

test plan
 - run a sis import
 - it should run

Change-Id: Ie4541b250f375bcb5fedfa6a1ab9afee15233169
Reviewed-on: https://gerrit.instructure.com/99230
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
2017-01-10 20:20:41 +00:00
Dan Minkevitch 78f5641ee3 Refactor comment locking algorithm to properly reflect course setting
Fixes CNVS-34215

Test Plan:
* Create an announcement
* As a student, see that the announcement is available to comments
* As an admin, enable the account setting to disable comments on announcements
* As a student, see that announcements have a locked icon and cannot have replies
* As an instructor, view the announcements page and click the settings icon for an announcement
* See that an "Open to Comments" option doesn't appear in the menu
* View (not edit) one specific announcement and click the settings icon
* See that an "Open for Comments" option doesn't appear in the menu
* As an admin, disable the account setting to disable comments on announcements
* As an instructor, view the announcements page and click the settings icon for an announcement
* See that an "Open to Comments" option appears in the menu and unlocks the announcement when clicked
* View (not edit) one specific announcement and click the settings icon
* See that an "Open for Comments" option appears in the menu

Change-Id: I99482c05a5d710095287108925cca969c76ec160
Reviewed-on: https://gerrit.instructure.com/99150
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Heath Hales <hhales@instructure.com>
Product-Review: Dan Minkevitch <dan@instructure.com>
Product-Review: Chris Ward <cward@instructure.com>
Tested-by: Jenkins
2017-01-10 20:14:39 +00:00
James Williams 42613b971a strong params part U-W
refs #CNVS-32574

Change-Id: Idf64d7dc4272c3ee186970b994e5fec5c9597418
Reviewed-on: https://gerrit.instructure.com/94682
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2017-01-10 19:56:18 +00:00
James Williams 41e9cf8119 strong params part S-T
refs #CNVS-32574

Change-Id: I1e28ac7a7debbb479c2f8c81597958c799b319d9
Reviewed-on: https://gerrit.instructure.com/94681
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2017-01-10 19:47:06 +00:00
James Williams 6003431940 strong params part P-R
refs #CNVS-32574

Change-Id: Ic3cd179a7cfb22e3b25a72500313f1baa8f96bb9
Reviewed-on: https://gerrit.instructure.com/94680
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
Tested-by: Jenkins
2017-01-10 19:46:18 +00:00
Simon Williams e6446e3279 spec: remove bullet_instructure gem
it was unused and our fork has diverged from the main gem.  I'd still
love to see bullet get into our linting, but we need to start over on
the approach

refs CNVS-34084

test plan: specs should pass

Change-Id: I46c211e4a21b6234d0e3a4fee1ac91acf2d3c5d0
Reviewed-on: https://gerrit.instructure.com/98789
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
Tested-by: Jenkins
2017-01-10 19:45:39 +00:00
Landon Wilkins 65744119ca dry up linters
test plan:
* see test commit verifying linters still work

Change-Id: I406c218309e824618869c9b5f3841af8387bf836
Reviewed-on: https://gerrit.instructure.com/98329
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins
Reviewed-by: Shawn Meredith <shawn@instructure.com>
Product-Review: Shawn Meredith <shawn@instructure.com>
QA-Review: Shawn Meredith <shawn@instructure.com>
2017-01-10 19:44:48 +00:00
James Williams 04f0d46b08 strong params part D
refs #CNVS-32574

Change-Id: Iaac099efac4162bd060e2b8d5a9e6bc5170ce02d
Reviewed-on: https://gerrit.instructure.com/94593
Reviewed-by: Dan Minkevitch <dan@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
Tested-by: Jenkins
2017-01-10 19:30:34 +00:00
John Corrigan b0008a343b better handle aria-valuetext output for SubmissionProgressBars
fixes FALCOR-58

test plan:
- Have an assignment with a pass / fail grading scheme.
- Complete the assignment for a student and grade it.
- As a teacher, trigger the context tray for the student (from the
  grades page, say).
- Observe that the `aria-valuetext` attribute for the corresponding
  progress bar is either `complete` or `incomplete`; it used to be
  `[object Object]`.

Change-Id: Ia780bea31e0085eaf636084218f123cbf8dd185a
Reviewed-on: https://gerrit.instructure.com/99139
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Dan Sasaki
Product-Review: Dan Sasaki
2017-01-10 18:48:07 +00:00
Edward Schiebel ce821321c9 Replace avatar image cropper with keyboard accessible one
Fixes: CNVS-28306

Test Plan:
- ensure Admin > <your account> > Settings > Enable Profiles
  and User Avatars are checked
- navigate to Account > Profile
- using keyboard:
  - TAB (displays "skip to main content")
  - ENTER (focuses on the main content of the profile page
  - TAB (focuses avatar image)
  - ENTER (displayes Select Profile Picture dialog)
  - TAB 4 times (focuses "choose a picture")
  - ENTER (displays system file open dialog)
  - Select a photo
  - The selected photo and crop-box are displayed and
    have focus
  - Use arrow keys to move the crop box around
  - Use shift-arrow keys to size the crop box
  - TAB twice to focus Save button
  - ENTER closes dialog
  - cropped image should be displayed on the profile page

change history
  - added js spec for the cropper
  - fix require_js config for react-crop

2016-12-13
  - changes needed after react-crop distribution changed
  - break CanvasCropper and CanvasCropperMaker into 2 files
    in response to code review
2016-12-16
  - update the react-crop version
  - set a min size on the cropper (so it can't go negative)
  - update css so image won't overflow its box
  - address eslint warnings
2016-12-21
  - fix merge conflict

note: the .rb file change supports the build. there is no need
      for a corresponding spec

Change-Id: I2b6dc165ed5dc2865f282c35018686dd820fea30
Reviewed-on: https://gerrit.instructure.com/97197
Reviewed-by: Steven Burnett <sburnett@instructure.com>
QA-Review: David Tan <dtan@instructure.com>
Product-Review: Chris Ward <cward@instructure.com>
Tested-by: Jenkins
2017-01-10 18:47:01 +00:00
James Williams 031242d031 strong params part Q
refs #CNVS-32574

Change-Id: Ifd139bf1e8296370d1d793ceed7c8e2e50440059
Reviewed-on: https://gerrit.instructure.com/94684
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2017-01-10 18:20:03 +00:00
James Williams 6fc0f8c28b strong_params part all the rest
refs #CNVS-32574

Change-Id: If0a354295f9433fcf4dc2a776d93ae45833a44bd
Reviewed-on: https://gerrit.instructure.com/94683
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2017-01-10 18:19:55 +00:00
James Williams f0100085af strong params part M-O
refs #CNVS-32574

Change-Id: Ic42c1c7bcc85c99818386392b1a0ebb55229e43c
Reviewed-on: https://gerrit.instructure.com/94679
Reviewed-by: Dan Minkevitch <dan@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2017-01-10 18:19:10 +00:00
James Williams 26ee38350a strong params part E-F
refs #CNVS-32574

Change-Id: Ib1fc9c81dbfa4ece200a15a23105dbfa6f84d0c6
Reviewed-on: https://gerrit.instructure.com/94677
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2017-01-10 18:16:54 +00:00
Michael Brewer-Davis 9cc28d4ceb add scores to select_mastery_path call
- helps cyoe process and assign synchronously
- correct link error in choose_mastery_path page

fixes: OUT-570

Test plan:

Test alongside CYOE g/97407

- As teacher, create mastery path that includes OR options
- Score student in range such that they are presented with
  these options
- As student, visit modules page and choose "Select assignment
  option"
- Choose one of the options
- Click on one of the assignments in the chosen option
- Ensure that you are able to view the assignment

Change-Id: I0d2a990b31cbd8205564ba704d4b38907abf98d9
Reviewed-on: https://gerrit.instructure.com/97427
Reviewed-by: Christian Prescott <cprescott@instructure.com>
QA-Review: Cemal Aktas <caktas@instructure.com>
Tested-by: Jenkins
Product-Review: Michael Brewer-Davis <mbd@instructure.com>
2017-01-10 17:59:48 +00:00
Keith Garner ac2382661a add runtime set failure percentage based mode to canvas_timeout
Using rolling counters in redis, build up data to go into timeout
protection when the percent of failures reaches a certain level.
Also, the existing timeout protection is tweaked to use redis keys
that won't overlap with the rolling counters redis keys.

The default values for failure rate cutoff is 20%, the default minimum
samples is 100, the default rolling counter time is 60 seconds. The
default protection time is the error_ttl time.

closes CNVS-34031

test plan:
 - Ensure canvas is configured to use redis
 - In the rails console do the following:
    Setting.set('service_qatesting_timeout', 1)
    Setting.set('service_qatesting_timeout_protection_method',
                'percentage')
    Setting.set('service_qatesting_min_samples', 10)
 - The following must be completed in the rails console in under a
   minute:
    Canvas.timeout_protection('qatesting') { }
    Canvas.timeout_protection('qatesting') { }
    Canvas.timeout_protection('qatesting') { }
    Canvas.timeout_protection('qatesting') { sleep 2 }
    Canvas.timeout_protection('qatesting') { }
    Canvas.timeout_protection('qatesting') { sleep 2 }
    Canvas.timeout_protection('qatesting') { }
    Canvas.timeout_protection('qatesting') { }
    Canvas.timeout_protection('qatesting') { }
    Canvas.timeout_protection('qatesting') { }
    Canvas.timeout_protection('qatesting') { }
    Canvas.redis.ttl("service:timeouts:qatesting:percent_counter:protection_activated")
 - Note that after each 'sleep' above that an error report of type
   'service_timeout' was generated
 - Note that after 10 samples, we went into timeout protection by
   the log message of "Skipping service call due to error count: qatesting 0.2"
 - Note that the Canvas.redis call returns a number between 0 and 60

Change-Id: Id14f2c86c11ded7bb8c18ecfcf51eed2faf4df33
Reviewed-on: https://gerrit.instructure.com/97247
Tested-by: Jenkins
Reviewed-by: Derek Bender <djbender@instructure.com>
QA-Review: KC Naegle <knaegle@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
2017-01-10 17:36:31 +00:00