Commit Graph

438 Commits

Author SHA1 Message Date
Cody Cutrer 440290c08f remove active_polymorph
fixes CNVS-25580

Change-Id: Id1a001e8b85f87d1c0e9678500ed13d435872b55
Reviewed-on: https://gerrit.instructure.com/68292
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2015-12-08 02:03:53 +00:00
James Williams 2da91413b9 improve redirection and status criteria for course link validator
test plan:
* create course content with various valid and invalid links,
 including the example links described in the ticket comments
* running the course link validator should not give false
 positives for these example addresses
* should work otherwise as normal

closes #CNVS-25484

Change-Id: I5d3a98b37e5c7696a2c60248df2376cd95dc9b0d
Reviewed-on: https://gerrit.instructure.com/68164
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Ryan Allen <rallen@instructure.com>
Product-Review: Cosme Salazar <cosme@instructure.com>
2015-12-07 21:38:58 +00:00
Rob Orton ab2eaaf205 fix outcome results report
fixes CNVS-23682

test plan
 - run outcomes results report
 - it should work

Change-Id: I8bf5e5b07247b5de3726c7d5bf48afd38079c5b8
Reviewed-on: https://gerrit.instructure.com/68094
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
2015-12-03 04:04:01 +00:00
Rob Orton 9bad9105b4 add deleted user filtering to last access report
fixes CNVS-24290

this adds the ability to filter whether or not you want deleted
enrollments when you run the Last User Access Report. Note this
determination of whether an enrollment is deleted is made
purely on the workflow_state of deleted for enrollments.

test plan:
1. create some users, and put them in some courses.
2. access the course as each one of the users.
3. delete one of the enrollments.
4. run the Last User Access Report with the deleted option off, and
notice you don't get the deleted enrollments access.
5. run the Last User Access Report with the deleted option on, and
notice you do get the deleted enrollment.

Change-Id: Iaa07b98ef03260eeef15513df62e0b0f926db813
Reviewed-on: https://gerrit.instructure.com/65800
Reviewed-by: Rob Orton <rob@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
2015-12-03 04:00:44 +00:00
Cody Cutrer b86b059b30 Merge branch 'pr_activesupport_suspend_tuning' of github.com:dgynn/canvas-lms
Change-Id: I8caca1cdf8d1320b5d35e2775c9d27344953827f
Reviewed-on: https://gerrit.instructure.com/67919
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
2015-12-01 13:37:08 -07:00
Cody Cutrer 7ea94c5ba8 rails 4 style associations
Change-Id: I0f80aa18ecfb73823368b7abb536d61cc0975c38
Reviewed-on: https://gerrit.instructure.com/67543
Tested-by: Jenkins
Reviewed-by: James Williams  <jamesw@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2015-12-01 20:01:34 +00:00
Jeremy Stanley f4dd6019fc complete rubyzip >1.0 migration
the zip-zip gem adds aliases from the rubyzip 0.9 names
(e.g. Zip::ZipFile) to the 1.0 names (e.g. Zip::File)

remove the last of the old names, and remove the gem

fixes CNVS-25247

Change-Id: I6b0c0427a1b4fa7f67a29f391043d018ddf1a551
Reviewed-on: https://gerrit.instructure.com/67660
Tested-by: Jenkins
Reviewed-by: James Williams  <jamesw@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
2015-11-30 16:00:12 +00:00
Dave Gynn 8a73170cc4 performance tune activesupport-suspend for rails 3.2 and 4.0
this skips the expensive compilation of the callback chain methods
unless the model *has* callbacks and callbacks are currently
suspended for the model. if callbacks are not suspended, the
default rails callback logic is performed.
2015-11-26 22:09:02 -08:00
Joel Hough 0d5fd23f4c assume text/plain for incoming mail with unspecified content-type
fixes CNVS-24061

test plan
- reply to a replyable notification from canvas with an email that
 lacks a Content-Type header (you'll have to use an email client
 with pretty low-level email fiddling capabilities, like a rails
 console)
- ensure that canvas accepts the message and posts the reply

Change-Id: Id1b4485c4adf0cb5a6f39b261d7975d1b2ef499f
Reviewed-on: https://gerrit.instructure.com/66426
Tested-by: Jenkins
Reviewed-by: Matthew Wheeler <mwheeler@instructure.com>
QA-Review: Heath Hales <hhales@instructure.com>
Product-Review: Joel Hough <joel@instructure.com>
2015-11-24 22:45:55 +00:00
Rob Orton 4248b98f9f fix include_deleted parameter to be boolean
refs CNVS-24290

