Commit Graph

142 Commits

Author SHA1 Message Date
Brian Palmer ba20f27352 optimize get_all_pertinent_contexts, especially for /calendar
By scoping the finds to the user, we can avoid a lot of grants_right
lookups and the associated db queries. This is especially helpful for
users who belong to a lot of groups or courses.

Change-Id: I31e22ecddf9456734d6c1297d776a8353e43a526
Reviewed-on: https://gerrit.instructure.com/2486
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-03-01 14:45:04 -07:00
Brian Whitmer dbe9fd9a6b don't let unlogged users access /accounts
fixes #3899

Change-Id: I45edd0cd4ccfe6676ddc9e62aab570f9f090de47
Reviewed-on: https://gerrit.instructure.com/2468
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
2011-03-01 14:21:30 -07:00
Brian Whitmer 4f2829da0b on quiz instructions page, "always available" isn't lined up
fixes #3047

Change-Id: Ie5b02bdd70cffb4ac1ce3c070552d6509b7a9453
Reviewed-on: https://gerrit.instructure.com/2465
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
2011-03-01 13:58:08 -07:00
Brian Whitmer fd8b51a083 change 'record media' on assignment submission to be a button
the link really was kind of hard to find

fixes #3227

Change-Id: Ia6ee04e944336f60cd2061ec9a44194c46511e31
Reviewed-on: https://gerrit.instructure.com/2476
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Mark Suman <marks@instructure.com>
2011-03-01 13:55:11 -07:00
Brian Whitmer 02cb5c4d92 default attempt limit on quizzes should be higher than 1
fixes #3469

Change-Id: Ic2646b868d46c7c3a428e47435baeb5e8f8269ef
Reviewed-on: https://gerrit.instructure.com/2466
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Mark Suman <marks@instructure.com>
2011-03-01 13:55:04 -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
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
Ryan Shaw 3ada5ea514 fix unclosed paren that made quizzes not work in speedGrader
fixes: #3919

Change-Id: If43e00d1553572ddf3e5aa140292636e5e988051
Reviewed-on: https://gerrit.instructure.com/2461
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Whitmer <brian@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-02-28 14:19:43 -07:00
Bracken Mosbacker 52aa6fb4a8 don't show feedback for deleted assignments
closes #2993

Change-Id: I896f32b6b84419fe839b8c2b576119b0cd23aeff
Reviewed-on: https://gerrit.instructure.com/2361
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
2011-02-28 10:50:23 -07:00
Jon Jensen f3df3c4665 fix assignment group hiding, closes #3800
Change-Id: I4a7ebbdec04aa06991a3be580a793993139b5dbe
Reviewed-on: https://gerrit.instructure.com/2444
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
2011-02-28 09:28:33 -07:00
Ryan Shaw a114f8073d allow deleting sub-accounts that had "deleted" courses.
Change-Id: Ie91990416ea1dae4a3287af227616faa9b073714
fixes: #3794
Reviewed-on: https://gerrit.instructure.com/2423
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
2011-02-28 08:54:15 -07:00
Zach Wily 46157ee57c fix html escaping in facebook app
Change-Id: I914be9d6eb4dcc7b3635f174cb9e57dcfe04060d
Reviewed-on: https://gerrit.instructure.com/2460
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-02-28 08:30:00 -07:00
Zach Wily 470963c56e fix "fill in multiple blanks" question types; fixes #3912
This was leftover from the removal of OpenObject from the quizzes.

Change-Id: I586c55133eefdc76f9c77d58d1bae3f339628264
Reviewed-on: https://gerrit.instructure.com/2450
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Whitmer <brian@instructure.com>
2011-02-25 21:37:56 -07:00
Jon Jensen 86b062bf61 wimba integration, fixes #2989
added wimba web conferencing support, moved dimdim config into plugin
settings, fixed a few web conferencing ui issues

