Commit Graph

7025 Commits

Author SHA1 Message Date
Mark Severson df82a1efc4 change available_for? and locked_for? to be more consistent
test plan: no functional change

refs #CNVS-5837

Change-Id: I07d942840e30df15883d484fcc4c6d0f86ff477d
Reviewed-on: https://gerrit.instructure.com/21156
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
2013-06-07 21:41:21 +00:00
James Williams 94d1f2ee97 add default_group_storage_quota setting to accounts
test plan:
* in account settings - quotas tab,
 set the default group storage quota
* attempt to upload files to a new group (without a set
quota) until the quota is hit or exceeded, confirming
that the set default is in effect

refs #CNVS-271

Change-Id: Ia4cbd84da19eb07d188dcc85c81c6b45bc2fa7ce
Reviewed-on: https://gerrit.instructure.com/21191
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>
2013-06-07 21:11:57 +00:00
Jacob Fugal 0819c2d3d3 don't silently eat failure in cassandra page views
if recording a page view fails, we want to handle and stop the failure
so it doesn't fail out the whole batch. but we don't want to do so
silently; log the error instead. (in the case of cassandra page views,
this failure will actually be a failure to log the failure in the
event_stream_failures table.)

fixes CNVS-6199

test-plan:
  - turn off cassandra for page views but leave redis queueing on
  - queue a page view (via script/console) and note its request id
  - queue a second page view with the same request id
  - queue a third page view with a different request id
  - process the queue (PageView.process_cache_queue)
  - the first and third page views should be inserted into the database
  - there should be crit-level lines in the log about the failure of the
    second page view

Change-Id: Ie1849a73d8f625ab8f90c8c15ddff5f9150a0de4
Reviewed-on: https://gerrit.instructure.com/21263
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
2013-06-07 20:56:52 +00:00
Zach Pendleton 1a1c2d294b add "pinned" discussions to index view.
fixes CNVS-5708

discussion topics can now be pinned to preserve their
position at the top of the discussion topics index page.
pinned discussions can be manually sorted, while all
other topics remain sorted by most recent activity.

test plan:
  * in a course with existing discussion topics, attempt
    to drag a topic into the pinned area and verify that
    it properly moves to that group and persists on page
    refresh;
  * move multiple topics into the pinned area and verify
    that they can be manually sorted and that the sort
    persists on page refresh;
  * drag a pinned topic to the open discussion area and
    verify that it properly moves there and persists on
    page refresh;
  * verify that pinned and open topics cannot be dragged
    into the locked area;
  * verify that open topics offer a pin option in their
    gear menus and that pinned topics offer an unpin
    option. verify that these options work as expected.

Change-Id: I65dccba5eed11dd8b0996ecd930b93a1d61dbebc
Reviewed-on: https://gerrit.instructure.com/21260
Reviewed-by: Zach Pendleton <zachp@instructure.com>
Product-Review: Zach Pendleton <zachp@instructure.com>
QA-Review: Zach Pendleton <zachp@instructure.com>
Tested-by: Zach Pendleton <zachp@instructure.com>
2013-06-07 20:00:26 +00:00
Brad Humphrey 56ab18b215 removing deleted accounts from the sub_accounts api call
this fixes a bug in the sub_accounts api that caused all
sub accounts to be returned, regardless of workflow state.
additionally fixes issues with the link headers that are
returned by this call.

test plan:
 * create an account with sub accounts
 * add a few sub accounts to the primary sub accounts
 * delete one or two of the accounts you just created
 * make an api call for sub-acccounts
   - use the recursive parameter
   - use the per_page param to be less then then number of active sub accounts
 * check to make sure that the deleted accounts do not show up in the results
 * check the link headers to make sure that they are being generated correctly

Change-Id: I8638f7ef18338c2aa9854c823fc5825834bb0c0c
Reviewed-on: https://gerrit.instructure.com/21230
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Product-Review: Brad Humphrey <brad@instructure.com>
2013-06-07 19:26:46 +00:00
Jon Willesen cfe41e4dd7 add permissions check to show the "new conference" button
the check was lost in the conferences interface upgrade

fixes CNVS-6195

test plan:
 - go to account permissions and turn off "create web
   conferences" for students.
 - go to student view of conferences index and make sure the
   "new conferences" button does not show.
 - turn the "create web conferences" permission on for students.
 - go to student view of conferences index and make sure the
   "new conferences" button is there.

