Commit Graph

30544 Commits

Author SHA1 Message Date
wdransfield 0818147a72 Allow turning on dev key FFs in root accounts
Closes PLAT-3379

Test Plan:
- Navigate to the site admin feature settings and turn off
  all the three new developer key feature flags.
- Delete all developer key FeatureFlag records in the db.
- As a root account admin visit a root account's feature
  flag page.
- Verify you do not see the three develper key feature
  flags.
- As a site admin visit the root account's feature flag
  page.
- Verify you do see the three new feature flags. Turn
  all flags on.
- As the root account admin verify you can now see and
  toggle the feature flags in the root account. Turn each on
  if they are not already.
- Verify developer key management and scoping works when all
  three feature flags are enabled.

Note: with this change the new dev key management and scoping
will not be available in the site admin account. This will
be enabled in a follow-up commit.

Change-Id: I06381c07d6b8c2743562e6ab076bdaf80b61d4bc
Reviewed-on: https://gerrit.instructure.com/150374
Reviewed-by: Stewie aka Nicholas Stewart <nstewart@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Product-Review: Jesse Poulos <jpoulos@instructure.com>
2018-05-18 15:44:10 +00:00
Matt Sessions be59a882a4 Create an alert for assignment_grade thresholds
Refs MBL-10481

Test Plan:
 - Create a course in an account with a user observation
   link setup and ensure the student and observer are enrolled
   in that course
 - Create an assignment
 - Create a threshold for that link for
   alert_type: 'assignment_grade_low' with a threshold
 - Grade that student with a score higher than the threshold
 - No ObserverAlert should be created
 - Grade that student with a score lower than the threshold
 - An ObserverAlert should be created
 - Create a threshold for the link for
   alert_type: 'assignment_grade_high' with a threshold
 - Grade that student with a score lower than the threshold
 - An ObserverAlert should not be created
 - Grade that student with a score higher than the threshold
 - An ObserverAlert should be created

Change-Id: Iad90398d6f5eebfbc3a1ecd406a484501e781c5f
Reviewed-on: https://gerrit.instructure.com/150306
Reviewed-by: Cameron Sutter <csutter@instructure.com>
Tested-by: Jenkins
QA-Review: Kausty Saxena <ksaxena@instructure.com>
Product-Review: Matthew Sessions <msessions@instructure.com>
2018-05-18 15:01:30 +00:00
Jeremy Neander bc5297c794 adjust bundler version range
When bundler 1.17 is released, this will likely result in the same build
failures seen prior to this change.

test plan:
 * Verify Jenkins passes

Change-Id: I4be0fb3f9a8c2ca072e04ecff7f7cba3e055da61
Reviewed-on: https://gerrit.instructure.com/150711
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Jeremy Neander <jneander@instructure.com>
QA-Review: Jeremy Neander <jneander@instructure.com>
2018-05-18 14:56:28 +00:00
Adrian Packel 30f303c5c4 Block more than max graders in SG
closes GRADE-1057

Test plan:

Note: if you're planning to test this with SpeedGrader in its current
form, you'll need to use a max grader count of 1 or 2 to accommodate
SG's built-in grader limit. To test with more graders than that, you
can use the Rails console (see below).

* Create a course (w/ at least one student) in an account with AMM on
* Add an appropriate number of instructors to the course to cover the
  assignment's grader count plus TWO (a final grader and an excess
  grader who will be rejected)
* Create a moderated assignment with the grader count you decided on,
  and set one of the instructors as the final grader

Testing via SpeedGrader (see note above):
  * From the moderation page, add reviewers for one or more students
    as normal
  * With *two* of the non-final-grader instructors, assign a provisional
    grade and submit a comment on one or more submissions.
  * As the remaining non-final-grader, attempt to assign a grade or
    leave a comment. This should result in an error message stating
    that the assignment has reached its maximum number of graders.
  * As the final grader, issue a provisional grade/submit a comment.
    This should work properly and not give an error message.

Alternative option to test via console if grader_count > 2:
  > assignment = Assignment.find(<assignment ID>)
  > student = <a student in the course>
  > non_final_graders = <array of teachers who aren't final graders>
  > last_grader = non_final_grader.pop
  > non_final_graders.each do |grader|
      assignment.grade_student(student, grade: 1, grader: grader)
    end

  > # the following statement should fail with an error
  > assignment.grade_student(student, grade: 1, grader: last_grader)

  > # the following should succeed
  > final_grader = assignment.final_grader
  > assignment.grade_student(student, grade: 1, grader: final_grader)

Change-Id: I7e0bbaf1be96fa19cf1d3526e9fa31e9531229c2
Reviewed-on: https://gerrit.instructure.com/150427
Tested-by: Jenkins
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
QA-Review: Indira Pai <ipai@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
2018-05-18 14:45:48 +00:00
Jeremy Neander a74da8dd3c spec: clean up some spec pollution
test plan:
 * Verify Jenkins passes

Change-Id: I5c6423bcf62a79dbc410e79b4c5e7f7b2f5a8818
Reviewed-on: https://gerrit.instructure.com/150694
Tested-by: Jenkins
Reviewed-by: Spencer Olson <solson@instructure.com>
Product-Review: Jeremy Neander <jneander@instructure.com>
QA-Review: Jeremy Neander <jneander@instructure.com>
2018-05-18 00:11:00 +00:00
Cody Cutrer 20ea5beefb bump inst-jobs and switchman-inst-jobs
Change-Id: Ib4743abb1d03d48b0476da1aefe0329d42149d53
Reviewed-on: https://gerrit.instructure.com/150667
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2018-05-17 22:48:51 +00:00
Rob Orton d7f48e04c9 activate the sis_batches shard for attachments
fixes CORE-1426

