Commit Graph

5960 Commits

Author SHA1 Message Date
Mark Ericksen 73c27a24ab Allow the ruby-debug related gems to be conditionally excluded for IDE development.
Fixes #CNVS-3710

Testing Notes:
===========
* Using an editor like RubyMine, add an environment setting for development
   called DISABLE_RUBY_DEBUGGING with a value of something like "1". Specific
   value is unimportant.
* Start a 'debug' session and set breakpoints and verify they fire.
* Using console based debugging, verify that the execution pauses
   when a DEBUG statement is reached.

Change-Id: Iec59efeb291827ee600b7184bce3990145189b47
Reviewed-on: https://gerrit.instructure.com/17540
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Willesen <jonw@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
2013-02-08 13:34:17 -07:00
Bracken Mosbacker 526cf977e2 fix finding media sources by type
It was changed to a string from a symbol in the html5
video commit

Test Plan:
 * doing a media_download?entryId=0_abcdefg&type=mp4 for a media object should work

Change-Id: I65e0cefa3163351b9737c247d1216699f9934182
Reviewed-on: https://gerrit.instructure.com/17549
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2013-02-08 13:32:33 -07:00
Eric Berry 04543fd454 notification url redirects to specific announcement
fixes CNVS-3224

test steps:
- create an announcement which is sent to students
- ensure that the links in the announcements directs to the
  announcement page and not the index page

Change-Id: Id0987d409ead5103679745e6129938e6985dfb22
Reviewed-on: https://gerrit.instructure.com/17374
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Willesen <jonw@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
2013-02-08 13:11:52 -07:00
Duane Johnson 6f1ec3403b refactor google_docs_specs and remove remote dependence
In anticipation of adding a faster google docs listing, first
refactor the specs.

Test Plan:
  - google docs should behave as before

refs CNVS-3592

Change-Id: Ic62d0cd170f491b5f36f516c0a71fde367dab0b2
Reviewed-on: https://gerrit.instructure.com/17548
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
QA-Review: Clare Hetherington <clare@instructure.com>
2013-02-08 12:56:35 -07:00
Mark Ericksen ead5794075 Maintain Ruby 1.8 support in calendar_events_api_spec for now.
Fixes #CNVS-3709

Testing Notes:
===========
* Using Ruby 1.8.x, run the calendar_events_api_spec.rb tests
   and verify that they pass. Previously 3 tests would fail
   with Array#sort_by! not being defined.

Change-Id: I39c998c7f788c2fee0f9940824fba4ede3cda52b
Reviewed-on: https://gerrit.instructure.com/17538
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
QA-Review: Zach Pendleton <zachp@instructure.com>
2013-02-08 12:48:20 -07:00
Zach Pendleton b78ab1c5bc handle wimba conference date parsing in ruby18/ruby19.
fixes CNVS-3556

wimba passes dates as MM/DD/YYYY, but ruby 1.9 expects date
strings given to `parse` to be in DD/MM/YYYY format. this
commit specifies a date format to avoid this issue and
remain compatible with both 1.8 and 1.9 servers.

test plan:
  * create a wimba conference;
  * visit its archive;
  * verify that canvas redirects to wimba and does not
    throw a 500 error.

Change-Id: Ic822a01f950b2465a5328a0b80b8b11c3e63c99d
Reviewed-on: https://gerrit.instructure.com/17507
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Mark Ericksen <marke@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
2013-02-08 12:43:19 -07:00
Stanley Stuart 8ddee6d7ff make conversations specs less prone to failure
Fixes an issue in the conversations selenium specs where the driver was
looking up old element in the page due to the way we were checking for
their existence, and if they did not exist, looking them up.

Also make sure that the elements get refreshed after the message form
submit happens because that appears to modify the dom pretty heavily.

Change-Id: Ib65b9619346acc05d7a69777a6413da286440ee8
Reviewed-on: https://gerrit.instructure.com/17487
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jake Sorce <jake@instructure.com>
QA-Review: Jake Sorce <jake@instructure.com>
2013-02-08 12:42:09 -07:00
Ahmad Amireh 7bec314522 API doc update for a group assignment override
The documentation regarding creating an assignment override with
`group_id` is made more clear and the prerequisites are better stated.

