Commit Graph

5887 Commits

Author SHA1 Message Date
Brian Palmer dd574808c2 cassandra batching, and batch up the page view updates
Add a batch method that uses cassandra's BEGIN BATCH/APPLY BATCH
functionality to cut down on the number of network round trips, and
possibly save a bit of CPU time on the cassandra servers.

Since execute returns a result set, it can't be batched, so we add another
method update for INSERT/UPDATE CQL statements that don't return a
value.

Closes CNVS-3526

test plan: No behavioral change. Do a regression test that page view
information is still send to cassandra properly. You can check the debug
logs to see that the CQL statements are all sent in one big BEGIN BATCH
statement.

Change-Id: Ibca4f6fbd84f2644436599c017f1ec8c39783e36
Reviewed-on: https://gerrit.instructure.com/17156
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Clare Hetherington <clare@instructure.com>
2013-01-31 16:59:13 -07:00
Jon Willesen cfac26ea29 added null check for child events in processAppointmentData
fixes #CNVS-3387. The CommonEventFactory was returning null
for some child events because it couldn't find the proper
context for them. This might be a legitimate filter, although
the api probably shouldn't be returning them. Either way, it
makes sense to put a null check on the results of the factory
since we do this elsewhere as well.

Test Plan:
 - Check for scheduler regressions

Change-Id: Idca8942ac5e138107248cda9c4dd04452823239e
Reviewed-on: https://gerrit.instructure.com/17290
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
2013-01-31 16:38:02 -07:00
Cameron Matheson 62e4d84dd8 show warning in gb1 for invalid assignment groups
closes CNVS-1924

Test plan:
  * set up one or more assignment groups that have no points possible
  * go to gradebook1
  * you should see similar warnings to the ones that appear in gb2

Change-Id: Icf11684e020a3eff4e654ebf73ee9ad2b9c159b1
Reviewed-on: https://gerrit.instructure.com/17069
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
2013-01-31 16:29:29 -07:00
Paul Hinze 4de8992575 Rails PG adapter: Properly quote Infinity and NaN
refs CNVS-1368

This backports a Rails 3.1 fix as a monkey patch to our Rails 2.3.X
installation. It should address unquoted instances of Infinity we are
seeing occasionally in web conference queries.

The test plan for this is not UI-based, since I was unable to reproduce
by poking around the BigBlueButton web conferences UI.

Test Plan:
 - Inside a ./script/console, choose a model with a column of type
   "float", like WebConference
 - Try to create it with 0.0/0 and 1.0/0 as the value of that column,
   like BigBlueButtonConference.new(:duration => 0.0/0).save(false)
 - Verify that no database exceptions are thrown

The official Rails commit with this fix is here:

06c23c4c7f

Change-Id: I41141054aa06c88ed121a33e6e2da578ff9be82d
Reviewed-on: https://gerrit.instructure.com/17317
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Hetherington <clare@instructure.com>
2013-01-31 16:07:03 -07:00
Zach Pendleton 67d06f0cda fix conversation menus in IE8.
fixes CNVS-3350

previously conversation menu actions were reloading the page
in IE8 when clicked while the URL was bare (e.g.
/conversations without a hash). menus now function as
expected and do not reload the page in any browser.

test plan:
  * in IE8, open conversation and ensure the URL has no
    hash;
  * click the gear menu of an existing conversation, select
    an action like "star," and verify that it works without
    reloading the page;
  * check other browsers for regressions in gear menu
    behavior;
  * check the star and mark as unread buttons on individual
    conversations for regressions.

Change-Id: I21c0f7ef454acfec360a7eadf015ac28ce05f825
Reviewed-on: https://gerrit.instructure.com/17310
Reviewed-by: Mark Ericksen <marke@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
2013-01-31 13:08:48 -07:00
Cody Cutrer ab11d39845 remove sqlite example config
Change-Id: Ie759b71c01b55dd2e425b2a8a54a2623a71b7bff
Reviewed-on: https://gerrit.instructure.com/17198
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
QA-Review: Jacob Fugal <jacob@instructure.com>
2013-01-31 12:06:30 -07:00
rob orton 617c30e321 allow reports on sub accounts and return deleted objects
closes PS-60

test plan
* provisioning report should now include deleted items
* sis report should now include deleted items
* grade export report should now include deleted users
* outcome report should now include deleted users
* these reports should work at the sub account level

