Commit Graph

213 Commits

Author SHA1 Message Date
Bracken Mosbacker e1a3350d7e ensure that deleted courses also delete enrollments
closes #3833

Change-Id: I21efa68116b7a250e9b0e9c2df2dd5dfd45a736e
Reviewed-on: https://gerrit.instructure.com/2301
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Whitmer <brian@instructure.com>
2011-02-15 16:48:17 -07:00
Brian Whitmer f9d40283da question banks questions showing up without names
If there are too many questions in a bank we show
just a summary for each question instead of the full
question to help render faster.  With the OpenObject
fix it appears that we lost the names of the
questions on the teaser partial.

Change-Id: Iab0a673462dc23626bb63637d1ece90d15aa4a5e
Reviewed-on: https://gerrit.instructure.com/2289
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-02-15 16:46:59 -07:00
Brian Whitmer 90e8f0e5be open_object quiz fixes
- @stored_params was sometimes a hash but everything was still
expecting an open_object
- missed a place where the code now failed on nil

fixes #3804

Change-Id: I1b74dadc5956314ebbf1da0baa0dd2d41940aad7
Reviewed-on: https://gerrit.instructure.com/2283
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-02-15 16:46:27 -07:00
Brian Whitmer d3a7f7131b context cache not getting invalidated on module item reorder
fixes #3803

Change-Id: Ia7311bf1c00ea93b7f31f510e47edcd74bb3efd1
Reviewed-on: https://gerrit.instructure.com/2282
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-02-15 16:46:16 -07:00
Brian Palmer 22db8d35d9 translate youtube URLs into embedded players for modules, fixes #3811
The more general issue of sites setting X-Frame-Options still remains.
See #3834.

Change-Id: Ia659f85aa30877d1e7a7ce351d5856809a034d7d
Reviewed-on: https://gerrit.instructure.com/2300
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-02-15 16:17:05 -07:00
Brian Palmer 564866d0e4 set allowed_attempts=1 when multiple attempts is unchecked, fixes #2525
Change-Id: I3b783efcfbeaa0360870da66edaaf7fb2677ba57
Reviewed-on: https://gerrit.instructure.com/2297
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Whitmer <brian@instructure.com>
2011-02-15 14:39:56 -07:00
Brian Palmer e0a163d297 change delayed_job child exiting strategy, fixes #3808
Before, the child did a hard Kernel#exit!, skipping all finalizers and
exit callbacks. This was causing issues with code misbehaving, for
instance Tempfile instances never getting rm'd off disk.

Now we're doing a fork { block } and using the normal ruby exit path, so
that these finalizers get run. I had to tweak the db connection
handling, because this means that the db connection is also getting
closed by each spawned child.

Unfortunately I'm sure there's a performance hit for reconnecting to the
job queue database after each job is run.

Change-Id: I83776d08bf3693f72fd3e7246cee196cca1987a1
Reviewed-on: https://gerrit.instructure.com/2295
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
2011-02-15 14:39:51 -07:00
Brian Whitmer ba802b72f2 allow up to four decimal places for numeric questions
fixes #3802

Change-Id: Ibba5f72dc27e76614801aba90bac23222d468028
Reviewed-on: https://gerrit.instructure.com/2275
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
2011-02-15 14:34:15 -07:00
Brian Whitmer d16e161a4e students couldn't initiate conferences, even if authorized
fixes #3797

Change-Id: I8efe888865815b4ef02e9bc30c03b7469102606e
Reviewed-on: https://gerrit.instructure.com/2271
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: JT Olds <jt@instructure.com>
2011-02-15 14:33:54 -07:00
Bracken Mosbacker d7e99aa39b properly handle an assessment with no questions on import
Change-Id: I14b1f4075e564e7553e29486d6ad0820e49039f9
Reviewed-on: https://gerrit.instructure.com/2294
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: JT Olds <jt@instructure.com>
2011-02-15 11:06:57 -07:00
JT Olds 3c4685a84f removing jammit references to deleted js files
Change-Id: I59e174d4cc8c202a682482ab61a8a34b5e76e17c
Reviewed-on: https://gerrit.instructure.com/2274
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Whitmer <brian@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-02-15 10:04:05 -07:00
Zach Wily 025098d64a don't call datetime_field multiple times on this field
The real fix for this is to make datetime_field idempotent, but that might be
a little trickier. This changes fixes this one specific case though.
(datetime_field was being called multiple times on the date field, which
caused it to include the date twice in the submitted value, which caused ruby
to misinterpret the pm.)

fixes #3818

