Commit Graph

58 Commits

Author SHA1 Message Date
Cody Cutrer 57fc782552 hide Copy Course button for non-authorized users fixes #4882
Change-Id: I04b551f4d81158345807b1adca6dbbea8bb0ff90
Reviewed-on: https://gerrit.instructure.com/4952
Tested-by: Hudson <hudson@instructure.com>
Tested-by: Selenium <selenium@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-08-05 12:26:37 -06:00
Zach Wily 11aca38df8 speed up loading sub-accounts as options
Change-Id: Icc5c4ef175ad86e6c13547861abb987d12176f8b
Reviewed-on: https://gerrit.instructure.com/4970
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: JT Olds <jt@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-08-05 10:32:26 -06:00
Zach Wily 770e8aca86 fix i18n for default term name
The strategy is that if a term is named "Default Term", that will be a marker
that it's the default term in any language. When displaying the term name, we
check if it == "Default Term" and show the translated version if so. We also
do some special-casing on saving a new term name to make sure the translated
term name doesn't get saved as the new name.

Change-Id: Ic2b6659f75ef5e56bb5aa5fb7b241bba77dee445
Reviewed-on: https://gerrit.instructure.com/4905
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-08-03 11:20:39 -06:00
Jon Jensen 5e66286c14 locale detection and selection, refs #4994
Change-Id: I0f1e50d912ba7ac81b9ceb3ae95baaba3a12425b
Reviewed-on: https://gerrit.instructure.com/4661
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-07-20 09:24:55 -06:00
Zach Wily 5181980fd4 fix typo in account
Change-Id: Ic062e4af52d1ef159f10e13a73da73675b2e038a
Reviewed-on: https://gerrit.instructure.com/4728
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-07-19 15:08:52 -06:00
Zach Wily 4cf56a75b1 finish conversion of storage_quota to bytes from MB
At this point, nobody should be writing quotas as bytes anymore, so we mass
convert the remainder to bytes and get rid of the backwards-compatible code.

Change-Id: Ic5d6f8c8eaed947aef48dd7b1da348158f4ea2a4
Reviewed-on: https://gerrit.instructure.com/4276
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-07-19 09:28:59 -06:00
Brian Palmer 92feb2bcdb replace ActiveRecord::Base calls with subclass calls where it makes sense
This was already a small issue if the job queue was on a different
database driver than the main database, and it'll become more important
as more AR connections are introduced.

Change-Id: I204becadd32bb935df096e8c937a04bb6962f0b2
Reviewed-on: https://gerrit.instructure.com/4601
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-07-18 13:56:08 -06:00
Cody Cutrer 7f5cc0693b optimize AdheresToPolicy
Basically, don't call a bazillion procs everytime you check_policy;
just the "given" statement.  Everything else is evaluated just once,
and cached on the class.  This does lose functionality (the ability
to access the instance inside of set_policy, and set methods), but
none of it was currently in use.

Change-Id: I736879d98beb4115a2e8c492931c755076291d08
Reviewed-on: https://gerrit.instructure.com/4665
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: JT Olds <jt@instructure.com>
2011-07-14 13:25:28 -06:00
JT Olds 2592c8af14 i18n login_handle_name
Change-Id: Ib1ca0b327c5686ba6bc672053af6caabfe265bed
Reviewed-on: https://gerrit.instructure.com/4612
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-07-12 11:54:53 -06:00
Zach Wily 46ae1a6022 fix storing new quota
Change-Id: I1b6dd7fd14df2dd61d4579bfd33f61da23fb35a8
Reviewed-on: https://gerrit.instructure.com/4626
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-07-09 07:32:52 -06:00
Zach Wily 4124efb683 switch to storing quotas as bytes instead of MB
Change-Id: Ie1be93fbfe7b62b8400923506b6bb13150f1d81f
Reviewed-on: https://gerrit.instructure.com/4275
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-07-06 09:18:31 -06:00
Jon Jensen fba0c94e4a string extraction for most i18n oddities
Change-Id: Ibdf9315b6165269af2ee0c99a27093d5abc75641
Reviewed-on: https://gerrit.instructure.com/4509
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-06-30 16:48:12 -06:00
JT Olds 22944c904c don't require no-op block for Account#fast_course_base
Change-Id: Ibb3854f3162aeecbf568e04bef54e5394e046855
Reviewed-on: https://gerrit.instructure.com/4408
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
2011-06-28 11:39:49 -06:00
JT Olds 6496094a1b add filter-enrollmentless-course functionality. refs #4497, closes #4602
Change-Id: Ie49f5d4baf236f104cba89eac940c473e1fb00f0
Reviewed-on: https://gerrit.instructure.com/3859
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-06-27 16:31:04 -06:00
JT Olds 3683a8d4d9 refactor abstract courses stage 2
add in refactored abstract courses