The group assignments feature and the dependency between
`group_category_id` and `group_id` in the stages of assignment creation
and assignment override creation are explained by a diagram sitting in an
appendix entry at the bottom of the Assignments API documentation page,
Appendix: Group assignments.

The diagram image in the appendix is exported out of the raw .xmind file
in doc/diagrams. You can edit that diagram using the XMind program
(http://www.xmind.net/), it's free to use and cross-platform (JAVA).

---

Testing:

  1. generate the API docs: `bundle exec rake doc:api`
  2. navigate to the Assignments API page
     (link: public/doc/api/assignments.html)
  3. take a look at the "Create an assignment override"
     section
  4. also take a look at the bottom of the page

fixes #CNVS-1204

Change-Id: I07660a7e8a58aba2e307849a79557067a7ea77fb
Reviewed-on: https://gerrit.instructure.com/17454
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
2013-02-08 11:50:54 -07:00
Ahmad Amireh 76790e4cff integrate yard-appendix plugin with canvas YARD cfg
Useful things the commit brings:

  1. Source documentation can now include images and out-of-source examples
  2. Source documentation can now be supplemented by "appendixes" for
     documenting advanced or uncommon usage, auxiliary examples, or any
     supplementary content
  3. An implementation of the YARD @see tag that utilizes the canvas
     YARD linkify helper

Necessary changes for integration were:

  * Gemfile now includes 'yard-appendix'
  * Rake task for generating API docs (doc:api) made more readable and
    now supports asset migration (images and examples)
  * Canvas YARD 'api' template now handles :appendix sections provided
    by the plugin
	* Canvas YARD 'linkify' helper modified:
    * uses a shared linker to look up a topic and controller
    * overrides default handling of 'Appendix: ' links
    * defaults to using the @object title as the link body when no title
      was explicitly passed instead of the path.to.object
  * Canvas YARD 'fulldoc' handler respects a
    DOC_OPTIONS[:all_resource_appendixes] that when turned on would
    generate appendix entries in the All Resources section[1]

[1] I've already implemented this functionality because I misread the
requirement (as seen in PB 6) so I thought we could keep it around and
toggle it if need be. The options are inside lib/tasks/docs.rake

---

Testing:

To verify that the changes do not alter or affect the current API docs,
fire up a terminal and do the following (inline comments for directions):

```bash
	cd /path/to/canvas;
	# generate the original docs before pulling these changes
	bundle exec rake doc:api
	mv public/doc public/doc_original
	# checkout these changes into a branch... after that:
	bundle install
	bundle exec rake doc:api
	diff -r -y -q public/doc_original/api public/doc/api
```

The output of the last command should look like this:

Only in doc/api: examples
Only in doc/api: images

To test the actual @!appendix functionality:

  * see https://github.com/amireh/yard-appendix for directions on how to
    define Appendix entries
  * write an Appendix in any controller, optionally reference it in some
    method (using @see or {link})
  * Appendix entry should be shown at the bottom of the controller's doc
    page
  * reference to the appendix entry should take you to it

Alternatively, you can check-out the gerrit change 17454 at
https://gerrit.instructure.com/#/c/17454/ which utilizes this
functionality.

Change-Id: Id667b77ff8d36b0f503e0f6752045e3d05bc3649
Reviewed-on: https://gerrit.instructure.com/17453
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
2013-02-08 11:50:37 -07:00
Ryan Florence 299f9ff69d added base SearchView closes CNVS-3600
also:
- added setParam to Collection.coffee
- fixed an issue in CollectionView where calling
  `add` on the collection double rendered the
   item if the collection was previously empty
- updated InputFilterView to send the value on
  `enter` event

test plan:
- see specs

Change-Id: I00f07a86d1d58b88fe157d30c25d39c12309387c
Reviewed-on: https://gerrit.instructure.com/17543
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Ryan Florence <ryanf@instructure.com>
2013-02-08 11:01:52 -07:00
Jeremy Stanley 9194e78de4 don't escape the quotes around 'display:none;'
fixes #CNVS-3711

test plan:
 - go to a course settings page
 - you should not see the contents of the Reset Course Content
   dialog underneath the Reset Course Content button
   (see screenshot attached to ticket)

Change-Id: I98c3f0d833f3e2dc7d0be1c86ddb62ea44b291db
Reviewed-on: https://gerrit.instructure.com/17542
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
2013-02-08 10:52:40 -07:00
Ryan Florence 2b954b7e68 updated View.coffee
- spec'd out the whole thing
- documented the whole thing
- fixed `optionProperty` to not extend the
  super class's option properties
- added `child` constructor method for saner
  child views, deprecating `views` option config
- added support for @model.present() and
  @collection.present()
- refactored a bit

Change-Id: I20ac13732893e3a7f07f4f3adfb2bb903d5a6157
Reviewed-on: https://gerrit.instructure.com/17521
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
QA-Review: Ryan Florence <ryanf@instructure.com>
2013-02-08 09:56:43 -07:00
Ethan Vizitei 3ba492fe81 add external tool tag to assignment api
FIXES #CNVS-3625

This attribute was already documented,
but was not actually being included in the
json that the assignment API spits out.

I added the external_tool_tag_attributes
json in cases when the assignment actually
had an external_tool_tag (and had
that as a submission_type).

TEST PLAN:

1) use the API to access an assignment
that has an external_tool_tag