test plan
 - sis import with errors should work

Change-Id: Id532db733e34fd64c825cb98d4544129e7516848
Reviewed-on: https://gerrit.instructure.com/150577
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
2018-05-17 22:45:03 +00:00
Cameron Sutter a124defc21 get alerts by student
closes MBL-10123

test plan:
- with a user_observation_link and an observer_alert_threshold
  make observer_alerts in the rails console
- hit the endpoint
  /users/:user_id/observer_alerts/:student_id
- it should return all alerts for that observer/student

Change-Id: I01fe71e3414d63cedc0e02eaed4e0d8822f80fcf
Reviewed-on: https://gerrit.instructure.com/150143
Reviewed-by: Matthew Sessions <msessions@instructure.com>
Tested-by: Jenkins
QA-Review: Taylor Wilson <twilson@instructure.com>
Product-Review: Cameron Sutter <csutter@instructure.com>
2018-05-17 21:56:34 +00:00
Ryan Shaw 0c27b44f21 ‘instructure-icons’ -> ‘@instructure/ui-icons’
closes: CORE-1433

This upgrades us to use @instructure/ui-icons everywhere instead
Of the old ‘instructure-icons’

Note here is the magic regex I used:
Find: (instructure-icons/lib/)(Line|Solid)(/Icon.*)(Line|Solid)
Replace: @instructure/ui-icons/lib/$2$3

test plan:
* all instUI icons should look/behave (as in, have same
  tooltips/screnreader labels/etc) the same as before.

Change-Id: I239a0545e5e3f4279ad5a3254eb28ea35c079a4d
Reviewed-on: https://gerrit.instructure.com/149288
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2018-05-17 21:49:25 +00:00
Ed Schiebel bf25c7b988 Sort groups and items correctly
fixes ADMIN-994

test plan:
  - fill one day of a planner with stuff. Put items in multiple courses,
    with multiple due dates and times. Include some user todos not in a
    course.
  > expect the groupings and items to be ordered:
    - Groupings are alpha by course/group name
    - Except that To Dos are last
    - Within each grouping,
        - items are ordered by due time, first things first
        - then alpha by item title if matching due times

Change-Id: Idcac554b93f908e5643db87fc913c69238e2cb15
Reviewed-on: https://gerrit.instructure.com/149416
Tested-by: Jenkins
Reviewed-by: Jon Willesen <jonw+gerrit@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Christi Wruck
2018-05-17 20:32:56 +00:00
Ryan Shaw 5441e760e9 @inst/ui-icons -> inst-icons in course user search
This introduces @instructure/ui-icons and converts just the account
Course user search stuff to use them instead of the old
‘instructure-icons’ package

Note here is the magic regex I used:
Find: (instructure-icons/lib/)(Line|Solid)(/Icon.*)(Line|Solid)
Replace: @instructure/ui-icons/lib/$2$3

test plan:
* the icons in the course/user search stuff should look/behave (as in,
  Have same tooltips/screnreader labels/etc) the same as before.

Change-Id: I22573aaaad239a9ceef4b5c1c0a610c3e5b7b586
Reviewed-on: https://gerrit.instructure.com/149287
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2018-05-17 20:06:33 +00:00
Anju Reddy a2259055e8 spec: spec to prevent speedgrader navigation on OG
fixes: GRADE-1144

Change-Id: I14f177582a83a7c3126b84ff6fd4a8437caddcbf
Reviewed-on: https://gerrit.instructure.com/150596
Tested-by: Jenkins
Reviewed-by: James Butters <jbutters@instructure.com>
Reviewed-by: Indira Pai <ipai@instructure.com>
Product-Review: Anju Reddy <areddy@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
2018-05-17 19:16:39 +00:00
Clay Diffrient 0a9226051e Add quota error handling to RCS sidebar
closes CORE-1239

Test Plan:
  - Set a course's usage quota to 10mb (or anything low)
  - Attempt to upload a file bigger than that through
    the RCS sidebar
  - Notice an error shows up
  - Upload a file less than the quota
  - Notice the error goes away

Change-Id: I2b8cab2fb76d3ec3520fff5eee337892d34d56d1
Reviewed-on: https://gerrit.instructure.com/150085
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Rohan Cheeniyil <rcheeniyil@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
2018-05-17 19:08:47 +00:00
Simon Williams ebbfde74ef make `wait_for_replication` more robust
we discovered that direct string comparision of xlog locations can give
invalid results in some situations, where second part of the xlog
location value "wraps" from 7 hex characters to 8

Change-Id: I62215e5fcc3f9655643aab9fc99f55ddbb37e8ac
Reviewed-on: https://gerrit.instructure.com/150385
Tested-by: Jenkins
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
2018-05-17 19:02:01 +00:00
James Butters a787ecdebd spec: make StudentGradesPage static
Change-Id: Ia2f0ab0d0f5ca8b31675e714b5328bb14e635cab
Reviewed-on: https://gerrit.instructure.com/150592
Reviewed-by: Indira Pai <ipai@instructure.com>
Reviewed-by: Anju Reddy <areddy@instructure.com>
Tested-by: Jenkins
Product-Review: James Butters <jbutters@instructure.com>
QA-Review: James Butters <jbutters@instructure.com>
2018-05-17 18:52:42 +00:00
Venk Natarajan 8468580108 Add in course and account tabs to new permissions page.
This will show the ugly table with the account and course roles
based on which tab is selected.

