Commit Graph

554 Commits

Author SHA1 Message Date
Brian Palmer dbe0d239e9 add html/image support to quiz question/answer feedback
closes #5284

Change-Id: I51aad86e8b389ab1f3d6b700ebcef968803f0b10
Reviewed-on: https://gerrit.instructure.com/5097
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
2011-08-24 10:09:22 -06:00
Brian Palmer c8f7529d4e oauth2 web app flow, refs #5029
accepts a redirect_uri to return the code to, in addition to the OOB uri
support. matches the redirect_uri domain host against the one stored on
the developer key.

this doesn't yet include a UI for registering developer keys.

Change-Id: I6fbfe6ff3dbd6ebea9c2f9fc5ce3e45447a1cbc8
Reviewed-on: https://gerrit.instructure.com/4963
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-08-23 17:27:47 -06:00
Cody Cutrer cdce5650fb fix date-restricted inactive enrollments getting permissions from roleoverride
refs #4996

Change-Id: I9d7111b229ddfc31c3daa1399e52422873f1388f
Reviewed-on: https://gerrit.instructure.com/5231
Reviewed-by: Zach Wily <zach@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-08-23 16:10:49 -06:00
Brian Palmer f483a19a3c api to retrieve all courses in an account
Change-Id: Ic849f61d38f4887c241b97c72edc08ed06434c20
Reviewed-on: https://gerrit.instructure.com/4973
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-08-23 15:58:51 -06:00
Cody Cutrer ba786a4508 statelessly enforce enrollment date restrictions fixes #4996
Change-Id: I978c1524518fd17bbffca73071f7b500ca79c435
Reviewed-on: https://gerrit.instructure.com/5166
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: JT Olds <jt@instructure.com>
2011-08-23 12:23:22 -06:00
Cody Cutrer 29310a356c reset course content closes #4583
Change-Id: I9f28519f68ab462833073de1126166e372d4ae89
Reviewed-on: https://gerrit.instructure.com/5211
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-08-23 11:26:52 -06:00
Brian Palmer 3d9eead696 api for the activity stream, closes #4740
Change-Id: If3a56f635dd6dbd93edc920f0bd0c5cadd709490
Reviewed-on: https://gerrit.instructure.com/4748
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
2011-08-23 09:13:20 -06:00
Jon Jensen 1ebf2072d6 fix two mysql bugs wrt common courses and enrollment types
Change-Id: Ied849e68744f4153851acf2c7d2d1c91f9f72479
Reviewed-on: https://gerrit.instructure.com/5215
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-08-22 21:35:19 -06:00
Jon Jensen 15ff3e4cf4 fix broken query
Change-Id: Iba6a99d49588a8e9409b4852443cfbcee03466bc
Reviewed-on: https://gerrit.instructure.com/5213
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-08-22 17:27:15 -06:00
Jon Jensen c8c15dcbb0 fix faculty journal checks
Change-Id: I23692f617b6949cfc13eed3e6c1046b0c723c0f5
Reviewed-on: https://gerrit.instructure.com/5206
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
2011-08-22 16:26:53 -06:00
tom metge 6be9a8afed don't dump the entire customer ldap db on search test.
only accepts the first result from the ldap connection, then exits.

Change-Id: I49f1db7bb3c1bbef8e24a09ead088141b775c66c
Reviewed-on: https://gerrit.instructure.com/5197
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2011-08-22 15:31:48 -06:00
Bracken Mosbacker 3e66b02684 prevent wiki title uniquefying from making the title too long
closes #4861

Change-Id: I200c0a0caad8fda56e8824e200f943999d0b9a7c
Reviewed-on: https://gerrit.instructure.com/5140
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2011-08-22 08:22:30 -06:00
Jon Jensen 274f8880ad faculty note support in new inbox
also pull in course/group user so we can use it in the future

