Commit Graph

1079 Commits

Author SHA1 Message Date
James Williams 89370c5f11 remove protected_attributes
refs #CNVS-32574

Change-Id: I3ba018a7110a7530c9af4a59c97422f626a749b6
Reviewed-on: https://gerrit.instructure.com/99260
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2017-01-12 17:46:18 +00:00
Christian Prescott ec2681a331 Fix negative needs_grading_count
closes OUT-426

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

Change-Id: I5eca4d0d9d008b2ce1ae39660f29709c509bed22
Reviewed-on: https://gerrit.instructure.com/96241
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
QA-Review: Alex Ortiz-Rosado <aortiz@instructure.com>
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Christian Prescott <cprescott@instructure.com>
2017-01-11 20:55:41 +00:00
Augusto Callejas e4badb2694 Add columns for Academic Benchmarks GUID update
refs OUT-450

test plan:
  - enable Academic Benchmarks using v1 credentials
  - import any set of standards
  - confirm that only vendor_guid and migration_id
    columns in learning_outcomes and learning_outcome_groups
    are populated
  - clear out all outcomes and outcome groups
  - configure Academic Benchmarks using v3 credentials
  - enable the use of the new GUID columns by running the following
    in a Rails console:
    * plugin = Canvas::Plugin.find('academic_benchmark_importer')
    * pluginSettings = PluginSetting.find_by_name(plugin.id)
    * pluginSettings.settings[:new_guid_columns]=true
    * pluginSettings.save!
  - import any set of standards
  - confirm that only vendor_guid_2 and migration_id_2
    columns in learning_outcomes and learning_outcome_groups
    are populated
  - restore the use of the current GUID columns by running
    the following in the previous Rails console:
    * pluginSettings.settings.delete(:new_guid_columns)
    * pluginSettings.save!

Change-Id: I77e5d578a55a0967310208029f1c5225188c3455
Reviewed-on: https://gerrit.instructure.com/98347
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Michael Brewer-Davis <mbd@instructure.com>
QA-Review: Cemal Aktas <caktas@instructure.com>
Product-Review: Michael Brewer-Davis <mbd@instructure.com>
2017-01-09 18:59:38 +00:00
Keith Garner 340fc0a6ca add ability to enable turnitin to site admins
Adding a flag to the Account.settings that determines if turnitin is
enabled. The ability to set or remove this flag has been changed to
only be available to site admins. Once the flag is set to on, the
account admins will have the ability to configure the turnitin
settings. Turning this flag off will disable turnitin for the
account.

closes CNVS-33937

test plan:
 - As an account admin, visit the account settings page and note there
   is no turnitin checkbox nor the turnitin settings dialog.
 - As a site admin, visit the account settings page and note the
   turnitin checkbox.
 - As the site admin, check the turnitin checkbox and save the
   settings.
 - Note on page reload the turniting settings dialog appeared.
 - As an account admin, visit the account settings page and note the
   settings dialog is present.
 - As an account admin, fill in the settings dialog and save the
   settings.
 - As a site admin, visit the account settings page and uncheck the
   turnitin checkbox and save the settings.
 - Note on page reload the turnitin dialog is gone.
 - As a site admin, check the turnitin checkbox and save the settings.
 - Note the turnitin settings dialog appears and contains the previous
   info.

Change-Id: I06e0add066794d56be27cb13250ccfa79d095e26
Reviewed-on: https://gerrit.instructure.com/98765
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Derek Bender <djbender@instructure.com>
Tested-by: Jenkins
QA-Review: Anju Reddy <areddy@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Christi Wruck
2017-01-06 20:23:39 +00:00
James Williams 74e63aa46c master courses: add imports_completed_at to migrations
closes #MC-52

Change-Id: Id862f15cb886f53c3f44d18f2f6fc4b79c5283e3
Reviewed-on: https://gerrit.instructure.com/98584
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2017-01-04 17:36:14 +00:00
Neil Gupta 04fc3e586c Populate scores table migration
Fixes CNVS-33783

Test plan:

* BEFORE YOU CHECK THIS PS OUT: grade a student submission so you have
at least one score saved in the new format
* Check out this patch set.
* run rake db:migrate locally and it passes
* from rails console or in database, your Scores table is populated
  with all past grades
* Make sure none of your grades changed.