test plan
 - pass include_deleted to account reports
 - use true and false and make sure they work

Change-Id: Ia5db2a61931ec1043c808f55178971236e398510
Reviewed-on: https://gerrit.instructure.com/66923
Tested-by: Jenkins
Reviewed-by: Mike Nomitch <mnomitch@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2015-11-20 22:48:54 +00:00
James Williams ada6ddb151 bump moodle2cc to 0.2.28
fixes module item references not importing
also converts "force_subscribe" forums to announcements

test plan:
* import the packages referenced in the tickets
* should import as expected

* also re-test the packages in CNVS-23155 and
 CNVS-24121

closes #CNVS-24773 #CNVS-24958

Change-Id: I710f849c6429f293a923f67a94d8c6b25516ad9b
Reviewed-on: https://gerrit.instructure.com/67401
Tested-by: Jenkins
Reviewed-by: Dan Minkevitch <dan@instructure.com>
Product-Review: Dan Minkevitch <dan@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
2015-11-19 19:12:35 +00:00
Cody Cutrer 34b8f46ba5 several qualified names fixes in raw SQL
refs CNVS-21900

Change-Id: I54afb7f5b35109f4cc78ab2f285e5bc9cb01190f
Reviewed-on: https://gerrit.instructure.com/67243
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2015-11-18 22:01:23 +00:00
Cody Cutrer 3e61b9bdd4 set timeouts for CanvasHttp requests
fixes CNVS-24680

Change-Id: I8317983ea8f735aa5eb2d99bb7b5750e2727d03b
Reviewed-on: https://gerrit.instructure.com/66714
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2015-11-11 21:16:16 +00:00
Simon Williams e25816ab6f Revert "handle nil responses from kaltura client"
This reverts commit ec9937e026.

fixes CNVS-24746

the commit being reverted fixed a bug in handling for a specific client
kaltura instance, but in the process, caused a regression in handling
for our normal instructure media processing flow. we are reverting the
fix for now, and will look into a better fix for the client specific
issue.

test plan:
- upload a file instructure's default media processing instance
- it should successfully generate a preview which can be viewed from the
  files page.

Change-Id: I61691c680b1b46d369d3dc1dac1d66dd5d4faf17
Reviewed-on: https://gerrit.instructure.com/66696
Reviewed-by: Mike Nomitch <mnomitch@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2015-11-10 20:50:37 +00:00
Jeremy Stanley 65f4dbd7d4 improve accounts#settings page load time
set up a relation that can be loaded once, instead of applying the
same scope dozens of times

test plan: quick regression on account report term settings

refs CNVS-24764

Change-Id: I0cbbe96e712087834d68888b39893e9106e80282
Reviewed-on: https://gerrit.instructure.com/66401
Reviewed-by: James Williams  <jamesw@instructure.com>
Tested-by: Jenkins
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2015-11-10 16:26:50 +00:00
August Thornton 69b31064c6 modified gemspec to comply with RubyGems v2.5.0
RubyGems v2.5.0 has more aggressive gemspec checks.
This removes the description and simplifies
the summary to comply with the parsing.

Change-Id: I08b259a0812d1290e512d6aee40296cb8a1f4b6d
Reviewed-on: https://gerrit.instructure.com/66578
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Product-Review: August Thornton <august@instructure.com>
QA-Review: August Thornton <august@instructure.com>
2015-11-05 21:44:02 +00:00
James Williams afe3b99995 truncate thumbnail filenames
closes #CNVS-24702

Change-Id: I4e2b369bad1127b06b39c7167f33f858fd09f982
Reviewed-on: https://gerrit.instructure.com/66279
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2015-11-03 15:52:51 +00:00
Cody Cutrer 2622b62e8e Merge branch 'master' of git://github.com/EinsteinsWorkshop/canvas-lms
Change-Id: I268ec1c5c4437e223274e35b7e81dd42c02ee73a
Reviewed-on: https://gerrit.instructure.com/65541
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Tested-by: Jenkins
2015-10-27 12:54:24 -06:00
James Williams 5de2a36d32 bump moodle2cc
fixes problems with duplicated wiki page names

test plan:
* import the package referenced in the ticket
* it should import the duplicated wiki pages
 (they will be differentiated by "-2", "-3", etc)