2) you should get "external_tool_tag_attributes"
as an attribute in the assignment json. It should
have the url of the external tool and whether
or not it's a new tab.

Change-Id: Ieebae7df5c169e8c5ae3e31739544014f53c27d3
Reviewed-on: https://gerrit.instructure.com/17509
QA-Review: Clare Hetherington <clare@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2013-02-08 09:36:38 -07:00
Sterling Cobb 88b8dc7238 Remove un-needed comments.
Change-Id: I38c24473f34d04e054db3c2879c3a7337a6b578a
Reviewed-on: https://gerrit.instructure.com/17393
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2013-02-07 16:38:50 -07:00
Joel Hough 3f60e941a8 fix nil due date comparison bug in upcoming assignments
test plan
- create an assignment with no due date
- create a section override for the assignment with a due date
  less than one week in the future
- as a student not in the overridden section, ensure that pages
  that include the "Upcoming Assignment" list do not crash

Change-Id: I877fd8eabf31b68fb071903050ab3eb228050a70
Reviewed-on: https://gerrit.instructure.com/17520
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
2013-02-07 10:27:52 -07:00
Brian Palmer 0b5182f9c6 don't check :view_statistics permission in js_env
Calling user_url ends up checking this permission, and
checking this particular permission is very expensive -- it involves
loading every course the user has ever been in, looking at Role
Overrides, etc. So doing it on every page is ouchy.

refs CNVS-3669 , which discusses the larger issue with this set_policy
block.

test plan: No visible change in behavior. When loading a course page,
there shouldn't be a series of queries loading and then processing every
one of your course enrollments.

Change-Id: Ic0afec59ab6ce37b82870025ecc520e68b0421fa
Reviewed-on: https://gerrit.instructure.com/17492
QA-Review: Brian Palmer <brianp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
2013-02-07 09:57:09 -07:00
Kyle Rosenbaum 2a7e6f1842 spec: refactor selenium specs
refactored to use click_option
refactored to use have_class and have_attribute
refactored do end

Change-Id: I6b3a921152347a5057263d727ccdc00ba9fd21ea
Reviewed-on: https://gerrit.instructure.com/17495
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jake Sorce <jake@instructure.com>
QA-Review: Jake Sorce <jake@instructure.com>
2013-02-07 09:42:16 -07:00
Zach Pendleton 870c613690 fix form submission on edit event page w/ multiple dates.
fixes CNVS-3616

when creating/editing an event with different dates for
each section, properly submit the form w/o throwing a
javascript error.

test plan:
  * create an event for a course with multiple sections,
    and check its 'use a different date for each section'
    checkbox;
  * provide a date for each section, click 'update event,'
    and verify that the form is submitted and the event is
    updated properly.

Change-Id: I336ecf5be45a27aec8f2c6df5a509272b4d19393
Reviewed-on: https://gerrit.instructure.com/17443
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Joel Hough <joel@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
2013-02-06 17:16:41 -07:00
Jacob Fugal f11a1ab56e only do bookmark pagination for the json response
I had thought this was just an API method. turns out there's an html
repsonse too that I totally killed (and no specs exercised...). do it
the old way for the html response.