Change-Id: I1aae399dcf39de61d104371e04aac24721a445bc
Reviewed-on: https://gerrit.instructure.com/21258
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Cam Theriault <cam@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
Product-Review: Jon Willesen <jonw@instructure.com>
2013-06-07 19:22:19 +00:00
Brian Palmer b80fd60ced add cassandra cluster info to CQL log lines
test plan:
  * enable cassandra page views
  * visit /users/X for a user with page views
  * search the rails log file for CQL lines, they should include the
    cluster name and the environment name like "[page_views development]"

Change-Id: I61903e55c01c818f33022f2971905951a31b8f0e
Reviewed-on: https://gerrit.instructure.com/21302
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
2013-06-07 19:09:39 +00:00
Cody Cutrer 3e3520c9d6 improve Cassandra helper methods
refs CNVS-6018

 * allow specifying which environment you want to check is configured/
   get a connection for
 * properly cache nil results

test plan:
 * cassandra page views should still save and load

Change-Id: I14c667182a38da4a5c64e7685dc9db81d45fcf07
Reviewed-on: https://gerrit.instructure.com/20978
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Brian Palmer <brianp@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2013-06-07 16:54:16 +00:00
Cody Cutrer 0f237c67a7 optimize Setting.from_config
refs CNVS-6018

cache the entire file, not just for the current env

test plan:
 * canvas should still boot and stuff

Change-Id: I09068452c9bafb3b3208b49abe3d19cf9fce1e8a
Reviewed-on: https://gerrit.instructure.com/20976
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Duane Johnson <duane@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
QA-Review: Brian Palmer <brianp@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2013-06-07 16:53:57 +00:00
Cody Cutrer 2ac4618fab activate the user's shard when consulting cassandra
refs CNVS-6018

test plan:
 * saving and loading of cassandra page views should work

Change-Id: Ic9730371bb1f4207cb06aa6da30baee9f4232d8f
Reviewed-on: https://gerrit.instructure.com/20979
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
QA-Review: Brian Palmer <brianp@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2013-06-07 16:53:22 +00:00
Brian Palmer deb1375158 spec: filter allowable_services by proc too
Change-Id: I61e43e09f9e3e67fb7cfa5815bfe48d13d52433c
Reviewed-on: https://gerrit.instructure.com/21299
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
QA-Review: Brian Palmer <brianp@instructure.com>
2013-06-07 16:36:24 +00:00
Bracken Mosbacker 5a689faa6d add lti variable substitution support
Added a basic variable substitution framework and implemented
a few variables as examples: $Person.name.full,
$Person.name.given, $Person.name.family

Added a concluded enrollment roles variable so that a tool
can know what a users concluded roles were. The variable is
$Canvas.membership.concludedRoles

Variable names are case sensitive.

Test Plan:
 * Create an lti tool launch with a custom key like this:
   * custom_my_var=$Person.name.full
 * With a concluded user do a tool launch that has the
   $Canvas.membership.concludedRoles variable
	 * it should list the concluded roles
 * Configure tools through an XML file with a custom param
   and make sure it works

Change-Id: Iefb85c441680c7ab3623ce85e405e1c48cda837c
Reviewed-on: https://gerrit.instructure.com/21193
QA-Review: Clare Strong <clare@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brad Humphrey <brad@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
2013-06-07 15:49:47 +00:00
Jon Jensen d01c5fddf6 spec: fix qunit timeout issues
* ensure that if a test times out, js:test actually fails
* apply https://github.com/jquery/qunit/commit/4e62b4a so that sinon
  doesn't blow up the once-a-second async requeuing. if it happened to
  fall on a test with a stubbed setTimeout, js:test would silently (and
  successfully) exit without running any subsequent tests. this could
  also cause tests to silently abort when run in the browser.

Change-Id: Ic53a16d66235cd3301fe3405a9eaa79a057af1dc
Reviewed-on: https://gerrit.instructure.com/21245
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
Reviewed-by: Stanley Stuart <stanley@instructure.com>
2013-06-07 15:40:56 +00:00
Cody Cutrer 22c8c0ba1e optimize Account#/Course.update_account_associations a bit
* don't pull all courses in at once
 * only select necessary columns

also pick up some edge cases where we wouldn't catch courses