Closes COMMS-895.

Test Plan:
* Enable new permissions page.
* Go to accounts/:account_id/permissions.
* You should see "Account Roles" and "Course Roles" tabs
* Clicking on each tab should show you a different table.

Change-Id: I7119e9d1b44ddad860595d20a34ace5650d682bf
Reviewed-on: https://gerrit.instructure.com/150348
Tested-by: Jenkins
Reviewed-by: Aaron Kc Hsu <ahsu@instructure.com>
QA-Review: Landon Gilbert-Bland <lbland@instructure.com>
Product-Review: Venk Natarajan <vnatarajan@instructure.com>
2018-05-17 16:20:14 +00:00
August Thornton c4cf9ee75e spec: add selenium tests for dev key UI and backend
closes PLAT-3389
closes PLAT-3390
refs PLAT-3314
refs PLAT-3315

test plan:
 - specs pass

Change-Id: I1c8edf6e257b9d521b887314d69baab299e0f022
Reviewed-on: https://gerrit.instructure.com/150562
Tested-by: Jenkins
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
Product-Review: August Thornton <august@instructure.com>
QA-Review: August Thornton <august@instructure.com>
2018-05-17 16:10:04 +00:00
Deepeeca Soundarrajan 3711ca9f2a spec: Add new enrollment ui specs and page object model
Test Plan:
  --Passes Jenkins

Change-Id: Ie436955f811b9aefa1d1328c9f37c47016a97c76
Reviewed-on: https://gerrit.instructure.com/143033
Tested-by: Jenkins
Reviewed-by: Robert Lamb <rlamb@instructure.com>
Product-Review: Robert Lamb <rlamb@instructure.com>
QA-Review: Robert Lamb <rlamb@instructure.com>
2018-05-17 15:48:02 +00:00
Rob Orton 150103c0c2 validate uniqueness of sis_source_id on course
Change-Id: Ib4ea0ba921abe5f7708b9a0eb473c8a2afc73d2c
Reviewed-on: https://gerrit.instructure.com/150501
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
2018-05-17 14:38:08 +00:00
Ryan Shaw 90579fcd71 spec: silence some console.logs and warnings
1. removes a console.log of “end spec”
2. there was 2 configurationFormSpec.js files, one in the “coffeescripts”
  dir and the other in the “jsx” dir. this combines them into one
3. That spec had a function that called .getDOMNode() a bunch of times
   needlessly, this removes that so there is not console warnings

Change-Id: I5b9161ea87a1a5e409514d3e005772f79cbb7c93
Reviewed-on: https://gerrit.instructure.com/150170
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2018-05-17 14:31:39 +00:00
wdransfield fa15c00744 New UI (read and write actual data)
Closes PLAT-3315, PLAT-3123

Test Plan:
- Create a new developer key and use the UI
  to set scopes.
- Verify the scopes are added to the
  developer key in the DB
- Edit the developer key and remove some scopes
- Verify the scopes are removed in the DB
- Verify the scopes are removed in the UI (after
  a refresh)
- Add a few new scopes to the key via the UI
- Verify new scopes are added in the DB
- Verify new scopes are added in the UI (after
  a refresh)

Change-Id: I3f0338857ca8f1f68829745f31feb96d76264735
Reviewed-on: https://gerrit.instructure.com/149963
QA-Review: August Thornton <august@instructure.com>
Tested-by: Jenkins
Product-Review: Weston Dransfield <wdransfield@instructure.com>
Reviewed-by: Marc Alan Phillips <mphillips@instructure.com>
2018-05-17 13:35:22 +00:00
Jeremy Neander 3bddf52f21 anonymize graders in speed_grader.json
closes GRADE-1021

QA Notes:

 * Anonymous Grading impacts the following parts of speed_grader.json

    For content associated with the current grader:

    * within `submissions[*]`:
       * `.submission_comments[*].author_id` (absent)
       * `.submission_comments[*].anonymous_id` (present)
       * `.submission_comments[*].author_name` (present)
       * `.submission_comments[*].avatar_path` (present)

       * `.provisional_grades[*].scorer_id` (absent)
       * `.provisional_grades[*].anonymous_grader_id` (present)

       * within `.provisional_grades[*]`

          * `.rubric_assessments[*].assessor_id` (absent)
          * `.rubric_assessments[*].anonymous_assessor_id` (present)

    For content associated with other graders:

    * within `submissions[*]`:
       * `.submission_comments[*].author_id` (absent)
       * `.submission_comments[*].anonymous_id` (present)
       * `.submission_comments[*].author_name` (absent)
       * `.submission_comments[*].avatar_path` (absent)

       * `.provisional_grades[*].scorer_id` (absent)
       * `.provisional_grades[*].anonymous_grader_id` (present)

       * within `.provisional_grades[*]`

          * `.rubric_assessments[*].assessor_id` (absent)
          * `.rubric_assessments[*].anonymous_assessor_id` (present)

 * When not anonymized:

    * within `submissions[*]`:
       * `.submission_comments[*].author_id` (present)
       * `.submission_comments[*].anonymous_id` (absent)
       * `.submission_comments[*].author_name` (present)
       * `.submission_comments[*].avatar_path` (present)

       * `.provisional_grades[*].scorer_id` (present)
       * `.provisional_grades[*].anonymous_grader_id` (absent)

       * within `.provisional_grades[*]`

          * `.rubric_assessments[*].assessor_id` (present)
          * `.rubric_assessments[*].anonymous_assessor_id` (absent)