fixes CNVS-3632

test-plan:
 - log in as a user with some groups
 - go to the /groups page
 - see groups

Change-Id: I519ada1836021aa49231ffa0b0c9df71bf16c907
Reviewed-on: https://gerrit.instructure.com/17502
Reviewed-by: Brian Palmer <brianp@instructure.com>
QA-Review: Clare Hetherington <clare@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2013-02-06 16:58:42 -07:00
Simon Williams 77c43ceb10 spec: make external tool selenium spec more robust
wait for initial javascript to load, and use regular find_element with id's
instead of selecting on aria-controls tags

test plan:
- specs (especially this spec) should pass

Change-Id: I9887d6af2cf171345b9f2a134082a31e5551e695
Reviewed-on: https://gerrit.instructure.com/17496
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Shawn Meredith <shawn@instructure.com>
Reviewed-by: Stanley Stuart <stanley@instructure.com>
2013-02-06 16:54:54 -07:00
Cameron Matheson 41bf60bce0 lock rb-inotify at version guard likes
Change-Id: I7353e0841aaf0b762359680f18db15fbac5a056b
Reviewed-on: https://gerrit.instructure.com/17503
Reviewed-by: Zach Pendleton <zachp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Cameron Matheson <cameron@instructure.com>
2013-02-06 16:17:25 -07:00
Simon Williams 8d665d41f5 let observers see grades on students grades page
syncronize permissions checks for reading grades for observers between
submission and enrollment objects.

closes CNVS-3541

test plan:
- gives grades to an observed student
- as the observer, to go the student grade page
- you should see the individual and overall grades.

Change-Id: Id8efd29eb963b00a0b01223cb3b595251b698eec
Reviewed-on: https://gerrit.instructure.com/17428
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ahmad Amireh <ahmad@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
2013-02-06 15:54:18 -07:00
Shawn Meredith 7ad46bd35f spec: filespecs "next" usage outside an rspec loop
Change-Id: I07fcecbfd95e471d349e0bcae4d916e110555f83
Reviewed-on: https://gerrit.instructure.com/17467
Reviewed-by: Jake Sorce <jake@instructure.com>
QA-Review: Jake Sorce <jake@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2013-02-06 15:21:14 -07:00
Paul Hinze 307494dc54 calendar events api: fix date boundary handling
Test plan:
 - Log in as a user with time zone set to Alaskan time
 - Create three events starting late in the evening on yesterday, today,
   and tomorrow
 - Query the calendar events API with no date range, you should see
   today's event
 - Query the calendar events API with a date range, you should receive
   a proper subset of the 3 events

Change-Id: I2ce518d909c24b69eaf3669e90e805eb7c7343e8
Reviewed-on: https://gerrit.instructure.com/17299
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
QA-Review: Brian Palmer <brianp@instructure.com>
2013-02-06 13:49:45 -07:00
Joel Hough 5dfe5bc96f make "Upcoming Assignments" lists vdd aware
fixes CNVS-1220

test plan
when checking for an assignment listed as upcoming, check:
- the "Coming Up" sidebar on the right of the user's or course's
  "Recent Activity" page
- the "Upcoming Assignments" sidebar on the right of the user's
  or course's Assignments page
- the "Upcoming Assignments" section on the main listing on the
  user's or course's Assignments page

ensure assignments can be overridden to be upcoming
- create an assignment that is due more than one week from now
- as a student, ensure the assignment is not listed as upcoming
- create an override that applies to the student that makes the
  assignment's due date less than one week from now
- As a student, ensure that the assignment is listed as upcoming

ensure assignments can be overridden to not be upcoming
- create an assignment that is due less than one week from now
- as a student, ensure the assignment is listed as upcoming
- create an override that applies to the student that makes the
  assignment's due date more than one week from now
- As a student, ensure that the assignment is not listed as upcoming

Change-Id: Ia517d87f0a8ed48f6ce3ca466258e7ad8ebe650c
Reviewed-on: https://gerrit.instructure.com/17168
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Stanley Stuart <stanley@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
2013-02-06 13:21:58 -07:00
Jon Willesen 358ad26203 make discussion topics index handle initial blank pages from api
If the first page from the discussion topics api came back
empty, the discussions index page assumed there were no topics
and did not display topics delivered on later pages.

