Commit Graph

10 Commits

Author SHA1 Message Date
Cody Cutrer bd9ba4e545 rspec 3-ify spec/controllers
refs CNVS-16239

Change-Id: I063c25c1481deb634c652f6b45e75b63c7f4dcd3
Reviewed-on: https://gerrit.instructure.com/42677
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2014-10-14 16:34:30 +00:00
James Williams 83c17ed81c spec: fix self_enrollment enabling
Change-Id: I073511735ba6afb71b4bf3aef28e19e467885e51
Reviewed-on: https://gerrit.instructure.com/39876
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bryan Madsen <bryan@instructure.com>
Product-Review: Bryan Madsen <bryan@instructure.com>
QA-Review: Bryan Madsen <bryan@instructure.com>
2014-08-26 13:30:24 +00:00
James Williams 70a6d79bad restrict former self-enrollment enabled courses through account
test plan:
* enable self-enrollment on the root account
* enable self-enrollment on a course
* disable self-enrollment on the root account
* self-enrollment should not work on the course

closes #CNVS-9109

Change-Id: Ic186497ae11376c00872200460d9850e4dfecc38
Reviewed-on: https://gerrit.instructure.com/39684
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Hilary Scharton <hilary@instructure.com>
2014-08-25 12:16:52 +00:00
Derek DeVries 237e89713a fix specs for rails3 to expect a 404 response instead of catching an exception
Change-Id: I7af57c4fcae02f1ba5c0fe5e446a0b6229bc0ca4
Reviewed-on: https://gerrit.instructure.com/29796
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Derek DeVries <ddevries@instructure.com>
QA-Review: Derek DeVries <ddevries@instructure.com>
2014-02-07 20:01:34 +00:00
Jon Jensen c87d12c573 self-enrollment API, fixes CNVS-10419
move existing self-enrollment endpoint (undocumented) into enrollment api

depends on g/28504

test plan:
1. specs should pass
2. existing self enrollment forms should work, specifically:
   1. enrollment dialog on public course page
   2. self enrollment url (from course settings)
   3. canvas.net enrollment dialog

Change-Id: I0c876720203654e0a589b9ef2d25b80c3e4dfb08
Reviewed-on: https://gerrit.instructure.com/28506
Reviewed-by: Dan Dorman <ddorman@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
Product-Review: Marc LeGendre <marc@instructure.com>
2014-01-15 21:17:04 +00:00
Jon Jensen e8416649dc avoid infinte recursion when self-enrolling in another shard
fixes CNVS-8780

test plan:
1. create a user in one shard
2. try to self enroll in a course in another shard
3. it should work, and you should not get a page error

Change-Id: Id856686546499f90c4a77cd64d008b621cdc4158
Reviewed-on: https://gerrit.instructure.com/25257
Reviewed-by: Landon Wilkins <lwilkins@instructure.com>
Product-Review: Marc LeGendre <marc@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2013-10-14 19:55:06 +00: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
Jon Jensen 695182de72 fix self enrollment urls for delegated auth
fixes #CNVS-2660

this snippet of code got lost in a refactor. if the account has delegated
auth and users are not authenticated, store the location and send them to
the login_url, where the delegated auth dance will happen (either they
enter the credentials, or it sees they are logged in and sends them back)

also put the "should i redirect for auth?" check into its own method for
easier reuse

lastly, override styles for embedded (popup) self enrollment form to ensure
overzealous custom styles don't make it look really bad

test plan:
1. set up an account with cas or saml
2. go to a self enrollment url when not logged in
3. it should redirect you to the login form
4. once authenticated, you should be able to self-enroll in the course

Change-Id: Ic0277ae0e11300fd43b7efea1c4edda589f42d29
Reviewed-on: https://gerrit.instructure.com/16706
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Cam Theriault <cam@instructure.com>
2013-01-14 13:23:58 -07:00
Jon Jensen 92c4bfdd37 self enrollment caps, refs #CNVS-1120
add support for self enrollment caps to limit the size of a particular
course. there is no UI for setting caps (yet)

test plan:
1. run specs
2. follow test plan for https://gerrit.instructure.com/15819

Change-Id: Ibf0a8f04f0c2efa820d0850cef26dfae20849246
Reviewed-on: https://gerrit.instructure.com/16021
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Joe Tanner <joe@instructure.com>
QA-Review: Cam Theriault <cam@instructure.com>
2012-12-19 12:29:58 -07:00
Jon Jensen f74ebd096b self enrollment refactor to facilitate CN integration
fixes #CNVS-1119, potentially supersedes
https://gerrit.instructure.com/14501 with a little work.

simpler flow that is more consistent with FFT signup. whether you click
the "join course" button (popup) or go to the join url, the workflow is
the same:

1. if you are authenticated, you just click the enroll button.
2. if you are not authenticated, you can either:
   1. enter your (canvas/ldap) credentials and submit to join the course.
   2. register and join the course (single form). you will then be
      dropped on the course dashboard in the pre_registered state just
      like a /register signup (you have to follow the link in your email
      to set a password).

note that if open registration is turned off, option 2.2 is not available.

other items of interest:

* fix CSRF vulnerabilities where you can enroll authenticated users in
  open courses, or un-enroll them if you know their enrollment's UUID
* move to shorter course-id-less route (w/ join code)
* reuse UserController#create
* handy openAsDialog behavior and embedded view mode
* better json support in PseudonymSessionsController#create
* extract markdown helper from mt
* show "you need to confirm your email" popup when you land on the course
  page the first time (already showed on dashboard)

test plan:
1. test the authenticated/unauthenticated scenarios above, for both the
   popup and join pages
2. regression test of /registration forms

Change-Id: I0d8351695356d437bdbba72cb66c23ed268b0d1a
Reviewed-on: https://gerrit.instructure.com/15902
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Joe Tanner <joe@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2012-12-19 12:29:47 -07:00