Commit Graph

2318 Commits

Author SHA1 Message Date
Cody Cutrer 6b9c2ce003 only search for active pseudonyms when logging in fixes #6128
also fix searching all accounts to do so case insensitively

Change-Id: I3199f5ecd80d07e685c09c31bdffc96ef0f5371e
Reviewed-on: https://gerrit.instructure.com/6592
Reviewed-by: Zach Wily <zach@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-10-31 13:48:17 -06:00
Cody Cutrer 3f3f72637a expose sortable name to user, fixes #5317
* expose sortable name directly to the user
 * don't downcase it
 * use a LOWER(sortable_name) index for postgres
 * set sortable name as "last_name, first_name" explicitly for SIS imports
 * populate sortable name intelligently in the UI

Change-Id: I476641f4817e27a11b573d91f102c5a74d3eba26
Reviewed-on: https://gerrit.instructure.com/6512
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
Reviewed-by: Ryan Florence <ryanf@instructure.com>
2011-10-31 12:22:08 -06:00
JT Olds 6403cdf705 don't actually delete users, just pseudonyms. fixes #6117
Change-Id: I560a9de442b75c07eca204ad63be5f3c76f1d5bc
Reviewed-on: https://gerrit.instructure.com/6564
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2011-10-31 11:48:18 -06:00
JT Olds 9bd892d5e4 update account associations on user merge. fixes #5574
Change-Id: I25e9b2d058bb406d229e640bc5b54da51f08bdd1
Reviewed-on: https://gerrit.instructure.com/6577
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-10-31 11:44:16 -06:00
Cody Cutrer c4c79f5d23 grandfather in accounts with old not-secure-by-default settings
refs #5833

Change-Id: Ic283bc7665e76ff0a19635faef3d5751f2d06e6b
Reviewed-on: https://gerrit.instructure.com/6581
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
2011-10-31 10:53:06 -06:00
Cody Cutrer 736ddf007b fix rendering of registration page for merges when there is no enrollment
refs #5833

Change-Id: Iaa4b66edc9d138cd5f2d6f31dc0e0a5460b36be5
Reviewed-on: https://gerrit.instructure.com/6584
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
2011-10-31 10:51:50 -06:00
Cody Cutrer 1da2b3f57e base showing Create User on the correct permissions
refs #5833 (ish)

users are created in the root account, so you must be allowed to
create users in that account, not the current account

Change-Id: I545cc873f682cd07888c949a56e4bb6cbb47566e
Reviewed-on: https://gerrit.instructure.com/6583
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
2011-10-31 10:51:26 -06:00
Ryan Florence 357b621691 placeholders for quiz answers fixes #5438
The previous fix for this in #4949 broke some
other question types where the app would get stuck
in a loop of selecting 3-4 inputs rendering the
page useless.

Added jQuery.fn.placeholder, can now use the
placeholder attribute on input elements, and then
call $(selector).placeholder(); to support IE.

The plugin checks for support and does nothing for
browsers that support placeholder, so we don't
need to do it ourselves.

also fixes #4949 (again)

Change-Id: Ifbb3e8110ea259ccbe235e3e364050ab29a51b68
Reviewed-on: https://gerrit.instructure.com/6572
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Jon Jensen <jon@instructure.com>
2011-10-31 10:47:42 -06:00
Cody Cutrer b6fca29032 make sure UsersController#create creates account assocations
refs #5833

Change-Id: I76e2e6879e33cc61752e084ec5d94ca9069fc0f6
Reviewed-on: https://gerrit.instructure.com/6586
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bryan Madsen <bryan@instructure.com>
2011-10-31 10:43:36 -06:00
Ryan Shaw 7be2641834 Author Name for "add new entry" was same for all users in a course
fixes: #6068

Change-Id: I2e4efcc5057a18910643a29ec029e24f4835b7cb
Reviewed-on: https://gerrit.instructure.com/6422
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
2011-10-31 09:21:51 -06:00
JT Olds 287bfc4300 plugins_spec should not expect there are no plugin settings
we actually have some spec-wide plugin settings fixtures

