Commit Graph

13344 Commits

Author SHA1 Message Date
Simon Williams 531dd972df spec: fix flaky new user search spec
when the result comes back empty, we can't wait for a change in the
data-automation='users list' element because it might already be gone.

test plan: specs should pass

Change-Id: I4460e0f5a833b4b3ff15ab6870ba27b36d36220d
Reviewed-on: https://gerrit.instructure.com/138807
Reviewed-by: Jeremy Putnam <jeremyp@instructure.com>
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
2018-01-23 19:34:30 +00:00
Rob Orton bdf0345b8e add group_category_id to group importer
fixes CORE-655

test plan
 - should be able to set group_category_id in
   groups importer
 - rake doc:api should work

Change-Id: I183143c319cdb5aa0f79ff2923c76b6fbec4d598
Reviewed-on: https://gerrit.instructure.com/137886
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Tested-by: Jenkins
Product-Review: Rob Orton <rob@instructure.com>
2018-01-23 19:21:33 +00:00
Rob Orton c0aa33d989 add group_category importer
fixes CORE-654

test plan
 - rake doc:api
 - sis docs should generate
 - group category importer should work

Change-Id: I015692ae5795f1dec5da291fe84330185bd7b3c7
Reviewed-on: https://gerrit.instructure.com/137878
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
QA-Review: Tucker McKnight <tmcknight@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2018-01-23 19:21:27 +00:00
James Williams 33c7ecc1ab create new users on account's shard
closes #CORE-901

Change-Id: I3bc1ac9bd4a99feb317bc2033874b41c3fd7f126
Reviewed-on: https://gerrit.instructure.com/138758
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2018-01-23 17:57:55 +00:00
Cody Cutrer c3bbcdebde be more efficient with consul
fetch the entire tree at once, stuff it all in the cache, and
then only read from the cache (don't read for real, since we want
negative cache effects as well)

Change-Id: I18bfca57dcbeb0c1bbfdc90d210ac8de9290d434
Reviewed-on: https://gerrit.instructure.com/138754
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
Reviewed-by: Tyler Pickett <tpickett@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2018-01-23 17:55:33 +00:00
Indira Pai bc0acf2ac3 Spec: Add Spec for Letter Grade
refs: GRADE-61

Test Plan:
 --- Passes Jenkins

Change-Id: I178774d5e0a68f09926ee6c5c2c20e2459986148
Reviewed-on: https://gerrit.instructure.com/138707
Tested-by: Jenkins
Reviewed-by: Anju Reddy <areddy@instructure.com>
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Product-Review: Indira Pai <ipai@instructure.com>
QA-Review: Indira Pai <ipai@instructure.com>
2018-01-23 17:11:09 +00:00
Spencer Olson 09a6cd78ea prevent creation of gpa scale assignments in the ui
Prevents users from creating GPA Scale assignments via the UI (they
can still be created via the API; that will be handled in another
ticket). Also, adds a deprecation warning to the API for the gpa_scale
type.

closes GRADE-32

Test Plan:
* Before checking out this commit, create a GPA Scale Assignment
  (Assignment 1) and a non-GPA Scale Assignment (Assignment 2).

1. Verify you cannot create a new assignment with 'GPA Scale' type.
   The 'GPA Scale' option should not be available in the 'Display
   Grade as' dropdown (you can try creating the assignment either via
   the 'quick creation' modal or the 'normal' new assignment page).
2. Edit Assignment 1 and verify 'GPA Scale' is still an option in the
   'Display Grade as' dropdown. Verify you can save the assignment with
   'GPA Scale' type, or with any other type.
3. Edit Assignment 2 and verify 'GPA Scale' is not an option in the
   'Display Grade as' dropdown. Verify you can save the assignment.

Change-Id: Iaebd2fabac1f95fa59627dcf6a618625276c813b
Reviewed-on: https://gerrit.instructure.com/137221
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Reviewed-by: Shahbaz Javeed <sjaveed@instructure.com>
Tested-by: Jenkins
QA-Review: Jeremy Neander <jneander@instructure.com>
Product-Review: Matt Goodwin <mattg@instructure.com>
2018-01-23 16:39:49 +00:00
Felix Milea-Ciobanu 40d01b4981 fix deleting appointment group with appointments error
fixes COMMS-666

test plan:
- create an appointment group for a course with at least one student
- as the student, sign up for an appointment in the group
- as the teacher, navigate to the course's appointment groups and
  delete the appointment group we created
- note that there is no error and you are redirected after the delete