Change-Id: I1d9a1178a02c24c1b2062ab1c58dbd750fc677f7
Reviewed-on: https://gerrit.instructure.com/98222
Reviewed-by: Rob Orton <rob@instructure.com>
Tested-by: Jenkins
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Neil Gupta <ngupta@instructure.com>
2016-12-29 16:59:03 +00:00
Neil Gupta 8edf09d694 add scores table
add scores table, which will hold the
computed_current_score and computed_final_score
which is currently stored on the enrollment
object. in addition, grading period scores will
be stored on the scores table.

closes CNVS-33573

Test plan:
* Create a course
* Make sure should total for all grading periods is enabled
* As a teacher, create an assignment that falls in a grading period
* As a student, submit something for that assignment
* As a teacher, grade that submission
* As a student, view your grades
* You should see the student's grade for both the grading period and
  all grading periods.
* Repeat this process for another assignment and make sure the total
  grades get updated for the student.

Basically, we want to smoke test test saving scores for an assignment
and re-calculating course grades with new scores. Everything should
behave the same as before.

Change-Id: Ib7241d55c0fa52e01441671f17f65675f8e10564
Reviewed-on: https://gerrit.instructure.com/96825
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Shahbaz Javeed <sjaveed@instructure.com>
Tested-by: Keith T. Garner <kgarner@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
2016-12-28 20:11:54 +00:00
Christian Prescott a909d264b7 Add need_grading_count scope to Submission
refs OUT-426

Counts submissions made by enrolled users in a pending grading state.
Includes partial index to support that aggregation

Test Plan
In canvas console or g/97755, ensure Submission.needs_grading_count:
Does count
  submission that has not been graded
  submission to quiz that is partially graded
  submission by student in the course
  submission by user that has been un- then re-enrolled in the course
  submission by user enrolled in >1 sections in the course *only once*
Does not count
  submission that has been graded
  submission that has been autograded
  submission by unenrolled user

Change-Id: I031bd3692c4dd4aaf4218a11a31c0debc61128ab
Reviewed-on: https://gerrit.instructure.com/97774
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
QA-Review: Alex Ortiz-Rosado <aortiz@instructure.com>
Tested-by: Jenkins
Product-Review: Christian Prescott <cprescott@instructure.com>
2016-12-21 01:47:05 +00:00
Nick Houle 4f0e8f08ba Add Ability to Create/Update Assignment Group integration_data
Fixes: SIS-2600

Test Plan:
- Run Migrations
- Use your favorite REST Client
- Create a new AssignmentGroup, confirm the integration_data
  is populated
- Update that AssignmentGroup, confirm the integration_data
  is populated

Change-Id: I2f91fd7153d0ab01e16af32b74b53cb2ef50553d
Reviewed-on: https://gerrit.instructure.com/94478
Reviewed-by: Nick Houle <nhoule@instructure.com>
Reviewed-by: Stewie aka Nicholas Stewart <nstewart@instructure.com>
Tested-by: Jenkins
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: Oxana
2016-12-20 19:51:54 +00:00
Matthew Berns a1aeb610fb revert OUT-20
closes OUT-1012

test plan:
- full regression testing of outcomes, including:
creation
deletion
moving
migrating
importing
taking
results
report export

Change-Id: Id0708d9133bab8977e6fcf7f91a56fb25f15b735
Reviewed-on: https://gerrit.instructure.com/97729
Reviewed-by: Michael Brewer-Davis <mbd@instructure.com>
QA-Review: Alex Ortiz-Rosado <aortiz@instructure.com>
Product-Review: Michael Brewer-Davis <mbd@instructure.com>
Tested-by: Matt Berns <mberns@instructure.com>
2016-12-20 00:20:34 +00:00
Matthew Berns 914ba27cca remove outcome_link from string limit migration
refs OUT-1012

Change-Id: I501da739d7dd20b3c5839fcfddc6a74e3303f3c5
Reviewed-on: https://gerrit.instructure.com/97911
Reviewed-by: Michael Brewer-Davis <mbd@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Product-Review: Matt Berns <mberns@instructure.com>
QA-Review: Matt Berns <mberns@instructure.com>
2016-12-19 17:53:36 +00:00
Cody Cutrer 0675a6483e deprecation notice for migrations to inherit from Migration[4.2]
Change-Id: I1349110c284f7cd7409fe7dea5fe8ab6c33b6e12
Reviewed-on: https://gerrit.instructure.com/95572
Tested-by: Jenkins
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
2016-12-14 22:19:21 +00:00
Mysti Sadler e65ecd070e Setup job for web export
closes OFFW-36