test plan:
 * do some sis imports
 * it shouldn't fail

Change-Id: I18d03f78e31c47de183e8a61ce7627ef1c3424ad
Reviewed-on: https://gerrit.instructure.com/21157
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2013-06-07 14:47:09 +00:00
Brian Palmer 6c0636fb86 add support for account services that are only enable-able by some users
For instance, this allows for account services that can only be enabled
in the UI by site admins, that kind of thing.

closes CNVS-6140

test plan: specs, this doesn't add any new services yet

Change-Id: Ie330c79b75a0cf4b755d73bba57dffc64c5e6447
Reviewed-on: https://gerrit.instructure.com/21262
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
2013-06-06 22:27:16 +00:00
Brad Humphrey 601f44a866 fix pagination for external tools on settings page
test plan:
 * Add 15 tools to an account
 * Should display all tools

Change-Id: Ia8f8b74aa90fa627ea7a7bea1b4aff2179c534d8
Reviewed-on: https://gerrit.instructure.com/21234
Reviewed-by: Eric Berry <ericb@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
Product-Review: Brad Humphrey <brad@instructure.com>
2013-06-06 21:27:25 +00:00
Joe Tanner 649c5cb85b Mobile oauth confirmation page, closes CNVS-5455
Mobile styling of oauth confirmation page.
Also refactors mobile login page to use boostrap.

test plan:
1. go to Site Admin > Developer Keys
2. add or use existing key to fill out this URL:
    /login/oauth2/auth?client_id=<ID>&response_type=code&redirect_uri=<URI>
    (URI should be encoded)
3. in a Chrome tab change the User Agent to a mobile device
4. in that same tab go to the url in step 2
    (you may be redirected to login)
5. the oauth confirmation page should look decent
6. click Log In, you should be redirected to URI + ?code=<long code>

Change-Id: I32a4d0638838dd23667ceaf40c02a5be84434f08
Reviewed-on: https://gerrit.instructure.com/21220
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Joe Tanner <joe@instructure.com>
Product-Review: Joe Tanner <joe@instructure.com>
QA-Review: Joe Tanner <joe@instructure.com>
2013-06-06 21:20:21 +00:00
Cody Cutrer 36d8bdb9d6 only select necessary columns for gradecalculator
instead of fulling in some possibly large columns that we ignore

also, we don't care about the order, so don't make the db sort
them

test plan:
 * change some scores
 * final scores as shown on csv exports or other places should
   reflect said changes

Change-Id: Ic5c8876aab3d3eed261d9b4714642302f25e0f3e
Reviewed-on: https://gerrit.instructure.com/21153
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Duane Johnson <duane@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2013-06-06 20:46:35 +00:00
Joel Hough 7f0b863d88 add alias for delayed posting from old delayed jobs
fixes CNVS-6143

test plan
- have some old delayed jobs that try to post a discussion using
 DiscussionTopic#try_posting_delayed
- ensure that they do indeed post the discussion

Change-Id: Ie3c2fa1e0ec65a031d4da258ce2d66be3a1cb7e1
Reviewed-on: https://gerrit.instructure.com/21248
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Willesen <jonw@instructure.com>
QA-Review: Cam Theriault <cam@instructure.com>
Product-Review: Joel Hough <joel@instructure.com>
2013-06-06 19:33:21 +00:00
Jacob Fugal 555c4569d6 use text as event_stream_failures.exception type
fixes CNVS-6200

test-plan: N/A

Change-Id: I0eb260c377de99fdb1ea0f95be4d7ffff39252db
Reviewed-on: https://gerrit.instructure.com/21264
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
2013-06-06 18:52:48 +00:00
Jon Jensen 81e50dbc71 switch out i18n backend, closes CNVS-5938
test plan:
1. specs should pass
2. run canvas with RAILS_LOAD_ALL_LOCALES=1
3. you should be able to switch locales and see translations
4. run i18n:generate on the parent commit and on this commit, the
   resulting config/locales/generated/en.yml should be identical

Change-Id: I5164943dc6e682c663145e91d7a9791331e9b4cc
Reviewed-on: https://gerrit.instructure.com/21014
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
Product-Review: Marc LeGendre <marc@instructure.com>
2013-06-06 18:11:28 +00:00
Jon Jensen 43aa27e436 popover fixes, enhancements
* fix styling of .horizontal.top popovers (offset was wrong, only shadow
   was top-aligned)
 * add support for .horizontal.content-top, i.e. a popover whose arrow is
   just below the popover-title

