Commit Graph

3049 Commits

Author SHA1 Message Date
Simon Williams 99c5a21022 api: allow only offer as a param to course update
fixes #10063

the coures update api required passing at least one course[*something*]
parameter, which meant if all you wanted to do was offer the course, you had to
pass a dummy parameter.

test plan:
- call the course update api an only pass {:offer => 1}
- it should work

Change-Id: I5b89f1f3f474c3b097083f17403e1da20be4ca56
Reviewed-on: https://gerrit.instructure.com/13057
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2012-08-21 14:34:19 -06:00
Cody Cutrer 7b8dd548d3 a few more things to skip for deleted root accounts refs #6891
Change-Id: Id56c0f9a157734483fad29ffd95b9ea146ff1002
Reviewed-on: https://gerrit.instructure.com/13060
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2012-08-21 13:49:23 -06:00
Brian Palmer 451c42460e directly return the avatar url in api responses
This will bypass a lot of extra rails requests on things like discusison
topic pages.

refs #9679

test plan: load a discussion topic with lots of user avatars of
different types, veryify they still display correctly.

Change-Id: I29829806da30410c6b938ff3bcf54329a58698c4
Reviewed-on: https://gerrit.instructure.com/13050
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Brian Palmer <brianp@instructure.com>
2012-08-21 13:43:49 -06:00
Simon Williams cb9570c60d account settings ui for calendar 2 and profiles
fixes #10031

provide a checkbox on all account settings pages, only visible to site admin
users, that allows them to enable/disable the new calendar or new profiles in
that account. this will work similarly to how global includes currently works.

test plan:
- as a site admin user, go to account settings
- you should be able to change the settings above
- as a regular admin user, go to account settings
- you should not be able to see/change these settings

Change-Id: Ia36189f0b31b30f2e2aad58652a12f870b9876a6
Reviewed-on: https://gerrit.instructure.com/13016
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2012-08-21 13:40:06 -06:00
Zach Pendleton 09958db6b6 add highlight color back to jquery ui autocomplete suggestions.
fixes #9863

test plan:
  * navigate to /accounts/:account_id;
  * begin typing in the 'Find a Course' text box until possible
    matches are displayed;
  * verify that when you mouseover results or navigate through
    them with your arrow keys the current option is highlighted.

Change-Id: I9a2b34009f943082e91f9dc640142bfdaeccbe7b
Reviewed-on: https://gerrit.instructure.com/13037
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cameron Matheson <cameron@instructure.com>
2012-08-21 12:44:41 -06:00
Jeremy Stanley 31ff56e24a preserve ContentTag links when overwriting Attachments
fixes #6233

test plan:
 * add a file to a module
 * upload a new file with the same name, overwriting the old one
 * make sure the file still appears in the module
 * make sure the new content is downloaded

Change-Id: Ic861cfd89aa30436f2abcf5d52e00efbcfb935e9
Reviewed-on: https://gerrit.instructure.com/12851
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
2012-08-21 12:05:58 -06:00
Cameron Matheson 4a4a2f53c1 fix grade-dropping in gradebooks
The main feature of this commit is that it introduces a grade-dropping
scheme that maximizes the students grade (rather than the simple yet
somewhat arbitrary and inconsistent scheme we had before)

Also fixes the following bugs:

fixes #8454
fixes #8330
refs #8177