Change-Id: Ifa8bb3edd2dbe1fcda9645091fd55bfd13781405
Reviewed-on: https://gerrit.instructure.com/16939
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Tyler Belnap <tyler@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2013-01-31 10:55:04 -07:00
Cody Cutrer e71558bbc3 clean up user account associations
refs CNVS-1338

test plan:
 * run the migration on production-like data
 * it should not fail

Change-Id: Ib8527f2cbee05d5e00941286f16c245091b1a2d9
Reviewed-on: https://gerrit.instructure.com/17117
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Hetherington <clare@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
2013-01-31 10:41:55 -07:00
Ethan Vizitei 8ee9573a38 refactor user merge into it's own class
refs #CNVS-1831

TEST PLAN:
1) no change in behavior, just a refactor
2) attempt to merge 2 users together
3) you should not suffer any surprise errors
during the user merge process

Change-Id: I8691b59e302dfda84dceeb890edafc54ade30c46
Reviewed-on: https://gerrit.instructure.com/16934
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Clare Hetherington <clare@instructure.com>
2013-01-31 09:48:31 -07:00
Joe Tanner db4f24cb2f show an error message when visiting a disabled self-enroll link
closes #CNVS-2464

test plan:
- turn self-enroll on for a course (course settings, more options)
- copy the secret URL
- turn self-enroll off
- go to the secret URL
- it should say enrollment is closed and not a 404 page

Change-Id: Ibd3f1c36f3c444dad48d4f492756d1db320475d8
Reviewed-on: https://gerrit.instructure.com/17226
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
QA-Review: Cam Theriault <cam@instructure.com>
2013-01-31 09:30:01 -07:00
Simon Williams 6b2185cf36 remove course.allow_student_assignment_edits
this was a course setting which allowed students to edit assignment
descriptions only.  unfortunately, it didn't work, because the form validation
code assumed a title input field would be present and tried to require that it
was there.

closes CNVS-3267

test plan:
- make sure the setting is not availble in course settings
- make sure students cannot edit assignments
- make sure teachers can still edit assignments

