Commit Graph

31529 Commits

Author SHA1 Message Date
Xander Moffatt 7a4b731cdb reference instfs_uuid from instfs direct upload
refs RECNVS-521

* previously instfs file upload returned only the
instfs uuid as `uuid`
* instfs file upload now returns canvas capture
data, which includes the canvas uuid
* instfs uuid has been renamed to `instfs_uuid`

test plan:
* specs

Change-Id: I1f77f3dd1952fbd275ae67c399ff04ef6533785b
Reviewed-on: https://gerrit.instructure.com/157118
Reviewed-by: Michael Jasper <mjasper@instructure.com>
Tested-by: Jenkins
Product-Review: Xander Moffatt <xmoffatt@instructure.com>
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
2018-07-12 16:13:06 +00:00
Matt Sessions f2b9488d29 Fix alerts to only generate when observer is enrolled
Refs MBL-10851

Test Plan:
 - Create a student and 2 courses and enroll the student in both
 - Create a user and make them an observer in only one course for
   the student
 - Setup thresholds for assignment_grade, course_grade, and
   assignment_missing
 - Go to the course the observer is not in and grade the student
   above/below the assignment_grade threshold
 - This should also trigger the course_grade threshold
 - Go to the course and create an assignment that is due in a minute
   or two
 - Wait at least 5 minutes
 - No assignment_missing alert should be created

Change-Id: If05db61a198ada8c2cfce9049d595fb633483882
Reviewed-on: https://gerrit.instructure.com/156852
Tested-by: Jenkins
QA-Review: Kausty Saxena <ksaxena@instructure.com>
Reviewed-by: Layne Moseley <lmoseley@instructure.com>
Product-Review: Matthew Sessions <msessions@instructure.com>
2018-07-12 15:38:29 +00:00
Sara Chadwick 21d795b565 Stop teachers from creating discussions after term ends
Fixes COMMS-1289

Test plan:
- Create a course with at least one teacher and apply a closed term
- As the teacher, check that you do not have a create discussion
  button
- go to courses/{course_id}/discussion_topics/new
- Verify that if you try to create a discussion, it returns an appropriate
  error message
- Check that discussions can still be created in other, appropriate
  contexts
- Create a discussion in a group to make sure the restriction only
  applies to courses

Change-Id: I8ef95a7c09948bebeb2ef05a83d05e774a889ec1
Reviewed-on: https://gerrit.instructure.com/156886
Tested-by: Jenkins
Reviewed-by: Landon Gilbert-Bland <lbland@instructure.com>
QA-Review: Steven Burnett <sburnett@instructure.com>
Product-Review: Steven Burnett <sburnett@instructure.com>
2018-07-12 14:12:14 +00:00
Transifreq 672b1e39ad update sv-x-k12 translation
Change-Id: I4654af05f4b723efe50a49e47f77ef8c363ccbcd
2018-07-12 06:06:42 -06:00
Transifreq 3f0cf254bc update nb-x-k12 translation
Change-Id: Icdd49deef1fb5e36b47359e248822a376fcba7f0
2018-07-12 06:05:47 -06:00
Transifreq 5da7ee4147 update da-x-k12 translation
Change-Id: I5a006394bf6d82cfbf3b7709373b8722d6370513
2018-07-12 06:04:55 -06:00
Keith Garner 78b99983c8 fix nil value for bool parameter being sent to docviewer
In certain cases, such as docviewer being launched by the mobile app,
the canvadoc_sessions_controller would cause docviewer to be launched
nil value for anonymous_instructor_annotations. Now that is only set
when enable annotations is true and anonymous_instructor_annotations
is true.

The mobile apps will need to be updated to honor this new flag.

fixes GRADE-1366

test plan:
 - Confirm anonymous_instructore_anotations is being sent only when
   enable_annotations is on and the assignment has
   anonymous_instructor_annotations.
 - Confirm launching from a mobile app doesn't explode

Change-Id: I95a7566067eb1c46f396164c877ece9335d510b3
Reviewed-on: https://gerrit.instructure.com/157085
Tested-by: Jenkins
Reviewed-by: Spencer Olson <solson@instructure.com>
QA-Review: Spencer Olson <solson@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
2018-07-12 01:59:24 +00:00
Keith Garner 7686d87cdb fix missing enrollment type and admin access for docviewer
This patchset fixes two issues related to passing the enrollment type
to docviewer.

The first issue is that since admins are not enrolled in
a course, they had no enrollment to share. We now look to see if the
user is an admin. Other enrollment types are now checked as well.

The second issue is that mobile speedgrader currently isn't passing
along the enrollment_type parameter. Temporarily we'll try to look up
which course an attachment is part of and guess the role. (This may
change as we coordinate with mobile to get better behaviour.)

fixes GRADE-1364
fixes GRADE-1365

test plan:
 - As an admin, view a student's submission in speedgrader, ensure
   DocViewer launches.
 - Ensure mobile speedgrader can launch DocViewer