Test plan:

  Create a few assignments in an assignment group with drop rules
  (you'll need at least 'drop lowest' and 'never drop') and make sure
  those rules are respected in the gradebooks (old and new).

  Don't forget to test with the 'treat ungraded as 0s' option

Change-Id: I7e4f11939a311e1360aedbeda4d4461f317cfee6
Reviewed-on: https://gerrit.instructure.com/12405
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
2012-08-21 10:29:47 -06:00
Brian Palmer ffa00a25ec query the slave for some expensive queries
Change-Id: Ic2716b75551a85fc028fa7ac0673bf5cb01f14d1
Reviewed-on: https://gerrit.instructure.com/13042
Reviewed-by: Zach Wily <zach@instructure.com>
Tested-by: Brian Palmer <brianp@instructure.com>
2012-08-20 22:28:38 -06:00
Brian Palmer 0d4e118bda optimize query for root attachment to filter db-side
test plan: no visible change in behavior, attachments should still get
root attachments assigned when appropriate.

Change-Id: I866a81b6da81a744483fcadb2bff5b74d229619b
Reviewed-on: https://gerrit.instructure.com/13041
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Brian Palmer <brianp@instructure.com>
2012-08-20 22:14:24 -06:00
Cody Cutrer 02d50f181d ignore incoming messages for deleted accounts
test plan:
 * get some notifications for discussions, conversations, etc.
 * delete the root account
 * reply to the notifications via e-mail
 * undelete the root account
 * the replies should not show up

Change-Id: I2afe5de256cbd55ca360a4327150871ea40d7493
Reviewed-on: https://gerrit.instructure.com/12902
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
2012-08-20 14:08:52 -06:00
Cody Cutrer 3854d260a8 avoid trying to create a wiki in Course#tabs_available
test plan:
 * with a read-only slave environment
 * create a new course
 * go to the course
 * it should not error

Change-Id: Ie0003cec2b684fca1400e6efbcca434a540d5c7a
Reviewed-on: https://gerrit.instructure.com/13032
Reviewed-by: Zach Wily <zach@instructure.com>
Tested-by: Cody Cutrer <cody@instructure.com>
2012-08-20 12:23:43 -06:00
Cody Cutrer c45ce31cc6 use a slave for Course#tabs_available
test plan:
 * visit several different courses

Change-Id: I19e8fbefba6164392269d6688df2c58d25e0f34b
Reviewed-on: https://gerrit.instructure.com/13027
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Brian Palmer <brianp@instructure.com>
2012-08-20 11:34:40 -06:00
Brian Palmer 2110996c16 read from the slave for some queries
* calendar events in the .ics feed
 * searching for users in an account
 * user's recent stream items

test plan: verify that these functions still work, both with and without
a slave db configured

Change-Id: Ia596d388642cc9df16e471472406d447a5eb1cf0
Reviewed-on: https://gerrit.instructure.com/13025
Reviewed-by: Zach Wily <zach@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Brian Palmer <brianp@instructure.com>
2012-08-20 11:33:21 -06:00
Zach Pendleton 5600cbaa90 fix default communication channel link. fixes #9963
test plan:
  * create a user with at least 2 confirmed communication
    channels;
  * on the profile page, click the default link (the star) for
    the non-default channel and verify that it is properly set
    as the default.

Change-Id: I1f48fcc9d11d4d5ed2cff60cc5d3b2d28e3fc0d3
Reviewed-on: https://gerrit.instructure.com/12999
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
2012-08-20 09:47:27 -06:00
Zach Pendleton ca110e1831 always overflow section list in gradebook2. fixes #9985
previously gradebook2 section list was only set to scroll if there
were more than 15 sections. this caused layout problems for sections
with long names that wrapped onto a second line.

solution is to always overflow the section list if it's taller than
550px.

test plan:
  * create a course with > 15 sections;
  * open gradebook2 in that course and verify that the section list
    is scrollable;
  * view a course with < 15 sections and verify that the section
    list still displays properly.

Change-Id: Iac199bfbf30e0c3f69b9e89b1f5c6b0f4f8fc5d4
Reviewed-on: https://gerrit.instructure.com/12963
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
2012-08-20 09:47:09 -06:00
Brian Palmer fef6c52922 fix global_includes error when the user has no association with the account
test plan: as a site admin, or another user who has no account
association but can view an account, visit an account that you aren't linked to.
you shouldn't see a page error.

Change-Id: Ib9544d188ff0e5cb3deb4753967fd69ab485b859
Reviewed-on: https://gerrit.instructure.com/13019
Reviewed-by: Bryan Madsen <bryan@instructure.com>
Tested-by: Brian Palmer <brianp@instructure.com>
2012-08-18 19:31:54 -06:00
Simon Williams 4086a305b5 bring back global include cache expiration
global includes for sub-accounts are cached, but we don't yet have good
expiration based on when the asset paths change, so this brings back a 15
minute caching window that was previously in place.

test plan:
- add sub-account branding
- visit a page and make sure it works (may need to wait up to 15 min)
- remove sub-account branding
- make sure it is gone after 15 minutes

Change-Id: I9c6778c673a18e95f175733bda2f4eb3d6fd2198
Reviewed-on: https://gerrit.instructure.com/13018
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Brian Palmer <brianp@instructure.com>
2012-08-18 18:09:48 -06:00
Simon Williams ae10e512dd change caching strategy for sub-account branding
fixes #9993; fixes #10034

we were caching the user's common account chain, but this was occasionally
caching all of the accounts loaded associations, which wasn't unmarshaling
properly.

the new strategy is to cache the global asset paths that should be used for
different contexts.

test plan:
- no visual changes in sub-account branding
- shouldn't generate any caching errors (these were intermittent and we never
  had solid steps to reproduce)

Change-Id: I37cc58a609ed7f90d967d6ebde74e849c754c0e8
Reviewed-on: https://gerrit.instructure.com/13017
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2012-08-18 16:07:22 -06:00
Cody Cutrer 98b2009b1c add support for looking up logins based on returned LDAP attribute
closes #9935

test plan:
 * configure an LDAP server without a Login ID Attribute
 * logging in with a pseudonym matching username should succeed
 * set the Login ID Attribute to something the LDAP server
   returns
 * change the pseudonym to match what the LDAP server will return
 * logging in with the same original username should succeed,
   finding the pseudonym named after the returned attribute