Change-Id: I34c2aea2fea9b56c988d4903fb2fcf32d96d4f10
Reviewed-on: https://gerrit.instructure.com/5190
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-08-20 19:58:53 -06:00
Jon Jensen 46fbd65c0b Merge remote-tracking branch 'origin/dev/conversations'
Conflicts:
	app/models/course.rb
	app/views/context/inbox.html.erb

Change-Id: I62c650ebd0bb20dd1f0a9a43843bf7f8d0b86c83
2011-08-20 08:22:14 -06:00
Jacob Fugal 834e38eaa1 conversations intro slideshow
Change-Id: Icb3be1ae4f33b374c5f3eafc4c30aa9c8e3ef2ad
Reviewed-on: https://gerrit.instructure.com/5152
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-08-19 23:31:40 -06:00
Jon Jensen 1fe15404ed clear the label if all messages have been removed, fixes #5346
Change-Id: I945a19f75ae7cb28e8acdd8489c5bbd11e831238
Reviewed-on: https://gerrit.instructure.com/5172
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-08-19 22:10:08 -06:00
Jacob Fugal b543701f17 conversation message notifications prefs
Change-Id: Ida26bebdda7991afa132cbacb3e0eef283ba2020
Reviewed-on: https://gerrit.instructure.com/5163
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-08-19 16:53:38 -06:00
Cody Cutrer 521cb6a1ae include sis ids in gradebook csv closes #4922
Change-Id: I6e062b22fdaa65e4a6ca1b288f9ec3dcddc1a107
Reviewed-on: https://gerrit.instructure.com/5153
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: JT Olds <jt@instructure.com>
2011-08-19 12:22:20 -06:00
Cody Cutrer 684508158d fix mass assignment bug
Change-Id: I95443fe6d74fd75a7cb590b65604b9ec410ce3fe
Reviewed-on: https://gerrit.instructure.com/5057
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: JT Olds <jt@instructure.com>
2011-08-19 10:24:25 -06:00
Cody Cutrer de92627373 optimize course, section, and xlist sis imports
optimize crosslisting itself:

 * use ids where possible to avoid unnecessarily loading up objects
 * Don't worry about keeping track of if we need to save; we're gonna
   save anyway
 * update account associations on any account change, not just root
   account change (if you re-crosslist a section from one sub-account
   to another sub-account, the users may no longer be associated with
   the first sub-account).

optimize sis imports:

 * really batch up update_account_associations

Change-Id: Ic0fbe1601afcbcd3e6540e69febc2e6a1a94157f
Reviewed-on: https://gerrit.instructure.com/5137
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: JT Olds <jt@instructure.com>
2011-08-19 10:21:56 -06:00
Cody Cutrer 4bb161c9a4 optimize sis enrollment imports
* Attempt to cache the course/section between rows
 * On section change, calculate the new account associations *once*,
   and use the new User#update_account_associations incremental mode
   for strictly new enrollments
 * Keep the account_assocations account_chain cache intact between
   calls
 * Fall back to global update_account_associations if too few
   enrollments in the section, if not a strictly new enrollment, or
   if the user is already going to be globally updated

Change-Id: I884a394aef4f4b81f4472ee3a57f89c1f72ae371
Reviewed-on: https://gerrit.instructure.com/5136
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: JT Olds <jt@instructure.com>
2011-08-19 10:21:49 -06:00
Cody Cutrer f997efd263 re-write update_account_associations for SPEED!
* Manually cache account chains (query cache gets dumped after every
   update or delete)
 * Use batch queries and preloads to make the number of queries
   constant wrt how many users are getting updated
 * Simplify calculation - find the root account ids, and merge the
   account chains together
 * Fix depth to be defined as the minimum depth to reach that account
   (rather than whichever path happened to be processed last)
 * Add incremental mode to only add accounts, rather than re-calculate
   all associations (only for User)
 * Don't auto-create the default section during
   update_account_associations; it costs a query and possibly an
   insert, causes angst with schools that don't want it, etc.
   Instead, always create associations against a 'nil' section so
   that a course has the proper associations.