Change-Id: Iebeaa00f357a59bff8462ecde79c57d68c04320f
Reviewed-on: https://gerrit.instructure.com/17056
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
2013-01-31 09:20:58 -07:00
Chris Hart 78213d6879 update icon font with perfected glyphs and replace a few missing
this just updates the icon-font to the most updated
version (which has kyle's tweaks to the glyphs)
and repaves a few places that showed old icons

Updated font again with new Kyle arrows: Chris

Updated font to map to Private Use Area so it is not read by screenreader

should be warmfixed

Change-Id: I36ddb2d0da8589b15ce6a5e1365e3ef96dce03a5
Reviewed-on: https://gerrit.instructure.com/16204
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Chris Hart <chris@12spokes.com>
QA-Review: Clare Hetherington <clare@instructure.com>
2013-01-31 08:58:36 -07:00
Jake Sorce 7e619efb69 mark files spec as pending
Change-Id: I446e21d37c221e5e660ca418b1c4ecd73bcdaebf
Reviewed-on: https://gerrit.instructure.com/17323
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bryan Madsen <bryan@instructure.com>
QA-Review: Bryan Madsen <bryan@instructure.com>
2013-01-31 08:58:32 -07:00
Zach Pendleton 771439fbbd shard Course#section_visibilities_for.
fixes CNVS-3375, CNVS-3426, CNVS-3436

previously, a user with enrollments in two shards could not
access some pages (e.g. conversations and profiles) because
they attempted to load enrollments across both shards. this
commit fixes the issue by changing to the appropriate shard
while querying enrollments.

test plan:
  * create a user with courses in multiple shards;
  * visit the conversations and profile pages and verify
    that they display as expected and no error message
    is displayed.

Change-Id: Iee98e2f19b1c454557d36c30d87eea9751f4557f
Reviewed-on: https://gerrit.instructure.com/17258
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
2013-01-30 16:25:17 -07:00
James Williams 1e8a11cc1d indicate overridden due dates on quiz show page
show in quiz details an overridden due date, or
"Multiple Due Dates" if there are multiple unique dates

test plan:

* override section due dates for a quiz
* confirm that a single due date is reflected on the
 quiz's landing page (if pubilshed)
* confirm that multiple due dates are reflected

refs #CNVS-746

Change-Id: Ia1fb796c9c0f16ffa95473fd51ba4839d811096b
Reviewed-on: https://gerrit.instructure.com/17261
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
2013-01-30 16:23:39 -07:00
Mark Ericksen aa405cafc4 Conversations filter should behave like "to" finder with users returned.
Fixes #CNVS-1476

Change the Conversations filter input to behave like the "To" finder
with how it lists entries. It should not stop at 5 entries only when browsing
user lists.

Testing Notes:
==========
* Setup at least 6 users that have the same letter in their name.
  Ex: bob1, bob2, billy, brandon, butch, grabthar
* In Inbox in the filter, type a "b" and verify that only 5 are displayed.
  It should NOT include one of the entries until additional letters
  are included in the filter to further limit. So if "grabthar" is not
  included in the first listing when filtered by "b", change to "bt"
  and verify it finds the user.
* Clear all the filter settings and click the "browse" button.
* Locate a course or group that has more than 5 users and verify that
  they are all listed.

Change-Id: Id6f4bc051948560b89b943e44ddd00691e2ce709
Reviewed-on: https://gerrit.instructure.com/17157
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
2013-01-30 15:49:05 -07:00
Jon Jensen de25db1ba8 protect against unsafe yml in i18n:import
ensure that imported translation files only contain basic or known safe
yml types

test plan:
1. run rake i18n:import
2. for the import file, specify a yml file with some ruby (e.g.
   "foo: !ruby/int 123"
3. it should not accept the file

Change-Id: I4859c38ca6fbd5976b52801d6e77d622397daa7c
Reviewed-on: https://gerrit.instructure.com/16697
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2013-01-30 15:24:08 -07:00
Jon Jensen 13f10f24ec don't rescue Exception
make it so you can ctrl-C out of i18n:import

Change-Id: I4ce469e67c2ab3f6f919915db0dc7cc9c95133ff
Reviewed-on: https://gerrit.instructure.com/17259
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Joe Tanner <joe@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2013-01-30 15:23:51 -07:00
Bracken Mosbacker 4d1e54f33f allow loading wiki page in edit mode
Some iFramed pages can force the browser to forward to a new
page. If you had one of those on a wiki page you couldn't
get to the page to edit it because it forwarded too quickly.
Now you can add ?edit=1 on the wiki page url and it won't
render the wiki's content when the page loads, allowing you
to edit it.

This also white-listed the 'sandbox' attribute for iframe
nodes. Sandbox isn't supported by all browsers, but adding
it to the iframe would prevent it from forwarding if you
don't want it to.

Test Plan
 * embed an iframe in a page that tries to forward the page
 * add ?edit=1 to the wiki page and notice that it doesn't forward you
 * add the 'sandbox' attribute to the iframe and save the wiki page
 * the sandbox attribute should not have been scrubbed when saving

closes #CNVS-1288

Change-Id: I5f257e88c81db93ff19d09798ad46a77abfd69bd
Reviewed-on: https://gerrit.instructure.com/17250
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
2013-01-30 15:15:16 -07:00
Cody Cutrer dc82956804 fix cross-shard role override lookups
fixes CNVS-3360

test plan:
 * add a user as a site admin, in a role other than AccountAdmin,
   with all permissions in that role
 * attempt to masquerade as an AccountAdmin in an account on a
   different shard
 * it should work

Change-Id: Icf06e98b6487d1d74c09326ebf2be2e5f0e24008
Reviewed-on: https://gerrit.instructure.com/17260
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2013-01-30 14:59:20 -07:00
Jon Willesen fafc911ccc better display of short events in calendar2 week view
fixes #CNVS-2571

Test Plan:
 - Go to the calendar2 week view.
 - Create a short event (say 15 minutes or less).
 - The event should be tall enough to display one line of text,
   as if it were a 30 minute event.
 - Check the tooltip for the event and make sure it displays
   the correct start and end time for the event.
 - Click on the event a check the popup dialog displays the
   correct times.
 - Click the edit in the popup to bring up the edit dialog box
   and check the edit box shows the correct times.
 - Change the event's times in the edit dialog, but keep it a
   short event.
 - After clicking save, the event should still appear as tall
   as a 30 minute event while it is semi-transparent during the
   ajax request. When the ajex request completes and the event
   turns opaque again, it should still appear as tall as a 30
   minute event.
 - Create another short event starting at the same time the
   first event ends.
 - The two events should be displayed staggered, as if they
   were overlapping events.
 - Drag-and-drop a short event to a new time. It should start
   at the new time, but its duration should not have changed.
 - Resize an event using the bottom resize handle. The event's
   start time should not change, but the duration of the event
   should change.
 - Check for similar behavior in the scheduler view and
   scheduled appointments.
 - Check for regressions in assignments, assignment overrides,
   and scheduler.

Change-Id: I325f79c12c43fe789fb328014a3a3de8d7499121
Reviewed-on: https://gerrit.instructure.com/17045
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Mark Ericksen <marke@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
2013-01-30 14:53:00 -07:00
Zach Pendleton 247c7915c1 stop google docs endless authorization loop.
fixes CNVS-3413

when submitting an assignment with a google doc, user
was previously presented with an endless authorization
loop; google docs list was never displayed. this commit
restores proper behavior.

test plan:
  * create an assignment that allows online submissions;
  * as a student, attempt to submit the assignment as a
    google doc (if you have not already authorized google
    docs access, you will need to do that first);
  * verify that the student is presented with a list of
    their available google docs and not asked to
    re-authorize their google docs access.

Change-Id: Iba9ffda7e35a88aa67b856689680c894a44c4532
Reviewed-on: https://gerrit.instructure.com/17265
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
2013-01-30 12:58:16 -07:00
Paul Hinze f8caf8dca6 Submission API: Return comment author avatar URL
Closes CNVS-2833

Test Plan:
- Make an assigment with a comment.
- Use the Submission API to GET that submission, including
  submission_comments in the response.
- Verify that the commenter's avatar URL is included in the response.

Change-Id: Ic344f1c66987f61e70d1db854ebd7378ede3814f
Reviewed-on: https://gerrit.instructure.com/17231
QA-Review: Adam Phillipps <adam@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2013-01-30 12:54:17 -07:00
James Williams fc9224edee indicate overridden due dates on quizzes index
show an overridden due date, or
"Multiple Dates" if there are multiple unique dates

(also some changes for consistency's sake to
context modules vdd)

test plan:
* override section due dates for a quiz
* confirm that a single due date is reflected on the quiz index
* confirm that multiple due dates are reflected

closes #CNVS-749

Change-Id: Ib59a4af4a52134514bb296906109346eeeb027d3
Reviewed-on: https://gerrit.instructure.com/17118
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
2013-01-30 12:49:07 -07:00
Jon Jensen 2834bf87eb don't mutate the cached permissions hash
permission_json was changing permission[:enabled] to true, which could
then mess up the in-process cache. RoleOverride.enabled_for? doesn't
handle true values, and subsequent page loads start erroring out.

also freeze cached hashes so we don't introduce issues like this in the
future

test plan:
1. go to /accounts/<id>/permissions as an account admin not enrolled in
   any courses (this was one way i could repro it consistently)
2. confirm canvas doesn't start blowing up when you navigate elsewhere

Change-Id: Ide611124df9a7cebc2e18385c6b7a1e1fa114625
Reviewed-on: https://gerrit.instructure.com/16681
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2013-01-30 10:12:43 -07:00
Jon Willesen 0b4cb6e2a5 fix some calendar events api spec failures
specs should stop making assumptions about the order events
appear in when they occur at the same time. fixes #CNVS-3455

Change-Id: Ibd3406496c3ff0ec175dc252b86ee1591d4cdeb5
Reviewed-on: https://gerrit.instructure.com/17254
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
QA-Review: Bryan Madsen <bryan@instructure.com>
2013-01-30 09:40:05 -07:00
Ethan Vizitei c55c3a228c fix user detail view errors
fixes #CNVS-3432

stack traces were coming up in production with
the error "must be a root account".  
granting the manage_logins permission on the
user model involved checking all user accounts
for subset permissions by loading up and then
examining all account users in every one of 
a user's accounts, something that raises
an error in the account.rb model unless the accout
being examined is a root account.  This
fix changes that permission check to only
examine root accounts, and also provides a
backup edge-case handler in 
#has_subset_of_Account_permissions? which
just returns false if the account being examined
is not a root account.

TEST PLAN:

1) login as a local admin

2) go to the detail page for a user
within the context of an account, in particular
one where the user being examined is affiliated
with at least one non-root account:
example (https://wharton.instructure.com/accounts/81471/users/1189725)

3) you should not get any internal server errors,
and should be able to view the user's details.