Now it waits until the last page is fetched before deciding
there are no topics.

fixes CNVS-2633

test plan:
 - create a course with no topics.
 - as a student, go to the course's discussions page; it should
   display "there are no discussion topics to show."
 - create at least 11 discussion topics for the course.
 - for the last 10 topics created, choose "Delay posting" and
   set it to a future date.
 - as a student, go to the course's discussions page; it should
   display the remaining visible topics.
 - edit all of the remaining visible topics and add "Delay
   posting" with a future date.
 - as a student, go to the course's discussions page; it should
   display "there are no discussoin topics to show."

Change-Id: I63550648c09213654f88b7f929832f973294224e
Reviewed-on: https://gerrit.instructure.com/17446
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
QA-Review: Clare Hetherington <clare@instructure.com>
2013-02-06 10:03:24 -07:00
Bracken Mosbacker 5776509165 fix subtitle menu typos
Oh the shame.

Test Plan:
 * Read the CC dialog. It should not say silly things.

refs #CNVS-324

Change-Id: If990410a43f5d3cd91244602e46c998fc4c0a1ee
Reviewed-on: https://gerrit.instructure.com/17488
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Matt Goodwin <mattg@instructure.com>
QA-Review: Bracken Mosbacker <bracken@instructure.com>
2013-02-06 10:00:45 -07:00
Ryan Florence 733627461d added CollectionView
test plan:
- see specs

Change-Id: Id31eb15c0a9215ec00c8b805afd35cf74128cfe5
Reviewed-on: https://gerrit.instructure.com/17476
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Ryan Florence <ryanf@instructure.com>
2013-02-05 16:30:12 -07:00
Ryan Florence a809fddbdf added @optionProperty to View.coffee
also, quit pulling backbone off window

test plan:
- existing `template` spec covers this

Change-Id: I42916bed9791ca3deae9259eff62afd8fcd1949c
Reviewed-on: https://gerrit.instructure.com/17475
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Ryan Florence <ryanf@instructure.com>
2013-02-05 16:29:49 -07:00
Brian Palmer ce056cf82f Don't mark MediaTracksController as an API
Further API infrastructure needs to be done to support API methods that
don't require a logged-in user or auth token, so these aren't actual
APIs yet.

Change-Id: I6080a1c37e3554ac1285b431e275812ebf4f96eb
Reviewed-on: https://gerrit.instructure.com/17479
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
QA-Review: Bracken Mosbacker <bracken@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2013-02-05 15:13:50 -07:00
Jon Jensen 890859f8cb make sure there is a space between the last update and the WHERE
test plan:
1. run migrations in mysql
2. they should not asplode

Change-Id: I34f564141c99f174311bb4c974630b7594e2096e
Reviewed-on: https://gerrit.instructure.com/17465
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2013-02-05 12:56:41 -07:00
James Williams a91d892e0f don't load root folder files into the collaborations
fixes a problem where having a collaboration causes root
folder files to load themselves into the collaborations
folder on the files page

test plan:
* upload a file into the root folder for a course
* create a collaboration
* visit the files page
* file should show up in the root folder,
 not the collaborations folder

fixes #CNVS-3584

Change-Id: Ib94e18b8149a223e9644ce4546eeb67b3418dad4
Reviewed-on: https://gerrit.instructure.com/17425
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2013-02-05 12:55:10 -07:00
rob orton faa91a7cdb more explicit select for sis exporter users.csv
refs CNVS-3607

test plan
- report should still work

Change-Id: Ic0ff43b551aeb6937da7d3fab8576017ba3e4a7b
Reviewed-on: https://gerrit.instructure.com/17451
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Tyler Belnap <tyler@instructure.com>
2013-02-05 12:38:24 -07:00
James Williams 9cc01263ff don't error on course export if the course name is too long
test plan:
* make a course with a name as long as you can
(255 characters)
* confirm that you can export it successfully

fixes #CNVS-3549