Change-Id: I7d476d45f41d9c3e382fac9b5c0c0aaa5369b956
Reviewed-on: https://gerrit.instructure.com/5135
Tested-by: Hudson <hudson@instructure.com>
Tested-by: Selenium <selenium@instructure.com>
Reviewed-by: JT Olds <jt@instructure.com>
2011-08-19 10:21:42 -06:00
Cody Cutrer 42e89f907d cinch down course permissions for admins refs #4952
Basically, being an admin doesn't imply full access.  Instead, it
only implies :read_as_admin, which only lets you see things like
course name and section names.

Add two new role overrides:
 * :read_course_content implies :read on the course
 * :manage_content is now a full fledge RoleOverride instead of
   an internal permission implicitly given to Teachers and Admins

Actually start using :view_all_grades override so that Admins
without it won't see grades (replaces :read_as_admin that was
granted to concluded teachers; :view_all_grades is always granted to
concluded teachers, but not to Admins).

Spiffy up several helper functions to take an array of permissions,
and return if any of them are true.

Make sure not to show course tabs that the user does not have access
to.

Fix up lots of permission checks, especially around viewing users
(:read_roster, :manage_students, or :manage_admins might allow you
to see the users in a course; :read_roster only allows you to see
prior enrollments if it was granted to you as an account admin).

Change-Id: Iafcab7956649e9d28e17bd5eedcb155a9ea76af4
Reviewed-on: https://gerrit.instructure.com/5092
Reviewed-by: JT Olds <jt@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-08-19 10:19:21 -06:00
Jon Jensen 0c1374affb allow replies to deleted conversations
fixes an issue where replying to a deleted conversation from the
dashboard resulted in an error page

Change-Id: Iad772a939ce94a84417c764e5fda361db744a89c
Reviewed-on: https://gerrit.instructure.com/5151
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-08-19 09:46:01 -06:00
Cody Cutrer 39d28171bf drop course level role override "support"
simplifies RoleOverride lookup logic, and the query once again uses
the already existing index

Change-Id: I2b165b7debc9aa7aa6fd032d7917cbbc23b4361c
Reviewed-on: https://gerrit.instructure.com/5063
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: JT Olds <jt@instructure.com>
2011-08-19 09:15:21 -06:00
Jon Jensen 1124798c2b section and observer visibility checks
also fixed a couple issues in existing enrollment visibility methods

Change-Id: I9c99777f4a6720e7d065607d9a22ce0b3314c7af
Reviewed-on: https://gerrit.instructure.com/5145
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-08-18 22:59:25 -06:00
Jon Jensen be5c679d1f fix styling and ordering of forwarded messages
Change-Id: I1f7b6d4867735c478a2b74f686f576756f9bbe58
Reviewed-on: https://gerrit.instructure.com/5141
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-08-18 22:59:14 -06:00
Zach Wily 4f840713a1 load all the latest messages for conversations at once
Change-Id: I5df13199af77c52a17f172e24b87089a7f15775b
Reviewed-on: https://gerrit.instructure.com/5143
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-08-18 21:33:50 -06:00
Jacob Fugal 11d27fe0b1 submission comments inline with conversations
also, don't generate messages from submission comments (the comments
themselves are inlined instead)

Change-Id: Ide41ab06581c6bca26e97a260616939ae8600e61
Reviewed-on: https://gerrit.instructure.com/5074
Reviewed-by: Jon Jensen <jon@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-08-18 10:56:38 -06:00
Jon Jensen 3867012b16 ability to send bulk private messages
Change-Id: Ia5ab5d74701389f6c83cce2420f555b041ea8581
Reviewed-on: https://gerrit.instructure.com/5079
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
2011-08-18 10:46:10 -06:00
Cody Cutrer a77776307b copy course settings hash (hide totals) when copying course
fixes #5295