Change-Id: I6b36b0e594a9f296d14cd35bec02186478bcbd13
Reviewed-on: https://gerrit.instructure.com/2343
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
2011-02-25 14:35:14 -07:00
Jon Jensen 820fa03212 when changing contexts, don't blank the message form, closes #3865
Change-Id: Id1733e2002f8ce76bb21d2d2f521dd65c9b58da0
Reviewed-on: https://gerrit.instructure.com/2424
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
2011-02-25 14:34:47 -07:00
JT Olds 34263ed8de making download public
Change-Id: I88a7d076faf306c935f71153908f6de29f6770da
Reviewed-on: https://gerrit.instructure.com/2436
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
2011-02-24 17:20:45 -07:00
Brian Palmer 202effa992 escaping of enrollments in course drop down, fixes #3907
Change-Id: If995936a602f9e0fb43bf756d52c2522731d7947
Reviewed-on: https://gerrit.instructure.com/2433
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-02-24 15:31:08 -07:00
JT Olds 96e746c31e making other import types supported via plugins
Change-Id: I689c374060fbfcc89eb79b918ea2db283c6eb99c
Reviewed-on: https://gerrit.instructure.com/2425
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
2011-02-24 15:15:53 -07:00
Brian Palmer 4e05ce3524 breadcrumbs are now escaped
Change-Id: Ice45457db7597c0d0e2da46b062ba02e17c843a7
Reviewed-on: https://gerrit.instructure.com/2427
Reviewed-by: Zach Wily <zach@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-02-24 13:03:35 -07:00
JT Olds 77b31810c6 hide wiki pages marked hidden from students
closes #1865

Change-Id: I582d566fd83575e70502dd682ca0347a436e194c2
Reviewed-on: https://gerrit.instructure.com/2422
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: JT Olds <jt@instructure.com>
2011-02-24 10:12:41 -07:00
Ryan Shaw a8443755bc dont show media comment both inline and in modal dialog
fixes #3887

Change-Id: I2ada94bdcd79332ef0d0fb6a98ee7459e18f6693
Reviewed-on: https://gerrit.instructure.com/2405
Reviewed-by: Brian Whitmer <brian@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-02-24 09:38:12 -07:00
Zach Wily ba7b585193 fix escaping in faculty notes, refs #3888
Change-Id: Ia5ff98778570059bab62b64152285dd68b734024
Reviewed-on: https://gerrit.instructure.com/2419
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-02-24 07:07:00 -07:00
Brian Palmer 099fe50e72 don't strip tags on plain text discussion entries, fixes #3892
The format_message call takes care of escaping HTML entities.

Change-Id: Ifb6f890903ee00c8098ee8596d4b66d18a2b9054
Reviewed-on: https://gerrit.instructure.com/2418
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-02-23 16:29:37 -07:00
Zach Wily ba6e8d8b64 fix escaping in autocompleted course search, refs #3888
Change-Id: I4e778bca558bff3aac0f5582653468c6d6a8b5fa
Reviewed-on: https://gerrit.instructure.com/2416
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
2011-02-23 16:22:34 -07:00
JT Olds 1f9894cb98 improving anonymous survey anonymity
* speed grader now requires hidden student names on anonymous surveys
 * quiz moderation no longer presents student names
 * anonymous surveys no longer provide a list of students who have not taken
   the survey

closes #3793

Change-Id: I7d48766600522b36379e8ae6d2a72486d2ce3ed7
Reviewed-on: https://gerrit.instructure.com/2407
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Whitmer <brian@instructure.com>
2011-02-23 16:11:13 -07:00
Brian Palmer 9b627b0e6e break SIS error/count reports into partials, fixes #3889
Change-Id: I2811b01392c2320654e237f1840b918bc58dedc6
Reviewed-on: https://gerrit.instructure.com/2412
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
2011-02-23 14:54:27 -07:00
Zach Wily 16eecfd4dc fix escaping in messages, refs #3888
It's unnecessary to html unescape the subject and body anymore, as they are
already unescaped.

Change-Id: I10b13805a42c677e1309983c77f1aa62e56e8578
Reviewed-on: https://gerrit.instructure.com/2413
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-02-23 14:37:42 -07:00
Zach Wily 0858d4e337 fix escaping issues with quizzes
Since plaintext fields are stored raw in the database, a lot of the previous
escaping/unescaping behavior in quizzes has changed.