Change-Id: Ifd24f202d25d7c2431409c1c7c3d285c81d7d990
Reviewed-on: https://gerrit.instructure.com/2292
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-02-14 07:29:10 -07:00
Brian Whitmer c493884e7c rename communication preferences to notification preferences
both names were actually being used, this will make it
consistent.

fixes #3781

Change-Id: I6ef6c791d4dca5d2934fa83fd6afaf4b5b9625a5
Reviewed-on: https://gerrit.instructure.com/2267
Reviewed-by: JT Olds <jt@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-02-11 23:36:21 -07:00
Brian Whitmer 96e57d560a make sure parent observers can see linked student grades
refs #3315

Change-Id: I6cd929384d7a3da4b8fc0f865508b880f6631e56
Reviewed-on: https://gerrit.instructure.com/2264
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
2011-02-11 23:35:53 -07:00
Brian Whitmer 2af6f465cd quizzes now have hard deadline if due_at is set
due_at used to mean "the time after which you could no
longer start taking a quiz" but that's not really what
"due at" means.  We changed it instead to now mean what
it implies, "the time at which all quiz attempts must
be completed."

So if you start taking a 4-hour quiz one hour before
it's due, you'll only get one hour to take it.

The other part of this is fixing the timer to support
switching from counting up to counting down.  When an
assignment is untimed but due, say, two months from now,
we should count up on the timer.  When we get close to
the due date, though, this should change to a countDOWN
instead.  Right now this switch is set to happen at
12 hours from the due date, and will flash a notice
saying "12 hours left".

fixes #3727

Change-Id: I1eec558de61e2500da88f4127b7e691e7aa5c205
Reviewed-on: https://gerrit.instructure.com/2182
Reviewed-by: Brian Whitmer <brian@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-02-11 22:22:58 -07:00
Brian Whitmer 15f6d0e1b8 ip filtering for quizzes
Teachers can specify an IP filter for a quiz, which
means students are only allowed to take the quiz
when their current computer's IP address matches
the specified filter.  The initial request to start
taking the quiz and any subsequent requests to
backup or submit the quiz attempt must all come
from a valid IP address.

Admins can pre-define named filters
so that teachers don't have to manually enter
filters all the time.  They can instead find them
from a provided list.

Change-Id: I59b6d8ddd31409fc9bd150ed695935ad2f458f86
Reviewed-on: https://gerrit.instructure.com/2167
Reviewed-by: Brian Whitmer <brian@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-02-11 22:16:47 -07:00
Brian Whitmer 89f5934bae quiz moderation
- added a moderation link on the quiz page
- moderators can see current quiz results for students
- moderators can add time to a current quiz attempt
- moderators can manually unlock a quiz for a student,
  which means the student can take the quiz even if
  it's locked for everyone else
- moderators can give a student extra time for every
  subsequent attempt of a quiz
- moderators can give a student extra attempts on a quiz
- moderators can also update these settings for multiple
  students at the same time

Change-Id: I31c34097fc6e19d8c6e377a6059568e591ffbab8
Reviewed-on: https://gerrit.instructure.com/2166
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-02-11 22:08:42 -07:00
Zach Wily 1a20361135 fix page error when cached_attachments on a submission_comment is nil
Change-Id: I5f5febd81e27d8ee41e418cd4749094556ccd525
Reviewed-on: https://gerrit.instructure.com/2287
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-02-11 20:58:19 -07:00
Brian Palmer c51b7fea1e include graded, unsubmitted submissions in "haven't submitted yet" messaging
refs #3783

Change-Id: I5b81c71645c423c339419cd1d2222998f846153d
Reviewed-on: https://gerrit.instructure.com/2277
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Whitmer <brian@instructure.com>
2011-02-11 16:49:54 -07:00
Brian Palmer ba8e495ac1 fix "message students who scored more/less than" and 0 scores
refs #3783

Change-Id: Idfd66601f0dd82a0e1f492a84d3526d77973ee4f
Reviewed-on: https://gerrit.instructure.com/2276
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Whitmer <brian@instructure.com>
2011-02-11 16:49:30 -07:00
Brian Palmer 5eba17d471 correctly show nil-scored pass/fail assignments as complete in grade summary
fixes #3784

Change-Id: If086be02e754728e76f17d8145dfcf2347b19818
Reviewed-on: https://gerrit.instructure.com/2272
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Whitmer <brian@instructure.com>
2011-02-11 16:39:27 -07:00
Bracken Mosbacker 03647b5152 require ssl for quiz import page
Change-Id: Id78204b142d0a74609cf2f75820e3eae567991c4
Reviewed-on: https://gerrit.instructure.com/2278
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-02-11 15:59:55 -07:00
JT Olds 461419d3a8 disable unnecessary tabs for site admin account
my justification for removing all these tabs (i could be wrong)

 * courses: the site admin account shouldn't have any
 * users: users in the site admin account are kinda useless if they aren't
          account admins, which you can configure in the settings tab
 * statistics, outcomes, rubrics, sub-accounts, faculty journal,
          terms, authentication, and sis import all make more sense in other
          account tabs

