Commit Graph

213 Commits

Author SHA1 Message Date
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
Brian Palmer b86fb7fd83 YAML dump Class and ActiveRecord::Base objects natively, refs #1
This fixes a long-standing issue with not being able to properly
serialize AR objects that are in arrays or other data structures. Now
that we're using native YAML methods for doing the serialization, rather
than dumping specially-formatted "LOAD;N" strings, it works properly.

I've left the load_for_delayed_job stuff in for now, for backwards
compatibility with jobs already in the queue.

Change-Id: I109f364b91c4becc8fc17ea1d9f041eb3c18281f
Reviewed-on: https://gerrit.instructure.com/2389
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
2011-02-22 16:23:40 -07:00
Bracken Mosbacker 2f9e0088fc don't create stream items for deleted objects
There was a race condition where the delayed job
for creating stream items hadn't run yet and an
object (like an announcement) was deleted, this
would create a stream item pointing to a deleted
object

closes #3699

Change-Id: I59cd5ac80b752e689098bbecb74243b6913de1a4
Reviewed-on: https://gerrit.instructure.com/2379
Reviewed-by: Brian Whitmer <brian@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-02-22 13:06:12 -07:00
Zach Wily 6b4c68c81f upgrade to latest rails_xss, fixes #3875
There was a bug where data passed to content_for via a string and not a block
was being marked as "html safe" when it hadn't been escaped.

Change-Id: I679281d1a767841b8f4d90ebbb8f8ca61a2a07f4
Reviewed-on: https://gerrit.instructure.com/2374
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-02-22 10:53:54 -07:00
Brian Palmer 250d846d66 more selenium config options, and run the web server in-process
Change-Id: I08b31b89951ebc9328836ee75c4a943ab8d4010d
Reviewed-on: https://gerrit.instructure.com/2358
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: JT Olds <jt@instructure.com>
2011-02-22 10:37:29 -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 bf99eea7e3 clean up sequence footer js
while I was tyring to find the cause of a zendesk
ticket I had to grock this, while I was at it I DRY'ed
it up a little.

Change-Id: Ib95a55031625dfaa635f8b3ca2a4d6c1b6224283
Reviewed-on: https://gerrit.instructure.com/2364
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
2011-02-22 10:13:59 -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
Zach Wily 558e85ac96 be sure to escape all chars that need html escaping in fillTemplateData
fixes #3872

Change-Id: I9e02184a798b78f090b6cc41a3dd4f21f5f7b665
Reviewed-on: https://gerrit.instructure.com/2373
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Reviewed-by: Brian Whitmer <brian@instructure.com>
2011-02-22 09:33:21 -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 Palmer 7bafbd0dab raise on serializing an unsaved model object to a delayed job, refs #1
Right now we serialize the AR object without an id, and fail later when
trying to perform the job, since we can't find the object without an id.
This change will make it a lot easier to track down these kinds of errors.

Change-Id: I89d7fb45182f6624bd7fee9b01c1294112a0ba8b
Reviewed-on: https://gerrit.instructure.com/2354
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-02-21 08:45:40 -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
Ryan Shaw 24f7cd2ca1 fix bugs with showing 1 section in speedGrader
fixes: #3853

Change-Id: I0ea031fd331d9cf206af273c7aaccd7dc26ecee9
Reviewed-on: https://gerrit.instructure.com/2348
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Mark Suman <marks@instructure.com>
2011-02-18 15:03:46 -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
Bracken Mosbacker e288d16e7f ensure the correct submission is show in the left frame
closes #3789

Change-Id: Ie10646ad7bcced77e83e9ea33e399395aae7d265
Reviewed-on: https://gerrit.instructure.com/2347
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Whitmer <brian@instructure.com>
2011-02-18 13:07:28 -07:00
Brian Whitmer e462888999 editing files in chrome on the files page
Chrome on a Mac doesn't support sendAsBinary, so this
code was failing.