test plan:
- you should be able to start a web zip export through
  the console
- this should cause module progression for all
  viewable items
- ensure epub exports still export

Change-Id: I901d491325fba3955af4544d1c1a2b87270cffff
Reviewed-on: https://gerrit.instructure.com/96752
Reviewed-by: Cameron Sutter <csutter@instructure.com>
Tested-by: Jenkins
QA-Review: Nathan Rogowski <nathan@instructure.com>
Product-Review: Jon Willesen <jonw+gerrit@instructure.com>
2016-12-14 20:10:47 +00:00
Nathan Mills 2c0150a733 create method for returning originality data
fixes PLAT-1912

test plan:
- Create an OriginalityReport for an attachment on a submission
- Call #originality_data on the submission
- You should get back the originality_report data

- Create some tii data on a submission
- call #originality_data on the submission

Change-Id: I35687c9b8d3e87a9d2359efadb5854452a47c8a8
Reviewed-on: https://gerrit.instructure.com/96583
Tested-by: Jenkins
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Nathan Mills <nathanm@instructure.com>
2016-12-12 17:41:21 +00:00
Simon Williams 42a1efbe1b rails 4.2: re-add default limit for string column
closes CNVS-33340

test plan: run migrations, all string columns should have a limit

Change-Id: I6180827e3a25fc12b137f291e1dc2c4f4787ba65
Reviewed-on: https://gerrit.instructure.com/96055
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
2016-12-12 05:32:36 +00:00
Simon Williams bdfe6de2d0 bump inst-jobs to 0.11.6
- handle YAML parsing failures
- rails 4.2: re-add default limit for string column

refs CNVS-33340

test plan: migrations should run

Change-Id: Iffb41de3740b67f632d0b8737659830e35298dff
Reviewed-on: https://gerrit.instructure.com/96913
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
2016-12-09 21:12:19 +00:00
Simon Williams 44568d32f9 bump switchman to 1.8.2
contains the following:
- rails 4.2: re-add default limit for string column
- fix exists? calls with multiple explicit shards

refs CNVS-33340

test plan: migrations run successfully

Change-Id: I09ab2b7733effac2765f95c1f6a527785b19f9f8
Reviewed-on: https://gerrit.instructure.com/96912
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
2016-12-08 22:48:48 +00:00
wdransfield d8bbff1c85 Add workflow state to the OriginalityReport Model
Fixes: PLAT-2000

Test Plan:
 - Create a new OriginalityReport and validate its
   workflow_state is set to 'pending'
- Change the workflow_state to 'scored' and
  verify the change is persisted when the model instance
  is saved.
- Change the workflow_state to 'error' and verify
  the change is persisted when the model instance is
  saved.
- Change the workflow_state to any other string and
  verify the change is NOT persisted when the model
  instance is saved.

Change-Id: I7cb96e7f979cee5767e22605a18397a352b1e8ea
Reviewed-on: https://gerrit.instructure.com/96433
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Reviewed-by: Nathan Mills <nathanm@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
2016-12-07 20:41:53 +00:00
James Williams 1fea0adeab master courses: add child content tags and restriction columns
i never know if what i'm writing is the right way to go but
this is at least a starting point

using serialized columns here adds some overhead but gives us
more flexibility in the long-run if we have to add more
granular locks

closes #MC-9

Change-Id: I2d1d9b3ef8681e3a2d1675e66e4d2e5294e5d8df
Reviewed-on: https://gerrit.instructure.com/96656
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2016-12-06 16:28:10 +00:00
James Williams 76cd1f1061 fix build_enrollment_states migration
closes gh-954

Change-Id: Idedd2b8a16450c5a9635e0f01cbae03e6dfdfe4b
Reviewed-on: https://gerrit.instructure.com/96006
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2016-12-05 16:13:53 +00:00
wdransfield eecdbfecb3 Re-Persist enabled tool settings launches for LTI 2
Fixes PLAT-1965

Test Plan:
- Install two LTI 2 tools: one at the course
  level, one at the account level. During registration
  enable the assignment configuration placement (see
  PLAT-1964).