Change-Id: I4512d99ccecd3b38bd57ab9d4c803084b053bc8c
Reviewed-on: https://gerrit.instructure.com/157025
Reviewed-by: Adrian Packel <apackel@instructure.com>
Tested-by: Jenkins
Reviewed-by: Gary Mei <gmei@instructure.com>
Reviewed-by: Derek Bender <djbender@instructure.com>
QA-Review: Spencer Olson <solson@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
2018-07-11 23:26:01 +00:00
Han Yan 274ac9f2a0 allow non-siteadmins to fetch audit_info for a content_migration
refs QUIZ-4921

test plan:
- in local Canvas, register a course, and import a CC package
- as siteadmin, go to /api/v1/course/<course_id>/content_migrations
  it should list the content_migrations for the course
- pick id for a content_migration and fetch
  /api/v1/course/<course_id>/content_migrations/<content_migration_id>
  you should be able to see `audit_info` section
- add a teacher to the course
- login as the teacher, and fetch
  /api/v1/course/<course_id>/content_migrations/<content_migration_id>
  the teacher should NOT see `audit_info` section
- as the same teacher, fetch
  /api/v1/course/<course_id>/content_migrations/<content_migration_id>?include[]=audit_info
  the teacher can see `audit_info` section

Change-Id: I1086eb92986bb9788d643123014c73556c1540d4
Reviewed-on: https://gerrit.instructure.com/157024
Tested-by: Jenkins
Reviewed-by: Dan Minkevitch <dan@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: John Corrigan <jcorrigan@instructure.com>
2018-07-11 22:44:34 +00:00
Luke Kingsley bea986b5e1 spec: Add discussion pact test
Added a test to hit the delete endpoint

Test Plan:
1. Pass Jenkins

Change-Id: Ib39bdc7abcb94f00ec2bfb17d71c43d4e1e3d341
Reviewed-on: https://gerrit.instructure.com/156932
Tested-by: Jenkins
Reviewed-by: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Luke Kingsley <lkingsley@instructure.com>
QA-Review: Luke Kingsley <lkingsley@instructure.com>
2018-07-11 21:41:06 +00:00
Luke Kingsley c65c24427b spec: add wiki post test
Test Plan:
1. Pass Jenkins

Change-Id: I0a6e39d595cc3d863424eb0a2846b6fd50993253
Reviewed-on: https://gerrit.instructure.com/156842
Tested-by: Jenkins
Reviewed-by: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Luke Kingsley <lkingsley@instructure.com>
QA-Review: Luke Kingsley <lkingsley@instructure.com>
2018-07-11 21:40:46 +00:00
Deepeeca Soundarrajan 837630ab2f Change the pact provider version
Test Plan:
  --Passes Jenkins

Change-Id: Ic5619f40a3691f85db9beae6d7a24276da919c85
Reviewed-on: https://gerrit.instructure.com/157019
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-07-11 21:24:48 +00:00
Michael Guymon c7a0ba68d6 Add Delayed Job homework submission for url uploads.
Add a Delayed Job Worker that reuses the
Services::SubmitHomeworkService to submit the url uploads after
copying the url from the source. Sends an email for success or failure
of the job. This will be used when InstFS is not enabled.

Based on work from GOOF-435 for the InstFS to support reliable
url uploads.

fixes: GOOF-461, GOOF-462

Test Plan:

* Disable InstFS
* Submit an assignment from Google/Office
* Get an alert with info about submission
* Job enqueued to process the upload.
* When job finishes, the assignment will be submitted.

Change-Id: I63d0f5f9b5dd01cc53bcfffe6f8d952cd6e2c078
Reviewed-on: https://gerrit.instructure.com/155104
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Josh Orr <jgorr@instructure.com>
Tested-by: Jenkins
QA-Review: Tyler Belnap <tyler@instructure.com>
Product-Review: Jesse Poulos <jpoulos@instructure.com>
2018-07-11 20:59:40 +00:00
Jon Willesen c874f2060f make DueDateCalendarPicker use unique ids
fixes ADMIN-1220, ADMIN-1221

test plan:
- multiple due date fields should not affect each other (see ticket)

Change-Id: If429a5373add6b4c21ac341dcea0c1f4b585de0f
Reviewed-on: https://gerrit.instructure.com/156814
Reviewed-by: Carl Kibler <ckibler@instructure.com>
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Jon Willesen <jonw+gerrit@instructure.com>
2018-07-11 20:45:40 +00:00
Jon Willesen feec619c1c add dir="ltr" to document for canvas-planner specs
gets rid of warnings from instui

refs ADMIN-798

test plan:
- specs pass without these warnings

Change-Id: I8e04feacf517f6a392410c76ef2f472b1cb44dbd
Reviewed-on: https://gerrit.instructure.com/156668
Tested-by: Jenkins
Reviewed-by: Carl Kibler <ckibler@instructure.com>
Product-Review: Jon Willesen <jonw+gerrit@instructure.com>
QA-Review: Jon Willesen <jonw+gerrit@instructure.com>
2018-07-11 20:32:52 +00:00
Jon Willesen f46f20090e fix translation warnings in canvas-planner tests
refs ADMIN-798