closes #CNVS-24121

Change-Id: Ib72bb996926ba314b537e366598617fc07764739
Reviewed-on: https://gerrit.instructure.com/65538
Tested-by: Jenkins
Reviewed-by: Dan Minkevitch <dan@instructure.com>
Product-Review: Dan Minkevitch <dan@instructure.com>
QA-Review: Dan Minkevitch <dan@instructure.com>
2015-10-23 19:30:59 +00:00
Cody Cutrer 68ca105569 Merge branch 'fix-filenames' of https://github.com/grahamb/canvas-lms into grahamb-fix-filenames
Change-Id: I66be9067ff36f22c5812fe27c8158fee9176d51a
Reviewed-on: https://gerrit.instructure.com/#/c/57532/
Reviewed-by: Jeremy Stanley <jstanley@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
2015-10-20 13:15:13 -06:00
Jon Jensen 3c022771b0 selinimum: the saga continues
Now with full js/jsx/coffee/hbs/scss goodness \o/

If your commit ONLY touches js/jsx/coffee/hbs/scss/views/controllers or
specific whitelisted things, and doesn't touch global-y bundles or
layouts, then your commit may** be selinimized. That means it will only
run the selenium specs that care about those files.

If you touch lib, or gems, or models, or any global-y stuff, all the specs
will still run.

Also add the ability to override what we selinimize against when testing
changes to selinimum.

**Note that actual selinimization depends on a post-merge build having
succeeded for the parent (or a near ancestor). If the post-merge build
failed, or your build starts before it finishes, or there are
unselinimizable changes between your commit and the nearest ancestor with
selinimum stats, then your commit will not be selinimized :'(

See 4a83f6b6 for the full story.

Test Plan:
* Specs should pass on this commit
* It should not be selinimized because we touch package.json
* See dependent test commits where selinimization happens

Change-Id: I62c78c316876aaff07514a0f460ff4d608dac494
Reviewed-on: https://gerrit.instructure.com/65082
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
Reviewed-by: Derek Bender <djbender@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2015-10-14 18:58:49 +00:00
Graham Ballantyne 4bee429702 Properly escape filenames with slashes on local storage
When using local storage instead of S3, having a course short name with
a slash in it will cause an error (No such file or directory @
rb_sysopen) when trying to export the Gradebook as a CSV. attachment_fu
is receiving the slash as part of the file path, and erroring out
because it can't find the file.

This change moves the sanitize_filename method out of the attachment
model and into s3_backend. It also addes a different, local-storage
specific sanitize_filename method to file_system_backend.