- Install two LTI 1 tools: one at the course level,
  one at the account level. Make sure they have the
  assignment configuration placement as well.
- Create a new assignment with submission type "Online"
  with "File Uploads".
- Foreach LTI 1 and 2 tool installed previously:
   a. Select the tool in the "plagiarism review"
      select box.
   b. Verify the tool renders in an iframe.
   c. Save the tool, then go back to edit
      the same assignment.
   d. Verify the tool that was selected in
      step 'a' was remembered and renders in
      an iframe.

Change-Id: I39c31de3d234d0e63d9aa11ab2f68fd8d8232dd4
Reviewed-on: https://gerrit.instructure.com/96499
Tested-by: Jenkins
Reviewed-by: Nathan Mills <nathanm@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
2016-12-01 20:31:11 +00:00
Jon Jensen 10b368f3d3 Revert "Persist enabled tool settings launches for LTI 2"
This reverts commit 3e73dfb8a5.

It doesn't play nicely with e3de0ea462

Change-Id: I1d434d926a49e52a279d76006d715f221802eeb6
Reviewed-on: https://gerrit.instructure.com/96446
Reviewed-by: Benjamin Christian Nelson <bcnelson@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2016-12-01 00:51:52 +00:00
wdransfield 3e73dfb8a5 Persist enabled tool settings launches for LTI 2
Fixes PLAT-1965

Test Plan:
- Install two LTI 2 tools: one at the course
  level, one at the account level. During registration
  enable the assignment configuration placement (see
  PLAT-1964).
- Install two LTI 1 tools: one at the course level,
  one at the account level. Make sure they have the
  assignment configuration placement as well.
- Create a new assignment with submission type "Online"
  with "File Uploads".
- Foreach LTI 1 and 2 tool installed previously:
   a. Select the tool in the "plagiarism review"
      select box.
   b. Verify the tool renders in an iframe.
   c. Save the tool, then go back to edit
      the same assignment.
   d. Verify the tool that was selected in
      step 'a' was remembered and renders in
      an iframe.

Change-Id: I74e5ce7d839c408659f75ee3819f797275b7b45e
Reviewed-on: https://gerrit.instructure.com/95443
Tested-by: Jenkins
Reviewed-by: Nathan Mills <nathanm@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
2016-11-30 20:37:39 +00:00
Cody Cutrer 505d032bd0 persist SAML SP entity ID on the account
refs CNVS-28836

so that if you delete the provider, and recreate, but your domain
changed in the interim, it won't change.

test plan:
 * use a domain for an account
 * have no auth providers
 * go to /saml2
 * it should show your entity id
 * change the domain you're using for the account
 * go to /saml2
 * the entity id should not have changed

Change-Id: Ic1ebbe2fb6c98e0e1bb7c466783ca177cd395920
Reviewed-on: https://gerrit.instructure.com/81935
Reviewed-by: Rob Orton <rob@instructure.com>
Tested-by: Jenkins
QA-Review: Benjamin Christian Nelson <bcnelson@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2016-11-30 18:08:11 +00:00
Matthew Berns b6f60b4a30 add OutcomeLink model for outcomes and outcome groups
closes OUT-20

test plan:
- full regression testing of outcomes, including:
creation
deletion
moving
migrating
importing
taking
results
report export

Change-Id: I63a5d07358e3b3f9a0537b1ec30c4b0bf44f79e9
Reviewed-on: https://gerrit.instructure.com/91126
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
QA-Review: Alex Ortiz-Rosado <aortiz@instructure.com>
Product-Review: Josh Simpson <jsimpson@instructure.com>
Tested-by: Matt Berns <mberns@instructure.com>
2016-11-29 21:32:49 +00:00
wdransfield e3de0ea462 Create OriginalityReport Api Create endpoint
Fixes: PLAT-1906

Test Plan:
- Create a new assignment with submission type
  online with file upload.
- As a student submit a document as a
  submission for the assignment and get
  the Attachment id from the submission.
- Make a post request to
  "/api/v1/assignments
  /:assignment_id/submissions/:submission_id/originality_report" with
  the following param in the body:
    "originality_report": {
       "external_tool_id":<id of the tool you installed>,
       "originality_score": <any value between 0 and 1>
    }
- Verify a new OriginalityReport is created.
- Verify create action fails if not all required
  params are given