test plan:
 A. Setup
    1. Enable AMM
       a. Set Account AMM to "on"
       b. Set Course Moderated Grading to "on"
       c. Set Course Anonymous Marking to "on"
    2. Select or create
       a. A Course
       b. At least one Student
       c. At least one TA
       d. A Teacher
       e. Two Assignments
          * Moderated Grading "on"
          * Anonymous Grading "on"
          * with rubrics
          * Teacher is the moderator
    3. Enable avatars

    4. Set Account AMM feature flag to "off"
       * This un-breaks SpeedGrader for grading purposes

    5. As a Student
       a. Give yo'self an avatar
          * Remember to smile
       b. Submit to both assignments
       c. Comment on the first submission
    6. As the TA
       a. Upload an avatar
          * No smiles. You are only an assistant.
       b. Grade both submissions using the rubric
       c. Comment on the first submission
    7. As the Teacher
       a. Avatar: The Last Gradebender
          * Wear that nice sweater you got for your birthday
       b. Grade both submissions using the rubric
       c. Comment on the first submission

 B. Massage Data
    1. Set Account AMM feature flag to "on"
       * This allows anonymity data to be saved
    2. Open the Rails console

    3. Load the assignments
    4. Update both assignments with:
       `{graders_anonymous_to_graders: true}`
       `{grader_comments_visible_to_graders: true}`

    5. Load the Teacher and TA (as `teacher` and `ta`)
    6. Create moderation graders for each assignment

       `assignment.moderation_graders.create!(…)`
       * `{user: teacher, anonymous_id: 'teach'}`
       * `{user: ta, anonymous_id: 'atata'}`

 C. With Grader Anonymity Enabled
    1. Ensure AMM is "on"
    2. Visit the course in SpeedGrader as the Teacher
    3. Open the browser network dev tools tab
    4. Refresh to ensure the `speed_grader.json` request is present
    5. View the response to that request

    6. Dig in.

    7. Verify the Teacher content is mostly anonymized
    8. Verify the TA content is fully anonymized

 D. With AMM Disabled
    1. Set Account AMM feature flag to "off"
    2. Visit the course in SpeedGrader as the Teacher
    3. Open the browser network dev tools tab
    4. Refresh to ensure the `speed_grader.json` request is present
    5. View the response to that request

    6. Dig in. Again.

    7. Verify the Teacher content is not anonymized
    8. Verify the TA content is not anonymized

    9. Smoke test SpeedGrader

Change-Id: I82a6afd79ce0a4cf6dac94ac2052ffa19a73dccb
Reviewed-on: https://gerrit.instructure.com/150148
Tested-by: Jenkins
Reviewed-by: Neil Gupta <ngupta@instructure.com>
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
2018-05-17 00:18:05 +00:00
Transifreq 09018443c2 update he translation
Change-Id: Ib87a63dc6ee1da5f2d64c22b475b97174f707540
2018-05-16 17:26:52 -06:00
Transifreq 1855427d19 update fa translation
Change-Id: I6ae85859e04ddee8464dcc51cd1bdb1e1da677d9
2018-05-16 17:25:48 -06:00
Graham Ballantyne f4a6c827ce Revert be37267 and downgrade ffi gem
The latest versions of ffi casue SIGABRTs on RHEL and CentOS. This
commit reverts be37267 and downgrades ffi back to 1.9.18.

closes gh-1297

Related issues:
gh-1291
https://github.com/ffi/ffi/issues/621

Change-Id: I7bce7887c3034e5e0478caf9daa24031da119bee
Reviewed-on: https://gerrit.instructure.com/150484
Tested-by: Jenkins
Reviewed-by: Bryan Petty <bpetty@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
2018-05-16 22:46:33 +00:00
Transifreq c5a3453465 update nl translation
Change-Id: I214c988621a1614b83d88c1b24f0d379770dacb1
2018-05-16 16:43:55 -06:00
Frank Murphy f2deabd4ac React Rubric component
Fixes OUT-2215

Test Plan
- Enable the non-scoring rubrics feature flag (note that due to caching
  you may need to wait for the feature to be truly enabled)
- Create a rubric with several criterion (outcomes and non-outcomes)
- Verify that the component looks correct in the LMGB assignments page
  for a given student:
  - Verify the Outcome icon is present next to criterion that are used
    for outcomes.
  - Verify the threshold for mastery points is displayed on outcomes
    criterion.
  - Create an assignment with a points-scale rubric. Assign points.
    Verify that the right columns are selected when graded.
  - Add comments to the points-scale rubric assignment. Verify they are
    displayed in the criterion heading.
  - Create a comment with newlines. Verify the line breaks are preserved
    when displaying the comment.
  - Create an outcome with a very long description. Use it in a rubric.
    Verify the "show long description" button is there and works
    properly.
  - Create an assignment with free-form comments. Grade an assignment,
    entering some free form comments. Verify the comments are presented
    instead of the points scale when displayed in LMGB.
  - Align to an assignment with total points hidden. Verify the total
    points are not present.