Change-Id: I6b7afc75496d947698dc23152879842806e3abc1
Reviewed-on: https://gerrit.instructure.com/21233
Reviewed-by: Ryan Florence <ryanf@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2013-06-06 16:44:48 +00:00
Jon Willesen d3fa632e34 add "preparing video" message to concluded conferences.
sometimes there is a delay between when the big blue button
conference concludes and the recording is ready. This commit
adds a new message for this state, "preparing video", instead
of showing "no recording".

fixes CNVS-6171

 - create a big blue button conference with the "long duration"
   and "recording" checkboxes checked.
 - start the conference.
 - while the conference is active, go back to the conferences
   tab and refresh the page.
 - press the "End" button to conclude the conference while it
   is running.
 - the conference should move to the concluded section and say
   "preparing video".
 - go back to the active bbb conference tab and close it to
   really end the conference.
 - wait for a bit, and then refresh the conference page.
   eventually the "preparing video" should be replaced by the
   view button, once the bbb server has finished processing the
   recording.

Change-Id: I138762480bdb9f793de9c6ed434cfa49a3d910ba
Reviewed-on: https://gerrit.instructure.com/21241
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
QA-Review: Cam Theriault <cam@instructure.com>
Product-Review: Jon Willesen <jonw@instructure.com>
2013-06-06 16:24:09 +00:00
Brian Palmer f81ab5f5d9 add debugging information to track down an issue
Change-Id: I8bdf9efcfc8a03478bfa8f99e5cd82a4d6ff4d13
Reviewed-on: https://gerrit.instructure.com/21251
Reviewed-by: Paul Hinze <paulh@instructure.com>
Product-Review: Paul Hinze <paulh@instructure.com>
QA-Review: Paul Hinze <paulh@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2013-06-06 02:00:00 +00:00
Bryan Madsen 439b4a003e spec: redirect stderr to stdout for rake js:test
Change-Id: I8e42f0ff18124a06cfbc0ea320bbce0e13491fa6
Reviewed-on: https://gerrit.instructure.com/21237
Reviewed-by: Shawn Meredith <shawn@instructure.com>
QA-Review: Shawn Meredith <shawn@instructure.com>
Product-Review: Shawn Meredith <shawn@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2013-06-05 23:40:47 +00:00
Simon Williams 601bb1d357 handle 0 variance in quiz_stats item analysis
fixes CNVS-6178

test plan:
- create a quiz
- answer it with > 15 students, exactly the same
- run item analysis
- it should work

Change-Id: I9f6661e81edb16ec112c00d27eb0374a7d3f66c6
Reviewed-on: https://gerrit.instructure.com/21209
QA-Review: Myller de Araujo <myller@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2013-06-05 22:53:45 +00:00
James Williams f65ee725c6 should not default imported wiki pages to unpublished state
test plan:
* import the package attached to the ticket
* the imported page should not be unpublished
(and currently invisible)

fixes #CNVS-6177

Change-Id: I4f8dd1766854e62cc95ed3823258539b079aa72a
Reviewed-on: https://gerrit.instructure.com/21235
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>
2013-06-05 22:34:32 +00:00
Duane Johnson 8cf1184312 adds an autoimport rake task and :discard option
Since there is a low signal-to-noise ratio on warnings from
translation files, we sometimes want to just import the file
regardless of warning status. This patch enables command-line imports
like so:

$ rake i18n:autoimport[config/locales/my-new-chinese-translation.yml]

The task discards translation keys that have wrapper or markup errors.

Also fixes a longstanding bug in the translation import that accepted
underscores in placeholder names as the beginning or ending of a
wrapper.

Test Plan:
- Import a new translation file. It shouldn't ask you for feedback on
  warnings, and the file should import and augment whatever
  translation file was there before (e.g. if you're importing chinese,
  check the config/locales/zh.yml file for changes)
- If a placeholder name has an underscore in it (e.g. %{android_url}),
  it should not show up in the mismatch report when autoimport runs.

Fixes CNVS-6139

