Commit Graph

4655 Commits

Author SHA1 Message Date
Simon Williams 1f4599b456 add more detailed errors to ldap tester
fixes #6347

* logs more information on ldap failures and passes it down to the browser in
  the ajax response.
* fixes a crazy javascript bug where we were accidentally using a reserved
  global var in webkit, 'status', which is a string, which interacted strangely
  with our use of it as a boolean. this fixes the tester for firefox/ie

test plan:
(for #6347)
- use the tester in firefox and ie, it should work

(for error messages)
- one at a time, change the fields of a config, and run the tester
- you should get (slightly) more helpful error messages about what is failing,
  based on status returned from the server.

Change-Id: Ic0837d7ff9f6283d615ddd4bbeef5a957dbd6553
Reviewed-on: https://gerrit.instructure.com/12880
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2012-08-17 14:31:41 -06:00
Cameron Matheson 0f6eae3cf1 include root_account in section_tabs cache key
fixes #9879

The profile nav link should only be shown when @domain_root_account has
profiles enabled.

Test plan:
  * make sure caching is enabled
  * go to to your user settings on an account with profiles enabled
    - you should see a profile link in the sidebar
  * switch to an account that doesn't have profiles
    - you should no longer see the profile tab in the sidebar

Change-Id: If502829ef9d0bfa8117df82e241beb8cd61e03a9
Reviewed-on: https://gerrit.instructure.com/12935
Reviewed-by: Jon Jensen <jon@instructure.com>
Reviewed-by: Bryan Madsen <bryan@instructure.com>
Tested-by: Bryan Madsen <bryan@instructure.com>
2012-08-17 14:15:10 -06:00
Cody Cutrer c41434c73c optimize GradePublishingResultsImporter
do it all in a single update query - avoids extraneous touches as well
as several queries to load data that can be checked in the update

test plan:
 * run grade publishing specs
 * publish grades with async option
 * import the results

Change-Id: I95a67cd1c4d7459cb0f28033421328da6de7113a
Reviewed-on: https://gerrit.instructure.com/12992
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2012-08-17 12:36:14 -06:00
Ryan Shaw 723d9c7e6d make jslint settings more sane
we use jslint just as a last resort effort to make
sure our javascript doesn't have syntax errors or
something.  these changes will make the jenkins
output less verbose.

Change-Id: I937ad1bc6f6b142c4ba424f65e72e9806468638f
Reviewed-on: https://gerrit.instructure.com/12787
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
2012-08-17 11:04:40 -06:00
Ryan Florence fe603e25d7 smaller avatar, removed reporting link
closes #9889
closes #10006

Change-Id: I032a1b79d6bd78e0a6173a73ab2babf979820f9a
Reviewed-on: https://gerrit.instructure.com/12986
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
2012-08-17 10:39:04 -06:00
Ryan Florence 7c611cd19a add 'http' to profile links w/o it fixes #9848
when the profile links are rendered they are now
checked for a simple schema, the check is very
loose so people can add tel:// file:// etc.

if there is no schema, http:// gets added to it

Change-Id: I68ad3d83d459916a25941fbf7d2803a68c5bf40b
Reviewed-on: https://gerrit.instructure.com/12987
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
2012-08-17 10:16:39 -06:00
Ryan Florence 8d872d1f9b updated social icons fixes #9857
- moved generic "contact" method icon to "message"
- added a google docs logo

facebook used to be in the 0x0 position, making
any services without an icon default to the
facebook logo, now it defaults to the message
logo which is better until we have an icon for
everything

Change-Id: I05378295dcfc4f86ab865ada838c77e321414cc4
Reviewed-on: https://gerrit.instructure.com/12984
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
2012-08-17 10:16:22 -06:00
Bryan Madsen d843fbf054 label a intermittently failing html editor selenium spec as pending
Change-Id: I227cc42f8f25d03924ea65a4f1c85a66a4655e1d
Reviewed-on: https://gerrit.instructure.com/12988
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
2012-08-17 10:15:26 -06:00
Cameron Matheson ab04533f0c require name when editing profile
fixes #9890

Test plan:
  * edit a user's profile
  * delete the name
  * you should see an error about the name

Change-Id: I05a3ad4ecd429c5e6563574e92571ae59100f0a6
Reviewed-on: https://gerrit.instructure.com/12942
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
2012-08-17 10:01:41 -06:00
Brian Palmer 785c8ca73b fix avatar fallback images using http instead of https
fixes #9451

rack's request.scheme doesn't take x-forwarded-proto into account, so it
was returning http. Using request.protocol correctly handles ssl
termination, it just means we have to chop off the "://" part of the
protocol.

test plan: In an environment using ssl behind a load balancer, load the
avatar for a user that doesn't have one. verify that the gravatar
request redirects back to canvas using https, not http.

Change-Id: Ifb5f42e91379cfe591d29e07cd2ccf1f9d2b19fa
Reviewed-on: https://gerrit.instructure.com/12865
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
2012-08-17 09:45:39 -06:00
Ryan Shaw ac9eebb275 new discussion topics/announcement index, edit and create
closes: #7172

test plan:

* open discussion topic index page:
  - see how it looks in blank course
  - full course
  - try graded & unread filters (make sure you see things you expect to and not those you don't)
  - do bulk actions by clicking checkbox for a few and hitting delete and lock buttons
  - verify infinite scroll works
  - verify that as a student you don't see posts that had delayed posting
  - click "create new" button to make a new one, make sure it works
  - do all the above in the announcement index page

* while viewing announcements index:
  - verify teacher can create external feed on right
  - no right side unless external feeds exist or they are teacher
  - external feeds are listed
  - only teacher can delete external feed

* while editing/creating new discussion/announcement
  - verify that announcement cant be made into assignment
  - for discussion topic, set as assignment and make sure the assignment settings set.
  - cant change discussion -> announcement (& vise versa)
  - type crazy & blank input, verify that it validates it for you
  - title cant be longer than 254
  - make sure these features work:
    - podcast feed
    - student posts in podcast feed
    - delayed posting
    - toggling threaded/unthreaded
    - must post before seeing replies
  - attach file, remove file attachment, upload new attachment should work

* make sure announcements/discussions look & behave right in other places they show up
  (like course, user dashboard)

* if you can think of any other places where you can edit/create discussions/announcements, make
  sure that still works

Change-Id: Ib0acaff8542bf09f99cd7aa99fb3ed16c999d224
Reviewed-on: https://gerrit.instructure.com/12655
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
2012-08-17 09:26:04 -06:00
Jeremy Stanley 81dbbf02fa fix return type for locked_for_user in folders api
fixes #9975

test plan:
 - retrieve a folder using the API
 - locked_for_user should be a single boolean value

Change-Id: I2bd6fcde8554be35ac497700c9e30a714fe96bed
Reviewed-on: https://gerrit.instructure.com/12975
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2012-08-17 08:56:00 -06:00
Zach Pendleton 8249329f9b don't display end course btn for courses in soft-concluded terms.
fixes #9872

on the course settings page, the 'end this course' button should not
display for courses whose terms have already ended.

test plan:
  * create a course inside of a term whose end_at date has already
    passed;
  * visit the course settings page and verify that the 'end this course'
    button is not visible in the sidebar.

Change-Id: I8f8ddc1cd495a3488fda6989de28d45abd67b6cd
Reviewed-on: https://gerrit.instructure.com/12893
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2012-08-16 17:05:56 -06:00
Jon Jensen d10d5c5b8b cache permission lookups for additional context types, refs #9957
now cache permission lookups for anything that is_a_context?, except for
the User model (since that might result in a lot of writes to the cache
that seldom get read). this expands the cacheable list to [Course, Group,
Account]

test plan:
1. use course, group and account-related functionality in canvas
2. confirm that the those permissions are cached (rails log) and used
3. do something that sets :session_affects_permissions (e.g. get a
   course invitation and go look at the course)
4. confirm that course, group and account permissions are no longer
   cached, but work correctly
5. confirm that non-context permission checks work correctly and are not
   cached (rails log)

Change-Id: I2aab74e225bb4da1a7f486512575c702415eb6fc
Reviewed-on: https://gerrit.instructure.com/12971
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2012-08-16 16:33:00 -06:00
Jon Jensen 41f6d8225f refactor grants_rights?, add cache expiration, refs #6058, #9957
clean up grants_right? and grants_rights?, and add cache expiration so
that stale data eventually clears. the cache-related changed are:

1. we now cache "nobody" lookups for course permissions
2. course permission lookups are cached for no more than a day

additionally, there is a slight behavior fix for non-course grants_rights?
calls that care about the session. previously, the session argument to a
"given" block would be set to nil unless the :session_affects_permissions
flag was set. this was *not* the case for grants_right?. so that means
that grants_rights? calls for a non-context could be more restrictive than
the equivalent grants_right? one(s).

a code audit reveals there should be no places where this was actually
happenening today, so the fix shouldn't affect any current permissions
checks in canvas. rubric_assessment.rb would be susceptible, but the
corresponding controller code is unused. eportfolio.rb has some session-
based policy checks, but it was setting :session_affects_permissions.

test plan:
1. use course-related functionality in canvas
2. confirm that the course permissions are cached (rails log) and used
3. do something that sets :session_affects_permissions (e.g. get a
   course invitation and go look at the course)
4. confirm that course permissions are no longer cached, but work
   correctly
5. confirm that non-course permission checks work correctly and are not
   cached (rails log)

Change-Id: Ie7f79054f48f6a9f168510349c3d1f1ef453deb4
Reviewed-on: https://gerrit.instructure.com/12933
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2012-08-16 16:32:27 -06:00
Cody Cutrer 350c6e498e change wording and color of high-security notice
test plan:
 * log in checking "stay signed in"
 * close the browser
 * open the browser, go to profile
 * it should say "For security purposes, please enter your password
   to continue" in yellow

Change-Id: I6a0f03d5d40314b1422d881f15f7a9053afcfc16
Reviewed-on: https://gerrit.instructure.com/12970
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2012-08-16 16:32:15 -06:00
Cody Cutrer 1033111308 use login/cas route for cas logins
functionally the same, but allows for higher level routing of CAS
requests apart from general login requests

test plan:
 * login and log out with CAS configured

Change-Id: Id4a9633f2dd48e9d7fe0cf9d3ec917750eb8c8ce
Reviewed-on: https://gerrit.instructure.com/12961
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2012-08-16 14:23:55 -06:00
Ryan Florence 39f7775ca7 added jQuery.validate method
Change-Id: I5f5e95009eec4febdfb733bbaea51ab8adf81ed9
Reviewed-on: https://gerrit.instructure.com/12941
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cameron Matheson <cameron@instructure.com>
2012-08-16 13:41:28 -06:00
Jeremy Stanley 4f2d096c26 add missing AssignmentsApiController#show documentation
also refactor the assignment description to an @object,
and reference it from all actions.

add some missing Assignment fields too

test plan:
 - make sure the generated documentation for Assignments is good
   (there is no behavior change)

Change-Id: I29815bb5dcd15ae14faac59f9941220415867ec4
Reviewed-on: https://gerrit.instructure.com/12867
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
2012-08-16 13:38:20 -06:00
Cody Cutrer 65e4578659 allow disabling canvas auth for accounts with another auth source
disabling canvas auth also force-disables open registration, and
makes LDAP auth act like full delegated auth (CAS or SAML)

test plan:
 * configure LDAP, CAS, or SAML. MAKE SURE YOU CAN LOG IN.
 * go to account settings, and disable "Canvas Authentication"
 * open registration should no longer show up on account settings
   page (after saving)
 * ensure you can no longer log in with your Canvas credentials, but
   you can with LDAP, CAS, or SAML credentials.
 * remove LDAP, CAS, or SAML from the account
 * "Canvas Authentication" should no longer show up on the account
   settings page, open registration should
 * your Canvas credentials should start working again
 * add LDAP, CAS, or SAML back
 * "Canvas Authentication" should be back on in account settings

Change-Id: Ic7475623e5139bb545a87d8e5b1014dabaf4e854
Reviewed-on: https://gerrit.instructure.com/12850
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2012-08-16 13:09:23 -06:00
Cody Cutrer b7b407248f multi-factor authentication closes #9532
test plan:
 * enable optional MFA, and check the following:
   * normal log in should not be affected
   * you can enroll in MFA from your profile page
   * you can re-enroll in MFA from your profile page
   * you can disable MFA from your profile page
   * MFA can be reset by an admin on your user page
   * when enrolled, you are asked for verification code after
     username/password when logging in
   * you can't access any other part of the site directly until
     until entering your verification code
 * enable required MFA, and check the following
   * when not enrolled in MFA, and you log in, you are forced to
     enroll
   * you cannot disable MFA from your profile page
   * you can re-enroll in MFA from your profile page
   * an admin (other than himself) can reset MFA from the user page
 * for enrolling in MFA
   * use Google Authenticator and scan the QR code; you should have
     30-seconds or so of extra leeway to enter your code
   * having no SMS communication channels on your profile, the
     enrollment page should just have a form to add a new phone
   * having one or more SMS communication channels on your profile,
     the enrollment page should list them, or allow you to create
     a new one (and switch back)
   * having more than one SMS communication channel on your profile,
     the enrollment page should remember which one you have selected
     after you click "send"
   * an unconfirmed SMS channel should go to confirmed when it's used
     to enroll in MFA
   * you should not be able to go directly to /login/otp to enroll
     if you used "Remember me" token to log in
 * MFA login flow
   * if configured with SMS, it should send you an SMS after you
     put in your username/password; you should have about 5 minutes
     of leeway to put it in
   * if you don't check "remember computer" checkbox, you should have
     to enter a verification code each time you log in
   * if you do check it, you shouldn't have to enter your code
     anymore (for three days). it also shouldn't SMS you a
     verification code each time you log in
 * setting MFA to required for admins should make it required for
   admins, optional for other users
 * with MFA enabled, directly go to /login/otp after entering
   username/password but before entering a verification code; it
   should send you back to the main login page
 * if you enrolled via SMS, you should not be able to remove that
   SMS from your profile
 * there should not be a reset MFA link on a user page if they
   haven't enrolled
 * test a login or required enrollment sequence with CAS and/or SAML

Change-Id: I692de7405bf7ca023183e717930ee940ccf0d5e6
Reviewed-on: https://gerrit.instructure.com/12700
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2012-08-16 13:09:07 -06:00
Cody Cutrer 77a2fca5b7 allow displaying/editing more than 2 LDAP configs fixes #9910
minimum to not accidentally blow away more than 2 configs

test plan:
 * in script/console, add more than 2 ldap configs to an account
 * the UI should show them all, and they should be editable
 * you should not be able to add more, or delete any individual
   config
 * normal editing of one or two configs should work just fine

Change-Id: I66b31f1b800b40aa490fd05b051bec23be9ef0bb
Reviewed-on: https://gerrit.instructure.com/12879
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Cody Cutrer <cody@instructure.com>
2012-08-16 10:27:41 -06:00
Sam Olds 6e169f1365 adds flash errors to the admin merge page
refs #8120

test plan
  - be an admin in a course with at least one other user
  - /users/1/admin_merge
  - enter your own id into the text box -> should get an error about not
    being able to merge an account with itself
  - enter a user id that doesnt exist -> should get an error about not
    being able to find the user
  - enter text and punctuation -> should get an error about invalid text
    being entered

Change-Id: Iaaef29ffb733edf4508b22ffbcc5030e05ffd245
Reviewed-on: https://gerrit.instructure.com/12793
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2012-08-16 10:25:55 -06:00
Cody Cutrer 287815c86a LDAP start tls support closes #9952
make start tls the default if not otherwise specified in the API, and
the default for new integrations in the UI. still support booleans
in the API.

test plan:
 * test non-tls, simple tls, and start tls LDAP servers
 * ensure new LDAP settings default to start tls

Change-Id: I60b2f2d6cbdd32beff14d198c92efbfd6705b041
Reviewed-on: https://gerrit.instructure.com/12923
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Cody Cutrer <cody@instructure.com>
2012-08-16 10:19:05 -06:00
Cody Cutrer 97d6a4db39 update net-ldap gem fixes #3500
test plan:
 * set up an LDAP search filter like
 (&(!(userAccountControl:1.2.840.113556.1.4.803:=2))(sAMAccountName={{login}}))
   and ensure you don't get a page error trying to log in

Change-Id: I7b431783f646cbdaf2b1c78778a05224e9c88183
Reviewed-on: https://gerrit.instructure.com/12913
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Cody Cutrer <cody@instructure.com>
2012-08-16 10:18:34 -06:00
Zach Pendleton 3ac2ac4176 scroll long event descriptions in calendar2. fixes #9774
previously, descriptions longer than 177px in calendar2 events
were overflowing beyond the modal onto the page. this fix adds a
scrollbar for those descriptions.

test plan:
  * create an assignment with a really long description and a due date
    (so it shows up in calendar2);
  * as a user in the same class as the assignment, visit the calendar2
    page and click on the assignment;
  * verify that the description is scrollable and does not overflow
    beyond the modal.

Change-Id: I6522f4712b31a879473bc63066cbd4854731b3b9
Reviewed-on: https://gerrit.instructure.com/12954
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
2012-08-16 09:43:00 -06:00
Simon Williams df277a6ad9 fix creating default notification policies
fixes #9966
refs #9901

there was a bug where policies for non-default channels were being considered
when deciding whether a default policy needed to be created, to show on the
communication preferences page.

also prevent an exception from being thrown when a user has no communication
channels, and visits the notification preferences page. We still need some
better UI here explaining why you can't do anything on the page.

test plan:
(for #9966)
- create a new user with an email, and setup some notification preferences
- add a new email address and retire the first one
- go to the notification preferences page
- you should have default preferences for the (new) default channel

(for #9901)
- as a user with no communication channels
- go to the notification preferences page
- it should not break

Change-Id: Iecd544571d6fece2a23c24b547ae434e8b57daae
Reviewed-on: https://gerrit.instructure.com/12952
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2012-08-16 09:32:26 -06:00
Zach Pendleton b2ab192780 gracefully handle imports w/o ident on response_label.
some malformed imports are missing an indent on response_label
tags. we should just ignore these instead of failing on import.

test plan:
  * run specs

Change-Id: I82914f1ff279b921ae5668c38b80ac4616595a29
Reviewed-on: https://gerrit.instructure.com/12950
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
2012-08-16 09:25:23 -06:00
Brian Palmer f60beca572 use global_id for the BBB voiceBridge number
This ensures that conferences on different shards won't accidentaly
share a voice bridge.

test plan: ensure that voice chat in Big Blue Button conferences still
works as expected.

Change-Id: I3e995943a33a2b18e6574c8f60f094e53f5a2753
Reviewed-on: https://gerrit.instructure.com/12945
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2012-08-16 09:22:22 -06:00
Jon Jensen 4985cdb3c1 spec: ensure adheres_to_policy specs run
test plan: run specs

Change-Id: I0336e58f65e1492b39a1de6ea1e9da0254b41750
Reviewed-on: https://gerrit.instructure.com/12928
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2012-08-15 22:13:20 -06:00
Simon Williams 4635521fe5 fix default notification policies for sharding
fixes #9942

notifications is an unsharded table, so we can't join it again notification
policies. switch to include to get expected behavior

test plan:
- on a non-default shard
- change all of your notification frequencies
- they should stay changed.

Change-Id: Ife74a2124567381e3d1898f1d34ca09904d7376d
Reviewed-on: https://gerrit.instructure.com/12937
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2012-08-15 17:07:36 -06:00
Brian Palmer 0cb816bd47 API for adding files by URL
This adds an alternative method for uploading files by giving Canvas a
public URL in the first step, rather than uploading the file data directly.

test plan:
- create a course file via the API upload mechanism
- make sure the return values are as documented
- make sure the file was correctly uploaded

- create a course file via the URL approach
- make sure the return values are as documented
- make sure the file status endpoint returns valid responses
- make sure the file was correctly stored in Canvas

- repeat that process with a file that has at least one redirect

- repeat that process but creating a homework submission file

- try to create a course file with a malformed URL
- confirm that the appropriate error message is returned

- try to create a course file with a relative URL
- confirm that the appropriate error message is returned

- try to create a course file with a URL that doesn't return 200
- confirm that the appropriate error message is returned

Change-Id: I2dcf711347ec4ef26d767ae1c1fa0bb056986651
Reviewed-on: https://gerrit.instructure.com/12143
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
2012-08-15 16:38:50 -06:00
Jake Sorce 2caea9dd13 change each buttons text align under unregistered services
fixes #9878

test plan:
  1. go to any users profile page
  2. notice under unregistered services
     each buttons text align is left instead
     of center

Change-Id: I27f93d3a17c832c16df9afea43cbcc6d9aadc48a
Reviewed-on: https://gerrit.instructure.com/12900
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bryan Madsen <bryan@instructure.com>
2012-08-15 15:43:11 -06:00
Bracken Mosbacker 5ef11b9ffc update moodle converter gem
Change-Id: Ie883dc4147e309b6fb321692e47827be968f3dd4
Reviewed-on: https://gerrit.instructure.com/12938
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2012-08-15 15:20:18 -06:00
Jon Jensen 990c54dab3 don't reenable form if we are redirecting
when a new user signs up, we don't want the form to be reenabled during
the window between the ajax response and the redirect to the dashboard

test plan:
1. go to /register
2. submit the form with missing/invalid data
3. it should be disabled, and then reenabled with appropriate error boxes
4. submit the form with valid data
5. it should remain disabled until you are redirected to the dashboard

Change-Id: If6a65db71ecbbcabdb747214cee181e25a5cff52
Reviewed-on: https://gerrit.instructure.com/12922
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
2012-08-15 12:45:35 -06:00
Brian Palmer 4701c9d3ce don't return scribd_doc for locked attachments with a root_attachment
fixes #9873

The previous method for making this happen was just setting scribd_doc
to nil on the attachment before serializing it (wut?), but
Attachment#scribd_doc is overridden to return the root_attachment's
scribd_doc if there isn't one on this attachment.

The new strategy is to just use our filter_attributes_for_user stuff to
remove the secret info if the user doesn't have permission.

test plan: Upload a pdf or something, set it as locked, link to it from
a wiki page. As a student in that course, you shouldn't be able to
preview the document in-line. Then copy the course. In the new course,
you also shouldn't be able to preview the document in-line.

Change-Id: I66dc3a55a4e0371337846eb82179e6638a7d3852
Reviewed-on: https://gerrit.instructure.com/12921
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2012-08-15 09:45:09 -06:00
Ryan Florence 63a2e3a5bc return false when rendering new profile
Change-Id: I2cceda5ca12b15e93f3a1d39f4c775185c67f9c1
Reviewed-on: https://gerrit.instructure.com/12924
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2012-08-14 16:54:40 -06:00
Brian Palmer ce4eb5cb42 upgrade Uploadify to 3.1.1
fixes #8221

test plan: no user visible changes in behavior, so this is a regression
test. repeat this test plan once for s3 files and once for local
files:
  * verify file uploads on /courses/X/files and /dashboard/files
    * upload to other folders
    * upload multiple files
    * zip uploads
    * weird characters in filenames, duplicate filenames
  * verify other places we upload files like content imports and sis
    imports

Change-Id: I01b7805eb947097b250bf9be944a9347ecc4ff5e
2012-08-14 14:49:35 -06:00
Jon Jensen f240b83ce3 fix ui-icon-info background image
test plan:
1. go to the style guide or some place that uses the ui-icon-info class
2. it should have the blue info icon

Change-Id: I3c16e7add2d444982fc010f1dbc833a7f6749db4
Reviewed-on: https://gerrit.instructure.com/12912
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2012-08-14 14:04:52 -06:00
Jon Jensen f75c161860 allow unconfirmed users to set communication preferences, refs #9897
when users sign up via open registration, they can use canvas before
confirming their email address (and setting a password). since we show
a "Configure Communication Preferences" button, it makes sense to let them
actually do it (instead of getting a big scary warning). notifications
won't actually be sent until the communication channel gets confirmed, so
we warn them about that.

test plan:
1. sign up as a teacher via /register
2. when you get to the dashboard, click the "Configure Communication
   Preferences" button
3. you should see notification preferences
4. you should be able to update them
5. you should see a reminder to confirm your email
6. the "re-send email" link in the reminder should work

Change-Id: I585a69b8667ef82eb2e4c3005179bc14377e467b
Reviewed-on: https://gerrit.instructure.com/12911
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
2012-08-14 13:03:43 -06:00
Ryan Shaw 5af0132a87 fix speed grader dialog button styling
this: http://cl.ly/image/0b0c013w2H02
and this: http://cl.ly/image/0u3n0Q2h2W0n

instead of:
this: http://cl.ly/image/2n283o012d0O
and this: http://cl.ly/image/43232r1i0Z3K

Change-Id: I1d2c66ab3c158c0e2fd8fde277f65ec4c92456ab
Reviewed-on: https://gerrit.instructure.com/12841
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Mark Ericksen <marke@instructure.com>
2012-08-14 12:16:59 -06:00
Ryan Shaw 28fce6e9e8 update gradebook uploads form to new styles
this: http://cl.ly/image/0T1i1B453g1H

Change-Id: I621bd938d4e6de4e57c15b83111ccae72a9443d0
not: http://cl.ly/image/0I2B0g2I362f
Reviewed-on: https://gerrit.instructure.com/12811
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Mark Ericksen <marke@instructure.com>
2012-08-14 12:16:50 -06:00
Brian Palmer 0382fbbdd7 omit deleted questions when exporting question banks
fixes #9816

test plan: create a question bank, add a couple questions, and delete at
least one question. copy the course, verify that the new course doesn't
have the deleted question in the bank, but has the others.

Change-Id: Icdbe4cf4a8a98d04aa755e1f89b0f87538b08023
Reviewed-on: https://gerrit.instructure.com/12908
Reviewed-by: Simon Williams <simon@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2012-08-14 12:12:01 -06:00
Jon Jensen 064629bce6 show "no_score" icon if turnitin check is pending, fixes #9844
fixes regression in gradebook around default turnitin icon (and brings gb2
in line)

test plan:
1. set up turnitin on an account and assignment
2. submit homework as a student
3. as a teacher, check gradebook and gradebook2
4. you should see a gray turnitin icon (until the turnitin report gets
   generated)

Change-Id: I3ac470c7e669f6933ece611595cef5673a847c7c
Reviewed-on: https://gerrit.instructure.com/12882
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
2012-08-14 11:31:08 -06:00
Jon Jensen a2755b62cb capture enrollment type during signup, closes #9896
store whether the new user is a teacher/student/observer (if specified)

test plan:
1. sign up as a teacher/student/observer
2. it should work
3. the user record should have the correct initial_enrollment_type

Change-Id: I6200d677f2da946b05d6f90c89617b3476ed390b
Reviewed-on: https://gerrit.instructure.com/12873
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
2012-08-14 11:30:40 -06:00
Jon Jensen 93e2892c7f restore conversations/find_recipients API route, fixes #9914
ensure legacy API route is still available (and added spec). minor doc
tweaks/fixes

test plan:

1. find conversation recipients through the web UI
2. find recipients by hitting the following URLs directly:
   * /api/v1/search/recipients
   * /api/v1/conversations/find_recipients
3. find recipients using the iPad app
4. it should all work

Change-Id: Ic283b3f5bacb22aba7b077e300d96c07565b8cd0
Reviewed-on: https://gerrit.instructure.com/12887
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2012-08-13 23:43:11 -06:00
Jon Jensen 86a84e1f4b spec: make spec less brittle
@module.id could be 99 (depending on spec run order, etc.), causing
unrelated failures

Change-Id: I5f43476dfcbe87d92d393cd2e2de2878eded6cde
Reviewed-on: https://gerrit.instructure.com/12894
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jake Sorce <jake@instructure.com>
2012-08-13 23:43:04 -06:00
Zach Pendleton 35b3fd355a paginate course people page w/ ajax. fixes #9678
return students and teachers/TAs 50 users at a time, and
display them in an infinitely scrolling div. also update
the styling of the scrolling divs to better reflect that they
are scrollable to users w/o permanent scrollbars (e.g. OS X).

test plan:
  * create a course with over 50 student or teacher/ta
    enrollments;
  * view the course people page and verify that student
    and teacher enrollments load as expected;
  * scroll the field with the most enrollments and verify
    that when the bottom is reached more enrollments load;
  * verify that when all enrollments have loaded, the div
    no longer attempts to load new enrollments;
  * create a new course section and add enrollments to it;
  * as a user with permissions limited to section, verify
    that only enrollments in the allowed section are
    displayed.

Change-Id: I2e6485a2edf950acf58f5ccbc75c2965297aed04
Reviewed-on: https://gerrit.instructure.com/12680
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
2012-08-13 14:50:29 -06:00
Ryan Florence b5cce9d6bb removed instructure_record from tinymce in files
closes #9842

Change-Id: I559905fdc5ff6c1829f5929ce27d0bdd8a36cfda
Reviewed-on: https://gerrit.instructure.com/12881
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
2012-08-13 13:21:11 -06:00
Bryan Madsen 1cefa46c05 exclude guard directory when processing files for i18n tasks
Change-Id: If08f4cd7816a9e61171d582530255f96b1d55853
Reviewed-on: https://gerrit.instructure.com/12863
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
2012-08-13 10:45:13 -06:00