Change-Id: I299fa7979a30b1efa8944c6df7150b82980c47c5
Reviewed-on: https://gerrit.instructure.com/2403
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-02-23 14:08:29 -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 Palmer 17b89a1751 add support for using sendmail for outgoing mail, closes #3880
This involved some refactoring, since we were using
ActionMailer::Base.smtp_settings[:domain] for generating "From"
addresses.

Change-Id: I6cac6d48971d396a56e07314e042b63a0081a4b6
Reviewed-on: https://gerrit.instructure.com/2398
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-02-23 08:41:50 -07:00
Brian Whitmer fd8154dc3e problem with facebook registration
missed a rescue in the case where there's not currently
a valid facebook session.

fixes #3867

Change-Id: Ia524dcd93be48e7a4e57866a414096437a0632d3
Reviewed-on: https://gerrit.instructure.com/2359
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
2011-02-22 20:23:09 -07:00
Brian Palmer 4115014102 deliver messages to all recipients in one job, closes #1
If any individual message delivery fails, we'll reschedule it as its own
individual job.

Change-Id: I51ae5941fd001c61e6c6b708185ff12585d0a49f
Reviewed-on: https://gerrit.instructure.com/2390
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
2011-02-22 16:23:58 -07:00
Ryan Shaw df166bfe4e move no-js and ie6 warnings out of app.html.erb
did this because it was a waste to send it to
every single page view.
plus I hated seeing it in the firebug and web
inspector

fixes: #3874

Change-Id: I3e25cb78cddf9f8f897c81014bb07ca77ccfc361
Reviewed-on: https://gerrit.instructure.com/2363
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
2011-02-22 10:35:41 -07:00
Ryan Shaw c289d36384 make it so screenreaders dont say "blank" all the time
it was because image_tag("blank.png") would put
a alt tag of "blank" on the image, which the screenreader
would always read.

fixes zendesk 5589

Change-Id: Ifbd200e17d40d6a5f45208f1adb6b49835ce3c5d
Reviewed-on: https://gerrit.instructure.com/2365
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
2011-02-22 10:13:23 -07:00
Brian Whitmer 0b6e4da151 kaltura pluginified
round one in moving all the yml files to the plugins system instead

Change-Id: Id255c15d14d27bce232606ece6bd00eb7e094749
Reviewed-on: https://gerrit.instructure.com/2339
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
2011-02-21 12:32:43 -07:00
Brian Whitmer e797890421 notification alerts date formatting
the notification settings were poorly formatted, which
was making the start and end times get saved
incorrectly.

Change-Id: I7aae061d823a18f44e00a1e52806df1a26ed3807
Reviewed-on: https://gerrit.instructure.com/2353
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-02-18 16:09:53 -07:00
Brian Whitmer e495aad662 instructors can't download locked files
if a teacher locks a file and tries to go to the
file details page, it says "hasn't been unlocked
yet", when really it should let them download
since they're a teacher.

fixes #3578

Change-Id: I42ea29d2803b8fa96fd50afd0adfdcf614702760
Reviewed-on: https://gerrit.instructure.com/2342
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
2011-02-18 16:05:14 -07:00
Brian Whitmer 7ac30914a4 make the textarea bigger for quiz questions
fixes #3791

Change-Id: Icbc5d002ada74c00bc072a0c225d6433d3a7f73f
Reviewed-on: https://gerrit.instructure.com/2288
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
2011-02-18 16:04:57 -07:00
Bracken Mosbacker b40e07c394 add option to copy course settings during content import
closes #3837

Change-Id: I6b3e40f5dade814d0c567d26f02d0d37d271fe7e
Reviewed-on: https://gerrit.instructure.com/2349
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: JT Olds <jt@instructure.com>
2011-02-18 15:11:10 -07:00
Zach Wily bad6e8480c make sure we set the updated_at attribute
Change-Id: I1064523c3028f39311c10f4435237910cd2a52fd
Reviewed-on: https://gerrit.instructure.com/2351
Reviewed-by: Brian Whitmer <brian@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-02-18 14:55:22 -07:00
Ryan Shaw 5718b9520b allow showing only a certain section in gradebook
if they can only see 1 section (possibly the default section),
they do not get the option to change it.