Change-Id: Ifce691c9dbc4452f39cab3364d8538792f8a1803
Reviewed-on: https://gerrit.instructure.com/4093
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: JT Olds <jt@instructure.com>
2011-06-27 11:01:06 -06:00
Zach Wily 5020f92dd4 make the default quotas configurable, and start conversion to bytes
This is the first step in a 2-step process to change the storage_quota column
to be in bytes instead of MB. After this commit is deployed, we can deploy a
second commit that will do the following:

  * Run a migration that multiplies all non-null storage_quota columns by
    1024 * 1024 (if they are < 1024 * 1024).
  * Removes the code that special cases quotas under 1MB.

Change-Id: I3fbf3fb85fbaae59e65edf86d9e94de1b51c2b6a
Reviewed-on: https://gerrit.instructure.com/4267
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Reviewed-by: Brian Whitmer <brian@instructure.com>
2011-06-20 15:37:46 -06:00
Zach Wily 66cdce18fe fix adding account admins; fixes #4885
Change-Id: I2dc97e3a214e66cd960496bac872ed4781060c4b
Reviewed-on: https://gerrit.instructure.com/4242
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-06-16 12:52:04 -06:00
Jon Jensen edcefd9299 remove sti and controller action scoping
also fixed a couple dup key issues and other weirdness

Change-Id: I48272a136783c95819de3863f05be4250a4a6102
Reviewed-on: https://gerrit.instructure.com/4223
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-06-16 08:25:51 -06:00
Cody Cutrer 2ba62b9aa4 Accounts string extraction
Change-Id: I42f1fe77dce59cfcb43f0b8ad2983c5cbe3f2adc
Reviewed-on: https://gerrit.instructure.com/4124
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
2011-06-09 15:44:46 -06:00
Zach Wily 819bfe1dc6 support a secondary ldap configuration for account authorization; fixes #4776
Adds the ability for admins to configure a second LDAP server that will be
queried after the primary, assuming the user could not be found on the
primary. This is a slight refactor towards a more flexible authorization
configs model. Changes include:

  * changed the authorization relationship on Account to has_many
  * for backwards compat with all the code that assumes one config, added
    a convenience method to Account
  * refactored the auth config editing screen to send multiple configs at a
    time
  * modified the pseudonym to iterate over all the auth configs (when using
    ldap), stopping at the first one that succeeds

Change-Id: I6bae474f542e8c7046f07d4ab2c27e7d6f64a1ce
Reviewed-on: https://gerrit.instructure.com/4108
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-06-08 23:06:29 -06:00
JT Olds 2fabedd7f1 refactor abstract courses stage 1
remove dependence on abstract courses

Change-Id: I2d533daed094de05b1942ed4565cda7734a30bf3
Reviewed-on: https://gerrit.instructure.com/4088
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-06-07 14:37:38 -06:00
Brian Whitmer 5feaf3df83 option for external url for forgot password link
LDAP configuration now allows admins to set an
external URL to link to for the "I don't know my
password" link on the login page, instead of relying
on Canvas' default behavior.

fixes #4629

Change-Id: I3be2c810e1d6d773751c1a2f7c85a0059df1bc94
Reviewed-on: https://gerrit.instructure.com/3812
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-06-02 09:15:25 -06:00
Bracken Mosbacker e15cb0e085 added fields for editing sis_source_ids and new sis permission
closes #4475

Change-Id: Ie6da7ec45dcba65409c0909d180358a3796319dc
Reviewed-on: https://gerrit.instructure.com/3944
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
2011-05-31 17:53:46 -06:00
Cody Cutrer bdbebfaec8 check all models for protecting attributes refs #3847
Change-Id: I7cba6e26ad98e91723e2ccf0a28b8db79bb37b5c
Reviewed-on: https://gerrit.instructure.com/3631
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-05-25 17:38:50 -06:00
Cody Cutrer 59f71fb27b fix up account level permissions fixes #4478
So, we have several account level permissions, we just weren't
respecting them.  Most notably is :manage_account_settings instead
of :manage, the generic permission.

Account users get all the generic permissions (:create, :read,
:update, :delete, :manage) because there are still lots of course
level things that check those permissions.  We still want to keep
those intact until we fix all those other checks, so for account
level things we need to use specific permissions as much as possible.

Things that are either odd or not correctly checked (due to having
to work with courses as a context with the generic permission):

 * Listing and searching Courses, and viewing Statistics, is
   available to any account admin, because there aren't specific
   permissions for them
 * Rubrics are not linked to without :manage_outcomes, but are
   accesible via direct URI
 * External tools is available to any account admin
 * Account reports uses the :read_reports permission, which is
   described in the UI as "View usage reports for the course"