Change-Id: I4b9acdc45d9d71723c81a844597abbff917b7d9c
Reviewed-on: https://gerrit.instructure.com/6573
Reviewed-by: Bryan Madsen <bryan@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-10-28 17:33:32 -06:00
JT Olds c754e8df0f splitting apart sis unit tests
Change-Id: Icb240f897a9c1d9709fcc1f4f39a349c09d11301
Reviewed-on: https://gerrit.instructure.com/6571
Reviewed-by: Zach Wily <zach@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-10-28 16:24:23 -06:00
Jon Jensen 0300755aec migrate all quiz images in course copy, fixes #5611
Change-Id: I1d6d6714aff59246d79e3f4a6d0d1ccce3eb79b0
Reviewed-on: https://gerrit.instructure.com/6542
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-10-28 14:15:08 -06:00
Brian Palmer ce09bc727d remove id param from menu_section partial
I can't find any rendering of _menu_section where this param is
included, and since id is actually a deprecated method name on the
Object class, this is filling the logs with a bajillion deprecation
warnings.

Change-Id: I64c9812f2772f12ecfe8220409f3b6ee39487a23
Reviewed-on: https://gerrit.instructure.com/6554
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-10-28 13:41:36 -06:00
Ryan Shaw 8dd5ad8c2b make sure discussion subentry is deleted with parent
Change-Id: I5de4bb1a5527e6c7dc73205c1f6f8c329e74ad68
fixes: #6081
Reviewed-on: https://gerrit.instructure.com/6502
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2011-10-28 12:42:32 -06:00
Brian Palmer bd3dc5b820 convert selenium specs to mocha mock framework
Change-Id: I77e20369f2b0006b8138b24528f3e2ca8cd4ae31
Reviewed-on: https://gerrit.instructure.com/6553
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bryan Madsen <bryan@instructure.com>
2011-10-28 11:57:33 -06:00
Cody Cutrer 794d59eef9 add method for plugins to easily inject into the delegated auth workflow
refs #5948

adjust specs so that if a login does inject themselves in by adding
additonal redirects, we keep following them

Change-Id: I16e616066ea1bef1aa5ed97718cbd8ddbd2c27c5
Reviewed-on: https://gerrit.instructure.com/6536
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-10-28 09:07:54 -06:00
Bryan Madsen b9981e4b9c fix more web conference related specs
Change-Id: I077183cb074a4013257e1c3e2b768635b1b10917
Reviewed-on: https://gerrit.instructure.com/6539
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-10-27 14:11:50 -06:00
Jon Jensen c758b85f85 en.yml snapshot for es and jp translations
Change-Id: I97c63c07e1c2b0f1e8611f68f6ae5abcec99974b
Reviewed-on: https://gerrit.instructure.com/6505
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-10-27 13:57:51 -06:00
Jon Jensen 7c21ae7c7a fix i18n:export bug, don't always rebase
Change-Id: I775e457229ddfa9868c8952abcc1aaa026c708ab
Reviewed-on: https://gerrit.instructure.com/6504
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
2011-10-27 13:57:29 -06:00
Ryan Florence 05cb088fe8 refactored embed image tinymce plugin, fixes #6056
- Added "Loading…" and "Image not found" feedback
  text when fetching images supplied by the user

- Added I18n support to copy

- Pulled logic out of excessively nested blocks
  into function declarations

- Removed an unnecessary interval that was
  running on every page with an editor (just
  needed a keyup instead of keypress handler),
  this improves performance everywhere in the app,
  but probably not noticeable for modern browsers.

- Removed intervals to detect image load and just
  bound to the 'load' event, loading an image url
  is now super snappy (interval was checking every
  500ms, so it was really slow at half second
  intervals).

- Removed duplicate logic for embedding an image

- Cached all elements that get reused.