- Verify create action sets optional params correctly.
- Verify the action requires all specified resources
  exists (file_id, and originality_score).
- Verify the action does not allow creating a tool with an
  originality_score not in the 0..1 range.
- Verify the action requires the attachment to be
  part of the submission.
- verify the action requires the submission to be
  part of the assignment.

Change-Id: Id5b0b61d399e4330c8c815bd4715735907f7cc6b

Create OriginalityReport Api Create endpoint

Fixes: PLAT-1906

Test Plan:
- Create a new assignment with submission type
  online with file upload.
- As a student submit a document as a
  submission for the assignment and get
  the Attachment id from the submission.
- Make a post request to
  "/api/v1/assignments
  /:assignment_id/submissions/:submission_id/originality_report" with
  the following param in the body:
    "originality_report": {
       "external_tool_id":<id of the tool you installed>,
       "originality_score": <any value between 0 and 1>
    }
- Verify a new OriginalityReport is created.
- Verify create action fails if not all required
  params are given
- Verify create action sets optional params correctly
- Verify the action requires all specified resources
  exists (file_id, and originality_score).
- Verify the action does not allow creating a tool with an
  originality_score not in the 0..1 range.
- Verify the action requires the attachment to be
  part of the submission.
- verify the action requires the submission to be
  part of the assignment.

Change-Id: Id5b0b61d399e4330c8c815bd4715735907f7cc6b
Reviewed-on: https://gerrit.instructure.com/94476
Tested-by: Jenkins
Reviewed-by: Nathan Mills <nathanm@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
2016-11-29 19:17:51 +00:00
Dan Minkevitch 762d083eea Add announcements to home page with setting
Fixes CNVS-32366

Adds the most recent announcements to the course home page, provided
the home page is a wiki page.

Test Plan:
* As a teacher, go to a course
* Create a wiki page
* Set the wiki page as the course home page
* Post some announcements
* Go to the course home page
* It should show the wiki page as expected without any changes
* Enable the "Show recent announcements on Course home page" under
  "More options" in the course's settings
* Go to the course home page
* It should show a "Recent Announcements" widget above the wiki page
  for the course

Change-Id: If342928461289dd199709188e170337e3965ef5c
Reviewed-on: https://gerrit.instructure.com/94492
Tested-by: Jenkins
Reviewed-by: Frederick Polgardy <fpolgardy@instructure.com>
QA-Review: David Tan <dtan@instructure.com>
Product-Review: Chris Ward <cward@instructure.com>
2016-11-23 17:29:51 +00:00
Cody Cutrer 3130c28f8b fix migrations under Rails 5
Change-Id: I91b269b8021fb827cff8f13bbb2d5a46774b8a5f
Reviewed-on: https://gerrit.instructure.com/95666
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2016-11-23 16:19:15 +00:00
James Williams 6f29ba1a48 master courses: create master migrations
i think we really only need one model to coordinate
the export/import dance

closes #MC-10

Change-Id: I9b028a027566ce3c9539431745f66f1ed65deed2
Reviewed-on: https://gerrit.instructure.com/95641
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2016-11-22 14:02:40 +00:00
James Williams 1756588309 master courses: add child subscriptions
this model will keep track of child courses and
whether we'll need to make a full copy or a selective one

closes #MC-8

Change-Id: I78b02391076018ab13c3ad6e7693d6fb33f7365e
Reviewed-on: https://gerrit.instructure.com/95552
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2016-11-18 17:00:11 +00:00
James Williams f22e8b3f47 master courses: create master content tags
gives a place for us to keep track of changed items for now
(and soon the restrictions for content after copy)

closes #MC-7

Change-Id: I7bbd6e371528a06ea93181b0f4d91f451ae99d52
Reviewed-on: https://gerrit.instructure.com/95502
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2016-11-18 15:38:57 +00:00
Cody Cutrer 884534ffa5 Rails 5: fix Rails version migration deprecation warning
also pins all migrations to Rails 4.2 semantics

Change-Id: I386566f7a1f3e3e8aa31675f467c87c443457aee
Reviewed-on: https://gerrit.instructure.com/95571
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Simon Williams <simon@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2016-11-17 23:46:22 +00:00
James Williams adfedf14e2 master courses: create master template
even though this is 1-1 on courses right now
i think this should hold all of the rest of the
master course data just in case we decide to extend things
in the future

