closes CNVS-34657
test plan: rubocop should still work
Change-Id: Ibdd340dd7ba516639ee5b7225449422b324bd33a
Reviewed-on: https://gerrit.instructure.com/100831
Tested-by: Jenkins
Reviewed-by: Tyler Pickett <tpickett@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
closes CNVS-34065
test plan:
- do something that sends an email
- it should work
Change-Id: I21c40bd414bd43580faf7423a829fca85c5625ad
Reviewed-on: https://gerrit.instructure.com/95345
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: Pedro Fajardo <pfajardo@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
Tested-by: Jenkins
Test Plan: Run the group and group_categories reports, make
sure you get all group categories, with course and account contexts
and make sure you get context information for the group report
Change-Id: Ie769a8679edf1240db571a6acaaa40009c060a22
refs: PFS-6415
Reviewed-on: https://gerrit.instructure.com/100180
Reviewed-by: Rob Orton <rob@instructure.com>
Tested-by: Jenkins
QA-Review: Trevor Byington <tbyington@instructure.com>
Product-Review: Chad McGuire <cmcguire@instructure.com>
the thread_safe gem has deprecations too, but they'll require Rails 5.1
until they're fixed (when both activesupport and tzinfo no longer
depend on it)
Change-Id: Ic53839d911ba8ed4d463d17f9dd7207673510f3a
Reviewed-on: https://gerrit.instructure.com/100499
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
test plan:
* import the packages referenced in the tickets
* the questions (in the question banks) should come over
in some useful fashion
closes #CNVS-34360
Change-Id: I5766ae856de9f3e6a1551109d4cb69f6c6ae7dfd
Reviewed-on: https://gerrit.instructure.com/100222
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
closes CNVS-33615
test plan:
* upload and download files using S3
* submit an assignment
* do an SIS import with parallel
* do a course copy
* export and import a course
* upload some custom css file in theme editor
* test a canvadoc and crocodoc preview
Change-Id: I9145b39728938e7e5903d23c4a4598fc8df4ef45
Reviewed-on: https://gerrit.instructure.com/93002
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
this was lost in https://gerrit.instructure.com/#/c/90657/33
Change-Id: Ie3a0c38cb7df0b627954ebc00ec9b0fc99bf43c7
Reviewed-on: https://gerrit.instructure.com/100330
Tested-by: Jenkins
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
correctly whitelist things that chain off of whitelisted methods, e.g.
connection
Change-Id: I38ec4699b324d0e5d26de6bde36d841fa696d7e5
Reviewed-on: https://gerrit.instructure.com/100186
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
fixes SD-2006
mixing `singleton_class.prepend` and `extend` appears to cause `super`
to misbehave every once in a while (~1/250 workers in ~20% of builds)
... perhaps a ruby 2.3.1 bug?
just use `singleton_class.prepend` like autoextend does. 30+ test builds
with this tweak, and zero failures :yuss:
also change a couple `include` calls to `prepend`
test plan:
n/a, specs
Change-Id: I35629d63ed3855d95ae427c1cd992d12b950880c
Reviewed-on: https://gerrit.instructure.com/99613
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
also add a cop to prevent it in the future
Change-Id: Ic949cc4448f546736aa3aeee17fc1fc33a1f2808
Reviewed-on: https://gerrit.instructure.com/99847
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
Before this fix, there was not a way to determine the workflow_state of the
course without accessing API. This fix adds a way to send the course
workflow_state during an LTI launch.
Test plan:
1) create a course
2) install a tool with the $Canvas.course.workflowState custom field
3) launch the tool and verify that the course workflow_state is passed in
the launch parameters
Fixes PLAT-1956
Change-Id: I933ddcd45c689ecd054e692c7e4dc993874dc995
Reviewed-on: https://gerrit.instructure.com/94987
Tested-by: Jenkins
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
Reviewed-by: Andrew Butterfield <abutterfield@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Jesse Poulos <jpoulos@instructure.com>
cleaner interface, with the bonus of making it easier to avoid mocking
`any_instance` on this class.
closes CNVS-33856
test plan:
- register linked in as a user service
- it should work
Change-Id: I158e132314569dd960e04c6c863db90146b8062a
Reviewed-on: https://gerrit.instructure.com/97542
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
Tested-by: Jenkins
in aws-sdk v2, this `.read` doesn't take a block, so the files were empty
verified manually by (re-)finalizing 42613b97
Change-Id: I07fecc2fba31b46de891a000ab16c298cf9a9cc1
Reviewed-on: https://gerrit.instructure.com/99250
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins
Reviewed-by: Landon Wilkins <lwilkins@instructure.com>
closes CNVS-34242
This makes dr_diff have an option to avoid checking
lines surrounding changes. It also sets up eslint
to take advantage of this rule.
Test Plan:
- Automated Tests Pass
- Eslint only flags errors on changed lines
(when run through Gerrit/Jenkins/Gergich or
via script/eslint)
Change-Id: I900430f21c4c925e8fd87bd62e75b271fa84d08e
Reviewed-on: https://gerrit.instructure.com/99048
Tested-by: Jenkins
Reviewed-by: Landon Wilkins <lwilkins@instructure.com>
Product-Review: Landon Wilkins <lwilkins@instructure.com>
QA-Review: Landon Wilkins <lwilkins@instructure.com>
refs #CNVS-32574
Change-Id: If0a354295f9433fcf4dc2a776d93ae45833a44bd
Reviewed-on: https://gerrit.instructure.com/94683
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
refs #CNVS-32574
Change-Id: Ib1fc9c81dbfa4ece200a15a23105dbfa6f84d0c6
Reviewed-on: https://gerrit.instructure.com/94677
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
cleaner interface, with the bonus of making it easier to avoid mocking
`any_instance` on this class.
closes CNVS-33854
test plan:
- register twitter as a user service
- it should work
Change-Id: I9dd2c7b85dd9937ebe2653a5e1309757812b6bf2
Reviewed-on: https://gerrit.instructure.com/97537
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
QA-Review: Benjamin Christian Nelson <bcnelson@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
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>
fixes CNVS-34164
test plan:
* basic smoke test that translations still work
Change-Id: Ia88fc88de8b52aeaa92b65ea43b93eef5adb1dcc
Reviewed-on: https://gerrit.instructure.com/95065
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
This cop encourages explit require_dependency calls for ambiguous nested
constants in specs. What does that mean? Consider:
module Analytics
describe Assignments do
Depending on what has been required and/or autoloaded, `Assignments` could
either resolve to `Analytics::Assignments`, or just the top-level
`Assignments`. This is a cause of flickering failures and test-queue woes.
This example should either have an explicit `require_dependency` call, or
get rid of the module and just do `describe Analytics::Assignments``
Correct all existing ones in the codebase, except for a few
ActiveRecord-related ones (the auto-correct isn't quite perfect, i.e. it
assumes the file path will be `const_name.underscore`, which is no bueno
for things like ActiveRecord::ConnectionAdapters::PostgreSQLAdapter)
Test plan:
n/a, specs
Change-Id: Ic24bf3e0f547ca11c46887d4af92804da091912a
Reviewed-on: https://gerrit.instructure.com/98752
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
note: Astrolabe::Node is now just Rubocop::Node
closes CNVS-34077
test plan: rubocop should still lint correctly
Change-Id: Id5feb1700ad78cc0b34c6cb90d2a75320b210138
Reviewed-on: https://gerrit.instructure.com/98512
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
Change-Id: I0a0630d7dace8ec0cfc21721ccf67c0e7a7fa9b5
Reviewed-on: https://gerrit.instructure.com/92792
Tested-by: Jenkins
QA-Review: Benjamin Christian Nelson <bcnelson@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
as of this commit, all canvas gems should be on rspec 3.5, and pass
without deprecation warnings.
closes CNVS-34040
test plan: specs should pass without deprecation warnings
Change-Id: I556b1a4a5aeb791c6ddd50ee35b51c513e025019
Reviewed-on: https://gerrit.instructure.com/98414
Reviewed-by: Landon Wilkins <lwilkins@instructure.com>
Product-Review: Landon Wilkins <lwilkins@instructure.com>
QA-Review: Landon Wilkins <lwilkins@instructure.com>
Tested-by: Jenkins
apparently some people like to wrap their choiceInteraction
nodes around div's which confuses the question text parser
and ends up sanitizing away all the data away
test plan:
* import the package referenced in the ticket
* the imported questions in the question bank
should have answers
closes #CNVS-33920
Change-Id: I245f2242f54048efacbf20967a5ae7c90d4f84ca
Reviewed-on: https://gerrit.instructure.com/97906
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
test plan:
* import the package referenced in the ticket
* it should be successful
closes #CNVS-33964
Change-Id: Ia57e59b3e66afcdf2b59021cd04edc0760c4cc4e
Reviewed-on: https://gerrit.instructure.com/98135
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
refs CNVS-33695
this allows immediate detection of modules that came from autoloading,
and also allows delaying calling your extension until the class
is fully loaded if desired (to call a method on the base class, for
example)
Change-Id: I2ddd2055e3cf184d3ee149f114da7ec93bd0ead8
Reviewed-on: https://gerrit.instructure.com/97928
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
modest speedup and lots of cleanup...
* :once a lot of common gradebook setup
* ensure we're not stubbing sessions in a :once
* remove lots of wait_for_...
* include_text
* have_size
Change-Id: I33883add7c34d2cf8867c3d6709ffd2cf92dd9bf
Reviewed-on: https://gerrit.instructure.com/97851
Tested-by: Jenkins
Reviewed-by: Landon Wilkins <lwilkins@instructure.com>
Product-Review: Landon Wilkins <lwilkins@instructure.com>
QA-Review: Landon Wilkins <lwilkins@instructure.com>
Fixes CNVS-33657
Refs CNVS-33562
Test Plan:
* In an account with multiple terms
spanning across past, present, and
future, go to account settings
Part 1:
* The "Show courses from the term:" dropdown
on the right should include groups for Default,
Active, Future, and Past (in that order)
* The terms in the dropdown are categorized
correctly based on their start and end dates
and alphabetized
Part 2:
* Click "+ New Course" on the right hand side
* The enrollment terms dropdown should match the criteria
from Part 1.
Part 3:
* Select the Reports tab
* Configure a report
* A modal should appear with a terms
dropdown that matches the criteria from Part 1 & 2.
Change-Id: Id46de9052ada9841cf7b2ad77246bb63258fc017
Reviewed-on: https://gerrit.instructure.com/96802
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Dan Minkevitch <dan@instructure.com>
so that CodeClimate will stop choking on them
Change-Id: I139b57d6bd0636710825bf1dbf6c28f1c640e039
Reviewed-on: https://gerrit.instructure.com/97586
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
fixes OUT-476
[ci-coverage]
test plan:
- load /plugins/academic_benchmark_importer
- confirm that no API v3 partner key value is present
- enter API v1 api key
- perform an import using the outcomes importer tool
- confirm that the outcomes are imported properly without errors
- clear out all learning outcomes
- load /plugins/academic_benchmark_importer
- enter an API v3 partner key
- perform an import using the outcomes importer tool
- confirm that the outcomes are imported properly without errors
Change-Id: I07fad9a4745e2dde35c67c2e862115d2a30d5957
Reviewed-on: https://gerrit.instructure.com/94489
Reviewed-by: Michael Brewer-Davis <mbd@instructure.com>
QA-Review: Cemal Aktas <caktas@instructure.com>
Tested-by: Jenkins
Product-Review: Jessica Hill <jhill@instructure.com>
closes CNVS-33609
This used class instance variables to store callback suspension
information at the class level. Now that is stored in thread data
so that requests across threads don't stomp on each other.
test plan:
* run canvas in threaded mode with lots of simultaneous requests
and make sure they don't stomp on each other.
* or, see spec
Change-Id: I62de11fba229192df54756f9b87dfb81c3772323
Reviewed-on: https://gerrit.instructure.com/88073
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Benjamin Christian Nelson <bcnelson@instructure.com>
Product-Review: Zach Wily <zach@instructure.com>
Tested-by: Jenkins
closes CNVS-32229
closes CNVS-32232
test plan:
* Create a course with MGP enabled and two grading periods in
the default term
* Create two assignments for this course, one in a closed GP and
one in an open GP
* To test overrides, create the following as well:
* For one of the students, make the open assignment due in the
closed grading period
* For another student, make the closed assignment due in the
open grading period
* Ensure the following steps work for all assignment/student
combos due in a closed grading period.
** CNVS-32229 **
* Login as a teacher
* Go to speedgrader for the assignment in the closed GP
* Notice that the grade input is locked down
* Right click on the locked-down input and select 'Inspect'
* Remove the 'ui-state-disabled' class and remove
readonly="readonly" from the input field's HTML
* Notice the input is no longer grayed out and you can enter
a grade
* Enter a grade and tab out of the input
* You should see an error message that says something went wrong
and notice in the Network tab of your dev tools that the AJAX
post failed, meaning the submission was not gradeable
* Refresh the page and notice the grade is not there.
* Verify it isn't there in Gradebook either
* Login as an admin
* Go to speedgrader for the assignment in the closed GP
* Notice that the grade input is *not* locked down
* Enter a grade and tab out of the input
* You should *not* see an error message that says something went
wrong meaning the submission was graded successfully
* Refresh the page and notice the grade is there.
* Verify it is also present in Gradebook
** CNVS-32232 **
* Login as a teacher
* Go into a gradebook that has an assignment that is
locked down because it is in a closed grading period
* Notice that the grade cells for the assignment are locked
down (because the submissions fall in a closed grading period)
* Right-click on one of the locked-down cells and select 'Inspect'
* Remove the 'grayed-out' and 'cannot_edit_in_closed_grading_period'
classes
* Notice the cell is no longer grayed out and you can enter a grade.
* Enter a grade
* Click on another cell.
* You should see an error message that says something went wrong
and in the Network tab of your dev tools verify the AJAX post
failed, meaning the submission was not gradeable
* Refresh the page and notice the grade is not there
* Login as an admin
* Login as a teacher
* Go into a gradebook that has an assignment that is
in a closed grading period
* Enter a grade in a cell that should be due in a closed grading
period
* Click on another cell
* You should *not* see an error message that says something went
wrong meaning the submission was graded successfully
* Refresh the page and notice the grade is there.
* Verify it is also present in Gradebook
Change-Id: Ia80e4de626616309c5e9dffb78ed0f9671ad1076
Reviewed-on: https://gerrit.instructure.com/95687
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
Tested-by: Jenkins
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
* remove dead code
* don't pollute rspec methodspace with stuff internal to
SeleniumDriverSetup
* get rid of global variables
* set up webserver and webdriver concurrently for a little speedup
* set up webdriver in a before :suite so that badness makes it bail early
(instead of "failing" every example in the first group)
Change-Id: I19e38a19afab671f1a3fbdedc38f81758179faa2
Reviewed-on: https://gerrit.instructure.com/96550
Tested-by: Jenkins
Reviewed-by: Shawn Meredith <shawn@instructure.com>
Product-Review: Shawn Meredith <shawn@instructure.com>
QA-Review: Shawn Meredith <shawn@instructure.com>
Reviewed-by: Landon Wilkins <lwilkins@instructure.com>