- Other general performance/readability/whitespace
  improvements.

Change-Id: Ifb7e21d2a4503c79c94d102a4fe7d9ccd088c78a
Reviewed-on: https://gerrit.instructure.com/6410
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
2011-10-27 13:16:16 -06:00
Jacob Fugal 21be362b0d tweak group category creation UI
fold "I'll create groups myself" into "create 0 groups now" for self
sign-up categories

Change-Id: I562f5f303da52fa6e7bcbdc2ce1fb7b071bb8342
Reviewed-on: https://gerrit.instructure.com/6143
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-10-27 13:06:18 -06:00
Ryan Florence 718f9f34ea qunit + AMD javascript specs
new stuff
---------

- added curl.js AMD module loader
- converted existing js specs to use QUnit
- removed jasmine stuff
- added rake task to run js specs

dependencies!
-------------

you'll need to install http://www.phantomjs.org/
if you want to run the specs.

next step is to incorporate curl.js into our app
environment.


Change-Id: I0ba97bc9abe1494f87fdfc0eca51d987a759bc85
Reviewed-on: https://gerrit.instructure.com/6477
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
2011-10-27 12:58:47 -06:00
Bracken Mosbacker 78e727f756 update qti specs for new question bank behavior
refs #5857

Change-Id: Idb84df1cb80be3f063ebc9a73c6f4b8c61e4aa8d
Reviewed-on: https://gerrit.instructure.com/6500
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-10-27 11:02:26 -06:00
Rob Orton 85fccf6cc8 fixes #6079 changes account admin role default permissions
Change-Id: Ifcb7619a02d6fddcc025e88fb727d86bbccdfcc8
Reviewed-on: https://gerrit.instructure.com/6450
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2011-10-27 10:37:05 -06:00
Brian Palmer 3a7b9dc239 fix up web conference related spec failures
Depending on spec run order, these would fail due to various plugin
setting problems and/or a bad stubbing in an api spec

Change-Id: I6b82949cb9eb67cc6b4d1e55c1393a42d7054c69
Reviewed-on: https://gerrit.instructure.com/6530
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-10-27 10:29:43 -06:00
Cody Cutrer f99abb4e56 Revert "add distinct name part fields refs #5317"
This reverts commit 995110f555.

Change-Id: Ic00e7ced20ca9d912587e3440862ceb50e601d15
Reviewed-on: https://gerrit.instructure.com/6511
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-10-27 10:17:29 -06:00
Ryan Shaw 919768475f make take_quiz faster on domready
after the changes in 215e828, scrolling was a lot
faster but the page still hung on dom ready in ie8
and triggered IE's "a script is running slowly"
dialog this helps address that.

refs: #6047

Change-Id: Ic9548f35666762702f57edcf039aaf199d4a92a8
Reviewed-on: https://gerrit.instructure.com/6441
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Ryan Florence <ryanf@instructure.com>
2011-10-27 10:09:44 -06:00
Brian Palmer 20a2376fe0 switch to mocha mock framework for specs
Change-Id: Iae9689d00d71b684048a9fecfa0eb60794943ed7
Reviewed-on: https://gerrit.instructure.com/6462
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-10-27 08:37:13 -06:00
Ryan Shaw 730c63ca29 disable auto-complete on safari too since it forces yellow bg
the inputs on the login screen use a background
image for to get the big rounded corner look.
chrome (and, apparently now safari too) forces a
background-color: yellow !important;
background-image: none !important;
in the system stylesheet so it can't be overwritten

Change-Id: Ic41ff35e7afe856735cd88dc3a28cf89f717f9f6
Reviewed-on: https://gerrit.instructure.com/6499
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: BJ Homer <bj@instructure.com>
2011-10-26 17:40:24 -06:00
Brian Palmer e5e1c51b1a use rspec mocks not mocha mocks
Change-Id: I35a64c54698e0722bacaa87b7dc11a34a3714bb2
Reviewed-on: https://gerrit.instructure.com/6516
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-10-26 17:08:03 -06:00
Cody Cutrer 92d3ad51e9 spec self unenrollment
refs #5833 (ish)