Change-Id: I34dc93ba4578bf67b7155138beee231adeb5d4ef
Reviewed-on: https://gerrit.instructure.com/17376
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
2013-02-05 10:21:20 -07:00
Brian Palmer ca5c8a8776 reconnect to redis in the job worker after forking
If the parent pool process uses redis, then the child after forking will
end up sharing the connection, so a reconnect is necessary.

Change-Id: I29f3fd3adafca504cf0805548bca9ba6b30d5318
Reviewed-on: https://gerrit.instructure.com/17456
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Brian Palmer <brianp@instructure.com>
2013-02-05 09:51:45 -07:00
Brian Palmer 44b76489b5 upgrade rails to 2.3.16
The html_escape changes were backported from rails 3 in 2.3.16, so I've
removed our modified version.

Change-Id: I0067b9d84e49459dd7d46ba53a1d597d2e0efb67
Reviewed-on: https://gerrit.instructure.com/17379
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Cameron Matheson <cameron@instructure.com>
QA-Review: Clare Hetherington <clare@instructure.com>
2013-02-05 08:44:57 -07:00
Brian Palmer d7bac4a190 fix for a ruby 1.9 warning message
Backported from ruby 2.0 (and possibly later 1.9 patchlevels) because it
was filling our logs with many millions of warnings. The code was
backported directly, the test was backported with conversion from
minitest -> rspec.

test plan: Delayed jobs that use ruby's net libraries should still work,
such as sending messages, taking web snapshots, etc. You shouldn't see
any further lines like this in the log:

net/protocol.rb:313: warning: regexp match /.../n against to UTF-8 string

Change-Id: Ic29daa4ee9f0587fb2a1ac2968cd08a2f68365a1
Reviewed-on: https://gerrit.instructure.com/17431
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
QA-Review: Brian Palmer <brianp@instructure.com>
2013-02-05 08:32:30 -07:00
Shawn Meredith f72c6c599d spec: file specs refactor
Change-Id: I6bd5b1f695c115efba4c39f5ff4868d7ab000ad1
Reviewed-on: https://gerrit.instructure.com/17367
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jake Sorce <jake@instructure.com>
QA-Review: Jake Sorce <jake@instructure.com>
2013-02-04 16:28:23 -07:00
Cody Cutrer 1470b3aaf5 fix merge_candidates to search the correct shard
refs CNVS-3559

test plan:
 * create a user on the default shard (and confirm the e-mail address)
 * on another shard, invite that same e-mail address to a course
 * it should *not* show the user from the default shard

Change-Id: I897c55f8eaac832cbf655e0348189db4dc7a0a5e
Reviewed-on: https://gerrit.instructure.com/17414
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Hetherington <clare@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2013-02-04 16:20:06 -07:00
Jon Jensen 6c886b3f95 only set association in one direction
refs CNVS-2651

makes it so 1. we don't need to clear the errors and 2. it doesn't get
auto-saved along with the context if has been accessed (e.g. in g/17020,
we check Context#profile in an after_save, which makes it want to save it
if we try to save the course a second time)

test plan:
* https://gerrit.instructure.com/17020

Change-Id: I182da6c39d50bde03bbbbab9fef57826a919f462
Reviewed-on: https://gerrit.instructure.com/17426
Reviewed-by: Joe Tanner <joe@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2013-02-04 15:28:45 -07:00
James Williams 12034f46be fix the remove multiple root folders data fixup
fixes a problem with the data fixup with creating a
new root folder, and with the spec where the spec
wasn't actually checking what it was meant to check

Change-Id: Iafd12f669c0cbfd12eebf6a2d9dc399e60c368eb
Reviewed-on: https://gerrit.instructure.com/17409
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
2013-02-04 14:57:04 -07:00
Cody Cutrer 00f3bb7994 change sections' root_account_id when the course changes
test plan:
 * move a course to a different root account
 * check the database - the section's root_account_id should have
   changed as well

Change-Id: I75647cc2c920af1b3f5e28ca8df30d32afa704a1
Reviewed-on: https://gerrit.instructure.com/17406
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: Clare Hetherington <clare@instructure.com>
2013-02-04 13:21:45 -07:00
Cody Cutrer c5bd3b122c this migration is non-transactional in dev
Change-Id: I1698e157f1dbcfdc44c5d66bbff6489e6b7c4476
Reviewed-on: https://gerrit.instructure.com/17419
Reviewed-by: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2013-02-04 12:33:38 -07:00
Brian Palmer dfadda66d2 1.9: fix our multipart form building to work with StringIO objects again
In 1.8 StringIO#path returns nil, but in 1.9 the method doesn't exist,
so building multipart forms was failing.