Change-Id: I0c4c45530908e975ab1eaee0e28b9d5f0a3489be
Reviewed-on: https://gerrit.instructure.com/20940
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Duane Johnson <duane@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
2013-06-05 22:02:47 +00:00
Jon Willesen 6afca65c49 incoming message processor should ignore harmless parsing errors
fixes CNVS-6138

test plan:
 - use a directory test to check:
   - normal emails are still processed correctly.
   - emails with irrelevant parsing errors (like a bad
     Received header) get processed normally and aren't treated
     like as errors.
   - emails with relevant parsing errors (like a badly
     folder To header) are treated as errors.
 - make sure receiving actual email isn't broken.

Change-Id: Ifbe8480de4546ec1b6205ebbdfef8d7ea72d3284
Reviewed-on: https://gerrit.instructure.com/21170
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
QA-Review: Cam Theriault <cam@instructure.com>
Product-Review: Jon Willesen <jonw@instructure.com>
2013-06-05 19:18:09 +00:00
James Williams 3a0f5884ff fix role api routing to find roles with periods
test plan:
* create a custom role with a period
* should be able to update/delete it through the
interface (which goes through the API)

fixes #CNVS-3904

Change-Id: Ifc2c9893786b0a3ce06d664c863f78e5e125161a
Reviewed-on: https://gerrit.instructure.com/21158
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2013-06-05 19:00:59 +00:00
Simon Williams c93f3e4dae only strand quiz_stats jobs per quiz
fixes CNVS-6175

test plan:
- submit a quiz, and then generate stats for it
- it should work

Change-Id: I07d6ca8eaa7c05cef45cea5539ba899697a627d4
Reviewed-on: https://gerrit.instructure.com/21208
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2013-06-05 17:22:07 +00:00
Zach Pendleton 8ae403cfca redesign discussions index page. fixes CNVS-5709
index page now displays topics in two groups: open and
locked. all discussions also now load lazily.

test plan:
  * navigate to a course's discussion topics page and
    verify that all current topics load and display
    in the appropriate group;
  * as a teacher or admin, verify that the lock/delete
    gear menu options work as expected;
  * in a course with more than 50 topics, verify that
    the topics load/display lazily.
  * as a student, verify that the discussion gear menu
    only appears on discussions that you've created.

Change-Id: I24cb256da7a552d0c137cd9522e758617f8d1b8e
Reviewed-on: https://gerrit.instructure.com/21095
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Cam Theriault <cam@instructure.com>
Reviewed-by: Mark Ericksen <marke@instructure.com>
Product-Review: Zach Pendleton <zachp@instructure.com>
2013-06-05 15:31:40 +00:00
Jeremy Stanley 1cd3580615 add data-api-endpoint for quiz / quiz list links
test plan:
 - have a course with a quiz
 - in rich content (like a wiki page), use the wiki sidebar
   to insert a link to the quiz list and a link to the quiz
 - retrieve the wiki page via the pages API
 - the quiz list link should have added attributes
   * data-api-returntype="[Quiz]" (with brackets)
   * data-api-endpoint: valid API link to the quiz index
 - the quiz link should have added attributes
   * data-api-returntype="Quiz"
   * data-api-endpoint: valid API link to the quiz
 - the API documentation should mention "Quiz" in the list
   of supported data-api-returntype values, found in the
   "Basics" section under "API Endpoint Attributes"

fixes CNVS-6115

Change-Id: If405f6779f1b3f3719503a9987cceaf29a508ed8
Reviewed-on: https://gerrit.instructure.com/21080
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
2013-06-04 20:34:24 +00:00
Jeremy Stanley c56ad5bdcb add data-api-endpoint for external tool launch links
test plan:
 - in rich text somewhere (wiki page, assignment, etc.),
   embed a link to launch an LTI tool.
   a suitable test tool can be found at
   http://lti-tool-provider.herokuapp.com
 - retrieve that text through the appropriate API
   (pages, assignments, etc.)
 - the link should have added data-api-return-type
   (SessionlessLaunchUrl) and data-api-endpoint attributes.
 - the data-api-endpoint should contain a link to the
   generate-sessionless-launch API. hit this link with
   curl or postman or whatever (authenticating with your
   token as is normal for API requests)
 - the above API should return a URL with a big scary
   verifier in it.  (you should be able to launch *that*
   URL to get into the LTI tool without a Canvas session)

fixes CNVS-5944