Change-Id: I73b19af889af8ecd35bfd17993baa2f3a4841f68
Reviewed-on: https://gerrit.instructure.com/5103
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
2011-08-18 09:14:07 -06:00
Jacob Fugal 281311b03b submissions.has_admin_comment
Change-Id: Ied0b1dc0763c2a401a65ce3e58284695f538e9b5
Reviewed-on: https://gerrit.instructure.com/5129
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
2011-08-17 17:58:12 -06:00
Jacob Fugal 4a9cb12929 media comments context on user
Change-Id: Icfb51b59e07e097f38b28660bbd36a5fdee60af6
Reviewed-on: https://gerrit.instructure.com/5115
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
2011-08-17 17:01:20 -06:00
Jacob Fugal 839755146e attachments and media comments for new conversations
Change-Id: Ie3c9a16a78747a58504d5279a6a996c2a150d567
Reviewed-on: https://gerrit.instructure.com/5010
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
2011-08-17 17:00:36 -06:00
Jacob Fugal c16ef14d2e fix auto-private of one-on-ones
Change-Id: Ic30ddef6f47875a20ad0bcdfbf4b4f8d872e2a7b
Reviewed-on: https://gerrit.instructure.com/5128
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
2011-08-17 16:59:47 -06:00
Jon Jensen d2f04c94da submission comment inbox_item cleanup
Change-Id: Id16c68de3d90f56285ad0dcdb785746f713f5ae3
Reviewed-on: https://gerrit.instructure.com/5123
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Whitmer <brian@instructure.com>
2011-08-17 14:02:42 -06:00
Jon Jensen 5549cfd4d9 fix update query performance in mysql
Change-Id: I404c1f196998cfa2efcf90cded0f334216298fcf
Reviewed-on: https://gerrit.instructure.com/5114
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-08-17 09:56:15 -06:00
Jon Jensen 59f96c6ae6 added monologue support (i.e. notes to self) to conversations
Change-Id: I1a11462ff95180645eb5163ff064cdd85175d6b7
Reviewed-on: https://gerrit.instructure.com/5101
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-08-16 21:18:08 -06:00
Jon Jensen ffcfad5e41 added states so we can retire messages w/o deleting them yet
Change-Id: I527a60aadfcb2f6848cb4446642642289ff6c957
Reviewed-on: https://gerrit.instructure.com/5100
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-08-16 21:15:26 -06:00
Jacob Fugal 0cc2f48b32 Merge remote-tracking branch 'origin/stable/2011-08-20' into dev/conversations
Conflicts:
	app/controllers/context_controller.rb
	config/assets.yml
	spec/integration/files_spec.rb
	spec/models/user_spec.rb

also removed test "ContextController GET 'inbox_item' should exclude
recipients if protect_recipients" since ContextMessage inbox items
aren't used any more on this branch.