lib/multipart.rb could use some larger refactoring but I'm limiting the
scope of this change since it's getting race tracked.

fixes CNVS-3562

test plan: With an environment running ruby 1.9, do a course copy with a
course that includes at least 1 video. The copy should succeed and the
video should work in the new course, as expected.

Change-Id: Ib8a9f1559c639831977f0118874735891b98d02f
Reviewed-on: https://gerrit.instructure.com/17407
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Hetherington <clare@instructure.com>
2013-02-04 12:33:09 -07:00
Cody Cutrer 16a53809c8 create messages from DelayedMessage.summarize on the user's shard
fixes CNVS-1714

test plan:
 * do an action that goes through DelayedMessage.summarize
   (I think just means setting some notifications to every 5 minutes
    or something)
 * wait the five minutes
 * the message(s) should show up in /users/x/messages

Change-Id: Ibcc646f9ec869543b8ba84c1d7c7f8171ce55d78
Reviewed-on: https://gerrit.instructure.com/17166
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
QA-Review: Clare Hetherington <clare@instructure.com>
2013-02-04 10:50:57 -07:00
Stanley Stuart cd0f84a0ba api: don't call empty on possible nils
Fixes a bug where sending nil assignment overrides through the api would
throw an error because nil doesn't respond to the method "empty?". The
code before was checking for the presence of an empty string, and blank?
works for both empty strings and nil via active_support's core object
extensions.

test plan:
  - specs should pass
  - Create an override through the api that has the key "due_at" but a
    null value. You should not get server errors.
  - Request the same override through the api. You should not get server
    errors.

Change-Id: I5792d96e307a9c563d751fbe21cef6178cb350e0
Reviewed-on: https://gerrit.instructure.com/17348
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Reviewed-by: Erik Lyngved <erik@12spokes.com>
QA-Review: Myller de Araujo <myller@instructure.com>
2013-02-04 10:14:05 -07:00
Jon Jensen 25ec19438c don't do an extra disableWhileLoading call each time the form submits
fixes #CNVS-3401

test plan:
1. find a form that can be submitted repeatedly w/o refreshing the page,
   or just check out https://gerrit.instructure.com/17019 with the
   accompanying canvasnet_registration commit
2. use the form multiple times
3. the form should get disabled every time you submit it

Change-Id: I2dcc4da885740513dc75300c01e75f93b5ca0d1b
Reviewed-on: https://gerrit.instructure.com/17199
QA-Review: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Stanley Stuart <stanley@instructure.com>
2013-02-04 09:45:22 -07:00
Paul Hinze 9c7f2822b3 api: return calendar events ordered by start_at
Test plan:
 - Create three calendar events, ensuring that the create order is
   different from the start order. So like Wed, Fri, Mon.
 - Use the API to request a date range of events back.
 - Verify that events are returned sorted, like Mon, Wed, Fri.

Change-Id: Id25bcc3cd5eba68d243586decddf4a394702f147
Reviewed-on: https://gerrit.instructure.com/17280
QA-Review: Clare Hetherington <clare@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2013-02-04 09:08:52 -07:00
Cody Cutrer 3ef475d437 handle tags for cross-shard conversations
refs CNVS-1171

test plan:
 * tags should show up and make sense when communicating with
   someone in a different shard

Change-Id: I21da08d17740dafde766d368300d197897c3639b
Reviewed-on: https://gerrit.instructure.com/17082
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2013-02-04 09:07:22 -07:00
Cody Cutrer 14155e9d51 shim for cross-shard conversations without messageable_users working
closes CNVS-3557

test plan:
 * view a cross-shard conversation
 * it shouldn't give you a page error

Change-Id: I5100554ba592ef03816757f79b205efa0012c948
Reviewed-on: https://gerrit.instructure.com/17380
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Hetherington <clare@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2013-02-04 09:07:13 -07:00