fixes #3788

Change-Id: Id3475adf38a7a0df9e4aaa1cb17165bfe52a91e1
Reviewed-on: https://gerrit.instructure.com/2323
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
2011-02-18 12:10:28 -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
Jon Jensen fe6b152e9c fix key collision issue in context_url, fixes #3832
Change-Id: I1d6cffef605cc6767357d0308ccb28778f92852e
Reviewed-on: https://gerrit.instructure.com/2299
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
Reviewed-by: Brian Whitmer <brian@instructure.com>
2011-02-17 13:20:28 -07:00
Jon Jensen f78189f2d2 don't return uninitialized var (that we don't even use), closes #3672
Change-Id: I164f6a5bd978da8d3cab81bb2e850e73b4196ea7
Reviewed-on: https://gerrit.instructure.com/2303
Reviewed-by: Brian Whitmer <brian@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-02-17 13:20:21 -07:00
Jon Jensen 7a8d68bc9d don't allow deletion of true/false answers. also hide question_comment ui, since it's redundant. closes #2997
Change-Id: Iff5a480e0d7a3992a7f4bdf36223dbed17c66435
Reviewed-on: https://gerrit.instructure.com/2306
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Whitmer <brian@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-02-17 13:20:14 -07:00
Jon Jensen 70c69c38e3 tweak user_url for non-admins so that it goes to profile page, closes #3810
Change-Id: I28c8bb4fdc4c7985b9f42f6c598bee1b5131c754
Reviewed-on: https://gerrit.instructure.com/2312
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Whitmer <brian@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-02-17 13:20:05 -07:00
Jon Jensen 14d70f9da3 auto mark-as-read when replying from the dashboard, closes #3822
there's already logic to flag the ContextMessage as read when you read (or
reply to) an InboxItem... just added the inverse to the models, plus a
read call to the controller when replying

Change-Id: Ie3c22cd4e81bbbb4f8a1d88412c6c6fd33e45dc3
Reviewed-on: https://gerrit.instructure.com/2329
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Whitmer <brian@instructure.com>
2011-02-17 13:19:56 -07:00
Brian Whitmer 7b840846bc clean up observer linking
observers can now be linked from either the course
details page or the user details page inside a course.
Fixed some bugs in this and made the code a bit
cleaner.

refs #3315

Change-Id: I004bc11d823fffcc76ab5b74ee235979248cae4d
Reviewed-on: https://gerrit.instructure.com/2263
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
2011-02-17 13:15:32 -07:00
Brian Whitmer 629805db3c recaptcha plugin
also some UI fixes for the plugin page

Change-Id: I161c458756c20e034c29d4515801fd9f6427aa53
Reviewed-on: https://gerrit.instructure.com/2093
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
2011-02-17 13:00:19 -07:00
Bracken Mosbacker b866a18699 fix wiki_page reference for module importing
closes #3843

Change-Id: I7cc3270f3a5766b8ad8fe7f1e2991396f2fff85c
Reviewed-on: https://gerrit.instructure.com/2313
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-02-17 10:40:18 -07:00
Ryan Shaw 6b8aea2725 fix html escaped string
Change-Id: I8c8f5a0b87ef77950a810ec71183a3966e264685
Reviewed-on: https://gerrit.instructure.com/2203
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-02-17 10:14:55 -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
Ryan Shaw 285b885a3d not using clippy anymore
Change-Id: Ie05e8ff386d524af420f44fb5d15bde963f1aa63
Reviewed-on: https://gerrit.instructure.com/2188
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
2011-02-16 17:52:37 -07:00
Bracken Mosbacker 840f365981 added undated assignments to assignments index page
closes #2187

