Commit Graph

7763 Commits

Author SHA1 Message Date
Jacob Fugal 954e77d645 rework error handling in event stream
fixes CNVS-15153

 * don't raise if the configured cassandra database can't be connected
   to; instead, return nil (uncached, so it can be retried next time)
   and treat it as connected but unavailable
 * allow configuring whether an error is re-raised (configured true for
   test only in canvas), rather than peeking into rails directly from
   event stream.
 * allow registering callbacks to run on insert/update error via
   on_error
 * on insert/update error, before (maybe) reraising the error, call any
   registered callbacks
 * configure canvas to log to Rails.logger and statsd (removed from
   EventStream::Failure) on insert/update error

EventStream::Failure is now unused, but not yet removed from the code.
it should be considered deprecated and remain unused; it will be removed
in the near future.

test-plan:
 - start canvas in non-test mode (e.g. development mode) with cassandra
   and statsd configured and running
 - turn off cassandra, so even stream inserts should fail
 - change a grade (to trigger a GradeChange event)
 - with cassandra off, event insert should fail, but should *not*
   impede the remainder of the grade change action
 - EventStream::Failure record should *not* be created in the database
 - an error line should appear in the Rails log for the failed insert
 - the appropriate 'event_stream_failure.*' statsd counters should be
   incremented

Change-Id: I5c6d29c2a08276ccc06ebc8c1a59e0d33ce2cc4e
Reviewed-on: https://gerrit.instructure.com/40088
QA-Review: August Thornton <august@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
2014-08-28 21:19:24 +00:00
Ian Hoerner b21d59f220 fix bad link in enrollment acceptance notification
fixes CNVS-14983

Test plan
- As a student
 - Accept enrollment to receive notification
- As a teacher
 - verify that the link in the notification takes you to the user's page

Change-Id: Ic3a7dc90e974a324666b51b81e767d0efe85a7dc
Reviewed-on: https://gerrit.instructure.com/39815
Reviewed-by: Brad Horrocks <bhorrocks@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Reviewed-by: Matthew Wheeler <mwheeler@instructure.com>
Product-Review: Ian Hoerner <ian@instructure.com>
2014-08-28 21:07:07 +00:00
Duane Johnson fef74e2059 add processing_errors to SIS imports API docs
SIS imports have a processing_errors key that is not included
in the current API docs.

Test Plan:
- visit /doc/api/sis_imports.html
- the SisImport object should include processing_errors

Refs SIS-432

Change-Id: Ifd930a513f3f802a0a6354e84716562aab2f0d35
Reviewed-on: https://gerrit.instructure.com/39704
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ken Romney <kromney@instructure.com>
Product-Review: Duane Johnson <duane@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
2014-08-28 18:58:18 +00:00
Derek DeVries 622d811c64 fix issue when restoring a deleted quiz with student submissions
fixes CNVS-15098, CNVS-15079

test plan:
  - as a teacher
    - create a quiz
    - publish the quiz

  - as a student
    - take the quiz

  - as a teacher
    - delete the quiz
    - attempt to restore the quiz
    - the quiz should restore successfully

Change-Id: I5111e5beeb6debbb43a587689251e2fb62a8d3bc
Reviewed-on: https://gerrit.instructure.com/40159
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ahmad Amireh <ahmad@instructure.com>
QA-Review: Trevor deHaan <tdehaan@instructure.com>
Product-Review: Derek DeVries <ddevries@instructure.com>
2014-08-28 18:51:26 +00:00
Ryan Shaw 57f8aad679 react files polish cleanup
closes: CNVS-12727

clean up ItemCog code
better handling of kylemenu popup
I18n'ed some stuff

Change-Id: I0c5401e4f24288e3ba8a724e319774cce2cb7571
Reviewed-on: https://gerrit.instructure.com/40049
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Reviewed-by: Jason Madsen <jmadsen@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2014-08-28 18:26:48 +00:00
Brian Palmer d6c9d87f76 add the canvas version to delayed_jobs_pool proc name
test plan: with a VERSION file in your rails root, run delayed jobs, the
process name will include the contents of the VERSION file. with no
VERSION file, it won't.