Change-Id: I305649237bdfaacc5001b75de3965bc12ff81298
Reviewed-on: https://gerrit.instructure.com/149468
Reviewed-by: Matt Berns <mberns@instructure.com>
QA-Review: Dariusz Dzien <ddzien@instructure.com>
Tested-by: Jenkins
Product-Review: Michael Brewer-Davis <mbd@instructure.com>
2018-05-16 22:33:53 +00:00
Michael Brewer-Davis 217477b119 Replace erb rubric with react
Change-Id: I55a371a34db75208d54d8370eba2718cc224ff8a
Reviewed-on: https://gerrit.instructure.com/148437
Reviewed-by: Michael Brewer-Davis <mbd@instructure.com>
Reviewed-by: Frank Murphy <fmurphy@instructure.com>
Tested-by: Jenkins
Product-Review: Michael Brewer-Davis <mbd@instructure.com>
QA-Review: Michael Brewer-Davis <mbd@instructure.com>
2018-05-16 21:51:34 +00:00
Michael Brewer-Davis 8ed74305db add ability to set rubrics as non-scoring
feature flagged as development-only
adds "Don't show Outcomes results" checkbox

closes OUT-2132

Test plan:
On the assignments show page
and discussions edit page:
- Ensure the non-scoring rubrics feature flag is
  off
- Spot check that no non-scoring behavior is apparent
  and that rubrics are edited and saved as normal
- Enable the non-scoring rubrics feature flag
  (note that due to caching you may need to wait
  for the feature to be truly enabled)
- Verify that choosing "Remove points from rubric"
  removes all references to points -- existing ratings,
  outcome thresholds, creating new ratings, point totals,
  points column, etc.
- Choose update rubric, verify that no points are shown
  in the view of the rubric
- Reload page, verify that no points are shown in the view
  of the rubric
- Edit rubric and uncheck "Remove points...".  Verify that
  points are returned in all locations
- Verify that edit and view modes for a rubric do not show
  points when using a screenreader and "Remove points..."
  is set
- Verify that "Don't show outcome results" is persistent
  but otherwise has no effect

On manage rubrics page:
- Spot check that no non-scoring behavior is apparent

Change-Id: Ifa72e127f26936221304afcd6530c1d8f1a6ac3b
Reviewed-on: https://gerrit.instructure.com/149622
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
Tested-by: Jenkins
QA-Review: Andrew Porter <hporter-c@instructure.com>
Product-Review: Sidharth Oberoi <soberoi@instructure.com>
2018-05-16 21:50:23 +00:00
Jeremy Neander 2a4996c9ee Revert "fix i18n for react CanvasRce"
This reverts commit d90f7b14ce.

Change-Id: Iba6c43bf8ade76528d805a7d5a371c4ce053998c
Reviewed-on: https://gerrit.instructure.com/150478
Tested-by: Jenkins
Reviewed-by: Jared Crystal <jcrystal@instructure.com>
Product-Review: Jeremy Neander <jneander@instructure.com>
QA-Review: Jeremy Neander <jneander@instructure.com>
2018-05-16 21:23:30 +00:00
Simon Williams 28fca1c3f5 bump once-ler
Change-Id: I69a7b3f6a40051608799ab6010bfeee0f354fa7c
Reviewed-on: https://gerrit.instructure.com/149926
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
2018-05-16 19:57:05 +00:00
Jared Crystal d90f7b14ce fix i18n for react CanvasRce
refs QUIZ-4451