Change-Id: I3a3995581bcc9bc7eb4074ea3f1ddeb66c598344
Reviewed-on: https://gerrit.instructure.com/17249
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Hetherington <clare@instructure.com>
2013-01-29 20:15:18 -07:00
Cody Cutrer 87e0751f27 update_all/delete_all with join support
refs CNVS-1171

test plan:
 * run specs; will be used by more code shortly

Change-Id: Ib58e664f6f6437a0a328944aa54cdc5871d94f2a
Reviewed-on: https://gerrit.instructure.com/17108
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2013-01-29 16:49:58 -07:00
Shawn Meredith ff4e388127 jenkins build summary
Change-Id: I783b53b9d3245d1361316d67964433f2e9ecef2d
Reviewed-on: https://gerrit.instructure.com/17171
Reviewed-by: Jake Sorce <jake@instructure.com>
QA-Review: Jake Sorce <jake@instructure.com>
Tested-by: Jake Sorce <jake@instructure.com>
2013-01-29 16:06:32 -07:00
Mark Severson f389c2ce27 fix inconsistent mini calendar ids and classes
fixes #CNVS-3330

Change-Id: I2544badad340b9ec582a39f7b7cb2b44267499a3
Reviewed-on: https://gerrit.instructure.com/17132
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Sterling Cobb <sterling@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
2013-01-29 16:03:51 -07:00
Jon Jensen ece889d1f3 triple-stash support for handlebars i18n, fixes CNVS-3402
support interpolation of known safe variables (e.g. an input) using
{{{placeholder}}} in handlebars