Change-Id: I773ff4ace5facdb48d415ad7528daaf761aeab1d
Reviewed-on: https://gerrit.instructure.com/40162
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
2014-08-28 18:25:49 +00:00
Simon Williams 122c7393c7 allow deleting grade for pass/fail assignments
fixes CNVS-14805

test plan:
- create a pass/fail assignment, with >0 points possible
- go to the gradebook
- update a student to have a checkmark for the assignment (pass)
- keep clicking until you get back to a non-graded state
- it shouldn't show an error banner

Change-Id: Ia19190d55083056a28583d87f6e41ed42f976347
Reviewed-on: https://gerrit.instructure.com/39961
Reviewed-by: Mike Nomitch <mnomitch@instructure.com>
Reviewed-by: Liz Abinante <labinante@instructure.com>
QA-Review: Anna Koalenz <akoalenz@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2014-08-28 17:47:40 +00:00
Jeremy Stanley 2fc50baa52 corrected rounding error when creating custom grade scheme
floating point math error caused errors with certain percentages

fixes CNVS-1850

test plan:
- create/edit an assignment and go to manage grading schemes
- enter various percentages for grades (93.5, 87.6, 69.5, 69.6) and save
- grades should reflect the percentage entered after saving and not mutate

Change-Id: Ieaae9d5ea5f6436890794a029cf0a54749ccad18
Reviewed-on: https://gerrit.instructure.com/39662
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Trevor deHaan <tdehaan@instructure.com>
2014-08-28 17:40:41 +00:00
Aaron Cannon f1bdc8f7e4 Accessibility: Enclose discussion titles in h3s
Fixes CNVS-14659

Test plan:
- Visit the list of discussion topics for a course.
- Verify that the discussion titles are recognized as level three headings by
  screen readers.
- Verify that the visual appearance of the page has not been effected.

Change-Id: Ideddc504730cd0e8cdc91a8f34174922acafed76
Reviewed-on: https://gerrit.instructure.com/38886
Reviewed-by: Jayce Higgins <jhiggins@instructure.com>
Product-Review: Matthew Wheeler <mwheeler@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Matthew Wheeler <mwheeler@instructure.com>
2014-08-28 17:33:07 +00:00
Ryan Taylor ebc19f7409 Quizzes and Assignments pass #destroy calls back and forth
While we can't reproduce locally, this code change will cause an
exception in the future which should provide additional information
about what is happening.

Closes CNVS-14864

Change-Id: I80fb1297a1d76c7fdc51715b09dde345e4ab47fc
Reviewed-on: https://gerrit.instructure.com/40117
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Derek DeVries <ddevries@instructure.com>
QA-Review: Trevor deHaan <tdehaan@instructure.com>
Product-Review: Ryan Taylor <rtaylor@instructure.com>
2014-08-28 16:32:59 +00:00
Ethan Vizitei f8b4c9d780 give good messaging when a quiz question is big
fixes CNVS-6983

When submitting a quiz question that's too long,
the response that is "unknown error" which isn't
helpful.  This provides a useful error message.

test plan:
 - Login as a teacher
 - EDIT AN EXISTING quiz question
 - make the question text more than 16384 characters
 - save the question
 - you should get an error that tells you why it can't save
 - CREATE A NEW quiz question
 - make the question text more than 16384 characters
 - save the question
 - you should get an error that tells you why it can't save

Change-Id: Ida3438a9648c6b8c61f9e4a19c9414f3595a67e8
Reviewed-on: https://gerrit.instructure.com/39748
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Derek DeVries <ddevries@instructure.com>
QA-Review: Trevor deHaan <tdehaan@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2014-08-28 16:19:16 +00:00
Jeremy Stanley 8b679c7417 support selective file exports with select[files] param
this is a friendly alias for select[attachments], done to be
more consistent with existing API names, and following the
example of select[modules], select[pages], etc.

test plan:
 - do selective content exports with the content export API,
   using select[files][]=(id), and ensure the correct file(s)
   are exported
 - test both common cartridge and zip exports

fixes CNVS-15129

Change-Id: I004ae1e8ba28ea8b7cf480c8fee5bd9633375781
Reviewed-on: https://gerrit.instructure.com/40115
Reviewed-by: James Williams  <jamesw@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2014-08-28 15:36:55 +00:00
Ethan Vizitei 45ab031524 change wording on question bank editing
fixes #CNVS-13065