Change-Id: Ia0f9409659dfc421f1199f7c8ab93b43edcde511
Reviewed-on: https://gerrit.instructure.com/3735
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-05-23 14:10:28 -06:00
Brian Whitmer 70e984bff6 grading standards improvements
- can attach a grading standard to a course
- interface for managing standards at the course
  and account level
- added final grade to gradebook page
- added final grade to student grades page
- added final grade to gradebook csv export

fixes #3868

Change-Id: I555b9f66b621d8967e893e50a671748267da9373
Reviewed-on: https://gerrit.instructure.com/3025
Tested-by: Hudson <hudson@instructure.com>
Tested-by: Selenium <selenium@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-05-21 19:20:34 -06:00
tom metge 3310fb4420 fix page view stats database compatibility
Change-Id: I970e0dd02b6075f38c33f0646a0e0096c2a3e5a1
Reviewed-on: https://gerrit.instructure.com/3706
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-05-18 17:15:39 -06:00
tom metge 03bf3970c2 sqlite compatibility in finding subaccounts
Change-Id: I6dbeb1251d9fd3272589c18cf3b69334119b9c08
Reviewed-on: https://gerrit.instructure.com/3701
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
2011-05-18 11:00:28 -06:00
JT Olds 773a9bb444 cleaning up course_account_association updates
Change-Id: I2f65c15b2d3df633e8f6206656fd7ea5efa7c64c
Reviewed-on: https://gerrit.instructure.com/3670
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-05-16 08:23:24 -06:00
Zach Wily cc7910d03e purge remaining traces of Facebooker
Change-Id: Id629e221007ae0a7ec9ae6bebd68a83ed3f9379f
Reviewed-on: https://gerrit.instructure.com/3662
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-05-14 23:10:04 -06:00
Brian Palmer 03e9dc440b don't return duplicate courses from fast_all_courses, fixes #4485
Change-Id: Ic760ac9b83e3caa9867c89620a72aa4a816e3703
Reviewed-on: https://gerrit.instructure.com/3594
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-05-11 10:34:36 -06:00
Cody Cutrer f7c1477e36 some more strategic caching and passing on actual objects rather than just ids
refs #3752

Change-Id: I7a660e35434128712be31b3c335bc6d2c5edc98f
Reviewed-on: https://gerrit.instructure.com/3522
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-05-06 14:02:13 -06:00
Brian Whitmer e8c3410404 opt-in for grades in emails
Students can now opt-in to receiving actual scores
in email/sms/facebook notifications about homework
grades.  This ability can be manually disabled at
the root account level if necessary.

fixes #4479

Change-Id: I1b769bef140719578fa345ca519999a2834b00f8
Reviewed-on: https://gerrit.instructure.com/3473
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-05-04 22:57:14 -06:00
Brian Palmer cee38eb579 filter users by enrollment term in account section, closes #4400
Change-Id: I42f006e7e90faf9f6c1b0e72678e12410bd2e321
Reviewed-on: https://gerrit.instructure.com/3359
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Whitmer <brian@instructure.com>
2011-04-29 07:59:55 -06:00
Zach Wily 20092fb2c9 fix more find_by_id cases where we could pass in an empty string
Change-Id: I6bd72dd78f739edac6377f863f298fa14283be38
Reviewed-on: https://gerrit.instructure.com/3299
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-04-27 10:45:09 -06:00
Bracken Mosbacker 04451fe3cc add basic instructions to authentication config page
closes #4144

Change-Id: Id61bda580c04d1de3801d01af1f482a2e259024c
Reviewed-on: https://gerrit.instructure.com/3301
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: JT Olds <jt@instructure.com>
2011-04-27 09:52:05 -06:00
Ryan Shaw 0d4e3a9de8 enable google previews of attachments; fixes: #4060
this makes it so devices without flash (eg: iThings) can
view documents inline.

Includes a few other changes:
 * add UI to account/settings page to enable/disable 3rd
   party services (i.e. google docs previews, twitter, linkedIn)
   -- you can disable these previews there.
 * use DRYer API for embedding scribd docs this also makes
   them ready if/when we switch to ssl
 * open documents on show_preview page in a modal window
   instead of inline in the list (which would grow a
   little wider every time you mouse over it) fixes #4004
 * use all available screen real-estate on files#show page
   (before it would only use 400px of height).
   fixes #4007

Change-Id: I0bb4b10c75c2217f35e0361bef61ca0b602533a9
Reviewed-on: https://gerrit.instructure.com/2662
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Whitmer <brian@instructure.com>
2011-04-22 10:17:13 -06:00
Zach Wily df3d4c6351 use something more secure than UUID for our unique tokens; fixes #4264
Change-Id: I407b50b98e44eab4e341b596ebefe9f35af3dc37
Reviewed-on: https://gerrit.instructure.com/3097
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: JT Olds <jt@instructure.com>
2011-04-15 10:54:47 -06:00
Brian Whitmer d4431fef57 add sis id to UI for courses, sections, pseudonyms
refs #4231