test plan:
 - comment out the non-react examples for the demo
   (if you don't comment them out, they will pull in the locale files)
 - change the language for the demo
 - the rce should reflect the change

Change-Id: I516f917fc466dc2d081c4e18fb34b909940711cc
Reviewed-on: https://gerrit.instructure.com/149760
Tested-by: Jenkins
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
Product-Review: Brent Burgoyne <bburgoyne@instructure.com>
QA-Review: Brent Burgoyne <bburgoyne@instructure.com>
2018-05-16 17:47:23 +00:00
Keith Garner d230a5e11e hide existing teacher comments when muting assignment
If an assignment is muted after comments are already left, this
patchset make canvas hide the teacher comments during muting.

fixes GRADE-1084

test plan:
 - Have a course with a teacher, two students, and 2 assignments. Make
   one of the assignments a group assignment.
 - For the non-group assignment:
   - As a teacher, leave a comment on the submission for one student
     via the student submission page or speedgrader
   - As the student, visit the student submission page and note the
     teachers comment is present
   - Mute the assignment
   - As the student, visit the student submission page and note the
     teachers comment isn't present
 - Repeat the steps above for the group assignment checking both students

Change-Id: Ib51d92173cdf4cee467362636c7dd6db9f665563
Reviewed-on: https://gerrit.instructure.com/149999
Tested-by: Jenkins
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Sidharth Oberoi <soberoi@instructure.com>
2018-05-16 17:38:13 +00:00
Spencer Olson c4338eb74a new gradebook: conditionally show anonymous header labels
In the New Gradebook, assignment headers now only show the 'ANONYMOUS'
label if the assignment has the anonymous_grading attribute set to
true and the Anonymous Moderated Marking feature flag is enabled.
Previously, the 'ANONYMOUS' label would show if the assignment had the
anonymous_grading attribute set to true.

closes GRADE-1158

Test Plan:
1. Disable Anonymous Moderated Marking at the root account.
2. Create an assignment in a course.
3. In a rails console, set that assignment's anonymous_grading
   attribute to true.

   assignment = Assignment.find(<assignment-id>)
   assignment.update!(anonymous_grading: true)

4. Go to the New Gradebook and verify that the column header for the
   assignment does not have an 'ANONYMOUS' label.
5. Enable Anonymous Moderated Marking at the root account.
6. Revisit the New Gradebook and verify that the column header for the
   assignment has an 'ANONYMOUS' label.

Change-Id: I288b411b6981bd71188ef64a40c90c26678f160d
Reviewed-on: https://gerrit.instructure.com/150322
Tested-by: Jenkins
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Reviewed-by: Adrian Packel <apackel@instructure.com>
QA-Review: Indira Pai <ipai@instructure.com>
Product-Review: Sidharth Oberoi <soberoi@instructure.com>
2018-05-16 17:29:47 +00:00
Carl Kibler 6fbee3c841 properly stick 'New Activity' button on planner
fixes ADMIN-908

the 'new activity' indicator could end up in wrong place in
IE and Edge and "position: sticky" doesn't work either. Moved
the indicator rendering from PlannerApp to PlannerHeader so it
can use absolute positioning below and work everywhere.

test plan:
- Add global announcement to 'push down' planner header
- add new assignment or other activity like 4 weeks in past
- 'New Activity' button should stick like glue to below
  separator line of Dashboard header. no floating above it.

Change-Id: Ib89b4e6cd6a1f42a42f800c4bc0cb4cded4312a0
Reviewed-on: https://gerrit.instructure.com/149251
Tested-by: Jenkins
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
2018-05-16 17:04:57 +00:00
Matt Sessions b0b9a38f7c Create alerts for account notifications
Refs MBL-10483

Test Plan:
 - Ensure that you have an observer and student link
   setup on your root account
 - Ensure that you have an ObserverAlertThreshold created
   for that link for alert_types of `institution_announcement`
 - Create an account notificaiton in a sub account
   that starts today
 - You should not have an ObserverAlert for it
 - Create an account alert
 - You should have an ObserverAlert for that account
   notification
 - Create an account alert that starts in a few minutes
 - Wait a few minutes (after start_at time)
 - You should have an ObserverAlert for that account
   notification
 - Create an account notification that is scoped to
   any scopes other than student and observer
 - You should not have an ObserverAlert fort that
   account notification

Change-Id: I8e6049fe7dfc524fbdede8ec7e18714971a2b7c9
Reviewed-on: https://gerrit.instructure.com/150134
Reviewed-by: Cameron Sutter <csutter@instructure.com>
Product-Review: Cameron Sutter <csutter@instructure.com>
Tested-by: Jenkins
QA-Review: Kausty Saxena <ksaxena@instructure.com>
2018-05-16 16:47:03 +00:00
Jacob Fugal eab9c0ed2a script to reclaim attachments from instfs
fixes RECNVS-419

intended for manual execution only if necessary, not scheduled by a job.
would be good to optimize to allow parallel downloads of files from
inst-fs instead of serial.

test-plan:
  setup:
    - configure your canvas with at least two root accounts, A and B
    - enable inst-fs on root account B but initially disable it on root
      account A
    - upload a handful of files into root account A ("set A") and verify
      they're being served by non-inst-fs (local storage or s3,
      whichever you have configured)
    - upload a handful of files into root account B ("set B") and verify
      they're being served by inst-fs
    - now enable inst-fs on root account A and upload or generate more
      files into various locations in that account (courses, groups,
      content exports, etc.). include any portion of canvas you want to
      verify ("set C")
    - verify "set A" is still served by local storage or s3 and "set C"
      is served by inst-fs

  trigger:
    - disable inst-fs on root account A
    - in the rails console, run:
      DataFixup::ReclaimInstfsAttachments.run([root_account_A])

  verify:
    - verify "set A" still works, and is still served by non-inst-fs;
      non-inst-fs files should be untouched by the fixup
    - verify "set B" still works, and is still served by inst-fs;
      inst-fs files in other accounts should be untouched by the fixup
    - verify "set C" still works, but is now served by non-inst-fs
      instead of inst-fs; inst-fs files in the target account should be
      "repatriated" to non-inst-fs storage

Change-Id: Ia6d7b43f295af79d7db4658dfad4e1965aab57d4
Reviewed-on: https://gerrit.instructure.com/149736
Reviewed-by: Jonathan Featherstone <jfeatherstone@instructure.com>
QA-Review: Collin Parrish <cparrish@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
Tested-by: Jenkins
2018-05-16 16:40:02 +00:00
Clay Diffrient 57fcd768ea Make file preview links tabbable
closes CORE-1322

Test Plan:
  - Add a pdf file link to a page
  - View that page
  - You should be able to tab to the small file preview link
    that shows up next to the link
  - Pressing 'Enter' on the link should open a preview
  - Focus should be on the minimize file preview link
  - Pressing 'Enter' on that link should send focus back
    to the file preview link