test plan:
- specs pass without translation warnings

Change-Id: Ib68e6010488578c0f1f1c17c4d70395440c3664c
Reviewed-on: https://gerrit.instructure.com/156651
Tested-by: Jenkins
Reviewed-by: Carl Kibler <ckibler@instructure.com>
QA-Review: Carl Kibler <ckibler@instructure.com>
Product-Review: Jon Willesen <jonw+gerrit@instructure.com>
2018-07-11 20:32:05 +00:00
Jacob Fugal 0170cbcb10 include attachment json in file capture response
fixes RECNVS-520

Change-Id: I08457160538ff71b7a4be6804ddb2957f0f22abe
test-plan: specs
Reviewed-on: https://gerrit.instructure.com/156938
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
Tested-by: Jacob Fugal <jacob@instructure.com>
2018-07-11 20:28:41 +00:00
Adrian Packel d021972901 Disallow invalid values in provisional grades
Insist that provisional grades must have a valid non-empty score to be
saved, just as non-provisional grades must. Similarly, ensure that an
existing valid provisional grade cannot be replaced with an empty value.
(In both cases the grade should silently revert back to its previous
value, or nothing if no grade was previously entered.)

fixes GRADE-1279

Test plan:

(Note that, while entering invalid grades, you may see an "Oops! The
last request didn't work out" flash error message; this is because we're
actually handling bad values on the back-end as errors now instead of
silently reverting them. The messages will only appear in development
and otherwise shouldn't affect anything.)

* Set up a moderated assignment
* Open it in SG as a provisional grader
  * Before issuing a real grade, try to enter some invalid values, like
    "asdf" or "EX" (invalid because a provisional grader cannot excuse)
    * The grade field should revert to its previous (empty) value
    * Check that a provisional grade object has *not* been created as a
      result of the invalid values (you can do so using the Rails
      console or by opening the assignment in SG as a moderator and
      checking the grades in the provisional grade selector)
  * As the same grader, make sure you can enter a valid grade
    * If you have entered a valid grade at least once, entering an
      invalid grade should revert to the last valid value
* Open the assignment in SG as a moderator
  * Check that you can excuse the assignment by grading as "EX"
  * Check for the following behavior with respect to the provisional
    grade selector:
    * If you enter an invalid value, the grade field should revert to
      the previously-selected value, whether it was your own grade
      ("Custom") or a provisional grade from someone else
    * Similarly, an invalid value should not change the selection of
      the provisional grade selector
    * Trying to enter a valid value should work as before, and select
      the "Custom" radio button if not already selected
* Finally, Create a non-moderated assignment, open it in SG, and check
  that it handles valid/invalid grades properly as before

Change-Id: I33fd9450ebea4f1f2d1cae2dd0a4c0c70d6e65c8
Reviewed-on: https://gerrit.instructure.com/156351
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-07-11 19:22:10 +00:00
Augusto Callejas dd867b5c6d Allow excluding users with no results
closes OUT-1859

test plan:
  - in a course, create about 10 outcomes and 10 student users
  - create an assignment, aligned to an outcome
  - submit to the assignment with two student users
  - assess the rubrics for each submission in speed grader
  - load LMGB, confirm that all students and outcomes appear,
    with the results of the two students
  - using a tool like Postman, perform an API call with an
    access to the following endpoint:

    http://canvas.docker/api/v1/courses/<course id>/outcome_rollups

  - confirm that a rollup appears for each student, and only scores
    appear for students whose assignments were assessed
  - append "?exclude[]=missing_user_rollups" to the request above
    and resubmit
  - confirm that only rollups with scores appears (should be two)
  - append "&include[]=outcomes" to the request above and resubmit
  - confirm that under the "linked" section, that "outcomes" contains
    all outcomes in the course

Change-Id: I399715093943455659ed5a05c39befca8dc2e801
Reviewed-on: https://gerrit.instructure.com/156247
QA-Review: Dariusz Dzien <ddzien@instructure.com>
Tested-by: Jenkins
Reviewed-by: Neil Gupta <ngupta@instructure.com>
Reviewed-by: Frank Murphy <fmurphy@instructure.com>
Product-Review: Michael Brewer-Davis <mbd@instructure.com>
2018-07-11 19:20:58 +00:00
Cody Cutrer 63d08a7784 spec: fix expectations on nil
Change-Id: I621bab000dbef356bcb1d73461ffd643fc0dc752
Reviewed-on: https://gerrit.instructure.com/156727
Tested-by: Jenkins
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2018-07-11 15:24:27 +00:00
Transifreq 84e00c918f update cy translation
Change-Id: I626f52dea28c9b3446a9013bd337dc985ee67f37
2018-07-11 05:11:11 -06:00
Frank Murphy 3b937041fc Fix jest deprecation warning.
Test Plan:
- With freshly installed npm modules,
- Verify "testResultsProcessor support is deprecated" is no longer
  displayed when running jest tests locally.
- Open the jenkins job from this PS.
- Go to the test report > (root)
- Verify "Free-form Rubric with a custom criterion by default renders
  the root component as expected" is present in the report

Change-Id: I921138e2a9a1025a3ed665693a6223819bf76392
Reviewed-on: https://gerrit.instructure.com/156778
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
Product-Review: Neil Gupta <ngupta@instructure.com>
QA-Review: Neil Gupta <ngupta@instructure.com>
2018-07-10 22:06:00 +00:00
Gary Mei 5a3437c251 fix semicolons as delimiters in gradebook importer
fixes GRADE-1324

Test Plan
 - Have DelayedJobs running.
 - Create a course with one teacher and at least one student.
 - Create an assignment for that course.
 - Go to the User settings of the teacher and turn on the option to
   use semicolons in Gradebook Export.
 - Go to the Gradebook as the teacher and export the Gradebook.
 - Open the csv file and change the grade a bit.
 - Verify that the csv did indeed use semicolons rather than commas.
 - Import that csv file back into the Gradebook.
 - Verify that the import worked successfully.
 - Turn off the option for using semicolons and instead use commas.
 - Verify that export/import works with commas using the same above
   steps.

Change-Id: I42870aeb3ff4064f3db39ed1b67681e2acc4ed8e
Reviewed-on: https://gerrit.instructure.com/156648
Tested-by: Jenkins
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
QA-Review: Adrian Packel <apackel@instructure.com>
Product-Review: Sidharth Oberoi <soberoi@instructure.com>
2018-07-10 21:13:27 +00:00
Jeff Belser 47de94a783 remove beta tag from Q.N easy button
fixes QUIZ-4877

Test Plan
  1. Navigate to the assignment index page for a course
  2. Ensure the Quizzes Next easy button no longer has the beta
     tag shown

Change-Id: I2841c3cdf264707d56496140715136b75a8e99bd
Reviewed-on: https://gerrit.instructure.com/156101
Reviewed-by: Aaron Griffin <agriffin@instructure.com>
Tested-by: Jenkins
QA-Review: David Tan <dtan@instructure.com>
Product-Review: Kevin Dougherty <jdougherty@instructure.com>
2018-07-10 20:34:30 +00:00
Augusto Callejas c47fb7a26f Exclude outcome results from muted asgmts/quizzes
closes OUT-2304

performance:
Indices are used throughout the scoped query.

Shard.current.id => 1773

base query:
LearningOutcomeResult.active.where(context_code:'course_1079845',user_id:3306819,learning_outcome_id:1397026)

without scope:
----------------------------------------------------------------------------------------------------------------------------------
 Nested Loop  (cost=4.86..8.20 rows=1 width=268)
   ->  Bitmap Heap Scan on learning_outcome_results  (cost=4.42..5.54 rows=1 width=268)
         Recheck Cond: ((user_id = 3306819) AND (learning_outcome_id = 1397026))
         Filter: ((context_code)::text = 'course_1079845'::text)
         ->  BitmapAnd  (cost=4.42..4.42 rows=1 width=0)
               ->  Bitmap Index Scan on index_learning_outcome_results_association  (cost=0.00..1.73 rows=27 width=0)
                     Index Cond: (user_id = 3306819)
               ->  Bitmap Index Scan on index_learning_outcome_results_on_learning_outcome_id  (cost=0.00..2.44 rows=123 width=0)
                     Index Cond: (learning_outcome_id = 1397026)
   ->  Index Scan using content_tags_pkey on content_tags  (cost=0.43..2.66 rows=1 width=8)
         Index Cond: (id = learning_outcome_results.content_tag_id)
         Filter: ((workflow_state)::text <> 'deleted'::text)

with scope (`exclude_muted_associations`):
----------------------------------------------------------------------------------------------------------------------------------------------------------
 Nested Loop Left Join  (cost=6.99..20.54 rows=1 width=268)
   Join Filter: ((learning_outcome_results.association_type)::text = 'Assignment'::text)
   Filter: (((ra.muted IS NULL) AND (qa.muted IS NULL) AND (sa.muted IS NULL)) OR (ra.muted IS FALSE) OR (qa.muted IS FALSE) OR (sa.muted IS FALSE))
   ->  Nested Loop Left Join  (cost=6.56..17.88 rows=1 width=270)
         ->  Nested Loop Left Join  (cost=6.13..15.72 rows=1 width=277)
               Join Filter: ((learning_outcome_results.association_type)::text = 'Quizzes::Quiz'::text)
               ->  Nested Loop Left Join  (cost=5.71..13.06 rows=1 width=269)
                     Join Filter: (((rassoc.association_type)::text = 'Assignment'::text) AND ((rassoc.purpose)::text = 'grading'::text))
                     ->  Nested Loop Left Join  (cost=5.28..10.85 rows=1 width=293)
                           Join Filter: ((learning_outcome_results.association_type)::text = 'RubricAssociation'::text)
                           ->  Nested Loop  (cost=4.86..8.20 rows=1 width=268)
                                 ->  Bitmap Heap Scan on learning_outcome_results  (cost=4.42..5.54 rows=1 width=268)
                                       Recheck Cond: ((user_id = 3306819) AND (learning_outcome_id = 1397026))
                                       Filter: ((context_code)::text = 'course_1079845'::text)
                                       ->  BitmapAnd  (cost=4.42..4.42 rows=1 width=0)
                                             ->  Bitmap Index Scan on index_learning_outcome_results_association  (cost=0.00..1.73 rows=27 width=0)
                                                   Index Cond: (user_id = 3306819)
                                             ->  Bitmap Index Scan on index_learning_outcome_results_on_learning_outcome_id  (cost=0.00..2.44 rows=123 width=0)
                                                   Index Cond: (learning_outcome_id = 1397026)
                                 ->  Index Scan using content_tags_pkey on content_tags  (cost=0.43..2.66 rows=1 width=8)
                                       Index Cond: (id = learning_outcome_results.content_tag_id)
                                       Filter: ((workflow_state)::text <> 'deleted'::text)
                           ->  Index Scan using rubric_associations_pkey on rubric_associations rassoc  (cost=0.42..2.64 rows=1 width=33)
                                 Index Cond: (id = learning_outcome_results.association_id)
                     ->  Index Scan using assignments_pkey on assignments ra  (cost=0.43..2.19 rows=1 width=9)
                           Index Cond: (id = rassoc.association_id)
               ->  Index Scan using quizzes_pkey on quizzes  (cost=0.43..2.65 rows=1 width=16)
                     Index Cond: (id = learning_outcome_results.association_id)
         ->  Index Scan using assignments_pkey on assignments qa  (cost=0.43..2.15 rows=1 width=9)
               Index Cond: (id = quizzes.assignment_id)
   ->  Index Scan using assignments_pkey on assignments sa  (cost=0.43..2.65 rows=1 width=9)
         Index Cond: (id = learning_outcome_results.association_id)

test plan:
  - create two course-level outcomes
  - create an assignment with a single question, and align the 1st outcome via a rubric
  - create a quiz bank with a single auto-gradeable question (e.g. true/false), and
    align the 2nd outcome to it
  - create a quiz that pulls the single question from the quiz bank above
  - as a student, submit to the assignment and the quiz
  - as a teacher, assess the assignment, providing a score to the rubric
  - as a teacher, confirm:
    * both outcomes have results in the LMGB
    * both outcomes have results in the sLMGB
  - as a student, confirm:
    * both outcomes have results in the sLMGB
  - as a teacher, mute the assignment in the gradebook:
    https://community.canvaslms.com/docs/DOC-12961-4152724339
  - as a teacher, confirm:
    * both outcomes have results in the LMGB
    * both outcomes have results in the sLMGB
  - as a student, confirm:
    * only the outcome associated with the quiz bank has results in the sLMGB
  - as a teacher, mute the quiz in the gradebook
  - as a teacher, confirm:
    * both outcomes have results in the LMGB
    * both outcomes have results in the sLMGB
  - as a student, confirm:
    * no outcomes should have results in the sLMGB
  - as a teacher, unmute the assignment in the gradebook
  - as a teacher, confirm:
    * both outcomes have results in the LMGB
    * both outcomes have results in the sLMGB
  - as a student, confirm:
    * only the outcome associated with the assignment has results in the sLMGB

Change-Id: I0ea05eedd29383501cc9306bcedcfa67aee4cd67
Reviewed-on: https://gerrit.instructure.com/155210
Tested-by: Jenkins
Reviewed-by: Neil Gupta <ngupta@instructure.com>
Product-Review: Neil Gupta <ngupta@instructure.com>
QA-Review: Neil Gupta <ngupta@instructure.com>
2018-07-10 20:18:30 +00:00
Jeremy Neander b17ef3ae7f spec: create clean spec tools
This adds optional detection and "safe" handling for:
* unmanaged async behavior
* unmanaged event listeners

Change-Id: I326265619869eebfafdb4a024b4b7773e2caefb9
Reviewed-on: https://gerrit.instructure.com/155882
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
Product-Review: Jeremy Neander <jneander@instructure.com>
QA-Review: Jeremy Neander <jneander@instructure.com>
2018-07-10 20:16:10 +00:00
Luke Kingsley 9b3f78b563 spec: Add discussion spec
Test Plan
1. Pass Jenkins

Change-Id: Idac4ee9f19ca639e8d7316d19132a078a944e1ce
Reviewed-on: https://gerrit.instructure.com/156796
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-07-10 20:13:50 +00:00
Luke Kingsley bbaa102b5f spec: Add authorization test
Test Plan:
1. Pass Jenkins

Change-Id: I0b5c39d6e36fbe52b87f7d0d45178362f7b73ee9
Reviewed-on: https://gerrit.instructure.com/156407
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-07-10 20:13:42 +00:00
Luke Kingsley 67c9d639a7 spec: add comments to base state
Test Plan
1. Pass Jenkins

Change-Id: I6c430220d9fd2e36c791df794a33920def2ca970
Reviewed-on: https://gerrit.instructure.com/156415
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-07-10 20:13:35 +00:00
Anju Reddy 2594e6f3d5 spec: add specs for provisional grader comment visibility
Change-Id: I17f5ee25943310997c3450185d9c9c411349f02c
Reviewed-on: https://gerrit.instructure.com/156686
Tested-by: Jenkins
Reviewed-by: James Butters <jbutters@instructure.com>
Product-Review: Anju Reddy <areddy@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
2018-07-10 20:12:56 +00:00
Nick Houle 8cdf400ba7 Implement Inst-fs capture callback for url uploads.
Adds an alert when the student submits stating that the upload is
processing and an email will be sent.

THe FilesController#api_capture called by InstFS, when the upload
processing is finished, uses Services::SubmitHomeworkService#submit
to submit the assignment.

Update the JS to prevent the browser from submitting the url upload
assignment twice. Passes the submit_assignment parameter to provide
backwards compatibilty, so the old JS can still double submit.

fixes: GOOF-449, GOOF-450, GOOF-435

Test Plan:
* Submit a file from the Google Drive, will see a pop up.
* Check the xhr for the request, the submit_assignment param will be true
* InstFS callback will cause the assignment to be submitted.

Change-Id: I5f49b8ef642fe5913bf0c2f282de8d697dcf1ce1
Reviewed-on: https://gerrit.instructure.com/154757
Reviewed-by: Nick Houle <nhoule@instructure.com>
QA-Review: Tyler Belnap <tyler@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Jesse Poulos <jpoulos@instructure.com>
Tested-by: Jenkins
Reviewed-by: Josh Orr <jgorr@instructure.com>
2018-07-10 19:56:27 +00:00
Ryan Shaw add1bc93e6 Add an <h1> to Canvas' Forgot Password page
…like how the login page has: https://cl.ly/0g3R1g0S2u3v

Fixes: CORE-1535

Test plan: 
Go to the forgot password page using a screenreader,
It should have an h1 that says “Forgot password?”

Change-Id: I5c7bc409a91d8dd462d71fd75d9550825e08de98
Reviewed-on: https://gerrit.instructure.com/156472
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Rohan Cheeniyil <rcheeniyil@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2018-07-10 19:07:46 +00:00
Ryan Shaw 6774f9f22c Upgrade tinymce to latest (4.7.13)
closes: CORE-1620

while I was upgrading all the package.json dependencies I noticed that
that the version of tinyMCE we are using is out-of-date

test plan:
* automated tests that deal with tinyMCE should pass
* smoke test the editor to make sure it looks/works the same as before

Change-Id: Ia7913f195d0a61aee2ac770ebcbf303ffad794fa
Reviewed-on: https://gerrit.instructure.com/156310
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Tucker McKnight <tmcknight@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2018-07-10 19:06:58 +00:00
Ryan Shaw eafeccdae4 canvas-rce: fix maxHeight on links accordions
Fixes: CORE-1581

Test plan:
* Create a page in a Canvas course that has 20 plus pages assignments 
  quizzes etc
* Edit the page and head to the Links area in the sidebar.
* make sure that as you expand each of those sections, that it does not
  grow beyond 20em high and that you can scroll down to the bottom of
  all the items in the list.

Change-Id: Ibbaa2e52b29c5d3244d412fcfa91593c153c6305
Reviewed-on: https://gerrit.instructure.com/155657
Tested-by: Jenkins
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Rohan Cheeniyil <rcheeniyil@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2018-07-10 19:06:24 +00:00
Luke Kingsley 49cf468a73 spec: Refactor wiki page spec
Test Plan:
1. Pass Jenkins

Change-Id: I3f87bb6e429bf244ecdf8d4dabe7edd6367d8fb7
Reviewed-on: https://gerrit.instructure.com/156655
Tested-by: Jenkins
Reviewed-by: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Luke Kingsley <lkingsley@instructure.com>
QA-Review: Luke Kingsley <lkingsley@instructure.com>
2018-07-10 18:00:12 +00:00
Ryan Kuang 6e2d127d8d Add custom columns to gradebook imports/exports
When exporting a gradebook,
the csv should include custom columns listed at the final columns.

fixes GRADE-1275

Test Plan (Exporting)
 -Create a course
 -Use the public api to add custom columns, 1 read only and 2 writable
  (POST /api/v1/courses/:course_id/custom_gradebook_columns)
 -Use the public api to add data into those custom columns
  (PUT /api/v1/courses/:course_id/custom_gradebook_columns/:id/data/:user_id)
 -Navigate to the gradebook for the course and inspect the columns
 -Export to csv
 -Check if the csv has the proper columns as the gradebook, the read only column
  should not have changed, while the writable columns should display the changes

Test Plan (Importing)
 -Follow the steps above to export to csv
 -Change any data in an assignment column
 -Make sure the column changed is not (read only)
 -Save the csv and upload into gradebook
 -Check if the assignment changes appear in the gradebook

Change-Id: I36a7d53af7b86ffcb6cdfbc4f78effcb0df9a3fe
Reviewed-on: https://gerrit.instructure.com/155027
Tested-by: Jenkins
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
Reviewed-by: Derek Bender <djbender@instructure.com>
QA-Review: Keith T. Garner <kgarner@instructure.com>
Product-Review: Matt Goodwin <mattg@instructure.com>
2018-07-10 17:36:50 +00:00
Jon Willesen aa20f2bdd1 remove applicationElement from planner tests
refs ADMIN-798

test plan:
- specs pass without these warnings

Change-Id: Id4e90a876f8b7ce7568188f35e63a73c0a11b8a4
Reviewed-on: https://gerrit.instructure.com/156662
Tested-by: Jenkins
Reviewed-by: Dan Minkevitch <dan@instructure.com>
QA-Review: Dan Minkevitch <dan@instructure.com>
Product-Review: Jon Willesen <jonw+gerrit@instructure.com>
2018-07-10 17:11:05 +00:00
Landon Gilbert-Bland 5e96fbd245 Fix permission cornerstone when few permissions selected
Test Plan:
  * Compile css
  * Go to new permissions page
  * Filter down to 1 role
  * Make sure the 'permissions' cornerstone doesn't expand to take up
    more of the page

Change-Id: I065bd36220c20408895a2dbf65872acc7eea0e28
Reviewed-on: https://gerrit.instructure.com/156735
Reviewed-by: Steven Burnett <sburnett@instructure.com>
Product-Review: Steven Burnett <sburnett@instructure.com>
QA-Review: Steven Burnett <sburnett@instructure.com>
Tested-by: Jenkins
2018-07-10 16:56:35 +00:00
Luke Kingsley 98ac0f8563 spec: refactor discussion spec
Test Plan:
1. Pass Jenkins

Change-Id: Ie6b3703f1fff0b6a0da7ac0b3b8885a1395687e8
Reviewed-on: https://gerrit.instructure.com/156731
Tested-by: Jenkins
Reviewed-by: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Luke Kingsley <lkingsley@instructure.com>
QA-Review: Luke Kingsley <lkingsley@instructure.com>
2018-07-10 16:47:23 +00:00
Carl Kibler 3854bad871 make lock icon on blueprint page colorful
fixes ADMIN-1149

test plan:
  - as admin of a blueprint course, go to its Announcements index  page
  - create announcement if needed
  - on use Lock/Unlock button on announcement row. icon should have a
    color when Locked and be grey when unlocked

Change-Id: Ie4b854560504d6e8911e8bd0c5c1ed232e4481b8
Reviewed-on: https://gerrit.instructure.com/156658
Tested-by: Jenkins
Reviewed-by: Dan Minkevitch <dan@instructure.com>
QA-Review: Luke Kingsley <lkingsley@instructure.com>
Product-Review: Carl Kibler <ckibler@instructure.com>
2018-07-10 16:45:49 +00:00
Spencer Olson c5ee434ff5 make anonymous grading checks consider muted status
Unmuting an anonymous assignment will now cause that assignment to show
in the UI as though it is not anonymous. In addition, posting grades for
a moderated anonymous assignment will now cause that assignment to show
in the UI as though it is not anonymous.

closes GRADE-1310
closes GRADE-1313

Test Plan:
1. Verify unmuting an anonymous assignment causes that assignment to no
   longer be anonymized in the UI. You can do this by spot checking
   gradebook (old/new/individual) and SpeedGrader. In addition,
   re-muting an unmuted anonymous assignment should cause the assignment
   to become anonymized in the UI.
2. Verify posting grades for a moderated, anonymous assignment causes
   that assignment to no longer be anonymized in the UI (even if the
   assignment is muted).

Change-Id: I113c61b4e7fa0eb8909448d8ba7cffb22600e17c
Reviewed-on: https://gerrit.instructure.com/156151
Reviewed-by: Gary Mei <gmei@instructure.com>
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
QA-Review: James Butters <jbutters@instructure.com>
Tested-by: Jenkins
Product-Review: Sidharth Oberoi <soberoi@instructure.com>
2018-07-10 16:24:26 +00:00
August Thornton a1eb8725bd spec: allow dev key to save with associated scopes
refs PLAT-3540
closes PLAT-3597

test plan:
 - test passes

Change-Id: Id6bef2b3475f768ba8d3545d7ec9f64c9e3e5f5e
Reviewed-on: https://gerrit.instructure.com/156719
Tested-by: Jenkins
Reviewed-by: Andrew Butterfield <abutterfield@instructure.com>
QA-Review: Andrew Butterfield <abutterfield@instructure.com>
Product-Review: August Thornton <august@instructure.com>
2018-07-10 16:22:44 +00:00
Jeremy Neander 1e979284ba spec: remove some spec pollution
Change-Id: I0a7f87a54203e7c119a4f615f29526e71baf4b25
Reviewed-on: https://gerrit.instructure.com/156718
Tested-by: Jenkins
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Adrian Packel <apackel@instructure.com>
Product-Review: Jeremy Neander <jneander@instructure.com>
QA-Review: Jeremy Neander <jneander@instructure.com>
2018-07-10 15:40:48 +00:00
Steven Burnett a691172945 not show peer review banner for inactive students
fixes COMMS-1272

Test Plan:
- create a course with a couple users
- create a graded discussion that is a peer review
- have a student1 (the one you are going to mark in active)
  submit to that discussion (simply just comment on the discussion)
- assign that student1 to another student2 as a peer review
- go to that discussion page as student2
- notice there is a peer review banner
- inactivate student1 from the course
- go back to the discussion as student2
- notice banner is gone

Change-Id: Ic048b840b160b63887425deb49236273cac466f8
Reviewed-on: https://gerrit.instructure.com/156504
Tested-by: Jenkins
Reviewed-by: James Williams  <jamesw@instructure.com>
QA-Review: Sara Chadwick <schadwick@instructure.com>
Product-Review: Steven Burnett <sburnett@instructure.com>
2018-07-10 15:32:15 +00:00
Han Yan 753c155b67 fix a potential race condition bug for Q.N importing
closes QUIZ-4898

test plan:
- a regression run on old Canvas CC/Qti imports
- try to import a Q.N import (without running Q.N) in Canvas
- from rails console, workflow_state should be `imported` for the migration
- from Canvas Api, we should be able to see values for the following key
    audit_info/migration_settings/imported_assets/lti_assignment_quiz_set

Change-Id: Ib4c13e59023578431afa502a3590bbc5e081eaf1
Reviewed-on: https://gerrit.instructure.com/156348
Reviewed-by: Steve Kacsmark <skacsmark@instructure.com>
Tested-by: Jenkins
QA-Review: David Tan <dtan@instructure.com>
Product-Review: Kevin Dougherty <jdougherty@instructure.com>
2018-07-10 15:23:37 +00:00
Cody Cutrer d28dae33ac bullet tweaks
* disable counter cache detection (we don't use it everywhere, because it can
   be a db resource drain)
 * mark objects created via spec factories that bypass AR as newly-created,
   and thus not needing to have associations preloaded on them

Change-Id: Ifc39c87df753fb28f8b094d77a5afe4f90fe8809
Reviewed-on: https://gerrit.instructure.com/156646
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2018-07-10 15:16:55 +00:00
Cody Cutrer 582421d92b integrate onceler with bullet
copy state over from before(:once) to examples, so that objects
created in the before(:once) don't get tagged as needing to have
been preloaded

Change-Id: I3a2f4fe1b7359f62f55d61a664e6bdcc1499862e
Reviewed-on: https://gerrit.instructure.com/156632
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-07-10 15:16:44 +00:00
Cody Cutrer 2971894311 rails 5.2: several Arel.sqls in AR::Base extensions
Change-Id: Ie8b4ba279376b0f9cf25f1e473bd29c3094a4137
Reviewed-on: https://gerrit.instructure.com/156641
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-07-10 15:16:34 +00:00
Matt Sessions 9c21d4bbc6 Fix duplicate alert issue
Refs MBL-10819

Test Plan:
 - Have a student observer pair setup where the
   observer has an assignment_missing threshold
   setup along with several other thresholds.
 - Create an assignment that will be due in the next
   minute or two
 - Wait for the periodic job to run (max 5 minutes)
 - Check the alerts for that student
 - There should only be one assignment missing alert

Change-Id: I561bf64e49457af87103ebc0ad38b35799caade5
Reviewed-on: https://gerrit.instructure.com/156401
Tested-by: Jenkins
Reviewed-by: Nate Armstrong <narmstrong@instructure.com>
Product-Review: Nate Armstrong <narmstrong@instructure.com>
QA-Review: Nate Armstrong <narmstrong@instructure.com>
2018-07-10 15:12:04 +00:00
Sara Chadwick 91ee9a7d2e Fix HTML in student notification for announcement
Fixes COMMS-957

Test plan:
- Start with a published course with a user enrolled with an active
   communication channel and announcement notifications set to
   ASAP
- Create and announcement with tables, text colors, background colors,
   and underlined stuff
- Go to /users/:userid/messages and click on the HTML tab for the message
  you just sent
- Make sure the html elements specified above are visible

Change-Id: I2b77751d3d4c380653ca224fcc03c3259554908d
Reviewed-on: https://gerrit.instructure.com/156670
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
QA-Review: Landon Gilbert-Bland <lbland@instructure.com>
Product-Review: Sara Chadwick <schadwick@instructure.com>
2018-07-10 15:06:33 +00:00