Change-Id: I243de9ee8efb2ef6609dca99a9b38bc2200cb573
Reviewed-on: https://gerrit.instructure.com/3011
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
2011-04-11 10:44:37 -06:00
Cody Cutrer 6283c3a7fc Delegate to CAS for auth. Closes #4130
Change-Id: I6bd3ef11314f75dd14b2fa9d835ecc40e43b5f3b
Reviewed-on: https://gerrit.instructure.com/2994
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-04-08 15:17:39 -06:00
Brian Whitmer 0b9860f9df make open enrollment configurable on root account
Change-Id: Id6604bc6972902b3f505a985d5d05ce0da477a51
Reviewed-on: https://gerrit.instructure.com/2840
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-03-29 14:56:55 -06:00
Brian Whitmer 9d131ea836 basic lti support
- external tools can be added on the course/account
  settings page
- external tools can be linked to from within modules
- clicking a tool in a module will load a new page
  with the tool embedded in an iframe
- see context_external_tools for standard procedures
  on retrieving settings for a specific link

fixes #4013

Change-Id: I8aa1934f8deac9af26d74036162b34fd1c4242e1
Reviewed-on: https://gerrit.instructure.com/2601
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
2011-03-23 16:58:11 -06:00
Jon Jensen f745f40073 Merge branch 'master' into dev/postgres
Conflicts:
	app/models/user.rb
	config/initializers/active_record.rb

Change-Id: Idc3b52dad873146efbb9268ecac28cac840f115e
2011-03-22 16:23:04 -06:00
Brian Whitmer f0388d8be5 empty turnitin comments causing page render error
Change-Id: I6ee7e48e661809fda5fd038b6bc1419da7ab0566
Reviewed-on: https://gerrit.instructure.com/2741
Reviewed-by: Zach Wily <zach@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-03-22 13:56:43 -06:00
Jon Jensen 4ea607cea4 postgres support and misc bugfixes, fixes #3574, #3943
Change-Id: I16aa188175a588b02dd6460baa83daae805aec9f
Reviewed-on: https://gerrit.instructure.com/2474
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Whitmer <brian@instructure.com>
2011-03-11 18:01:02 -07:00
JT Olds 65b6f07050 add cross-listed account id to associated course accounts
Change-Id: I2d54baf24c704825a23be3d3c33d2a2d1da28462
Reviewed-on: https://gerrit.instructure.com/2517
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Whitmer <brian@instructure.com>
2011-03-09 09:24:53 -07:00
Brian Whitmer 41c9f12988 enforce term/course/section start and end dates
before we were recording these values but not doing
anything about it.  This commit starts scheduling
delayed_jobs to activate/conclude enrollments
in the background when dates pass.

it does not conclude/publish courses/sections
automatically, though.  if we want that to be
automated based on dates then I think we should
do that in a separate commit.

fixes #3356

Change-Id: Id94356fbc5b82196dd041fdb250607a7633cee9f
Reviewed-on: https://gerrit.instructure.com/2431
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
2011-03-01 13:47:12 -07:00
Brian Whitmer 98c6d03cc9 speed improvements for files page
there's was a lot of unnecessary database calls going
on, should be a little faster now.

fixes #3939

Change-Id: I9a43e0d801bc632d16248ad92b7c9ff16d1673eb
Reviewed-on: https://gerrit.instructure.com/2484
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-03-01 13:21:03 -07:00
Zach Wily 3ebda084fe fix a lot of html escaping issues
These issues arose from a change in the way we are storing plaintext fields in
the database. Previously they were stored html escaped, and now they're not.
Fixed areas include:

 * folder names in file manager
 * new course sub-account dialog
 * grading rules for assignment groups
 * event titles in calendar
 * content locks page
 * outcomes inside rubrics
 * course listing while writing feedback
 * copying file between contexts in file mgr
 * sis import screen logs
 * file upload options in wiki sidebar

Change-Id: Iab8c8deb81fdfd9062570288218db4180204a497
Reviewed-on: https://gerrit.instructure.com/2406
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-02-23 12:25:34 -07:00
Brian Whitmer 23404fe1c1 account-level notifications
account admins can create "Alerts" from the account
settings page that show up as sticky messages on the
user dashboards.  The alerts stay until the end_at
date, or until the user clicks the "close" link.  If
you add an alert to the site_admin account then it's
considered a global alert and will go to all root
accounts.

fixes #3738

Change-Id: I47e6eaf717145af24d847d4387e0ad5c36800094
Reviewed-on: https://gerrit.instructure.com/2293
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-02-16 21:34:05 -07:00