Change-Id: I909ca7361b890c0a16be459dd538ecfe89f9a3e9
Reviewed-on: https://gerrit.instructure.com/149852
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Dan Sasaki <dsasaki@instructure.com>
2018-05-16 14:39:07 +00:00
James Williams 8312806b51 redirect unauthed account admins to /settings
test plan:
* enable new course user search
* have an account admin without the right to
read the list of users or read courses
* should be redirected to the settings
 when viewing /accounts/X

closes #CORE-1316

Change-Id: I7ba1e43c36fc550652642fbc084f8e0937937777
Reviewed-on: https://gerrit.instructure.com/150213
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2018-05-16 12:24:51 +00:00
Sara Chadwick af626792d9 Remove extra "use agenda view for accessibility" messages
Fixes COMMS-1103

Test Plan:
 * Turn a screen reader on
 * Navigate to http://localhost:3000/calendar
 * Use screen reader commands to navigate to month, week, and the
   top level of the mini calendar
 * As you are navigating through it, make sure that you're only
   getting the message to use agenda view once

Change-Id: Ic9811cf30ff28a9680afcd4cff7c1f4034c635e7
Reviewed-on: https://gerrit.instructure.com/150232
Tested-by: Jenkins
Reviewed-by: Landon Gilbert-Bland <lbland@instructure.com>
QA-Review: Aaron Kc Hsu <ahsu@instructure.com>
Product-Review: Landon Gilbert-Bland <lbland@instructure.com>
2018-05-15 21:45:18 +00:00
Nick Pitrak 47450fd320 restrict from unmuting assignments
closes GRADE-1052

test plan:
- set the Anonymous Moderated Marking flag for your account
- set the Anonymous Marking flag for your course
- create a course
- add a teacher
- create an assignment
- as a site admin, go to the assignment page and then to the speedgrader
- ensure the unmute button is disabled

Change-Id: I4c27e2cbcdd12cdbf1789d5e89f78dec7c052a97
Reviewed-on: https://gerrit.instructure.com/149972
Reviewed-by: Adrian Packel <apackel@instructure.com>
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
Tested-by: Jenkins
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Sidharth Oberoi <soberoi@instructure.com>
2018-05-15 21:20:45 +00:00
Nick Pitrak 820c64dd73 restrict access to submission details page
closes GRADE-1053
closes GRADE-1054

test plan:
- set the Anonymous Moderated Marking flag for your account
- set the Anonymous Marking flag for your course
- create a course
- add an account admin, a teacher, and a student
- create an assignment
- as a site admin
  - browse to the grades page for the student
  - write down the grades page url
  - ensure the submission details link for the assignment is present
  - click the submission details link for the assignment
  - ensure the link renders the grades page
  - write down the submission details url
- masquerade as the account admin
  - browse to the grades page url
  - ensure the submission details link for the assignment is not present
  - browse to the submission details url
  - ensure the url is forbidden
- masquerade as the teacher
  - browse to the grades page url
  - ensure the submission details link for the assignment is not present
  - browse to the submission details url
  - ensure the url is forbidden
- masquerade as the student
  - browse to the grades page url
  - ensure the submission details link for the assignment is present
  - browse to the submission details url
  - ensure the link renders the grades page

Change-Id: Id88b33f79f7fa46c9b6a2349f90e92c96fc2ac21
Reviewed-on: https://gerrit.instructure.com/149529
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Reviewed-by: Adrian Packel <apackel@instructure.com>
QA-Review: Adrian Packel <apackel@instructure.com>
Tested-by: Jenkins
Product-Review: Sidharth Oberoi <soberoi@instructure.com>
2018-05-15 21:20:41 +00:00
Jeremy Neander 3f0629e9bd ignore undefined asset strings
There are specs which do not appropriately provide an asset string and
consequently explode in hard-to-debug ways. Since this function can
already return undefined, providing a default empty string does not
impact the behavior.

There are no specs for this function, sadly.

test plan:
 * Verify Jenkins passes

Change-Id: Ibba39fce03ab8cedd5e275887366db0ec4dfa482
Reviewed-on: https://gerrit.instructure.com/149241
Reviewed-by: Spencer Olson <solson@instructure.com>
Tested-by: Jenkins
Reviewed-by: Landon Gilbert-Bland <lbland@instructure.com>
Product-Review: Jeremy Neander <jneander@instructure.com>
QA-Review: Jeremy Neander <jneander@instructure.com>
2018-05-15 20:31:46 +00:00
Omar Khan 96e7f9187e Only include quiz question_types in api responses
The Quiz#question_types method is expensive for large quizzes. It's
currently called every time a quiz is serialized, even though we only
need the question_types attribute in API responses (I believe it's used
by the mobile app).

This commit moves the question_types attribute to a separate
QuizApiSerializer that is only used in API responses.

Fixes QO-356
Fixes QO-357

Test plan:

- Create several huge quizzes (tens of thousands of questions across
  multiple question groups)
- Open the quizzes list page
- Check that the page loads reasonably quickly

Change-Id: Id18a32fc47f20cd24cb178e972f49e8984bfe53e
Reviewed-on: https://gerrit.instructure.com/149829
Reviewed-by: James Williams  <jamesw@instructure.com>
Tested-by: Jenkins
QA-Review: David Tan <dtan@instructure.com>
Product-Review: Omar Khan <okhan@instructure.com>
2018-05-15 20:12:16 +00:00
Spencer Olson 5252a6087e speedgrader: conditionally remove moderation bar
Hides the Moderation Bar in SpeedGrader when the Anonymous Moderated
Marking feature flag is enabled.