Change-Id: I2e51312341b08f87ff2be7bee57370318be72b65
Reviewed-on: https://gerrit.instructure.com/21075
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
2013-06-04 20:33:57 +00:00
Stanley Stuart bbec6ea08c remove openobject from turnitin
Replaces OpenObject with a struct in order to gain performance.

test plan:
  - as a site admin, go to the account settings page
  - under the Turnitin settings, set it up with valid turnitin settings
  - make sure the turnitin confirmation link works

Change-Id: Ie71cc2faf8c34c3c43de66b133058c7781c4e86b
Reviewed-on: https://gerrit.instructure.com/16483
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
Product-Review: Stanley Stuart <stanley@instructure.com>
2013-06-04 19:55:52 +00:00
Eric Berry ba0dd818a5 added the ability for users to review app center apps
test steps:
- enable the app center with a valid access token
- visit the app center under account settings
- click on a tool and ensure the reviews appear in the list at the
  bottom
- click the link 'Rate this tool' and add a review
- ensure that the review list reloads

** note: you will not see the actual app star rating or review
count change when you add/modify a review. this is expected behavior.

Change-Id: I79ab0769f56b3a17b6eb2056de1416eb1a0a71ca
Reviewed-on: https://gerrit.instructure.com/21054
Reviewed-by: Brad Humphrey <brad@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Brad Humphrey <brad@instructure.com>
2013-06-04 19:16:20 +00:00
Ryan Shaw f7bf153ae3 use sass for jammit css compression, no more java!
jammit can use sass to minify css.  this is great
because now we don't need the yui-compressor.
which means that we don't need java.

Change-Id: I22d0f35340077a866ffe1000443bc5a061a9e613
Reviewed-on: https://gerrit.instructure.com/11588
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Product-Review: Bryan Madsen <bryan@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2013-06-04 18:25:56 +00:00
Cody Cutrer b283022336 fix user filtering for cross-shard conversations or without sharding
test plan:
 * without sharding, filter conversations by user; it should work
 * with sharding:
   * create a conversation between users on the same shard
   * from another shard, create a conversation with one of the
     users from the first shard
   * from the first shard, search for the conversation with
     the user from the other shard
   * it should work

Change-Id: I92b67f5974af96daf952d95e14c4350bd4225d07
Reviewed-on: https://gerrit.instructure.com/21155
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Bryan Madsen <bryan@instructure.com>
2013-06-04 18:16:54 +00:00
Ethan Vizitei 0c9fa02a01 Extract Assignment Broadcast Policy
FIXES CNVS-6037

moving the complicated conditions for the
broadcast policy into it's own class and
adding some isolation tests.

TEST PLAN:
  This is just a refactor, there should be
no new behavior.  Doing a regression of
notifications dispatched from assignments
should be all that's needed.

Change-Id: Ie8bc424d7ad02ed579e31df4d024ba998c7160b2
Reviewed-on: https://gerrit.instructure.com/20908
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
2013-06-04 18:11:44 +00:00
Simon Williams d96ba9c601 finish removing course.publish_grades_immediately
this was removed from the UI in Mar 2011 but was never completely ripped out.
we'd like to remove it now since it was adding extra complexity for no benefit.

closes CNVS-5929
refs 

test plan:
- create/update/delete an assignment from the index page, and the show page
- grade an assignment (with and without muting)
- test assignment notifications (with and without muting)
  - creating an assignment
  - editing an assignment
  - changing a due date (after 3 hours of being edited)
  - grading an assignment

Change-Id: Ie455bed41154018b5bd2c9c0e69e1e3285a0ac09
Reviewed-on: https://gerrit.instructure.com/20778
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
2013-06-04 18:11:08 +00:00
Jon Willesen 700f4e4f50 do not fetch BBB recordings if conference has not started
fixes CNVS-6129

test plan:
 - configure BBB plugin with an account with existing recordings
 - create a new BBB conference
 - start the console, find the new conference, and call the
   recordings method.
   - should return an empty array.
 - should still return the recordings for concluded conferences
   with recordings.

Change-Id: I47534aa77616858ae5fdc47aefe9792cd1552376
Reviewed-on: https://gerrit.instructure.com/21109
Reviewed-by: Zach Pendleton <zachp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Cam Theriault <cam@instructure.com>
Product-Review: Jon Willesen <jonw@instructure.com>
2013-06-04 17:38:29 +00:00
Zach Pendleton dd46056c10 remove fixture from remoteselect spec.
also call server.restore() on fakeServer.