some extra stuff:
* support flagging a placeholder as safe in i18n.js via %h{placeholder}.
  this is equivalent to raw'ing the value
* remove support for {{placeholder}} in i18n.js since we never use it.
  previously it would just issue a warning, now it will fail i18n:check
* remove support for %{placeholder} in handlebars since it's inconsistent
  with handlebars. using it will fail i18n:check

test plan:
* run specs and/or use the new triple-stash

Change-Id: Iade349ce90ec695590ae53328226d12dd935ac5b
Reviewed-on: https://gerrit.instructure.com/17209
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
2013-01-29 15:10:19 -07:00
Jeremy Stanley bb005dda58 course batch update api
also adds a new Progress class and API endpoint for
managing new background jobs.

fixes #CNVS-561

test plan:
 * refer to the API documentation for Courses
   and Progress
 * use the Update Courses endpoint to offer, conclude,
   and delete multiple courses in a batch
 * use the Query Progress endpoint to check the
   status of a batch
 * make sure offering already published courses
   succeeds, and also concluding already concluded
   courses

Change-Id: I49d89c1f373f4999b6201574b43a20c53ef28b70
Reviewed-on: https://gerrit.instructure.com/16844
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
2013-01-29 14:06:03 -07:00
Shawn Meredith 8845a555b2 spec: removing pending from kaltura specs
Change-Id: I1bbe702148a7054e3631634e012ed8433cbfce57
Reviewed-on: https://gerrit.instructure.com/17077
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jake Sorce <jake@instructure.com>
QA-Review: Jake Sorce <jake@instructure.com>
2013-01-29 13:31:42 -07:00
Joe Tanner 0333be64aa adding optional user arg to #default_frequency for use in a plugin
refs #CNVS-2648

Change-Id: Ie51025406679a1af314fc9438c3f56d124b6faec
Reviewed-on: https://gerrit.instructure.com/17039
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Cam Theriault <cam@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
2013-01-29 09:29:38 -07:00
Mark Ericksen 7c0c7e9f4b Return to previous Calender2 view after editing event.
Fixes #CNVS-2576, Fixes #CNVS-2515

Testing Notes:
===========
* In Cal2, change to "week" view and preferably select a
  week other than the default (to ensure it returns to the correct one)
* Click a "Calendar Event" and hit "more options".
* On the Calendar Event edit page, hitting "Cancel" or changing
   the event and hitting "Update" should redirect the user back
   to the calendar and return them to the week view previously used.
* Click the "popup" title to view the Calendar Event's show page.
  * Verify that the URL has a "return_to" component.
  * Clicking the "Back to Calendar" button will return to the
    previous calendar view.
  * Clicking the "Edit Calendar Event" button will respect
    the previous calendar view when hitting cancel or update.