closes GRADE-1139

Test Plan:
1. Turn the Anonymous Moderated Marking feature flag on at the root
   account level.
2. Create a moderated assignment. Go to the moderation page for the
   assignment and add a second reviewer.
3. Log in as an instructor that is not the moderator for the
   assignment. Go to SpeedGrader for the assignment and give a
   provisional grade for a student.
4. Log in as another instructor that is not the moderator for the
   assignment. Go to SpeedGrader and verify there is not a 'Moderation
   Bar' at the top of the page (if it was there, the 'Moderation Bar'
   would include a tab for each reviewer, and a dropdown to add a new
   review).
5. At the root account, disable the Anonymous Moderated Marking feature
   flag.
6. As the same instructor from step 4, revisit SpeedGrader and verify
   the 'Moderation Bar' is present.

Change-Id: Ib3965927ead41b8ad2bc781a3eb040999cb3d57b
Reviewed-on: https://gerrit.instructure.com/150181
Tested-by: Jenkins
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Reviewed-by: Adrian Packel <apackel@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Sidharth Oberoi <soberoi@instructure.com>
2018-05-15 19:27:06 +00:00
Parker Miller 041b822c12 update total_lines before queueing jobs in reports
Prevents a race condition in parallel reports
where a job completes before total_lines is set
which causes a nil error when updating progress

test plan:
- run account report using parallel runner
- it should work

refs PFS-10491

Change-Id: I4e128896df8d91c52760b14b272494f7791539db
Reviewed-on: https://gerrit.instructure.com/150298
Tested-by: Jenkins
Reviewed-by: Sean Mikkelsen <smikkelsen@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
2018-05-15 17:56:01 +00:00
Marc Phillips b91bb7b55a Rename DeveloperKey* Files
Rename the DeveloperKey* files to names that do
not contain DeveloperKey in them. This removes the
noise of adding developerkey to every filename in a
namespaced folder (which is redudant) that will allow
for easier following of code changes.

Test Plan:
n/a

Change-Id: Icd9be5a813e44e6429677954c20c3a476c927302
Reviewed-on: https://gerrit.instructure.com/150151
Tested-by: Jenkins
Reviewed-by: Stewie aka Nicholas Stewart <nstewart@instructure.com>
Product-Review: Marc Alan Phillips <mphillips@instructure.com>
QA-Review: Marc Alan Phillips <mphillips@instructure.com>
2018-05-15 17:06:33 +00:00
Ed Schiebel 3c6dc0c166 Correctly scroll to most recent new activity
when the planner is in tablet mode, the new activity indicators are next
to the item, not the group. the previous code didn't take that into
account when it looked for it by sorting on animatableIndex.
Unfortunately, there can be duplicate PlannerItem animatableIndices.
Deal with that by having PlannerApp -> Day -> Grouping -> PlannerItem
assign the index using this.props.animatableIndex * 100 + myIndex. A
nice side effect of this is that you can look in the animatable-registry
and see the logical groupings.

fixes ADMIN-911

test plan:
It was a fluke that my local date generated PlannerItems with new
activity with duplicate animatableIndex values. That's the only way
I stumbled on this issue.
  - Have items due with new activity in due the past,
    a couple in the same day but different courses.
  - load the planner, and click the New Activity button
  > expect it to scroll to the most recent in the past item with new
  > activity and focus on the checkbox
  - check the checkbox so the new activity item is completed
  - refresh the browser
  - click New Activity
  > expect it to scroll to the item and focus on the "show 1 completed
  > item" toggle.
Also
  - ensure that the item with new activity receives focus

Change-Id: I2cf5fbdcb5cf43647c5dce121149c03ae72a94bf
Reviewed-on: https://gerrit.instructure.com/149728
Tested-by: Jenkins
Reviewed-by: Jon Willesen <jonw+gerrit@instructure.com>
QA-Review: Jon Willesen <jonw+gerrit@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
2018-05-15 15:52:42 +00:00
Xander Moffatt e9af3e6a5f upload submission comment files through InstFS
* fix for both admin and student

closes RECNVS-427

test plan:
* create course, assignment, and student
* as student, submit the assignment
* go to Submission Details, add a comment with a file
* reload the page so the file shows up
* download the file and note that the download comes through InstFS
* repeat process as admin

Change-Id: I9c321bb1ad0fef3b42a9d84f3da1357592d0e781
Reviewed-on: https://gerrit.instructure.com/150155
Tested-by: Jenkins
Reviewed-by: Michael Jasper <mjasper@instructure.com>
QA-Review: Collin Parrish <cparrish@instructure.com>
Product-Review: Xander Moffatt <xmoffatt@instructure.com>
2018-05-15 15:50:14 +00:00
Jeremy Neander 47f8d66189 check assignment for student anonymity in speedgrader
refs GRADE-1021

test plan:
 * smoke test `speed_grader.json` for anonymous students
 * smoke test `speed_grader.json` for non-anonymous students

Change-Id: I8117eab29cc268427f2465e19f09875559b92904
Reviewed-on: https://gerrit.instructure.com/150147
Tested-by: Jenkins
Reviewed-by: Derek Bender <djbender@instructure.com>
Reviewed-by: Adrian Packel <apackel@instructure.com>
QA-Review: Adrian Packel <apackel@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
2018-05-15 15:38:14 +00:00