Change-Id: I99d0e4914cb1bf9617993c1cb1afdbca0e9ba32f
2011-08-16 15:45:39 -06:00
Cody Cutrer 7810d67cb7 clean up course permissions slightly refs #4952
* remove permissions that are never checked (or never checked on
   Courses
 * allow concluded teachers to continue to read faculty journals
 * re-order the "teacher" and "admin" lines in Course so they are
   easier to compare

Change-Id: I5c031ac1104904d1be74071ca86c9f899bd9d5af
Reviewed-on: https://gerrit.instructure.com/5077
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
2011-08-16 11:06:43 -06:00
Zach Wily 41720dd913 prompt to overwrite/rename new files with duplicate names; refs #5131
Added a step to the flash upload process in the Files section to do a
preflight check to see if there are any duplicate filenames. If there are, the
user gets the option to either rename the new files, or overwrite the existing
ones. (Overwrite means deleting them - we already have code that will redirect
to new files with the same name as deleted files if they're linked directly by
id.)

Change-Id: I926631aadcebec3cae1607f818044f7cd4b74cea
Reviewed-on: https://gerrit.instructure.com/5091
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-08-16 09:15:03 -06:00
Zach Wily 54bab9db59 prompt to overwrite/rename new files with duplicate names; refs #5131
Added a step to the flash upload process in the Files section to do a
preflight check to see if there are any duplicate filenames. If there are, the
user gets the option to either rename the new files, or overwrite the existing
ones. (Overwrite means deleting them - we already have code that will redirect
to new files with the same name as deleted files if they're linked directly by
id.)

Change-Id: I926631aadcebec3cae1607f818044f7cd4b74cea
Reviewed-on: https://gerrit.instructure.com/5091
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-08-16 09:10:55 -06:00
Cody Cutrer 56069d8abe simplify permission policies for Course and Account
Basically, change from using recursive calls to a single flattened call.

Interestingly, this change caught a bug in the become user spec, so
apparently the old code wasn't quite working as intended.

Change-Id: I20fce8dbc5ca7c4797a4f8bd929202aaf8a96f9c
Reviewed-on: https://gerrit.instructure.com/5062
Tested-by: Hudson <hudson@instructure.com>
Tested-by: Selenium <selenium@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
2011-08-16 08:38:39 -06:00
Cody Cutrer 4db7bbad10 cinch up admin permissions wrt stuff available in the accounts section
Refs #4952

 * Fix saving role overrides for Site Admin account roles
 * Add the following permissions:
   * read_course_list (for listing or searching courses)
   * view_statistics (for viewing account statistics)
   * manage_user_notes (instead of being implied-ish by read_reports)
 * Hide UI elements that provide access to features that are not
   allowed
 * Remove lots of not applicable stuff from Site Admin settings

Change-Id: I7414368b472ba655d04118db30c1bb46542deb37
Reviewed-on: https://gerrit.instructure.com/5054
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
2011-08-16 08:17:55 -06:00
Cody Cutrer 9c3e9f7c89 enforce course creation permissions fixes #5188
* Remove the show_create_course_button helper, and refactor into
   Account's set_policy block
 * Don't implicitly give any admin :manage_courses rights (since it
   can be revoked)
 * Check for the correct permission on the correct account in the
   GettingStartedController and CoursesController#copy

Change-Id: I6769d20c299d7e34ea83a79cdb6fab0d588122dc
Reviewed-on: https://gerrit.instructure.com/5027
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
2011-08-15 16:10:48 -06:00
Cody Cutrer 5a0937cfea fix auto-require problem in hudson build
Change-Id: I926fa5f097b0d467bf49688328d6fb45a9d05adf
Reviewed-on: https://gerrit.instructure.com/5071
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-08-12 14:52:34 -06:00
Zach Wily 50ac28ff9c hide description from locked assignments on the calendar; fixes #5215
Fixing this required some minor refactoring:

 * A model can now define "filter_hash_for_user" to filter serialized data out
   of the model based on user. In this case, we were sending the assignment to
   the browser in json, and we wanted to strip out the description if the
   assignment was locked for the user.
 * The lock_explanation generator was not i18n'd before. That was fixed, and
   similar code in javascript was also refactored so it can be called by
   anybody. (In this case, by the assignments in the calendar.)

Change-Id: Ia606be2a16df9bd87222306445f548b3a7a78801
Reviewed-on: https://gerrit.instructure.com/5051
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-08-12 10:14:56 -06:00
Cody Cutrer 6a65bf5b4e add setting for hiding total in grade summary
closes #4623

also fixes the UI for "what-if" score showing when you really can't
use them

Change-Id: I19a5f41512e0d162a78c10b0c7c23f22624b6af0
Reviewed-on: https://gerrit.instructure.com/5030
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Whitmer <brian@instructure.com>
2011-08-11 16:43:56 -06:00
Brian Whitmer cd6b3273b6 fix avatar moderation page
- some users were showing up even though they had no avatar set
- there was a trailing " on each row
- set a max-height for avatar images

Change-Id: I0a5c36a722da13a12d06f38384434474b68bce31
Reviewed-on: https://gerrit.instructure.com/5044
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-08-11 16:11:03 -06:00