Change-Id: Ia7afb1f2acacd73e6e3b1a008ee4e4957fbfe771
Reviewed-on: https://gerrit.instructure.com/138264
Tested-by: Jenkins
Reviewed-by: Landon Gilbert-Bland <lbland@instructure.com>
Reviewed-by: Aaron Kc Hsu <ahsu@instructure.com>
QA-Review: Venk Natarajan <vnatarajan@instructure.com>
Product-Review: Felix Milea-Ciobanu <fmileaciobanu@instructure.com>
2018-01-23 01:05:36 +00:00
Andrew Butterfield 754153b90a Handle turnitin polling more gracefully
fixes PLAT-2954

Test plan:
* Create a TII assignment
* Make a submission
* Ensure that a bunch of delayed job errors are not triggered (they look
  like these https://sentry.insops.net/instructure/canvas/issues/317736/)
* Ensure that you still get an originality report back and that
  everything works as it did.

Change-Id: I27efdfabc45c58db2afc9cbcafbaebede4fd5c14
Reviewed-on: https://gerrit.instructure.com/138532
Reviewed-by: Marc Alan Phillips <mphillips@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Product-Review: Andrew Butterfield <abutterfield@instructure.com>
2018-01-22 23:47:48 +00:00
Venk Natarajan 9ac730b531 Don't send notifications for unstarted courses.
If a published course has not started yet, but we add a student
in the course to a group, we were sending that student a
notification for it.  This prevents that from happening.

Fixes COMMS-372

Test Plan:
* Have two published courses, one that has started, and one that
  starts some time in the future.  Also set it to restrict
  participation to between the start and end dates.
* Have a student with a fully accepted enrollment in each.
* Make sure that student's communication channel is confirmed
  `u.communication_channel.confirm!`
* Make sure this student is set to receive all notifications
  ASAP.
* In each course, create a group set, then a group, and add the
  student to the group.  Make the group names different so you
  can distinguish.
* Still as an admin user, go to users/:student_id/messages.
* You should only see a "new context group" notification message
  for the course that has already started.

Change-Id: I3a3d10f30f8359a71a7a8b781005f298f646bf49
Reviewed-on: https://gerrit.instructure.com/137959
Reviewed-by: Steven Burnett <sburnett@instructure.com>
Reviewed-by: Felix Milea-Ciobanu <fmileaciobanu@instructure.com>
Tested-by: Jenkins
QA-Review: Landon Gilbert-Bland <lbland@instructure.com>
Product-Review: Venk Natarajan <vnatarajan@instructure.com>
2018-01-22 21:33:55 +00:00
Jacob Fugal a91a9fbf59 handle uncommon contexts inst-fs uploads
refs RECNVS-257

test-plan:
* with inst-fs enabled and configured
* attempt to import a content export; import job will fail but upload of
  import file should succeed
* attempt to upload a file to a "File Upload" question in a quiz; should
  succeed

Change-Id: I98174652ae25162cf703560090535acc5f815f02
Reviewed-on: https://gerrit.instructure.com/138538
Tested-by: Jenkins
Reviewed-by: Andrew Huff <ahuff@instructure.com>
QA-Review: Collin Parrish <cparrish@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
2018-01-22 20:55:37 +00:00
James Williams fe0792b7b7 don't reset course_format in sis import without header
test plan:
* create a course through a sis import with
 a `course_format` set
* update the course in another sis import without
 a `course_format` header
* it shouldn't reset the course format to "Not Set"

closes #CORE-883

Change-Id: Idad1eb279344f879b2402409807da1c85c3b91e5
Reviewed-on: https://gerrit.instructure.com/138308
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2018-01-22 20:04:09 +00:00
Matthew Berns d8ef9c366b add aXe testing to conversation views
test plan:
- run the spec files edited in this patch normally with
  yarn run jspec-watch path/to/spec
- tests should all pass as expected
- run the spec files edited in this patch with the new command
  yarn run a11y-report path/to/spec
- you should get aXe errors on existing a11y violations

Change-Id: I4a476c5fb448462419f239741f5886a9a1f3c01d
Reviewed-on: https://gerrit.instructure.com/130951
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
Product-Review: Matt Berns <mberns@instructure.com>
QA-Review: Matt Berns <mberns@instructure.com>
2018-01-22 17:09:26 +00:00
Matthew Berns 4ad7e1375f add aXe testing to conference views
test plan:
- run the spec files edited in this patch normally with
  yarn run jspec-watch path/to/spec
- tests should all pass as expected
- run the spec files edited in this patch with the new command
  yarn run a11y-report path/to/spec
- you should get aXe errors on existing a11y violations

Change-Id: Ic4c0fadd6aa6d51c6fe867ee9e3811d0d2f516d6
Reviewed-on: https://gerrit.instructure.com/130946
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
Product-Review: Matt Berns <mberns@instructure.com>
QA-Review: Matt Berns <mberns@instructure.com>
2018-01-22 17:09:19 +00:00
Steven Burnett f209c801b5 prevent section specific behavior to only courses
fixes COMMS-676

Test Plan:
- Ensure you can add a section specific announcement
  in a course
- Ensure you can NOT add a section specific announcement
  in a group either through the api or through the frontend
- Ensure nothing blows up on the course announcements page or
  groups announcements page.

Change-Id: I2b23c6a50a204776da24f467e2bb45a5c09bd291
Reviewed-on: https://gerrit.instructure.com/138389
Reviewed-by: Felix Milea-Ciobanu <fmileaciobanu@instructure.com>
Reviewed-by: Venk Natarajan <vnatarajan@instructure.com>
Tested-by: Jenkins
QA-Review: Landon Gilbert-Bland <lbland@instructure.com>
Product-Review: Steven Burnett <sburnett@instructure.com>
2018-01-22 17:02:53 +00:00
Matthew Berns 374a5804f5 add aXe testing to content migration views
test plan:
- run the spec files edited in this patch normally with
  yarn run jspec-watch path/to/spec
- tests should all pass as expected
- run the spec files edited in this patch with the new command
  yarn run a11y-report path/to/spec
- you should get aXe errors on existing a11y violations

Change-Id: Ib2c24c44e0288c9ef8dbe8f317958c0b6618c9ce
Reviewed-on: https://gerrit.instructure.com/130950
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
Product-Review: Matt Berns <mberns@instructure.com>
QA-Review: Matt Berns <mberns@instructure.com>
2018-01-22 16:51:30 +00:00
Cameron Matheson 713ccad7b0 graphql: assignment override types
closes RECNVS-27

Test plan:
  * create different types of overrides for assignment(s)
  * make sure you can view the overrides with graphql

Change-Id: I557e1e8b26f8ead6c26bbddb5e09fd5ac425d421
Reviewed-on: https://gerrit.instructure.com/138381
Tested-by: Jenkins
Reviewed-by: Michael Jasper <mjasper@instructure.com>
QA-Review: Collin Parrish <cparrish@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
2018-01-19 22:24:34 +00:00
Marc Alan Phillips d7643ad2dd Return variable name when Expansion is empty
closes PLAT-2015

Test Plan:
 - Setup an lti launch that requests the expansion
   of variables that are listed in the ticket
 - Ensure that the variable expansion being asked is
   set up in such a manor that it returns empty
 - On launch of the lti tool, the variable should
   return the expansion string variable name

Change-Id: Ic96d130548f959ab394334171d7ea8ba7b3f7b1a
Reviewed-on: https://gerrit.instructure.com/138066
Tested-by: Jenkins
Reviewed-by: Nathan Mills <nathanm@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Karl Lloyd <karl@instructure.com>
2018-01-19 21:41:51 +00:00
Marc Alan Phillips e7d23e6a19 Send lti_course_id in assignments lti api payload
closes PLAT-2992

Test Plan
- hit the /api/lti/assignments/:assignment_id endpoint
- note that 'lti_course_id' is present
- in the console, check that
  Lti::Asset.opaque_identifier_for(assignment.context)
  equals the value in the api call

Change-Id: I1231b62bf3d633047c7988ddb3260fa5c7e94372
Reviewed-on: https://gerrit.instructure.com/138325
Tested-by: Jenkins
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Karl Lloyd <karl@instructure.com>
2018-01-19 21:40:16 +00:00
Marc Alan Phillips e30b834dda Allow user_navigation visibility control
Lti tools can now define visibility on the user nav.

closes PLAT-2827

Change-Id: If9cf5441d7c2610f80c7ca18145e915a39737ffc
Reviewed-on: https://gerrit.instructure.com/138133
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
Reviewed-by: Nathan Mills <nathanm@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Product-Review: Karl Lloyd <karl@instructure.com>
2018-01-19 21:40:09 +00:00
Rob Orton cf8f79f4bc partial revert of group_categories scope
a98de63653e05132b7efd0ac5994caa3f88941c5

fixes CORE-887

there are many uses of account.group_categories,
but still no uses of account.all_group_categories

reverting group_categories to default to only
active group_categories

test plan
 - delete a group_category in console
 - is should not show up in the accounts UI

Change-Id: I2dcfa15a4efc9f7fb92dd6f4bbe96b0f6e81602d
Reviewed-on: https://gerrit.instructure.com/138288
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2018-01-19 21:35:49 +00:00
wdransfield 55baba98b9 Set Tool Setting assignment relationship on import/export
Fixes PLAT-2998

Test Plan:
- Create three assignments. Two should be associated with
  plagiarism detection tools (installed in the root account)
  and the third should just be a standard file upload assignment.
- For both assignments that use a plagiarism tool do:
      Create a tool setting that takes the following
      shape:
      {
	resource_link_id: <lti_context_id of the
	assignment>,
	tool_proxy: <The tool associated with the
	assignment>,
	context: <The course of the assignment>,
	custom: <A hash with strings as keys>,
	custom_params: <A hash with strings as keys>
      }
  Note that the `custom` and `custom_params` hashes
  should be different for the two tool settings.

- Verify that both tool settings are able to be fetched using
  this endpoint: "tool_proxy/:tool_proxy_guid/courses/:course_id
    /resource_link_id/<lti_context_id of the assignment>/tool_setting"
  This endpoint will require a JWT access token.
- Do a course copy
- Verify that two new tool setting were created.
- Verify the resource link ids match the corresponding
  copies of the assignments.
- Verify the `custom` and `custom_parameters` hashes
  were copied to the correct new tool settings.
- Verify the tool proxy of the new tool settings point
  to the original tool.
- Verify the the context of the new tool settings is
  the new course.
- Verify that both _new_ tool settings are able to be fetched using
  this endpoint: "tool_proxy/:tool_proxy_guid/courses/:course_id
    /resource_link_id/<lti_context_id of the new assignment>/tool_setting"
- Verify the copying the plain file upload assignment also succeeded as
  normal.
- Edit the new assignments and verify the correct tool launches.

Change-Id: Iaf92fc23c0373585039cc2debf9657d10989c4ec
Reviewed-on: https://gerrit.instructure.com/138218
Reviewed-by: Andrew Butterfield <abutterfield@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
2018-01-19 21:05:21 +00:00
Anju Reddy 528c571286 spec: flaky spec; database query did not guarantee ordering
Change-Id: Iec1f8fddecb11f2b071ac5697bfd0d461d05860c
Reviewed-on: https://gerrit.instructure.com/138486
Tested-by: Jenkins
Reviewed-by: KC Naegle <knaegle@instructure.com>
Product-Review: Anju Reddy <areddy@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
2018-01-19 19:50:35 +00:00
Han Yan 3d5ed6a7a2 Apply Feature Flag default ("On") to account already provisioned
closes QUIZ-3805

test plan:
- spin up canvas and make sure easy button and quiz migration is
  available for local envs
- Quizzes.Next feature flag is set to On

Change-Id: Ie98372bb46b91a79172e639cbd50029f87490fad
Reviewed-on: https://gerrit.instructure.com/137749
Tested-by: Jenkins
Reviewed-by: Aaron Griffin <agriffin@instructure.com>
Product-Review: John Corrigan <jcorrigan@instructure.com>
2018-01-19 17:15:55 +00:00
Aaron Kc Hsu 7678810c7f Add Ability To View and Delete RSS Feeds to Announcements
fixes COMMS-634 COMMS-633

Test Plan:
- ensure feature flag for section specific announcements is on (account FF)
- on the announcements v2 index page
- Click on the External Feeds link
- notice a tray pops out
- Look at the list of External Feeds
- Try to add a feed
- Try to delete a feed

Change-Id: I54ac41a816b0b6d515bcd8173f8b26ee4a634cde
Reviewed-on: https://gerrit.instructure.com/137312
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
Reviewed-by: Felix Milea-Ciobanu <fmileaciobanu@instructure.com>
Product-Review: Matt Goodwin <mattg@instructure.com>
QA-Review: Landon Gilbert-Bland <lbland@instructure.com>
2018-01-19 16:10:02 +00:00
Matthew Berns ac7a4bce1b add aXe testing to profile views
test plan:
- run the spec files edited in this patch normally with
  yarn run jspec-watch path/to/spec
- tests should all pass as expected
- run the spec files edited in this patch with the new command
  yarn run a11y-report path/to/spec
- you should get aXe errors on existing a11y violations

Change-Id: Id906cdc281ee51fe1a508e77832665b66f2f2774
Reviewed-on: https://gerrit.instructure.com/130995
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
Product-Review: Matt Berns <mberns@instructure.com>
QA-Review: Matt Berns <mberns@instructure.com>
2018-01-19 15:11:03 +00:00
James Williams 89f6302482 add parent_account_id as a sticky sis field
test plan:
* mark "process as UI changes"
 when creating a subaccount through accounts.csv
 (this should add parent_account_id as a stuck field)
* the parent_account_id should not be able to be
 changed by subsequent sis imports,
 unless "process as UI changes" is marked

closes #CORE-660

Change-Id: I08f8198b9ef9a1abdac3f7c4e5165bdad62fdac0
Reviewed-on: https://gerrit.instructure.com/135512
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
Tested-by: Jenkins
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2018-01-19 13:20:20 +00:00
Rob Orton 41ad5e981e make sis_source_id unique for group_categories
fixes CORE-886

test plan
 - should not allow two group categories with
   the same sis id

Change-Id: I467c9e1d2ae28f5d0091391c9c6c0d313b0e11d3
Reviewed-on: https://gerrit.instructure.com/138277
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Tucker McKnight <tmcknight@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2018-01-18 22:57:19 +00:00
Matthew Berns bf7cdd12ea fix mastery for bank/outcome combo under specific conditions
fixes OUT-1775

test plan:
- create an outcome (latest score would be easiest for tests)
- create a bank with the following conditions
 - 1 question worth 0.5 points
 - align your outcome, set a mastery percentage of 100%
- align the question to a quiz
- as a student, take the quiz
- as the teacher, go to speedgrader and give the student
  a 5/0.5
- go to the LMGB
- the outcome should show the student's mastery as 30/3

Change-Id: I155eaa9e653c4e03eb5b0a0bfb274748d73c1c40
Reviewed-on: https://gerrit.instructure.com/137955
Tested-by: Jenkins
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
QA-Review: Andrew Porter <hporter-c@instructure.com>
Product-Review: Sidharth Oberoi <soberoi@instructure.com>
2018-01-18 22:39:20 +00:00
Clay Diffrient c715af4539 Make sidebars appear when RCEs become active
In some situtations the sidebar would be hidden and never
reappear for a given RCE. This makes it so that the
sidebar reappears whenever focus goes to the RCE.

closes CORE-700

Test Plan:
  - Go to [classic] Quizzes
  - Create a quiz with a mulitple choice question
  - In one of the answers below use the pencil icon to edit
    the question in an RCE
  - Enter some text and click the Done button
  - Notice the Sidebar disappears
  - Click into the question text area
  - The sidebar should reappear

Change-Id: I368bb5f88961d66a05c7d7e767cb884b65ccc58b
Reviewed-on: https://gerrit.instructure.com/137926
QA-Review: Tucker McKnight <tmcknight@instructure.com>
Tested-by: Jenkins
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
2018-01-18 21:50:04 +00:00
Matthew Berns 6d0e785bd6 add aXe testing to rubric views
test plan:
- run the spec files edited in this patch normally with
  yarn run jspec-watch path/to/spec
- tests should all pass as expected
- run the spec files edited in this patch with the new command
  yarn run a11y-report path/to/spec
- you should get aXe errors on existing a11y violations

Change-Id: I7061fe2cc631e04bfb3c2469bb2bc8b2791ba62c
Reviewed-on: https://gerrit.instructure.com/131007
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
Product-Review: Matt Berns <mberns@instructure.com>
QA-Review: Matt Berns <mberns@instructure.com>
2018-01-18 21:48:02 +00:00
Matthew Berns 397d9e59cc add aXe testing to group manage views
test plan:
- run the spec files edited in this patch normally with
  yarn run jspec-watch path/to/spec
- tests should all pass as expected
- run the spec files edited in this patch with the new command
  yarn run a11y-report path/to/spec
- you should get aXe errors on existing a11y violations

Change-Id: Ie1abf47dc7b3b680f8767f334e25ec0b94e11600
Reviewed-on: https://gerrit.instructure.com/130959
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
Product-Review: Matt Berns <mberns@instructure.com>
QA-Review: Matt Berns <mberns@instructure.com>
2018-01-18 21:47:55 +00:00
Matthew Berns 9b18df5c62 fix outcomes not updated on manually scored quizzes
fixes OUT-1832

test plan:
- create a learning outcome
- create a question bank and align the outcome
- add at least one text question to the bank, such as
  an essay question
- create a quiz that allow retakes for 'latest score'
- attach the questions from the bank to the newly created
  quiz
- as a student, take the quiz
- there should not be any learning outcome result yet,
  since the essay question needs grading
- as the teacher, grade the essay question
- there should now be a learning outcome result
- try giving the essay question a different score
  the outcome should update properly based on the given
  score
- change the quiz kept score on retakes to 'highest'
- take the quiz as a student
- as the teacher, give the quiz a higher score
- the outcome should update
- take the quiz as the student again
- as the teacher, give the quiz a lower score
- the outcome should not update, since the original
  higher score should still be the kept score

Change-Id: Icd2d0894ba3b9c956878e5691aae46f6f6c90b9a
Reviewed-on: https://gerrit.instructure.com/137946
Tested-by: Jenkins
Reviewed-by: Neil Gupta <ngupta@instructure.com>
Reviewed-by: Frank Murphy <fmurphy@instructure.com>
QA-Review: Andrew Porter <hporter-c@instructure.com>
Product-Review: Sidharth Oberoi <soberoi@instructure.com>
2018-01-18 19:24:12 +00:00
Han Yan 6d50f50707 Rubrics from deleted enrollments are visible in other courses
closes OUT-1394

test plan:
- Add a teacher to two different courses
- In Course A create a rubric and save it as the teacher
- In Course B create an assignment as the teacher
- Attempt to add a rubric to the assignment
- Search existing rubrics. Rubric created in Course A
  should be in the list. (Don't add the rubric)
- As an admin delete the teachers enrollment in Course A
- Attempt to add a rubric to the assignment
- Search existing rubrics. Rubric created in Course A
  shouldn't be in the list

Change-Id: I814954f9999ed0f8b44afc007748eea595cac1cd
Reviewed-on: https://gerrit.instructure.com/138018
Reviewed-by: Spencer Olson <solson@instructure.com>
Tested-by: Jenkins
Reviewed-by: Matt Berns <mberns@instructure.com>
QA-Review: Andrew Porter <hporter-c@instructure.com>
Product-Review: Sidharth Oberoi <soberoi@instructure.com>
2018-01-18 18:30:17 +00:00
Felix Milea-Ciobanu c730a65834 remove non-text content from announcements v2 ui
fixes COMMS-682

test plan:
- create a new announcement and add rich content to its content such
  as images, tables, etc
- visit the announcements page
- note that the announcement rows do not display non-text content but
  do display text

Change-Id: I11ecb15f51bc8df93a211b95850d109bcb4bb78c
Reviewed-on: https://gerrit.instructure.com/138245
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
Reviewed-by: Landon Gilbert-Bland <lbland@instructure.com>
QA-Review: Landon Gilbert-Bland <lbland@instructure.com>
Product-Review: Felix Milea-Ciobanu <fmileaciobanu@instructure.com>
2018-01-18 18:07:59 +00:00
Landon Gilbert-Bland 98418544ec Fix logging and notification searching in admin tools
This was previously doing string comparison of human readable dates to
determine if the search was valid. Fix this so that it will now check
javascript `Date` objects instead, as well as not closing the modal and
actually displaying an error message if you try to perform a search with
the start date ahead of the end date.

This also changes functionality so an error will be raised if a date was
invalid, instead of silently defaulting to no date behind the scenes.

Fixes COMMS-568

Test Plan
  - Send some messages to a user
  - Go to the admin tools page (admin -> `account_name` -> admin tools )
  - Click on the View Notifications tab
  - Input the user you sent the messages to
  - click on the user from the new list of users
  - Input an invalid start and end date (such as `BANANA`), and notice
    that it prints an error for the invalid dates. Note that the error
    will not disappear unless you select the form, ie not if you only
    click the calendar button. This will be a separate ticket.
  - Select a time window with the start time being after the end time,
    and click 'Find'. Notice that an error message pops up indicating
    that this is invalid
  - Select a time window between when you sent the messages, and click
    find again. Notice that the modal will close and the that the
    messages show up.
  - Run the invalid dates with the `logging` tab as well, and make sure
    that those also properly display the error messages when invalid
    dates are selected

Change-Id: Idecafe5bc02f62ca0a5b89a584ad55b0fa59adbe
Reviewed-on: https://gerrit.instructure.com/138004
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
Reviewed-by: Venk Natarajan <vnatarajan@instructure.com>
QA-Review: Venk Natarajan <vnatarajan@instructure.com>
Product-Review: Landon Gilbert-Bland <lbland@instructure.com>
2018-01-18 17:56:20 +00:00
Venk Natarajan c35527aa83 Don't allow creating appointment groups for concluded courses.
Fixes COMMS-636.

Test Plan:
* Have some courses, make sure they are published, and be
  a teacher in these.  You'll want a few courses here.
* Make sure you have scheduler enabled, but *not* the
  new scheduler.
* Conclude one of these courses.  Go to the home page of
  the course you concluded, click on settings, then click
  on the "calendar" for the course.  You have to go to the
  calendar this way because this is the user action path
  that manifested the bug.  You can get to a concluded
  course by clicking on the "Courses" tab and then going
  to the "all courses" link.  It should be there under
  "past enrollments"
* Once at the calendar, click on the "scheduler" button and
  make a new appointment group.  When you select calendars,
  the concluded course should not show up (non-concluded
  ones should show)
* Also verify that if you make an appointment group and
  *then* conclude the course, that:
  ** If you made the group for more than one course and
     later conclude some (but not all) of these, that only
     the non-concluded ones show in the scheduler view.
  ** If all courses for a group are concluded, then that
     entry should not show at all in the scheduler view.

Change-Id: I2ed25c8cf2921e681972686b0499f2f909eebfe4
Reviewed-on: https://gerrit.instructure.com/138205
Tested-by: Jenkins
Reviewed-by: Landon Gilbert-Bland <lbland@instructure.com>
Reviewed-by: Steven Burnett <sburnett@instructure.com>
QA-Review: Landon Gilbert-Bland <lbland@instructure.com>
Product-Review: Venk Natarajan <vnatarajan@instructure.com>
2018-01-18 17:55:34 +00:00
Steven Burnett f0154f5391 use correct context in message students message
corrects the notification context in the message students
who dialog located on the peoples page

fixes COMMS-585

Test Plan:
- Go to people page
- create a group set without assigning
  anyone to the group
- in the drop down (next to the + Group button)
  click message unassigned students
- notice you can still send a message to those students

Change-Id: I464565419310ab73f246dcf541e413d5e706cd5f
Reviewed-on: https://gerrit.instructure.com/138019
Reviewed-by: Venk Natarajan <vnatarajan@instructure.com>
Reviewed-by: Landon Gilbert-Bland <lbland@instructure.com>
Tested-by: Jenkins
QA-Review: Landon Gilbert-Bland <lbland@instructure.com>
Product-Review: Steven Burnett <sburnett@instructure.com>
2018-01-18 17:52:35 +00:00
Simon Williams 9c7cdcb12f spec: skip flaky RCS spec; refs CORE-877
Change-Id: I0f79f3d8e1a0aefb0a6127dedfabc06da6bba944
Reviewed-on: https://gerrit.instructure.com/138226
Tested-by: Jenkins
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
2018-01-18 16:45:33 +00:00
Michael Brewer-Davis 601ca9aa4b restrict outcome results report to subaccounts
also refactors report in anticipation of further tickets

closes OUT-1629

Test plan:
- Create an account with two subaccounts
- Create an account-level outcome and import
  into both subaccounts
- Create an account-level rubric which
  includes the outcome
- Create courses in the account and subaccounts
- Create assignments in each course
- Attach the rubric to each assignment
- As a student, submit each assignment
- In SpeedGrader, assess each assignment using the
  rubric
- In the root account, go to the Settings/Reports
  tab and run the Outcomes Report
- Verify that all three assessments are included
- In a subaccount, go to the Settings/Reports
  tab and run the Outcomes Report
- Verify that only the result in that subaccount
  is included
- Repeat the reporting steps with the Student Competency
  Report

Change-Id: I9db0fca47197227468946ee7a716d90fdd6ac1a7
Reviewed-on: https://gerrit.instructure.com/137897
Tested-by: Jenkins
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
Reviewed-by: Frank Murphy <fmurphy@instructure.com>
QA-Review: Andrew Porter <hporter-c@instructure.com>
Product-Review: Sidharth Oberoi <soberoi@instructure.com>
2018-01-18 04:03:51 +00:00
Indira Pai ef54fd9a62 Spec: Add spec for complete/incomplete
refs GRADE-76

Test Plan:
 --- Passes Jenkins.

Change-Id: I90819b2e8ee2a85bfead6e100070258f8da99e07
Reviewed-on: https://gerrit.instructure.com/137743
Tested-by: Jenkins
Reviewed-by: Anju Reddy <areddy@instructure.com>
Product-Review: Indira Pai <ipai@instructure.com>
QA-Review: Indira Pai <ipai@instructure.com>
2018-01-17 23:40:29 +00:00
Rob Orton 68ed1c341d add sis_ids to groups and group categories APIs
fixes CORE-652

test plan
 - groups response should include sis_id
 - group category response should include sis id

Change-Id: I2e2ea884e6fed333baf4a2f5df8a8d1ad0e65f1c
Reviewed-on: https://gerrit.instructure.com/137876
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
QA-Review: Tucker McKnight <tmcknight@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2018-01-17 23:21:41 +00:00
Cameron Matheson 584e05dbb6 graphql: add groups
closes RECNVS-252

Test plan:
  * create groups for a course
  * retrieve those groups (and their members) using the course's
    groupsConnection field

Change-Id: I446001385f185e6205e1758c73415f0f06456106
Reviewed-on: https://gerrit.instructure.com/137920
Tested-by: Jenkins
Reviewed-by: Michael Jasper <mjasper@instructure.com>
QA-Review: Collin Parrish <cparrish@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
2018-01-17 23:09:12 +00:00
Steven Burnett dbd5cda2dd hide sections drop down on groups page
fixes COMMS-677

Test Plan:
- Turn on section specific announcements FF
  (account ff)
- go to groups/<id>/discussion_topics/new?is_announcement=true
- notice the section specific drop down doesn't show

Change-Id: I0dab4c440e3c8248540f9714e625f43eb11f4034
Reviewed-on: https://gerrit.instructure.com/138158
Reviewed-by: Venk Natarajan <vnatarajan@instructure.com>
Reviewed-by: Felix Milea-Ciobanu <fmileaciobanu@instructure.com>
Tested-by: Jenkins
QA-Review: Landon Gilbert-Bland <lbland@instructure.com>
Product-Review: Steven Burnett <sburnett@instructure.com>
2018-01-17 22:18:29 +00:00
Ed Schiebel 1c1666191d Bump canvas-planner to v1.0.16
The big change to planner in this version is instui 4.6.0

closes ADMIN-680
refs ADMIN-679

test plan:
  - student_planner_spec.rb selenium tests pass
  - planner seems to work OK

Change-Id: Ia5fc7ad265e3110e7d53100f05446929e34e05b7
Reviewed-on: https://gerrit.instructure.com/137588
Tested-by: Jenkins
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Reviewed-by: Mysti Sadler <mysti@instructure.com>
Reviewed-by: Jon Willesen <jonw+gerrit@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
2018-01-17 20:24:12 +00:00
James Williams 7d28e03935 account for sender in conversation reply limit
test plan:
* use `Setting.set("max_group_conversation_size", "2")`
 in the rails console to lower the number of people
 a conversation can include
* send a message (start a conversation) to 2 people
* the recipients should be able to reply without error

closes #COMMS-662

Change-Id: I194a604b540bff9516a5882917d2ff5dad20085b
Reviewed-on: https://gerrit.instructure.com/137899
Tested-by: Jenkins
Reviewed-by: Felix Milea-Ciobanu <fmileaciobanu@instructure.com>
Reviewed-by: Steven Burnett <sburnett@instructure.com>
QA-Review: Venk Natarajan <vnatarajan@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2018-01-17 20:15:53 +00:00
Ryan Shaw 6ff34cde20 make column header links bold
Closes: CORE-846

the "Students" header is bold because that is what the styleguide calls 
for. but the rest of the column headers are font-weight "normal" because
instUI links resets them back to that. but kdub says links in <th> 
should still be bold

Test plan:

* turn on user/course search feature flag
* go to /accounts/x
* all the column headers should be bold
* go to /accounts/x/users
* all the column headers should be bold

Change-Id: I2d2970bb68fb67db3a8b1058b8084948ad3259c6
Reviewed-on: https://gerrit.instructure.com/137480
Tested-by: Jenkins
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2018-01-17 18:22:35 +00:00
Ryan Shaw 0a3f16fcd4 [account course/user search] a bunch of fixes
Fixes: CORE-682	SIS ID tooltip inconsistent with others
Fixes: CORE-683	Sort on SIS ID results in column disappearing
Fixes: CORE-684	SIS ID column wrapping seems to only support 5 chars
Fixes: CORE-685	Long teacher names are truncated.
Fixes: CORE-615	Delegated Auth accounts don't get Login ID in “+ People”
Fixes: CORE-712 Don't fetch subaccounts until "add course" is opened
Fixes: CORE-713 Don't keep form controls disabled while fetching terms
Fixes: CORE-715 - use Friendly (short) date for “Last Login”
Fixes: CORE-719 the "add user" dialog doesn't handle any errors
Closes: CORE-714 - rm custom CSS/markup and only use InstUI components

Test plan:
* look at the test plan on the jira for each of those and make sure it
  Works now.
* do a complete regression of all the user/course search stuff
* verify that the add user and add course forms have error handling and
  validation messages

* test creating a new user by clicking the “+ People” button in the
  toolbar
  - try to test any weird edge cases by typing in bad info
  - make sure you get sane validation messages
* try to update a user’s info by clicking the pencil button on the
  row showing that user
  - make sure you are able to update all the attributes the form shows
    You and that there is good validation messages.
* for both of those, turn on and off the manage SIS permission for
  The logged in user and make sure that it doesn’t show the sis id column
  or give you the option to change the user’s SIS id

Change-Id: I675d70757b7fff34cfe6a54dcb1b9aace1169901
Reviewed-on: https://gerrit.instructure.com/134420
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2018-01-17 18:22:05 +00:00
Landon Gilbert-Bland 3690d2cb39 Stop group links from showing up when they should not
Fixes COMMS-644

Test plan:
  - Create a course
  - Create a group in said course and add a student to this group
  - Conclude the coures
  - Mascarade as the student
  - Go to the groups page
  - Verify the group is shown under the `Previous Groups` heading, and
    that the group name is not a clickable link.

Change-Id: I6b68be00629b17f410e386024d97c253e6265bb2
Reviewed-on: https://gerrit.instructure.com/137857
Tested-by: Jenkins
Reviewed-by: Venk Natarajan <vnatarajan@instructure.com>
Reviewed-by: Felix Milea-Ciobanu <fmileaciobanu@instructure.com>
QA-Review: Steven Burnett <sburnett@instructure.com>
Product-Review: Landon Gilbert-Bland <lbland@instructure.com>
2018-01-17 17:04:58 +00:00
Rob Orton b5de0458d9 dots and new lines
test plan
 - specs should pass

Change-Id: Iafc7c9b8ca64f32568e658b600e19c2e6f9045ca
Reviewed-on: https://gerrit.instructure.com/138026
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-01-17 16:56:26 +00:00