closes #MC-6

Change-Id: I821b8350984554c20f1306e84cb2d300e21d72b5
Reviewed-on: https://gerrit.instructure.com/95428
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2016-11-17 16:15:19 +00:00
Nathan Mills b3c22d159c create originality_report
fixes PLAT-1905

test plan:

none: it's just a model

Change-Id: Icff872019d4f1e5618afbe081ae6368a498a129e
Reviewed-on: https://gerrit.instructure.com/94244
Reviewed-by: Rob Orton <rob@instructure.com>
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Tested-by: Jenkins
Product-Review: Nathan Mills <nathanm@instructure.com>
2016-11-16 16:56:31 +00:00
Simon Williams 4f2996d772 rename invalid User#browser_locale values
it got missed when other locale fields were renamed

test plan:
- set your user browser_locale field to an invalid value like "zh"
- run the migration
- it should be renamed to a valid value

Change-Id: Ib4a4556f08cf2cc3445d5bc52574680f3735aa62
Reviewed-on: https://gerrit.instructure.com/94607
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
2016-11-07 21:15:22 +00:00
wdransfield 1de74f69bc Make lti add edit permission on by default for account membership
Fixes PLAT-1942

Test Plan
- Create a new custom account role before
  the migration from this commit is run. Make sure
  the role has the `manage_content` permission.
- Run the migration and verify that the `lti_add_edit`
  permission is now enabled for the custom account role.
- Create a new custom account role and verify that the
  `lti_add_edit` permission can be enabled.

Change-Id: I82458180b72cfa43d02c19b55ccad61d52ba0156
Reviewed-on: https://gerrit.instructure.com/94315
Reviewed-by: James Williams  <jamesw@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
2016-11-03 18:24:03 +00:00
James Williams c13fcb9925 remove migration_settings limit on content_migrations
closes #CNVS-30183

Change-Id: I6d57cd6062f4c15ac355e97aea8002b62811e11f
Reviewed-on: https://gerrit.instructure.com/94224
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2016-11-02 15:59:21 +00:00
wdransfield 8c109d7075 Add ExternalTool - Assignment join table
Fixes: PLAT-1922

Test Plan:
 - verify that 'context_external_tools' can be
   referenced from Assignment.
 - verify that 'assignments' can be referenced
   from ContextExternalTool.

Change-Id: I87dce2151fb80dc8ca80c44eeab1009640b75004
Reviewed-on: https://gerrit.instructure.com/93866
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Nathan Mills <nathanm@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
2016-11-01 19:47:30 +00:00
Nathan Mills d9b15473a5 add lti_context_id to assignments
fixes PLAT-1901

test plan
create an assignment, and look up the lti_context_id in the
database
try using "lti_context_id:{the lti_context_id}" for the assignment
id to show/update/delete the assignment via the api

Change-Id: Iffe07db810087353f73d30c75acd4860e08aeec7
Reviewed-on: https://gerrit.instructure.com/93688
Tested-by: Jenkins
Reviewed-by: Matthew Wheeler <mwheeler@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Andrew Butterfield <abutterfield@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Nathan Mills <nathanm@instructure.com>
2016-10-28 18:53:50 +00:00
Cody Cutrer b00259b4a8 optimize and handle race conditions for generated quiz questions
fixes CNVS-32804

test plan:
 * general regression test of quiz creation and taking for quizzes
   with both inline groups, and groups pulling from question banks
 * be sure to test groups that specify more questions than are in
   the bank
 * especially more than double - it should continue duplicating questions
   when you take the quiz, to meet the number of questions allowed

Change-Id: If7f86b37928e9f83b34506b6e2ccf1772000c900
Reviewed-on: https://gerrit.instructure.com/93733
Tested-by: Jenkins
Reviewed-by: Ryan Taylor <rtaylor@instructure.com>
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2016-10-28 18:46:28 +00:00
James Williams f23f3b0ff2 remove rails 4.0 support
Change-Id: Id1900160375644ea33badaa9d9f9185fab6b81ac
Reviewed-on: https://gerrit.instructure.com/92726
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2016-10-25 17:17:22 +00:00
James Williams 2e85402923 strand and de-prioritize the assessmentquestion yaml datafixup
the datafixup jobs are taking longer than i anticipated, we'll need
to keep them from strangling the job servers

