Commit Graph

16 Commits

Author SHA1 Message Date
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
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
Bracken Mosbacker a03dd41895 don't allow single item failures to stop a whole import
Before if any single item had an error the whole import
errored out. This lets items fail and the rest continue to
import. The single item failures are logged as warnings in
the ContentMigration and this allows the user to know what
failed.

All the warnings/failures are also shown on the migration
list page to help admins diagnose problems.

refs #4903

Change-Id: I66b81ce1c243258dfc8c1d7d1381b2ea8daa3e72
Reviewed-on: https://gerrit.instructure.com/4268
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-06-17 12:21:59 -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
Jon Jensen 405321e08b i18n groups and grading_standards, plus i18n.js count fu
Change-Id: Id8a420ef1cc25d93c34fcc1351e909b3bc60f5bc
Reviewed-on: https://gerrit.instructure.com/4181
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-06-14 12:22:31 -06:00
Brian Palmer 1dd7454e47 add root_account relation to groups, refs #4247
This will be necessary for looking up groups by SIS ID.

Change-Id: I9282d6377d846a6659210348884088c4f6e36028
Reviewed-on: https://gerrit.instructure.com/4025
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: JT Olds <jt@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-06-03 10:45:34 -06:00
Cody Cutrer 4ef76d938b grant manage_wiki and manage_files rights to group managers
fixes #4675, #4641, #4674

Change-Id: I014b940bed10d6788422007d0c393745c0bbfa4a
Reviewed-on: https://gerrit.instructure.com/3996
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-06-03 07:46:06 -06:00
Jon Jensen af13294b29 give students full wiki privileges within groups, closes #4611
Change-Id: Ib902203c1b39bb1bc1b2d333ebd7713746326216
Reviewed-on: https://gerrit.instructure.com/3850
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-05-26 09:57:30 -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
Jon Jensen 6d226272df cast columns in dynamic finders, warn on all-nil argument lists
in production mode we now cast to the appropriate type and issue a warning
if it can't be cleanly cast (e.g. '' -> 0). if all arguments are nil (or
empty arrays, e.g. find_by_id([])) and we aren't in a scope, issue a
warning (sometimes we really do want nil when we're in a scope, e.g. line
216 of app/models/folder/rb).

in development/test mode, we now raise errors in the two warning scenarios
above (though that is configurable).

fixed several places in the code where specs failed due to the change, or
where inputs to dynamic finders looked problematic

Change-Id: Ifea851cb14d3e89b6df08ade8e83934579678f8b
Reviewed-on: https://gerrit.instructure.com/3434
Reviewed-by: Zach Wily <zach@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-05-03 11:06:04 -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 Palmer 65dad2aa72 add comment that i forgot to add a while back
Change-Id: Idedd3b18fd3d70c54e3383d9b3416f820b1db35d
Reviewed-on: https://gerrit.instructure.com/2844
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Whitmer <brian@instructure.com>
2011-03-29 08:48:28 -06: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
Brian Palmer 62f22d9df7 optimize group loading on courses#show page
Change-Id: I8db43095d2b6f71822624dc2b3134caa1f8748f4
Reviewed-on: https://gerrit.instructure.com/2480
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Whitmer <brian@instructure.com>
2011-03-01 11:49:31 -07:00
Brian Whitmer 893aa8af13 deleted users showing up in the groups list
...and possibly other places as well.  Seems like the
default should be to not include deleted users in
any result set.

fixes #3741

Change-Id: I87caaaa2ea69f303e20cbbd259663411b4a9ce89
Reviewed-on: https://gerrit.instructure.com/2201
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-02-10 13:26:44 -07:00
Brian Whitmer 8b8173dcc9 Initial commit.
closes #6988138
2011-01-31 18:57:29 -07:00