Change-Id: Ic1728adcdb7ac4b8b7f5f81311b8267ed0b84cfe
Reviewed-on: https://gerrit.instructure.com/21130
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
Product-Review: Zach Pendleton <zachp@instructure.com>
QA-Review: Zach Pendleton <zachp@instructure.com>
2013-06-04 15:35:37 +00:00
Cody Cutrer edeb4b98db optimize stream item deletion
add an index on updated_at, and effectively use it

Change-Id: I0830a9c6089ba21f0b79a83e36fd0fe8e0d08348
Reviewed-on: https://gerrit.instructure.com/21165
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2013-06-04 14:52:19 +00:00
Simon Williams 177b92ca11 fix lengthen submissions attachment_id migration
closes CNVS-6155

test plan:
- make sure you can upload files for a submission

Change-Id: Id3043682a0784bc5064c8fda1ba09329facea4e5
Reviewed-on: https://gerrit.instructure.com/21154
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
2013-06-04 03:40:20 +00:00
Cody Cutrer 19c8b2d2cf add group category index to groups
the association isn't smart enough to include conditions on
context_type and context_id in order to utilize the existing index

Change-Id: I62bef79de1b729c6717dadced9a122e856832504
Reviewed-on: https://gerrit.instructure.com/21162
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2013-06-03 22:26:43 +00:00
Bryan Madsen 2b94a9cade Change edu-apps linke to point to www.edu-apps.org
fixes #CNVS-6158

Change-Id: I6736e5891f1eb3432755fb43311e50d22e0d1afa
Reviewed-on: https://gerrit.instructure.com/21160
Reviewed-by: Eric Berry <ericb@instructure.com>
Reviewed-by: Brad Humphrey <brad@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Bryan Madsen <bryan@instructure.com>
QA-Review: Bryan Madsen <bryan@instructure.com>
2013-06-03 22:05:49 +00:00
Shawn Meredith dd07a84c18 spec: conversation_context_filtering pending
Change-Id: I45c2808ba959940d8b825fe20c492e58a76ffb33
Reviewed-on: https://gerrit.instructure.com/21139
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bryan Madsen <bryan@instructure.com>
QA-Review: Bryan Madsen <bryan@instructure.com>
Product-Review: Bryan Madsen <bryan@instructure.com>
2013-06-03 20:41:56 +00:00
Cameron Sutter e7c24b05eb assignment groups API
fixes CNVS-6064

test plan
- using the API, create, get, and update an assignment group
- using the API, delete an assignment group with and without assignments
and both specify an assignment group to move the assignments to
and don't specify an assignment group
- it should throw an error if there are no other active assignment groups

Change-Id: I0d637d73255115258dc42e73541146c889a68afc
Reviewed-on: https://gerrit.instructure.com/20993
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2013-06-03 18:02:46 +00:00
Joe Tanner 5c9b83f826 Allow users to resurrect a retired email, closes #CNVS-6045
Really resurrect retired communication channels.
Fixes some callbacks that should've returned true.

test plan:
1) in rails console:
    u = User.find(<some user id>)
    cc = u.communication_channels.detect{|cc| cc.path_type == 'email'}
    cc.bounce_count = 5
    cc.workflow_state = 'retired'
    cc.save
2) take note of the email on the cc
3) start up the server and go to /about/<user id>
4) click 'Add Email Address' and enter the email noted in 
5) it should be successful

Change-Id: I0b4572545859eacd823a46b326303860069b00f1
Reviewed-on: https://gerrit.instructure.com/21102
Product-Review: Marc LeGendre <marc@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Landon Wilkins <lwilkins@instructure.com>
2013-06-03 17:13:37 +00:00
Simon Williams 6494940a64 fix announcements for logged out users in public courses
fixes CNVS-6133

test plan:
- in a public course, make an announcement
- view it as a logged out user
- it should work

Change-Id: Ic887760066b58745e2d541194a72da6874b69bcc
Reviewed-on: https://gerrit.instructure.com/21134
Product-Review: Bryan Madsen <bryan@instructure.com>
QA-Review: Bryan Madsen <bryan@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2013-06-03 15:05:42 +00:00