Change-Id: Ia4ec5aa0967ec6bfe95ee8b3106967672d440e1d
Reviewed-on: https://gerrit.instructure.com/93514
Tested-by: Jenkins
Reviewed-by: Davis Lynn McClellan <dmcclellan@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2016-10-24 20:40:39 +00:00
Davis McClellan 540ca5374e Datafix for CNVS-32686
refs CNVS-32686

Change-Id: Ida8c19678020968b660f48789ce846243d36f4fd
Reviewed-on: https://gerrit.instructure.com/93328
Reviewed-by: James Williams  <jamesw@instructure.com>
Tested-by: Jenkins
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Product-Review: Davis Lynn McClellan <dmcclellan@instructure.com>
2016-10-21 18:46:37 +00:00
Joel Hough 1f120c7031 create pseudonym registration done notification
fixes CNVS-31821

test plan
- run migrations
- ensure that pseudonym done notification is sent when creating
 a user as an admin via the api with these parameters:
user[skip_registration]=true
pseudonym[send_confirmation]=true
communication_channel[skip_confirmation]=false

Change-Id: Idd3a48afb8364ff49605e59080c324c459307444
Reviewed-on: https://gerrit.instructure.com/91617
Tested-by: Jenkins
Reviewed-by: James Williams  <jamesw@instructure.com>
QA-Review: Heath Hales <hhales@instructure.com>
Product-Review: Joel Hough <joel@instructure.com>
2016-10-17 15:33:58 +00:00
James Williams 350a294068 add lock_version to enrollment states
there are instances where a handful of enrollment states
are getting out of sync

i fear that this is due to a race condition and that this is
 the only solution

test plan:
* basic regression on course access, changing course dates,
 term dates, etc

closes #CNVS-32350

Change-Id: If6c91ff861690a409b9822953fa527c38fa7ac3f
Reviewed-on: https://gerrit.instructure.com/91745
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: David Tan <dtan@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2016-10-13 12:39:28 +00:00
Bryan Holladay 4e9eb7c65d VeriCite plugin integration into Assignments, Gradebook, and Speedgrader 2016-10-07 08:10:56 -04:00
Matthew Berns b9933af53f add setting for intra-group peer reviews
closes OUT-383

test plan:
- create a group set and at least 2 groups
- assign some students to the groups
- create a new assignment and assign it to the
  group set, and enable peer reviews
- as a student in one of the groups, submit to the
  assignment
- go to the peer reviews page and attempt to
  assign peer reviews
- no peer reviews should be assigned
- on the same page, enable intra-group peer reviews
- attempt to assign peer reviews, peer reviews should
  be assigned to other group members of the submission

UI testing:
- when creating/editing an assignment, the intra-group
  reviews toggle should only be present if the group
  assignment box is checked, and if the automatically
  assign peer reviews toggle is selected
- the setting for intra-group reviews should persist after
  saving

Change-Id: I770749555f70b0e6d204f2d8eca268ec08ddeb36
Reviewed-on: https://gerrit.instructure.com/89757
Reviewed-by: Christian Prescott <cprescott@instructure.com>
QA-Review: Alex Ortiz-Rosado <aortiz@instructure.com>
Tested-by: Jenkins
Product-Review: McCall Smith <mcsmith@instructure.com>
2016-10-05 16:08:37 +00:00
Cody Cutrer 257d9e6af3 add index on access_tokens(user_id)
fixes CNVS_32352

Change-Id: I8120cf3453ea017899bd48c6cf6efffcee3504c8
Reviewed-on: https://gerrit.instructure.com/91858
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2016-10-03 20:11:16 +00:00
James Williams 24f91cac8b datafixup for conversation root_account_ids
closes #CNVS-32253

Change-Id: I99cde7d015e86d4f8a8fb3c7203ede0c9735c604
Reviewed-on: https://gerrit.instructure.com/91315
Tested-by: Jenkins
Reviewed-by: Joel Hough <joel@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2016-09-28 15:41:04 +00:00
Cody Cutrer 9a55bab8bd add index on CanvadocsSubmissions
fixes CNVS-32259

Change-Id: I7d8e84c4bb4192e3210bc078397b94ae772b4593
Reviewed-on: https://gerrit.instructure.com/91398
Tested-by: Jenkins
Reviewed-by: Rosser Schwarz <rschwarz@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2016-09-27 17:46:06 +00:00