Per Erin Hallmark, "Question Group" makes
more sense than "Quiz Group"

Test Plan:
 -Login as an instructor
 -try to add a question to a question group
 -see the better label that using the preferred
    wording

Change-Id: I372e4bce7e223557ae5ce3a08f2d91882bd45857
Reviewed-on: https://gerrit.instructure.com/39760
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Taylor <rtaylor@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Trevor deHaan <tdehaan@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2014-08-27 23:16:36 +00:00
Cody Cutrer 48864de3f6 begin rails 4
enough for bundle install to work with 4.1.5

Change-Id: I277df9e4315fa250b6028139113c74721148e2f0
Reviewed-on: https://gerrit.instructure.com/39656
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2014-08-27 23:09:17 +00:00
Ahmad Amireh 0f2d1ab0cf CQS - Quiz report generation & downloading
Features:

  - quiz report buttons are now functional
  - the report status is displayed in the tooltip
  - reports can be generated
  - their progress is tracked
  - when a report is generated, it is auto-downloaded
    - unless the user reloads the page before generation is complete
    - *NEW*: when reports r loaded, and we find out that some are being
      generated, the buttons actually show that just as if the teacher
      had just pushed the button in that page view
  - lots lots of tests, every single scenario is covered

Development updates:

  - helpers for testing stores and their actions
  - there is now a test environment initializer
  - grunt/connect server now supports downloading files from Canvas
    (e.g, proxies requests from /files/* with proper FRAMEORIGIN
    masquerading)
  - I18n.t() calls now provide (limited) support for Date parameters;
    the output is not quite the same as in Canvas yet
  - Backbone/JSON-API abstractions for parsing things without really
    caring
  - new, extended doc tags (JSDuck):
    - @needs_cfg: state the config parameter a method uses, or
      relies on, to function
    - @async: mark a method as asynchronous

Closes CNVS-14848

TEST PLAN
---- ----

  - go to CQS page
  - mouse over either the "Student Analysis" or "Item Analysis" buttons
    + verify you see a message saying they're not generated yet
    + click on one
      - verify you see a progress bar inside the tooltip, wait for it
        + verify the message changes, and you are prompted to save the
          CSV file

other things to try:

  - request a report generation
    + quizkly, before it finishes, reload the page
    + quickly, mouse over the button
      - verify that you see the progress bar just as if you had
        initiated the request on this page view
      - when it finishes, verify you do *not* get the Save prompt

  - try generating both reports at the same time:
    + verify you get a total of 2 Save prompts, one for each report

Change-Id: I1aec6c9e791de262ef87d028f2b432e921e6ea4a
Reviewed-on: https://gerrit.instructure.com/39855
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Trevor deHaan <tdehaan@instructure.com>
Reviewed-by: Derek DeVries <ddevries@instructure.com>
Product-Review: Derek DeVries <ddevries@instructure.com>
2014-08-27 22:09:42 +00:00
Simon Williams 4c34761c34 remove unused page_header and page_subhead content blocks
closes CNVS-14803

test plan:
- make sure the headers are unchanged on the following pages:
  - /accounts/1/account_authorization_configs
  - /accounts/1/sis_import
  - /courses/1/content_exports
  - /courses/1/confirm_action?event=delete
  - /accounts/1/terms
  - /accounts/1/sub_accounts
  - /accounts/1/users/1/delete
  - /users/1/admin_merge

Change-Id: I4563e243cb733e2826d52b408991032da3767efa
Reviewed-on: https://gerrit.instructure.com/39373
Reviewed-by: Ryan Florence <ryanf@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Anna Koalenz <akoalenz@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2014-08-27 21:52:14 +00:00
Jeff Belser 6377e9b9bf fix i18n for time zone dropdowns and profiles
fixes CAT-465

Test Plan
  1. Start canvas with full localization support enabled
     (ie $ LOLCALIZE=true rails server)
  2. Ensure the time zone select inputs on the course settings,
     account settings, user profile settings and new user confirmation
     pages are localized appropriately
  3. Ensure the course and user profile time zone is localized
     when not editing the settings

Change-Id: Ic9cb64986451a9a10925b716b727eae45b3b1806
Reviewed-on: https://gerrit.instructure.com/39435
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Nick Houle <nhoule@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
Product-Review: Adam Phillipps <adam@instructure.com>
2014-08-27 21:36:47 +00:00
Jeremy Stanley 7f23639c25 prevent non-admin users with SIS IDs from deleting themselves
(previously, canvas only did this for users with SIS IDs and
managed authentication. I do not see how the managed auth part
is relevant.)

test plan:
 - The Edit Settings page at /profile/settings should show the
   "Delete My Account" link only if
   * the user is an account or site administrator, or
   * the user has no SIS ID
 - the "Really delete" page (users/1/delete) should redirect
   back to the profile page with an error message for non-admins
   with SIS IDs
 - the Users API should return a 401 (Unauthorized) error if
   non-admins with SIS IDs try to delete themselves

fixes CNVS-14804

Change-Id: I93a003235204b0fbde226c76aaf8677f3a417f9d
Reviewed-on: https://gerrit.instructure.com/39789
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: James Williams  <jamesw@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Hilary Scharton <hilary@instructure.com>
2014-08-27 21:24:50 +00:00
Jeremy Stanley 92b9dbfd34 prevent N+1 query on sub_accounts#show
fixes CNVS-14835

Change-Id: Iaabf7d1994f355abf3ea000bdbcef9e208f54712
Reviewed-on: https://gerrit.instructure.com/39448
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: James Williams  <jamesw@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2014-08-27 21:04:38 +00:00
Cameron Matheson 4812cf935a include document preview urls in submissions api
closes CNVS-13322

Test plan:
  * consume endpoints on the submissions api
  * attachments should now include a "preview_url" (it will display the
    document)

  * document previews should still work everywhere in canvas
    (speedgrader, files, tinymce)

Change-Id: Ic11725832fa55e0deedf3bbce4a8b6a84f4ea29a
Reviewed-on: https://gerrit.instructure.com/36423
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
2014-08-27 19:47:00 +00:00
Cameron Sutter 88cd60a540 kill assignment global nav
fixes CNVS-13317

test plan:
 > assignments global navigation should be gone
 - type in '/assignments' as the URL manually
 > it should redirect you to the user dashboard

Change-Id: I6f26b825119268b62164ee37897be86909682a17
Reviewed-on: https://gerrit.instructure.com/39788
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Anna Koalenz <akoalenz@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Hilary Scharton <hilary@instructure.com>
2014-08-27 19:14:56 +00:00
Clay Diffrient 25d15c03f1 Adds move to option for module items
Makes the modules page more accessible for both screenreader and
keyboard only users.

fixes CNVS-9045

  test plan:
    1. Using a screenreader go to the modules page (/courses/##/modules)
    3. Navigate to the admin links cog for a module item.
    4. You should see a "Move to..." option.
    5. Click it using whatever the screenreader uses for click
       (VO: Ctrl+Option+Space)
    6. A dialog should appear (This dialog should be accessible)
    7. You should be able to move a module item to whatever location
       you want.

Change-Id: I7f6cffef2eb321103889fb81e932e9551f8b912e
Reviewed-on: https://gerrit.instructure.com/39930
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Cosme Salazar <cosme@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
2014-08-27 18:52:45 +00:00
Joel Hough f333fca8ad speed up user note permission checks on the inbox
fixes CNVS-14990

test plan
- have a user associated with many accounts (~10)
- have teacher enrollments in many courses in those accounts (~100)
- conclude a significant portion of the enrollments (~75%)
- enable user notes on at least one of the accounts
- make sure the user does not have :manage_students permissions on
 any of the accounts
- load the conversation inbox
- ensure that the inbox loads in a timely fashion (at least faster
 than without this commit)
- regression test user notes in conversations

Change-Id: I9d108f193c998e970c3798181dc3faf9a13cadf4
Reviewed-on: https://gerrit.instructure.com/39756
Reviewed-by: Matthew Wheeler <mwheeler@instructure.com>
Product-Review: Matthew Wheeler <mwheeler@instructure.com>
Reviewed-by: Brad Horrocks <bhorrocks@instructure.com>
Reviewed-by: Mark Severson <markse@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
2014-08-27 18:35:14 +00:00
Colleen Palmer 837e130778 Initial new_styles styleguide
fixes CNVS-14529

What it does:

- Adds feature flags for new styleguide styles
- Strips out un-needed variable highcontrast (these will need to
be set per element, not on the main color variables)
- Changes gemfile to point to temporary dress_code repo: we need this
so the dress_code generator strips out the parent tag

Test plan:

- get new gem: bundle install
- get new styles: npm run compile-sass
- regenerate styleguide: rake css:styleguide
- Make sure new_styles is disabled. You can do this in rails console:
Account.find(1).disable_feature!(:new_styles)
- Go to /styleguide and it should look the same as it does now
- Now turn on the feature flag. In rails console:
Account.find(1).enable_feature!(:new_styles)
- Refresh /styleguide and you should see are base starter styles for
the new look and feel!

Note: The new styleguide components are a wip and this request just
adds in the layout and styles specifically for the /styleguide page
to use while we work through all the components. You will notice
some funky looking ui - that's normal. We will be attacking these
components piece by piece.

Change-Id: I952b36346df77f98ddb7bbc5e27ab9b45ab4d8ca
Reviewed-on: https://gerrit.instructure.com/39600
Reviewed-by: Chris Hart <chart@instructure.com>
Reviewed-by: Derek DeVries <ddevries@instructure.com>
Product-Review: Colleen Palmer <colleen@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Matt Fairbourn <mfairbourn@instructure.com>
2014-08-27 17:43:50 +00:00
Colleen Palmer a8752be787 Accessibility color on quiz stats
This updates the colors used on the quiz statistics so they
can pass accessibility needs.

fixes CNVS-13982

Test Plan:

- Recompile css - npm run compile-sass
- Make sure New Quiz Statistics feature is active
- As an admin or teacher that has given a quiz to students, go to
the "Statistics" tab to view new statistics
- Using inspector, grab the hex for the Gray color used on the
"Avg Score" title
- Go to Webaim and enter that color as foreground and #ffffff (white)
as background and make sure it passes WCAG AA

Change-Id: Id53d68991dba2fecee3792d8f14f5cc4841a72b3
Reviewed-on: https://gerrit.instructure.com/39223
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Chris Hart <chart@instructure.com>
QA-Review: Nathan Rogowski <nathan@instructure.com>
Product-Review: Matt Fairbourn <mfairbourn@instructure.com>
2014-08-27 14:34:32 +00:00
James Williams 07e03d3c9a add menu tool links to gear menus on modules index
test plan:
* create an external tool with one or more of the
following extension types configured:
'assignment_menu', 'module_menu', 'quiz_menu',
'wiki_page_menu'

* enable lor feature flag for account or user
* for a course, the gear menu for modules and exportable
 module items (assignments, quizzes, and wiki pages for now),
 should contain a new link (if configured)

* clicking the link should launch the tool, passing a query
 parameter (either 'modules%5B%5D=:id' for modules, or
 'module_items%5B%5D=:id' for items)
 (note: '%5B%5D' is equivalent to '[]' escaped)

closes #CNVS-14547 #CNVS-14552 #CNVS-14553 #CNVS-14554

Change-Id: Ifebf669c25f600c6491648ad8ec5ab65c62932ba
Reviewed-on: https://gerrit.instructure.com/39874
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
2014-08-27 14:25:27 +00:00
Jeremy Stanley 5baca5c7b2 add :preload_courses option to User#cached_current_enrollments
many consumers of this function proceed to load the course for
each enrollment (note that #active? etc. load the course, to get
term dates). this causes an N+1 query each time. add an option
to preload courses for the returned enrollments, and use it
where it makes sense.

test plan:
 - have a user with many active enrollments
 - load the dashboard for the user (/)
 - consult the system log and ensure this isn't sequentially
   queried for every course the user is enrolled in:
SELECT "courses".* FROM "courses" WHERE "courses"."id" IN (x)

fixes CNVS-14880

Change-Id: Ie7be8f402b49516aa7bc667f9cf8b7598d2abfc7
Reviewed-on: https://gerrit.instructure.com/40070
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2014-08-27 14:04:25 +00:00
Cameron Matheson ff58a8fa56 always show gb2 "move total column" option
fixes CNVS-15081

Test plan:
  make sure you can move your total column in gb2 whether or not your
  assignment groups are weighted.

Change-Id: I7e76f1ea95f67de326ba77fbf963017bb824a881
Reviewed-on: https://gerrit.instructure.com/39984
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
2014-08-27 03:08:50 +00:00
Cody Cutrer ddb704c6cc don't bother checking redis in a health check
we automatically work around redis failures anyway

Change-Id: I13c8b689447ee1de27a768d442624d2839a52ea1
Reviewed-on: https://gerrit.instructure.com/39980
Reviewed-by: Brian Palmer <brianp@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2014-08-27 03:03:31 +00:00
Sterling Cobb 5ab197456c hook api up for restricted access
fixes CNVS-12653

When you open the restricted access dialog, it should be synced with
the server and saving should work.

Test Plan

Given you are on the new files page
And you are a user that has permission to change restricted access
And you click a file or folders admin cog
And you select 'restricted access' for the options
Then you should see a dialog open
And there should be two options with radio buttons
And the first option should be checked by default
When you click on the 'Schedule student availability' option
Then you should see two inputs with calendars you can select
And you should be able to select dates for those inputs
And you should be able to "Update" the restricted access
And those changes should be persistant.

Change-Id: Ibe57fc49cb063cfcd3acb64f2a6d1bf8bfc49b66
Reviewed-on: https://gerrit.instructure.com/39451
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2014-08-26 23:45:44 +00:00
Ethan Vizitei c4adbda6e4 fix resending messaging for invitations
fixes #CNVS-5002
fixes #CNVS-14938

the route this posted to needed
to be made "optional" for the final
param (:id) to accept posts correctly.

Also the "pending" check on invites
requires the currentRole to be passed to it.

Test Plan:
 - Login as a teacher
 - Invite a new student
 - try to resend the invitation
 - you *SHOULD NOT* be told they've accepted it already
 - also sending the invite should not fail

Change-Id: I005699f70f0e6dadaa47adf797d6fa1a5002b1bd
Reviewed-on: https://gerrit.instructure.com/39753
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Reviewed-by: Jason Madsen <jmadsen@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2014-08-26 23:08:40 +00:00
Michael Nomitch 65a28679c5 DA - grading rework for performance
fixes CNVS-14865

test plan:
  - with a large class
  - with DA on and off
    - check that the gradebook csv download works
      (grades can be wrong when DA is on)
    - check that gradebook2 & srgb work
    - check that student grade summary pages work

Change-Id: I7a7b4ffe302d912aa2877106295a78ab662868f1
Reviewed-on: https://gerrit.instructure.com/39470
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2014-08-26 22:46:14 +00:00
Brian Palmer 181579660c clear shard and special account caches based on age
test plan:

- regression test to make sure that you can navigate to different
  domains and shards, create + process delayed jobs, and navigate to the
  default and site admin accounts

Change-Id: I0ed4bf3309e3950a046ed1cd7bc7b1fe0a806a7a
Reviewed-on: https://gerrit.instructure.com/39972
Tested-by: Brian Palmer <brianp@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
2014-08-26 20:29:55 +00:00
Ryan Shaw d53aa3e637 add ability to move things from one folder to another
fixes: #CNVS-14725

this commit also moves the shared functionality
of File and Folder to base class

File and Folder have similar behavior, we were branching
a lot and defining the same methods on both. this
has them both inherit from the same base class
so they can share that functionality

this commit has has a bunch of changes on stuff that
sterling is working on too. so i want to get it pushed
now so he doesn't have a bunch of merge conflicts. tests
coming in the next commit.

test plan:
in the new files interface,
* click the cog for an item
* click the move option
* a dialog asking where you want to move it to should appear
* pick something
* press "move"
* it should immediately show that it is moved
* it should still show that it is moved when you refresh

Change-Id: I226d21396ab3b6b84e9cdcd62212500986efd9b2
Reviewed-on: https://gerrit.instructure.com/39943
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jason Madsen <jmadsen@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2014-08-26 20:00:56 +00:00
Jacob Fugal c9c44b5344 strip user input self-enrollment code
fixes CNVS-5066

when a user comes to the /registration page, they may have a
self-enrollment code (aka "Join Code" in the form) from some specific
course they're signing up for. if they enter that code with trailing (or
leading whitespace), which is particularly common when copy/pasting,
still let it work. (whitespace is never a valid part of a
self-enrollment code)

test-plan:
 - have a course with self-enrollment enabled
 - note the self-enrollment code
 - go to /register and select to register as a student
 - try to register including the course's self-enrollment code with an
   extra space character added to the end
 - registration should be successful, including creation of an
   enrollment in that course

Change-Id: I1b7c0535e437e1d5e4243d78559eaa4b6b72abdc
Reviewed-on: https://gerrit.instructure.com/39861
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
QA-Review: Jacob Fugal <jacob@instructure.com>
2014-08-26 19:37:56 +00:00
Joel Hough cd05e5678f re-add reply messaging to email notifications
fixes CNVS-15068

test plan
- cause a conversation message notification email to be sent
- ensure that the text and html versions of the email include text
 saying that you can reply to the email to reply to the
 conversation message
- cause a discussion entry notification email to be sent
- ensure that the html version of the email includes text saying
 that you can reply to the email to reply to the comment (the text
 version should have the text, too, but it was there before this
 commit)

Change-Id: I79c40ecb55bd17eef96931bbb3f255768914fcc7
Reviewed-on: https://gerrit.instructure.com/39925
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Matthew Wheeler <mwheeler@instructure.com>
Product-Review: Matthew Wheeler <mwheeler@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
2014-08-26 17:42:04 +00:00
Ryan Florence 00cac7a86a make screenreader ux in dialogs better
- removed `role="dialog"` because that puts the
  content into "application" mode, royally
  messing up navigability

- added `aria-hidden="true"` to all of the content
  outside of the dialog

- rearranged some opening/closing tags in app
  layouts so they live in the same file

closes CNVS-14476

Change-Id: I83be208a2f993caf8b436112da1b3e30e0f533fa
Reviewed-on: https://gerrit.instructure.com/39933
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Reviewed-by: Jason Madsen <jmadsen@instructure.com>
Product-Review: Ryan Florence <ryanf@instructure.com>
2014-08-26 16:57:47 +00:00
Ben Young aa8c506e5f Update parameters in the following API docs - 3
- Collaborations
- CommMessages
- Communication channels
- Conferences
- Content exports

Test plan:
- rake doc:api
- Verify the above doc pages for parameter accuracy

Refs SIS-403

Change-Id: I5b7c7ba70ea9ddeaed148ab8ccc24436fe307373
Reviewed-on: https://gerrit.instructure.com/38681
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Duane Johnson <duane@instructure.com>
Product-Review: Duane Johnson <duane@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
2014-08-26 16:42:33 +00:00
Ben Young cd0fbadcbc Place parameters in enrollment object in create enrollment API example requests.
Fixes CNVS-14397

Test plan:
- rake doc:api
- verify that public/doc/api/enrollments.html#method.enrollments_api.create shows the correct api parameters

Change-Id: Ie22e65c6f47f05c3e3f7bd49d89757e47f2afeb2
Reviewed-on: https://gerrit.instructure.com/38501
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Duane Johnson <duane@instructure.com>
Product-Review: Duane Johnson <duane@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
2014-08-26 16:21:10 +00:00
Ben Young c8530610ab update API doc required params - 9
- Poll choices
- Poll sessions
- Polls
- Quiz extensions
- Quiz question groups

Test plan:
- rake doc:api
- Verify the above doc pages for parameter accuracy

Refs SIS-403

Change-Id: Iefb2933061707390fa3b28428a5183ca214d5d87
Reviewed-on: https://gerrit.instructure.com/39313
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Duane Johnson <duane@instructure.com>
Product-Review: Duane Johnson <duane@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
2014-08-26 16:14:19 +00:00
Brad Humphrey e131649632 add lti ContentItemSelectionResponse message type
Test Plan:
  - install a tool with the message_type 'ContentItemSelectionResponse'
  - launch the tool
  - it should have the JSON param content_items
  - content_items should have a placementOf -> id that points to a migration API endpoint
  - run the migration by POSTing to the given endpoint
  - the migration should have all course content in it
  - try a migration with one assignment, one quiz, one module, and one page
    * add quizzes[]=:id&assignments[]=:id&modules[]=:id&pages[]=:id
  - the migration should only extract the specified items

closes CNVS-14613

Change-Id: Ic43c3fb1e77c12d5f4d6712d42932e63bc36762e
Reviewed-on: https://gerrit.instructure.com/39427
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
2014-08-26 14:58:21 +00:00
Alex Boyd 8a1527843d correct erroneous curl example in API documentation
fixes CNVS-12214

test plan:
  - ensure the API documentation for GroupsController#invite shows
    each email address in a separate -F argument in the curl example

Change-Id: I14691cda60c762e280b3a30d7bdbf6ef5a80b6a3
Reviewed-on: https://gerrit.instructure.com/39721
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Matthew Wheeler <mwheeler@instructure.com>
Product-Review: Matthew Wheeler <mwheeler@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
2014-08-25 22:10:57 +00:00
Ryan Shaw 97387d48ac allow File to behave like normal backbone models
we had written some code for the backbone File model
that assumes that you would always have a 'file'
attribute (that is an actual filesytem object representing
the bytes of the file), so you couldn't save
or toJSON it if you were wanting to save it's other
attributes (like name or parent_folder_id)

this just fixes that.

test plan:
make sure that files still work as
intended in quizzes or other places we use files.

Change-Id: I4d9b7283b2d9d7160fd5b95819d9b7093f4c1cf0
Reviewed-on: https://gerrit.instructure.com/39916
Reviewed-by: Jason Madsen <jmadsen@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2014-08-25 21:14:08 +00:00
Cody Cutrer 2b30675ce0 ignore garbage values for all_site_admin_account_users_copies
Change-Id: Idc7b3cfceda71c73f8aefcc17bdaabc00de65ba5
Reviewed-on: https://gerrit.instructure.com/39913
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2014-08-25 21:06:03 +00:00
Cody Cutrer d3ba3725a3 allow distributing all_site_admin_account_users around a large cache ring
Change-Id: I89766dbb524436f7f0cddc9b438c6c6a99546fb4
Reviewed-on: https://gerrit.instructure.com/39904
Reviewed-by: Brian Palmer <brianp@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2014-08-25 19:59:54 +00:00
James Williams d631656666 add support for module items in selective content export
test plan:
* should be able to use the API to export individual items
associated with modules by specifying a "module_item" or
"content_tag" id

refs #CNVS-14552

Change-Id: I340c5e35297aa9d6e7971ba2b26ae6b222404fde
Reviewed-on: https://gerrit.instructure.com/39808
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2014-08-25 19:19:05 +00:00
Brian Palmer 57c34d3191 query the discussion topic materialized view from slave
test plan: load a discussion topic in the web UI. it should load as
before, and if the materialized view already existed, the logs should
show the SELECT for it only against the slave.

Change-Id: If397681f1ebb2502089ee94c24b0292b34ec8eb8
Reviewed-on: https://gerrit.instructure.com/39877
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2014-08-25 17:09:24 +00:00
Ben Young 00aefc8cc4 update API doc required params - 12
- User observees
- Users

Test plan:
- rake doc:api
- Verify the above doc pages for parameter accuracy

Refs SIS-403

Change-Id: If7b362adf1aa385483d362557e88fabafbb39426
Reviewed-on: https://gerrit.instructure.com/39370
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Duane Johnson <duane@instructure.com>
Product-Review: Duane Johnson <duane@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
2014-08-25 16:50:04 +00:00
Ben Young 76fcd273be update API doc required params - 11
- Roles
- Sections
- SIS imports
- Submissions
- Tabs

Test plan:
- rake doc:api
- Verify the above doc pages for parameter accuracy

Refs SIS-403

Change-Id: I53c9cd44ffbe370b0d013949c24cf8e79285a3cc
Reviewed-on: https://gerrit.instructure.com/39368
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Duane Johnson <duane@instructure.com>
Product-Review: Duane Johnson <duane@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
2014-08-25 16:49:57 +00:00
Ben Young fe19b0c8d0 update API doc required params - 10
- Quiz questions
- Quiz reports
- Quiz submission questions
- Quiz submissions
- Quizzes

Test plan:
- rake doc:api
- Verify the above doc pages for parameter accuracy

Refs SIS-403

Change-Id: I8aab8a03648b5c6bee28132a662e5e7560b18ebd
Reviewed-on: https://gerrit.instructure.com/39365
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Duane Johnson <duane@instructure.com>
Product-Review: Duane Johnson <duane@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
2014-08-25 16:49:51 +00:00