Change-Id: I84a154de2bf4fbefa6183a9381ca21441bd2c35a
Reviewed-on: https://gerrit.instructure.com/12910
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Cody Cutrer <cody@instructure.com>
2012-08-17 20:07:30 -06:00
Simon Williams 744fa75b83 don't load all enrollments on xhr to course#show
fixes #10003

when grade publishing was disabled, a strange series of events was causing the
course settings page to make a GET xhr request to the course show action, which
handles these types of requests differently and returns the course json with
ALL current enrollments attached.

this sort of defeats the purpose of paginating the enrollments on the course
settings page, so that is sad.

test plan:
- with the network tab open, go to the course settings page in a course with
  lots of students
- you shouldn't see the offending xhr request
- grade publishing should still work

Change-Id: I3348d312ec6ad78b2a1ce9c1c2a9a9685f2f5a19
Reviewed-on: https://gerrit.instructure.com/12982
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2012-08-17 17:37:49 -06:00
Simon Williams ad10e9f3d0 truncate long urls in the page views table
fixes #9852

they'll be truncated to 100 characters. they'll still link to the full url, and
the full url will be visible by hovering over them for a moment.

test plan:
- as a user, visit some long canvas urls (assignment edit is a good one)
- go to /users/:id
- look through the page views table
- long urls should be truncated, so that all the other columns are always
  visible
- you should be able to see the full url by hovering
- make sure you test in all browsers

Change-Id: I56ebfc667b2252fb626b481d3541f76d0f5836b6
Reviewed-on: https://gerrit.instructure.com/13005
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2012-08-17 17:34:19 -06:00
Jon Jensen 4996994005 htmlify bio at display time, fixes #10026
convert line breaks, links etc.

test plan:
1. edit to your profile bio
2. put in some breaks and links
3. after saving, the formatting and links should be preserved
4. if you edit again, it should be exactly as it was

Change-Id: I294a3a593260c8b52720e7f272017139578b8031
Reviewed-on: https://gerrit.instructure.com/13007
Reviewed-by: Zach Wily <zach@instructure.com>
Tested-by: Bryan Madsen <bryan@instructure.com>
2012-08-17 17:13:50 -06:00
Brian Palmer 592785c4a6 allow sub-domains to match the redirect_uri on the developer key
fixes #9995

also validates_as_url the redirect_uri, sometimes people were leaving
off the http:// part when setting up the key

test plan: set up a developer key with a given domain. kick off an oauth
request flow with redirect_uri equal to that domain, it should be
accepted. use a sub-domain of that domain, it should also be accepted.
use a higher-level domain, it should not be accepted.

Change-Id: I55510f463b1faa3339b9908f9941715d93de5a16
Reviewed-on: https://gerrit.instructure.com/12980
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2012-08-17 16:48:34 -06:00
Ryan Florence 108fbd3995 added instructions for social contact methods
fixes #9838

Change-Id: Idb629a4db76697092a195f80d01ba7d3b99e2904
Reviewed-on: https://gerrit.instructure.com/12985
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Bryan Madsen <bryan@instructure.com>
2012-08-17 16:08:04 -06:00
Cameron Matheson ee73e7cb06 rename 'edit profile' button to 'edit settings'
fixes #9869

Test plan:
  * go to the profile settings page
  * make sure the edit button in the right sidebar says 'edit settings'

Change-Id: I7362197618080af174f80c3e3059dabb499c8631
Reviewed-on: https://gerrit.instructure.com/12955
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Bryan Madsen <bryan@instructure.com>
2012-08-17 15:20:51 -06:00
Simon Williams ce408483b1 only touch context module once on reorder
fixes #10007

when reordering content in a module, all the content has to be resaved with
its new position. each of these saves was touching the module, which could
cause a huge number of duplicate updates in a big module

test plan:
- reordering items in a module should have no visible changes
- tail the logs while reordering items
- you should only see one call of the form UPDATE "context_modules" SET
  "updated_at" ...

Change-Id: I860c88dad3fd5fde63a2317dacf557acd02729ff
Reviewed-on: https://gerrit.instructure.com/12993
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2012-08-17 15:14:17 -06:00
rob orton 15c1a1e2ea fix api documentation s/pdf/sis page fixes #9965
Change-Id: I3e092477775cd6f5152b65fe8a9cbb471c411930
Reviewed-on: https://gerrit.instructure.com/12991
Reviewed-by: Jake Sorce <jake@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2012-08-17 15:06:57 -06:00
Ryan Shaw d97e98c148 stop discussion tooltips from clipping on small screens.
fixes #9510

this uses jqueryui tooltip for discussion unread.

test plan:
  * shrink browser window to at least 1024x768;
  * create a discussion with multiple entries;
  * log in as a member of the class;
  * hover over the total/unread counts and verify that the
    tooltips don't clip.

Change-Id: I10485e6a86debc5fca2c6a1e841568c8b6fb137c
Reviewed-on: https://gerrit.instructure.com/12664
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
2012-08-17 15:02:02 -06:00
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
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
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
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
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
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
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
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