also fix it so that non-self-enrolled users can't unenroll themselves

Change-Id: I584ce21df0aa31d3a37c9b611a65d29858c2a41b
Reviewed-on: https://gerrit.instructure.com/6486
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
2011-10-26 16:01:44 -06:00
Cody Cutrer 9be1995008 support creation_pending users that were created prior to the big refactor
refs #5833

prior to the big refactor, creation_pending users were created with
pseudonyms.  after the refactor they aren't (since there could be
conflicts that need to be resolved by the user).  without this fix,
the old users that have a pseudonym would be forced to create another,
non-conflicting pseudonym.  this fix just reuses the pre-created
pseudonym, if it exists

Change-Id: Ib3dc822e6ca179fb0e512d8bc4b3014cdaad262a
Reviewed-on: https://gerrit.instructure.com/6483
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
2011-10-26 16:01:34 -06:00
Cody Cutrer 695ab7f955 remove completely unused user workflow_states
just a bit of cleanup

Change-Id: I9535e38155b663c252514a08d65e75dba05719e9
Reviewed-on: https://gerrit.instructure.com/6482
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
2011-10-26 16:01:27 -06:00
Cody Cutrer 2595707b6b fix self enrollments refs #5833
note that it's not strictly broken by #5833's changes, because it
didn't work for existing users before (it would ask you to login
if you weren't, and you put in an existing e-mail address, and then
it would ask you to login again if you were already logged in).

Change-Id: Idb84397ad90987076c8e717863be496fc825b77e
Reviewed-on: https://gerrit.instructure.com/6481
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
2011-10-26 16:01:16 -06:00
Jacob Fugal 3b2d4b38af include response-content-disposition in S3 download urls
when downloading a file (attachment) that's on S3, include the
response-content-disposition parameter in the redirect url so that the user
will get a Content-Disposition header from S3 giving the file the correct
disposition (attachment, not in-browser) and the correct filename (the
'natural' filename in S3 is that of the first copy of the file uploaded;
someone else may have uploaded it again with a different filename; we want them
to see the correct filename in the download).

CAVEATS:

 * in the case of duplicate files with different filenames, the content
   disposition will cause the correct filename to be used by the browser in
   saving/prompting-to-save the file, but the actual S3 filename will still be
   present in the URL if inspected.

 * the filename in the content-disposition is correctly quoted as per RFC 2616
   for ASCII, but a lot of browsers do it wrong. we are making no attempt to
   accomodate their idiosyncracies.

 * the http quoting we do is ghetto and doesn't account for multi-byte
   characters.

fixes #4473

Change-Id: I468a6ecdaee2946ab89172984adacf20b491d541
Reviewed-on: https://gerrit.instructure.com/6506
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2011-10-26 16:00:31 -06:00
Cody Cutrer 0180c28581 fix some invitation acceptance bugs refs #5833
* Make sure we pass the enrollment info on when registering a new user
 * Fix bug that we would use the current user's enrollment, rather than
   the enrollment in the session (from an invitation link)
 * Optimize check_enrollment a bit - don't do a query for NULL uuid
 * Optimize the non-preview workflow to cut out a redirect that
   can be handled inline

Change-Id: I0ec08df2c910995d95782dd98aa863f3f62db549
Reviewed-on: https://gerrit.instructure.com/6416
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
2011-10-26 15:47:25 -06:00
JT Olds cbd95db6c3 fix collaborator (de)select all links. refs #5796
Change-Id: I83f177bb5f302c804e82b4f61500e50cf2f741a9
Reviewed-on: https://gerrit.instructure.com/6294
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2011-10-26 15:24:18 -06:00
JT Olds 3c66de62d7 don't show the collaborators selection form if there aren't any, refs #5796
Change-Id: Ia8682624442fd96e1e784544f3b9d7c51f73c2ca
Reviewed-on: https://gerrit.instructure.com/6284
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2011-10-26 15:24:04 -06:00
JT Olds ef4c897e2f fix the 'Started by' user link in collaborations, refs #5796
Change-Id: I125b17b9389aa622fca6cb5bb012828e979bf593
Reviewed-on: https://gerrit.instructure.com/6282
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-10-26 15:04:03 -06:00
JT Olds ef33ff77e8 automatically start the new collaboration wizard when there aren't any
refs #5796