NOTE: Using the "Calendar Event" read-only display link does not
return to the correct calendar week view. The nature of this page
will be changing making a fix invalid.

Change-Id: Iacd4a6e9b1de752fc3463c16ab8631ce4a941703
Reviewed-on: https://gerrit.instructure.com/17001
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
2013-01-28 21:27:17 -07:00
Cody Cutrer 1adac7579a drop context_messages
left over cruft from a very long time ago, in case we needed to
revert stuff

test plan:
 * smoke test conversations

Change-Id: Ie222afc37dd17539e8e993857ed535c1bee4bade
Reviewed-on: https://gerrit.instructure.com/17197
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
QA-Review: Clare Hetherington <clare@instructure.com>
2013-01-28 17:55:11 -07:00
James Williams 13045b9325 fix roles api doc for add_role
Change-Id: Ia8fd49e2004fde95679f945daa908dd07375d976
Reviewed-on: https://gerrit.instructure.com/17211
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
QA-Review: Bracken Mosbacker <bracken@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2013-01-28 16:22:55 -07:00
Brian Palmer c35b234480 remove trailing comma in cassandra create table
This worked in 1.1 but throws a syntax error in 1.2 (which we don't
support yet, but will soon enough)

Change-Id: Ide2d3a39dd1700d04cb7a00620d77af273bf282b
Reviewed-on: https://gerrit.instructure.com/16991
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
QA-Review: Brian Palmer <brianp@instructure.com>
2013-01-28 16:16:53 -07:00
Nathan Mills b039dee3e1 create group categories api methods
move group categories methods from groups_controller to group_categories_controller

fixes PS-79
fixes PS-80
fixes PS-108
fixes PS-109

test plan:

*check that group categories still works in ui for accounts, and courses via api

*you should be able to list/show group categories for a course as a teacher or ta via api

*you should not be able to list/show group categores for a course as a student via api

*you should be able to list/show group categories for an account as an admin via api

*you should be not be able to list/show group categories for an account as a non-admin via api

*you should be able to create a new group in a course using the api

*you should be able to create a new group in a account using the api

*you should be able to create a course group category in the api and have it automatically create groups

*you should be able to create a course group category  in the api and have it split students between groups

*you should not be able to use "split_group_count", "create_group_count", or "enable_self_signup" on a non course group category

Change-Id: Ied696a2c5571dad39eae6f0fe9e45692e6f8494c
Reviewed-on: https://gerrit.instructure.com/16820
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: Dave Jungst <dave@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2013-01-28 16:06:51 -07:00
Shawn Meredith 03c4ddd61a spec: external_tools url xml serving locally
Change-Id: I80765a02c86984b1b2effe5bb9450cc99532f6dc
Reviewed-on: https://gerrit.instructure.com/17016
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jake Sorce <jake@instructure.com>
QA-Review: Jake Sorce <jake@instructure.com>
2013-01-28 15:14:32 -07:00
Brian Palmer 7a70785e3e switch JSON back-ends
closes CNVS-3410

test plan:
* parsing and emitting json should still work as before -- the API is a
  great way to verify this. Also just using canvas pages that make AJAX
  calls back to the server.

Change-Id: I30ac2aa6b88c51927dbf71067766db0de02b0c45
Reviewed-on: https://gerrit.instructure.com/17206
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Brian Palmer <brianp@instructure.com>
Tested-by: Brian Palmer <brianp@instructure.com>
2013-01-28 14:38:20 -07:00
Ryan Florence 8a0b540d8c remove .
Change-Id: Iad4444b6ba125a4fcd0e26226a8c0941bf58730c
Reviewed-on: https://gerrit.instructure.com/17103
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Florence <ryanf@instructure.com>
QA-Review: Ryan Florence <ryanf@instructure.com>
2013-01-28 12:49:38 -07:00
Ryan Florence ae0e91045e expand recent activity in .links fixes #3275
test plan:
1. on the dashboard, click the whitespace next to
   the course links in the header
   - it should expand

Change-Id: Ie3cfeeb1c40217b5d92755421d54c1fc1265865b
Reviewed-on: https://gerrit.instructure.com/17104
Reviewed-by: Joe Tanner <joe@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Cam Theriault <cam@instructure.com>
2013-01-28 12:48:09 -07:00
Cameron Matheson 623d428158 show warning in gb2 for invalid assignment groups
refs CNVS-1924