This change also reverts cf341a4, which fixed this bug in
gradebook_csvs_controller (#640).

A CLA is on file under my employer, Simon Fraser University
(github.com/sfu).

Test plan:

enable local storage for canvas
create a course with a slash in the short name (e.g. CHEM 121 / CHEM
122)
attempt to export the gradebook
ensure the gradebook file was exported and downlaoded correctly

revert cf341a4 replace slashes with underscores in gradebook export filename

Reverts cf341a4 to previous behaviour, in prep for a proper fix in AttachmentFu itself.

remove sanitize_filename from attachment model

move original sanitize_filename to s3_backend

add local storage-specific sanitize_filename to file_system_backend

add tests for new sanitize_filename methods

force file_in_context_spec to use s3_storage

refactor file_system_backend#filename=

always pass `value` (the string being set as the filename) through `sanitize_filename`
2015-10-13 15:11:51 -07:00
Cody Cutrer 1bd856cffc make google drive timeout configurable
Change-Id: I52b46c71fe9a0c4c7d272b67658909e53902b383
Reviewed-on: https://gerrit.instructure.com/64921
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Tested-by: Cody Cutrer <cody@instructure.com>
2015-10-09 19:32:39 +00:00
James Williams 83b0b5b3fe strip unclosed tags from html
closes #CNVS-18869

Change-Id: Ia16bbbb369ac77cba1021f39431f92045f2473bb
Reviewed-on: https://gerrit.instructure.com/64863
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2015-10-09 12:56:14 +00:00
Rob Orton 2b4a7f4d22 show inactive status for inactive enrollments on sis export
fixes CNVS-23667

test plan
 - set an enrollment to inactive via sis import
 - run sis export it should have inactive instead of nil

Change-Id: I125698dde37a0511c1a196c25c414fc5fbbb9345
Reviewed-on: https://gerrit.instructure.com/64495
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2015-10-06 16:43:54 +00:00
Joel Hough d2210350a2 sqs incoming mailbox
fixes CNVS-23704

test plan
- regression test incoming sqs (see CNVS-21215)

Change-Id: I71cb0f2f49902c5d7d348da55301a129a74d0b18
Reviewed-on: https://gerrit.instructure.com/64188
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
QA-Review: Heath Hales <hhales@instructure.com>
Product-Review: Joel Hough <joel@instructure.com>
2015-09-30 22:22:05 +00:00
Cody Cutrer 5fdfe00b88 improve name inference
* don't treat suffix-like-names as suffixes when they're more likely
   the given name
 * even more so when it should already be in last-name-first context

test plan:
 * have a user with the full name "Vi Duing", which should translate
   to a sortable name of "Duing, Vi"
 * do an LTI launch
 * first name should come through as Vi, last name as duing

Change-Id: I2d728614af8ff421a5e14e8c2d116d9f0d0a2499
Reviewed-on: https://gerrit.instructure.com/63139
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2015-09-29 05:33:42 +00:00
Michael Nomitch ec9937e026 handle nil responses from kaltura client
fixes CNVS-20610

test plan:
  - configure account to use kaltura (is this possible)
  - upload a very short video via the new files page
  - upload works
  - after a reasonable amount of time (waiting for it
    to transcode) you can preview the file via the files
    pages

Change-Id: Ie874eca7fe9943e491282aac15019f25ec0c7713
Reviewed-on: https://gerrit.instructure.com/63604
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Jenkins
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
2015-09-25 14:12:32 +00:00
Michael Nomitch 765dfac194 create enrollment activity report
fixes CNVS-18507

test plan:
  - enroll a few users in a course
  - enroll a user from a different account
    in that course
    - log in as this user and visit the course
  - from the account, as an admin run the
    last_enrollment_activity report
  - all the users in the course show up
    including the user from the other account
  - last activity shows your log in as the new user

Change-Id: I0729400f253ecd24b290a499f13eecd86a4f564e
Reviewed-on: https://gerrit.instructure.com/63513
Tested-by: Jenkins
Reviewed-by: Jacob Fugal <jacob@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
2015-09-25 14:12:30 +00:00
Kacey Roberts ff10b28e43 Added User List to responses on all questions for quiz statistics.
test case:
1. Create a Quiz with a question for each type.
2. Add at a few users to the course.
3. Create student submissions for the quiz with varying responses
4. When you log in as a teacher navigate to that quizzes statistics,
  and click on the expansion button for a question.
5. Click on the response ratio for that question and a modal will show
displaying all the users that have responded to that question.

Change-Id: I5e23b42f6982683902124d734c36eedb9c5da7f7
Fixes: PFS-2227
Reviewed-on: https://gerrit.instructure.com/59720
Reviewed-by: Ryan Taylor <rtaylor@instructure.com>
Tested-by: Jenkins
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Jason Sparks <jsparks@instructure.com>
2015-09-24 20:56:42 +00:00
Benjamin Porter 2bf50a2368 Academic Benchmarks CLI: add ability to remove IPs by note
Referencing the IP addresses by note is super convenient when managing
this interface.

Fixes CNVS-23385

Test Plan:

    * Be careful when testing.  You are affecting the same
    * system that is used in production

    From a rails console:

    1. Whitelist an IP address with a note of your choice.  Make sure
    you invent a new note and don't reuse one that already exists.

        AcademicBenchmarks::CliTools.whitelist_ip("3.3.3.3", "cool-note")

    2. Now remove the IP address from the whitelist with:

        AcademicBenchmarks::CliTools.remove_from_whitelist("<note-name")

Change-Id: I7cb1c1aac4d527fe2608c33bbc73b006abd6df69
Reviewed-on: https://gerrit.instructure.com/63703
Tested-by: Jenkins
Reviewed-by: Ryan Taylor <rtaylor@instructure.com>
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Product-Review: Benjamin Porter <bporter@instructure.com>
2015-09-24 19:16:41 +00:00
Jacob Fugal e2f11f5542 don't try and eager load in a data fixup
fixes CNVS-21318

eager load will try and select all the columns of the joined table by
name. but due to race conditions, being in the middle of running
migrations, it's possible the process will know of a column that hasn't
been created yet. naming it in the select will break the query.

Change-Id: I71ddd01c77f8f6157e36a01103dff52b7b967284
test-plan: N/A
Reviewed-on: https://gerrit.instructure.com/63902
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Product-Review: Jacob Fugal <jacob@instructure.com>
QA-Review: Jacob Fugal <jacob@instructure.com>
2015-09-24 17:05:16 +00:00
James Williams ff98b0e351 bump moodle2cc
test plan:
* import the package referenced in the ticket
* should work

closes #CNVS-23155

Change-Id: Iaf575356bb252ba4bebed557c79a56f490bb9dfe
Reviewed-on: https://gerrit.instructure.com/63853
Reviewed-by: Dan Minkevitch <dan@instructure.com>
Tested-by: Jenkins
QA-Review: Charles Kimball <ckimball@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2015-09-24 12:15:09 +00:00
Jon Jensen c449a8ba5c explicit jsdom and qunit dependencies for npm v3
since other projects have been known to upgrade npm on a jenkins node in
the course of a build, affecting subsequent canvas builds  ಠ_ಠ

test plan:
npm install should be happy on npm v3

Change-Id: I6767dac7dea7c8cfb4dfabbf94a29f6cccb00c15
Reviewed-on: https://gerrit.instructure.com/63708
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins
2015-09-21 22:27:02 +00:00
Jacob Fugal 7339952ea4 rollback aba0de7 and its effects
until we can update transifex at the same time as we merge the rename.

this reverts commits:

 * f2cbb3e76e
   (Updated zh_Hant translation)

 * 9ab70066fd
   (Updated zh translation)

 * d861ceca74
   (Updated fa-IR translation)

 * aba0de7b96
   (rename some locales)

Change-Id: I130a0a14e366274c86026bbaccad985a24bb4f1f
Reviewed-on: https://gerrit.instructure.com/63496
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Product-Review: Jacob Fugal <jacob@instructure.com>
QA-Review: Jacob Fugal <jacob@instructure.com>
2015-09-21 14:51:24 +00:00
Cody Cutrer 2c2e687e59 qualified names fixes for migrations
refs CNVS-21900

Change-Id: I6b7e323e3c700aee3a7c86cb8f06fce78e5606df
Reviewed-on: https://gerrit.instructure.com/63384
Tested-by: Jenkins
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2015-09-17 22:03:28 +00:00
Cody Cutrer aba0de7b96 rename some locales
fixes CNVS-19910
fixes CNVS-23061

 * zh_Hant => zh-Hant (dash according to IETF standard)
 * zh => zh-Hans (it's really simplified Chinese)
 * fa-IR => fa (so that it will apply for _any_ Persian locale,
   not just Iran)

also handle fallbacks for deprecated languages

test plan:
 * _before_ applying this commit, change your language to one of
   the locales being renamed
 * apply the commit, but don't run the migration
 * ensure that your Canvas is still translated, both normal and
   JS translations
 * run the migration
 * you should still be translated, and in your user settings it shows
   the correct language translation

Change-Id: If02793fce1db57856895899804f1389076093d0a
Reviewed-on: https://gerrit.instructure.com/57111
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Product-Review: Dan Minkevitch <dan@instructure.com>
2015-09-16 21:36:58 +00:00
Brad Horrocks 1aff77fe8b allow deactivating developer keys
Fixes PLAT-1232

test plan:
* go to developer keys UI
* you should be to deactive and reactivate keys
* deactivate a key that you have a token for
* the token should no longer work, even though it's not expired

Change-Id: I7388226c710ab0841692902886a49146a037e615
Reviewed-on: https://gerrit.instructure.com/50008
Tested-by: Jenkins
Reviewed-by: Nathan Mills <nathanm@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Brad Horrocks <bhorrocks@instructure.com>
2015-09-16 18:31:33 +00:00
Matthew Minuti 77e649f505 Adding HTML5 video capability. 2015-09-11 16:50:30 -04:00
Rob Orton 51f7deb7e5 don't check if a file with no name exists
fixes CNVS-22899

test plan
 - remove filename from a root attachment
 - on a child attachment run
 - a.find_existing_attachment_for_md5
 - it should not error

Change-Id: I36edc4d0d28f04c80eef13d1c4cb1e322650b765
Reviewed-on: https://gerrit.instructure.com/62368
Tested-by: Jenkins
Reviewed-by: Jacob Fugal <jacob@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2015-09-09 16:47:22 +00:00
Cody Cutrer 9bf7304917 use preload instead of include on associations
refs CNVS-21901

also got rid of some useless associations

Change-Id: I13e012e0ec755443fbed12ca0629c53a9c693f43
Reviewed-on: https://gerrit.instructure.com/62217
Reviewed-by: Rob Orton <rob@instructure.com>
Tested-by: Jenkins
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2015-09-08 20:32:41 +00:00
Cody Cutrer 56ccea56d4 use preload/eager_load instead of includes
refs CNVS-21901

Change-Id: Ie9e1b2778b72f649392d8a1c47c0c86dae0ef19c
Reviewed-on: https://gerrit.instructure.com/58660
Reviewed-by: Rob Orton <rob@instructure.com>
Tested-by: Jenkins
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2015-09-08 20:32:05 +00:00
Jeremy Stanley dff35f3b9b fix blank essay question prompt on import
test plan:
 - import the package attached to the ticket
 - the essay questions should have prompts

fixes CNVS-22435

Change-Id: I2e623f7f73609c06be2b3f4b8202885d787d3255
Reviewed-on: https://gerrit.instructure.com/62426
Reviewed-by: James Williams  <jamesw@instructure.com>
Tested-by: Jenkins
QA-Review: Charles Kimball <ckimball@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2015-09-04 21:28:29 +00:00
Ryan Shaw 9f34f62be9 upload css direct to s3 and optimize unbranded css
fixes: CNVS-22276

what this change does:
* changes it so if you have a 'host' set in canvs_cdn.yml,
  when you run brandable_css it will push the css
  files directly to s3 instead of writing them all to
  disk.
* fixes the bug where brandable_css thought it had
  to re-compile css files that have not changed
* changes the way we load css bundles that don't include
  any branding or use any of the variant variables
  (like: $use-high-contrast or $use-new-styles).
  before, we generated a unique css file for each
  variant and each brand for any of those bundles.
  this will instead point everyone to same url if 
  the file uses none of those variables.

test plan:
* with no canvas_cdn.yml file:
* run compile_assets
* run it again, it should say "no changes" quickly
* the css in canvas should work
* now, rm -rf public/dist/brandable_css
* save a canvas_cdn.yml with proper s3/cloudfront settings
* compile_assets
* canvas should work and use the css that was uploaded
  to s3 in previous step
* compile_assets again, it should say "no changes"
  within a few seconds.
* if you can, delete a css file from s3 & run 
  brandable_css again. it should see that it needs
  to regenerate that file and do so correctly.

when testing the css in the UI, especially make sure
to look for:
* try loading the equation editor in different variants,
  (e.g.: high contrast, new styles, legacy) the css
  for it should always be loaded from <cdn>/dist/brandable_css/no_variables/...
* keep your js console open, there should not be any 404s
* check the screenreader_gradebook


most of the changes actually happened in brandable_css:
https://github.com/ryankshaw/brandable_css/compare/6e0ddc59...master
when code-reviewing, please do a thorough scan of 
those changes too.


Change-Id: Ie6efcedd92c3783e0b2dd194ec222b9dc28d0838	
Change-Id: Ie6efcedd92c3783e0b2dd194ec222b9dc28d0838
Reviewed-on: https://gerrit.instructure.com/61495
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2015-09-04 21:23:43 +00:00
Benjamin Porter 28d1e703a6 Academic Benchmarks API: check for empty string in key and user id
We provide a guard against a nil api key and a nil user id, but not
against the empty string.  This adds that check.

Fixes CNVS-21974

Test Plan:
    1. set the Academic Benchmark API key to nil and try to schedule an
    import.
    2. Observe that the import fails by telling you that no API key is
    set
    3. Set the AB API key to the empty string and try to schedule an
    import.
    4. Observe that the import fails by telling you that no API key is
    set

Change-Id: I2c96de9b541bec988f4b62fa52ed6200eeea5f1c
Reviewed-on: https://gerrit.instructure.com/58812
Reviewed-by: Cameron Sutter <csutter@instructure.com>
Tested-by: Jenkins
QA-Review: Adam Stone <astone@instructure.com>
Product-Review: Benjamin Porter <bporter@instructure.com>
2015-09-03 05:48:00 +00:00
Jeremy Stanley 82c3bf7f3d don't create super long tempfile names
limit the tempfile suffix to the last 50 chars of the filename
if it's longer than this. filenames (not display names) can get
very long quickly when they're non-ASCII because of URL encoding.

test plan: You should be able to upload a file named

  Качество образования-1.txt

with local storage

fixes CNVS-22707

Change-Id: Ie2af770b6de8c1499d02c3cf396e6f831becfae7
Reviewed-on: https://gerrit.instructure.com/61949
Reviewed-by: Jon Willesen <jonw@instructure.com>
Tested-by: Jenkins
QA-Review: Charles Kimball <ckimball@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2015-09-02 21:26:38 +00:00
Benjamin Porter 85ecb30513 AcademicBenchmark: Add IP whitelist management to cli tools
Fixes CNVS-22520

Test Plan:

    ** Be careful, because removing a job server's IP address **will**
    affect production.  Also make sure you remove the address you added,
    otherwise you are leaving open a security hole.  If you have any
    questions at all, contact me and I'll help you :-) **

    Using a rails console behind an already whitelisted ip address:

        1. Query the list using:
            - AcademicBenchmark::CliTools.whitelisted_ips
        2. Observe that the whitelist is returned to you
        3. Add an IP address to the whitelist.  If at home, use your
        home IP address.  If at work, just use whatever
            - AcademicBenchmark::CliTools.whitelist_ip("76.27.0.81",
              "testaddress")
        4. Re-query the list and observe that your address is now
        present.
        5. Check for whitelist like this:
            - AcademicBenchmark::CliTools.whitelist?("76.27.0.81")
        6. Now remove like this:
            - AcademicBenchmark::CliTools.remove_from_whitelist?("76.27.0.81")
        7. Re-query and make sure it's gone

Change-Id: Ic8f055cd5aa124f8b4c5a615f06d3415e709cb2b
Reviewed-on: https://gerrit.instructure.com/60879
Reviewed-by: John Corrigan <jcorrigan@instructure.com>
Tested-by: Jenkins
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Product-Review: Benjamin Porter <bporter@instructure.com>
2015-09-01 23:33:50 +00:00
Benjamin Porter 92081d6bc3 AcademicBenchmark gem: add some CLI tools
There are many operations that we are doing frequently, that we do by
hand each time.  It's about time we start coding these up to save
us time in the console, especially since they are starting to get
risky.

Test Plan:

Import some outcomes, then delete them.  Make sure they all delete.

	To delete: From a rails console:
        `AcademicBenchmark::CliTools.delete_imported_outcomes("<name-of-outcomes-root>")
        the name of outcomes root would be "Iowa" if you did the iowa
        outcomes, for example

Fixes CNVS-22601
Refs CNVS-22313

Change-Id: I4193fec741be9eb47d8c054a62371c8bfe469cb5
Reviewed-on: https://gerrit.instructure.com/60855
Tested-by: Jenkins
Reviewed-by: Ryan Taylor <rtaylor@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Benjamin Porter <bporter@instructure.com>
2015-09-01 19:19:36 +00:00
Benjamin Porter 89aed994f9 AcademicBenchmark: fix missing error message
There are several fatal errors that can be encountered in an import.
these were previously being reported as warnings, which is not accurate.
Additionally, the error message was not being set properly so in the
outcomes import API we were getting back a null error message.

Fixes CNVS-22517

Test Plan:

Most of these conditions are difficult to reproduce because they result
from the Academic Benchmarks server.  Therefore, there isn't really a
practical test plan we can do without building an emulator (which I
actually would like to do when we have a little time)

Change-Id: I521fc5250a3369497944cda5e44bbbc622f46681
Reviewed-on: https://gerrit.instructure.com/60876
Reviewed-by: John Corrigan <jcorrigan@instructure.com>
Product-Review: Benjamin Porter <bporter@instructure.com>
QA-Review: Benjamin Porter <bporter@instructure.com>
Tested-by: Jenkins
2015-08-31 16:25:43 +00:00
Matthew Wheeler a38ab02ca9 Display throughput by queue on IMP Dashboard
Fixes CNVS-22630

Test Plan:

Smoke test IMP against both types of queues

Change-Id: Icb88864b600ff76b389cd3858b70ee7898ec05f8
Reviewed-on: https://gerrit.instructure.com/61442
Tested-by: Jenkins
Reviewed-by: Joel Hough <joel@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: Matthew Wheeler <mwheeler@instructure.com>
2015-08-27 22:16:03 +00:00