Change-Id: I53d71c4c99a4889b7fb4f4736637dc166aad5e8f
Reviewed-on: https://gerrit.instructure.com/2319
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Whitmer <brian@instructure.com>
2011-02-16 15:17:17 -07:00
Brian Whitmer a862fda727 let observers message teachers if enabled
by default observers don't have messaging permission.  Now
you can give them messaging permission, but if they don't have
roster access then they can only message the teachers.  If
they are also granted roster access then they can message
anyone in the course.

refs #3315

Change-Id: Ic9d867a964d3231fedd97547dadd645a6eb85308
Reviewed-on: https://gerrit.instructure.com/2265
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
2011-02-16 14:35:53 -07:00
Brian Whitmer f9f5790ff3 add 'import content' link to course settings page
Change-Id: I7663a539a0657b8f64ac90e343944cf8e5dd2884
Reviewed-on: https://gerrit.instructure.com/2211
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
2011-02-16 14:35:30 -07:00
JT Olds 003aa6a1bf adding link to sis import docs
closes #3829

Change-Id: I68c215ef8f4ce11f22b2f156b691fa8284342e78
Reviewed-on: https://gerrit.instructure.com/2308
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
2011-02-16 14:22:59 -07:00
Brian Whitmer 8035e390f4 add observer role to csv import
and add a new column for linking it to a user

refs #3315

Change-Id: I8333a0530bb2da5557385bf30f45cdd56b5eb261
Reviewed-on: https://gerrit.instructure.com/2266
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
2011-02-16 13:49:18 -07:00
Brian Palmer 5b4abbe76c spec fixes -- db:test:reset could fail depending on load order
Change-Id: I8b9622f5106a7834fd2925f8893d9be1207bda74
Reviewed-on: https://gerrit.instructure.com/2309
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: JT Olds <jt@instructure.com>
2011-02-16 12:47:51 -07:00
Brian Whitmer 2f3f70b339 better flow for updating plugin settings
also added option for plugins to provide validation on
their settings page.  I need this for some of the
more complex settings we'll have to put together
as we move stuff from yml files to settings.

Change-Id: I78e6e3cd423e7ef7e15eafae86db8337f605be3a
Reviewed-on: https://gerrit.instructure.com/2247
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
2011-02-16 12:30:18 -07:00
Brian Whitmer ee56f631b9 revising conferences open/closed logic
this logic didn't make sense to me, and it was obviously
broken, so I rewrote it.  These are the new assumptions
for web conferences:

- when the first participant joins a conference, we set
  started_at, start_at and end_at
- once nobody is using the conference anymore and end_at
  has passed, or it is more than 15 minutes past
  end_at, we set ended_at
- if ended_at is set and has passed, the conference is
  considered closed
- if ended_at is not set and a user tries to join an
  inactive conference, don't let them unless they're
  authorized to resume the conference
- conferences are resumable by those with permission, but
  only until the end_at date, after that it's all over

fixes #3827

Change-Id: I3f7474c314a99f0fd5a2b7f9222216d2fc3168a1
Reviewed-on: https://gerrit.instructure.com/2304
Reviewed-by: Zach Wily <zach@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-02-16 10:54:47 -07:00
JT Olds 4351cff8dd enable sis import for the default account
closes #3830

Change-Id: Ia82f02c97f2bf34ca7e944a5a6749bbc89a98f72
Reviewed-on: https://gerrit.instructure.com/2305
Reviewed-by: Brian Whitmer <brian@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
2011-02-15 17:59:22 -07:00
Ryan Shaw 96b0b820eb style the "File Uploads For" iframe and handle swf's
2 things:

1. styled the file uploads for: thing so that it
is not so ugly.

2. if anything in the file list is a swf, when
they click it embed it inline with wmode: opaque
so that it doesn't appear on to of everything
(like the students dropdown in the speedGrader)

Change-Id: Ifcc1044d5256269f1f8b5549f1fb51fde088dba8
fixes: #3497 and zendesk #4562
Reviewed-on: https://gerrit.instructure.com/2192
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Whitmer <brian@instructure.com>
2011-02-15 17:04:41 -07:00