Test plan:
  * set up an assignment group that has assignments with 0 points
    possible
  * make sure you see warning icons in the assignment headers and the
    final grade columns
  * there should also be some helpful hover messages

Change-Id: Iad9e1323ba20008cf77687b12dbb18c5bfbba83a
Reviewed-on: https://gerrit.instructure.com/17023
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
2013-01-28 12:46:50 -07:00
rob orton bdfadf3cb4 add date parser helper for account reports
refs PS-29

test plan
 * pass this helper a date
 * the date should be formatted to pass into a query

Change-Id: Ib1183d268973f0830e4eeb5c2bf7ea714d4fa49a
Reviewed-on: https://gerrit.instructure.com/17192
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brad Humphrey <brad@instructure.com>
QA-Review: Brad Humphrey <brad@instructure.com>
2013-01-28 12:43:36 -07:00
Jon Willesen 4375e7395a fix an intermittent calendar events api spec failure
fixes #CNVS-3326 - the order of the events was not well defined
since they had the same start and end dates.

Change-Id: If3398c4acda49d03440b31b7f55c285f84c58949
Reviewed-on: https://gerrit.instructure.com/17112
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
QA-Review: Bryan Madsen <bryan@instructure.com>
2013-01-28 12:33:28 -07:00
Cody Cutrer 54c502c9f8 add index on conversation_messages(author_id)
so that user merges don't kill the db

test plan:
 * merges of users with lots of conversations should be faster

Change-Id: I4cc8f9cc081f205639999c8486e9604d23bc0ff5
Reviewed-on: https://gerrit.instructure.com/17167
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Hetherington <clare@instructure.com>
2013-01-28 11:01:16 -07:00
Erik Lyngved e5e009a71b api for quiz settings
Fixes #CNVS-2948

Notes:
* Previously the quiz API was very simplistic, just supporting
  a generic index action
* This commit currently contains new endpoints for quizzes#show,
  create, & update, plus docs
* Also validating attribute values in create and update endpoints.

Test Plan:
* Test the new Quiz API endpoints to edit quiz settings:
  * GET  /api/v1/courses/:course_id/quizzes/:id  (show)
  * POST /api/v1/courses/:course_id/quizzes      (create)
  * PUT  /api/v1/courses/:course_id/quizzes/:id  (update)

Change-Id: I762ea2ffd8f5f0ee263381f1ba5be05c54c54e40
Reviewed-on: https://gerrit.instructure.com/16853
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
2013-01-28 10:07:28 -07:00
Stanley Stuart 6a618ecea9 ensure todos have needed fields during api calls
This commit fixes a regression from d30084, in which calls to
Api::V1::assignment_json were not being provided needed fields such as
'turnitin_settings' when accessed through the todos api. This caused the
instantiated ActiveRecord objects to throw an exception because the
field(s) had not been assigned.

test plan:
  - Ensure you have a todo, e.g. an assignment that you haven't
    submitted but is due in the future.
  - Make an authenticated API request for todos
    (e.g. /api/v1/users/self/todo ).
  - The API response should be successful and include todo information.
    The API response should not contain an error message, or have an
    HTTP status indicating errors such as 500.

fixes CNVS-3362

Change-Id: I8af8f17590ac8e37fa2a545c9e49deadf6f3d2b6
Reviewed-on: https://gerrit.instructure.com/17176
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
QA-Review: Brian Palmer <brianp@instructure.com>
2013-01-26 17:38:21 -07:00
Jon Willesen ba69b52791 conversations list should ignore gear menu clicks.
fixes #CNVS-3163: We need to keep the conversation from opening
when the gear menu is clicked so it is possible to mark the
conversation as unread.

test plan:
 - Go to inbox and create a conversation.
 - Click inbox again to refresh the page. No conversation
   should currently be loaded.
 - Click on the gear menu for the conversation. The
   conversation should not load.
 - Click on "mark as unread". The conversation should be marked
   as unread and stay that way.
 - Click on inbox. The conversation should still be unread.

Change-Id: I36b729af73f35e45cf91a57b48356be093cb74bc
Reviewed-on: https://gerrit.instructure.com/17078
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
2013-01-25 21:26:36 -07:00