they can only change sections they are allowed to see

the setting is stored in $.store.userGet and is keyed
off of the course too so it will be remembered for a
given user/course/browser combo.

if the page loads and tries to show only a section,
but that section does not have anyone in it, or they
cant see anyone in it, it will alert() reload to show
all sections.

fixes #3653

Change-Id: Ie6de238ac8e1d5367ae8ab961aaa0fcc1ca66c1e
Reviewed-on: https://gerrit.instructure.com/2324
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Whitmer <brian@instructure.com>
2011-02-18 14:15:03 -07:00
Ryan Shaw 37b74ecc04 embed flash, dont load in iframe so wmode is set
Change-Id: I07dbdbdda9a5e53bb47ed91d15af4d665081af03
fixes: #3541 "Flash file blocks Feedback window"
Reviewed-on: https://gerrit.instructure.com/2209
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Whitmer <brian@instructure.com>
2011-02-18 13:50:19 -07:00
JT Olds 148e66ac68 supporting designer/observer imports and make course_id optional
now one of course_id/section_id is required for enrollments, but not both

Change-Id: I4ebd19ac05988bf3eeffcb846d8bc1fafce73b40
Reviewed-on: https://gerrit.instructure.com/2316
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Reviewed-by: Brian Whitmer <brian@instructure.com>
2011-02-18 13:25:29 -07:00
Ryan Shaw 25e7d81ba5 show flash mime icon in full-files
Change-Id: Id0015afa6da488111e51527cf7633b04374f07a1
Reviewed-on: https://gerrit.instructure.com/2208
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
2011-02-18 10:57:49 -07:00
Ryan Shaw eb8c0bb9d9 changing assignment type deleted assoc. topic
...if the assignment was a discussion topic.

Change-Id: I5279ae402486a1255a4d5b5a7b59017c9fae3fc5
fixes: #3743
Reviewed-on: https://gerrit.instructure.com/2202
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
2011-02-18 10:57:39 -07:00
Brian Whitmer eee2627610 invalidate caches for account alerts
there's still going to be up to a 3 minute delay on alerts
showing up on a user's dashboard, since we don't touch all
the users for an account when an alert changes, but if a
user closes the alert it should go away forever like it's
supposed to now.

Change-Id: I6461836ad126c4646a496734e84c89305f873f2d
Reviewed-on: https://gerrit.instructure.com/2344
Reviewed-by: Zach Wily <zach@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-02-18 09:59:31 -07:00
Brian Whitmer 781cea7d94 zip importer shouldn't fail on slow uploads
Used to fail after 10 empty ajax responses.  Changed to
not count it as a bad request unless it's already had
at least one good request.

fixes #3838

Change-Id: I5d41f52ca302f779507e2e93a03ebac342b97e2b
Reviewed-on: https://gerrit.instructure.com/2311
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
2011-02-17 17:30:31 -07:00
Brian Whitmer b99263ed72 fix outcome details to show correct numbers
On the outcomes page if you clicked "show details" for an
outcome, it would always say "0 artifacts" even if there
were artifacts.  The problem is it wasn't actually looking
for artifacts, it was looking for something else.  Also
fixed the pageless code on the outcome details page to
correctly do an infinite scroll.

fixes #3823

Change-Id: I6e0fd06ea70e5915ee5cdef23d4851ecd6a285fc
Reviewed-on: https://gerrit.instructure.com/2318
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
2011-02-17 17:13:28 -07:00
Brian Whitmer 47a1fdcf5d make quiz pages more efficient
On large quizzes there were problems both while
taking and editing the quiz because of all the DOM
elements.  Part of the solution was using more event
delegation, and part was rendering smaller
partials when editing quizzes with lots of questions,
and then loading the full details of only the
questions that the user wants to edit/view.

fixes #3771
fixes #3817

Change-Id: I73aabe79323c1879d7fc8985d1709751271730f2
Reviewed-on: https://gerrit.instructure.com/2290
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-02-17 15:48:06 -07:00