the settings and permissions tabs are needed though, though everything but
account-level permissions are disabled

closes #3702

Change-Id: I4516b62ad57600870d9139ba19837325a39665f1
Reviewed-on: https://gerrit.instructure.com/2246
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Whitmer <brian@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-02-11 13:31:27 -07:00
tom metge 28dbe009ff fix sqlite compatibility for delayed_jobs-related queries
Change-Id: I13004a50207401c4b8a990dce5cfa2ec3871a102
Reviewed-on: https://gerrit.instructure.com/2256
Reviewed-by: Brian Whitmer <brian@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-02-11 12:56:46 -07:00
Brian Palmer d8f9ee6174 revert an explicit permission to the proper default
In /accounts/*/role_overrides

The value was being saved correctly, but the UI was incorrect and super
confusing. It'd always show a bold "explicit" green checkmark, rather
than the semi-transparent check/cross depending on the actual default.

refs #3711

Change-Id: Ide0a0603b6c820ea0ec94646c4327239d980b09c
Reviewed-on: https://gerrit.instructure.com/2194
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Whitmer <brian@instructure.com>
2011-02-11 12:54:21 -07:00
tom metge 62ba756243 ignore demo database files
Change-Id: I01c3a08a6d5201d66ccdaeb22cdbd64e5dc2059f
Reviewed-on: https://gerrit.instructure.com/2257
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: JT Olds <jt@instructure.com>
Reviewed-by: Brian Whitmer <brian@instructure.com>
2011-02-11 12:54:14 -07:00
JT Olds b0fd3fea78 console.log removal
Change-Id: I3793631c4b99cf86f7b1e86c4e42c7e0a094a73a
Reviewed-on: https://gerrit.instructure.com/2269
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
2011-02-11 12:40:27 -07:00
JT Olds 046cfe54c1 oh whoops, bash might not always be the default shell
Change-Id: I3ba13544e0238579fb374a6a0886fd978689433c
Reviewed-on: https://gerrit.instructure.com/2270
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-02-11 12:33:24 -07:00
JT Olds ead989d4a5 removing files.js
Change-Id: I45f2b53fa9367d4228751fab81cbbcb44c18c569
Reviewed-on: https://gerrit.instructure.com/2237
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Whitmer <brian@instructure.com>
2011-02-11 10:50:33 -07:00
JT Olds dc1cc82a9c test file uploads from homework submissions page
Change-Id: Ifdaf61db104cf06f9edfbdc80eca6133a258886a
Reviewed-on: https://gerrit.instructure.com/2101
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Whitmer <brian@instructure.com>
2011-02-11 10:50:20 -07:00
JT Olds f39cab0237 discussion page file upload selenium tests
Change-Id: I77c8a4e3b292e0eb32a145aa0b59322e7939b92a
Reviewed-on: https://gerrit.instructure.com/2100
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Whitmer <brian@instructure.com>
2011-02-11 10:50:13 -07:00
JT Olds a1698d6009 flash s3 uploading
Change-Id: I479dc752d707ef6b52f7efb5e4e43514c2dbe15e
Reviewed-on: https://gerrit.instructure.com/2098
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Whitmer <brian@instructure.com>
2011-02-11 10:50:07 -07:00
JT Olds cdb522a281 non-flash direct-to-s3 changes
Change-Id: I1147b249c887a2034e499e1b22d633f7813a716f
Reviewed-on: https://gerrit.instructure.com/2097
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Whitmer <brian@instructure.com>
2011-02-11 10:49:53 -07:00
JT Olds ba735d41b6 direct-to-s3 server side changes
Change-Id: Ie7b415b84f403c98d82f0e67212ae2e7b051b67d
Reviewed-on: https://gerrit.instructure.com/2096
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Whitmer <brian@instructure.com>
2011-02-11 10:49:47 -07:00
Bracken Mosbacker 9168dfbdec urls from external migrations are already escaped
The text helper was double escaping urls from external migrations

refs #3667

Change-Id: Ica89af6fffab47ec1fee82167acc1d34551e63e4
Reviewed-on: https://gerrit.instructure.com/2232
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Whitmer <brian@instructure.com>
2011-02-11 10:28:51 -07:00
Brian Palmer e09161c808 don't push empty hashes onto the rubric rating data, fixes #3654
Change-Id: Ic2ac3d2fdc0e68786a9f372da25dc3b56b878451
Reviewed-on: https://gerrit.instructure.com/2244
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Whitmer <brian@instructure.com>
2011-02-11 08:34:17 -07:00
Bracken Mosbacker 8fee9b2e55 use ssl on the migration page
Change-Id: If9eabcc2167e6343a32625c9dcba6c2381d1e716
Reviewed-on: https://gerrit.instructure.com/2249
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
Tested-by: Zach Wily <zach@instructure.com>
2011-02-10 14:57:58 -07:00
Brian Whitmer dfd90c83d9 make things work on windows with less hackery
The closure-compiler gem has an undocumented
dependency on Windows with Ruby < 1.9.  I've added
this to the Gemfile and also sent a message to
the gem's owner to hopefully get this fixed.

Change-Id: Ifb06b97013d541238cb834ca1773e16c1db11355
Reviewed-on: https://gerrit.instructure.com/2213
Reviewed-by: Brian Whitmer <brian@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-02-10 13:33:26 -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
Zach Wily f3e702a264 fix image/file upload section in eportfolios, fixes #3756
It looks like at some point we switched from an "upload" to an "attachment"
section type, which broke this

Change-Id: I49f1a45ad5b39acd00376504962b9841264d4bd0
Reviewed-on: https://gerrit.instructure.com/2227
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Whitmer <brian@instructure.com>
2011-02-10 12:34:07 -07:00
JT Olds 4a96bd6b9e this is going into the database, and it probably shouldn't
Change-Id: I490f31aa3d44189712c3992437740c6003416c6d
Reviewed-on: https://gerrit.instructure.com/2214
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-02-10 12:26:31 -07:00
Mark Suman 01d9f66a5b Add SpeedGrader for iPad to the list of recognized browsers.
fixes #3606

Change-Id: I875171ac8a4474a38c7fbc836cf52c5be4b0dbe5
Reviewed-on: https://gerrit.instructure.com/2226
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-02-10 10:29:08 -07:00
Brian Palmer e693c6ebba make the "remember me" cookie httponly, fixes #3763
Change-Id: I1d7a0eab74c23dbdb4dfdca186b73009dc6aeb6d
Reviewed-on: https://gerrit.instructure.com/2230
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-02-10 10:05:06 -07:00
Brian Palmer 520fb21130 remove legacy stream item support, closes #3647
Change-Id: I9c6d5d02726eb523672c413a81112b17d82fc62c
Reviewed-on: https://gerrit.instructure.com/2229
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Whitmer <brian@instructure.com>
2011-02-10 09:52:45 -07:00
Brian Palmer e988de9906 remove old stream items with a periodic job, refs #3647
Change-Id: I4d66747016f5ce13d02ea413e362153633f0362a
Reviewed-on: https://gerrit.instructure.com/2228
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-02-10 09:52:38 -07:00
Brian Palmer 87b37e72d4 flush the role_override cache on each request, fixes #3711
Once we're storing these permissions caches in a shared memcache
cluster, we can flush them only when they've actually been invalidated.
But until then, we have to flush on each request, in case a role
override was changed on a different app server.

Change-Id: I4479605b96a4fcf36a686033939be4a158aa9699
Reviewed-on: https://gerrit.instructure.com/2224
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Whitmer <brian@instructure.com>
2011-02-10 09:52:24 -07:00
Brian Palmer 9768c13341 put bluecloth in the correct gemfile group
Change-Id: Ic9f201d6bec3c7589957d1f3263c2b8507a8b237
Reviewed-on: https://gerrit.instructure.com/2241
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-02-10 08:44:41 -07:00
Bracken Mosbacker 2a38ddd91d fix qti plugin reload errors in development mode
Change-Id: Ia76b870d84e766dfa79992cfb854dc6383115abb
Reviewed-on: https://gerrit.instructure.com/2234
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: JT Olds <jt@instructure.com>
2011-02-09 18:43:03 -07:00
Brian Whitmer 065134fe9b saw some errors in error_stack... didn't know these lines could raise errors
Change-Id: I6c6b49cb72168a743a6b8e95091479bed7b6254f
Reviewed-on: https://gerrit.instructure.com/2223
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
2011-02-09 17:26:33 -07:00
Brian Whitmer 48723be3ea facebook plugin generating invalid urls
the default url for facebook authorization calls wasn't getting the
"http://" part sometimes, which is obviously a problem.

Change-Id: Iabc51056f81d8c427ffcbad8f20d215cfd724025
Reviewed-on: https://gerrit.instructure.com/2222
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: JT Olds <jt@instructure.com>
2011-02-09 17:00:27 -07:00