Change-Id: Ifc3306a00e9d8f028f4de514a9499b93fdfd8537
Reviewed-on: https://gerrit.instructure.com/6281
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-10-26 14:46:37 -06:00
Brian Palmer 8ad501a099 limit failed login attempts
closes #5880

We track failed attempts for both (pseudonym) and (pseudonym, ip) in
Redis, the latter with a lower threshold. If either threshold is
exceeded, the user can't attempt to login for a given time period
(default 5 minutes). This protects against brute force auth attacks.

We've hooked into Authlogic for this, so it should apply to everywhere a
user is logged in -- login screen, API basic auth, Respondus API, etc.
It doesn't apply to SSO auth, where the SSO authority is assumed to have
existing protection of its own.

I refactored the Respondus SOAP API to use Authlogic in a more standard
manner, to make this work.

Change-Id: I569823f83c5c2855526464da270426275eb857cd
Reviewed-on: https://gerrit.instructure.com/6428
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-10-26 14:27:30 -06:00
Jon Jensen 1287bb08b0 strip whitespace from extracted strings
Change-Id: I010fdde1f27e605f33aa532f3ade9b5cde20a7d7
Reviewed-on: https://gerrit.instructure.com/6413
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
2011-10-26 13:55:32 -06:00
JT Olds 3ab1f94553 reword collaboration service descriptions, refs #5796
Change-Id: Iddb33a0a1f6da983b9dc328a817a76d88dd46520
Reviewed-on: https://gerrit.instructure.com/6293
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2011-10-26 13:30:07 -06:00
JT Olds e7c9d7e67c english string collaborator count typo, refs #5796
Change-Id: Ia37bfdf1f9c048127a0b6529f0065b1088a269dd
Reviewed-on: https://gerrit.instructure.com/6286
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2011-10-26 13:29:56 -06:00
JT Olds af340254e9 i18n key typo, refs #5796
Change-Id: I46b185847c828106d8d1aeef944e9098545492de
Reviewed-on: https://gerrit.instructure.com/6285
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2011-10-26 13:29:44 -06:00
JT Olds 6d83261364 fixing some collaboration description layout, refs #5796
Change-Id: I86b67e77ebff8589b0684d651662fd2e68077b97
Reviewed-on: https://gerrit.instructure.com/6283
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2011-10-26 13:29:07 -06:00
Bracken Mosbacker 64b6064565 get quiz group name when importing
refs #5546

Change-Id: Ic8137e24f41f0342f8e628a39b30a110bafafb72
Reviewed-on: https://gerrit.instructure.com/6471
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2011-10-26 12:31:13 -06:00
Bracken Mosbacker ae498ae7e7 don't fail when converting qti item without identifier
some qti questions that are converted don't have an identifier
like they're supposed to. This allows those questions to still
be processed without causing an error

refs #5546

Change-Id: I2bc931a65095fca2e73beaaf578f99037e5e09e3
Reviewed-on: https://gerrit.instructure.com/6400
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2011-10-26 12:31:03 -06:00
Brian Palmer e0eafa83eb use hard-coded table names for VALID_SIS_COLUMNS
This shaves about 0.8 seconds off canvas startup time in dev mode on my
MBP. Not a lot, but it's something.

Change-Id: I1e835e5a97a122b2f4a5c5dcd9d86d6a4c0369b0
Reviewed-on: https://gerrit.instructure.com/6472
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-10-26 09:25:19 -06:00