Commit Graph

1162 Commits

Author SHA1 Message Date
Jon Jensen 04855677a0 show number of recipients in course/group
also ported activesupport pluralizations to javascript (useful for
i18n en/default fu)

Change-Id: I9c46c29663b7d73f89732cad5b017e176e9920c4
Reviewed-on: https://gerrit.instructure.com/5291
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
2011-08-29 16:25:07 -06:00
Jon Jensen b2b21a794b account-level question banks, closes #5025
phased out AssessmentQuestion#context, did some ground work for #5026
and #5027

Change-Id: Ice4567a0f069dd49da8ce57bf0c8325b0b062115
Reviewed-on: https://gerrit.instructure.com/5303
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Reviewed-by: Brian Whitmer <brian@instructure.com>
2011-08-29 16:24:49 -06:00
Brian Palmer 7fa0ff9663 conversations are teacher interactions, fixes #5437
Change-Id: I03aebdee626ae8300acf0973a97d0ba69f5098f5
Reviewed-on: https://gerrit.instructure.com/5326
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-08-29 14:03:50 -06:00
Jon Jensen 432283d3e7 bump question_data size, limit possible combinations. fixes #4953
Change-Id: Ic716425680c2c50a0c960d391104fc5502d4fafd
Reviewed-on: https://gerrit.instructure.com/5282
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-08-29 13:37:09 -06:00
Zach Wily f394576f82 expire the home menu html cache after 15 minutes
This means there may be a delay of up to 15 minutes between when a course
starts and when it shows up in the dropdown for a student. This will be fixed
when we have a central cache and better invalidation.

Change-Id: I377a22609963979ade9fae7e0ced4b7c2c48a368
Reviewed-on: https://gerrit.instructure.com/5315
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2011-08-29 12:54:32 -06:00
Brian Palmer ba7be770fa support fractional values in grading schemes, closes #5397
this required changing the data format, so a version column is added to
the table and backwards compatibility code is included. import/export is
aware of this as well.

Change-Id: I753060a6886e3896cbfbad69d16bcc2f1310d466
Reviewed-on: https://gerrit.instructure.com/5296
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-08-29 12:04:28 -06:00
Brian Palmer 188ace58f0 don't error out if a stream item's assignment is hard deleted
Change-Id: I1b7976a68b5e2bebf7fe6b5d7db065024e3141ec
Reviewed-on: https://gerrit.instructure.com/5317
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2011-08-29 11:05:16 -06:00
Brian Palmer 2570dae41a fix letter grade rounding of fractional grades, fixes #4879
Change-Id: I17e89fc8705795541375139e4e3b934abaea136c
Reviewed-on: https://gerrit.instructure.com/5286
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-08-29 11:05:06 -06:00
Jacob Fugal 0e359b5f14 parse in user timezone on discussion topic update
fixes #5398

Change-Id: I139ce3d148ffe841a764c852b7431fd3798fd84a
Reviewed-on: https://gerrit.instructure.com/5312
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
Reviewed-by: JT Olds <jt@instructure.com>
2011-08-28 20:24:29 -06:00
Cody Cutrer 7ec1eed536 only touch courses once when updating terms and overrides
refs #4996

Change-Id: I9e269753619fe1af5595f552ab57bf55b768247a
Reviewed-on: https://gerrit.instructure.com/5305
Reviewed-by: Zach Wily <zach@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-08-26 22:55:03 -06:00
Zach Wily 8570bdf250 invalidate enrollment date restrictions based on course
Previously we had to touch every enrollment in a term when the dates changed,
which was too much database activity. Now we just do courses, with the
downside being a little more work loading the course to do the enrollment
check (hopefully it's normally loaded anyway).

Change-Id: Idc3500c141b2e09c1940bc30f51880b59e064c83
Reviewed-on: https://gerrit.instructure.com/5304
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: JT Olds <jt@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2011-08-26 22:17:17 -06:00
Brian Palmer 0460765570 set a max-height on conversations body text area, fixes #5313
Without a max-height, elastic.js will just keep growing the textarea
indefinitely, growing it right off the bottom of the screen (and
scrolling is disabled on the page, so you can't scroll around it).

Change-Id: I361bab4b0cab42f70d2fdd26c21136b78838d6f4
Reviewed-on: https://gerrit.instructure.com/5301
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-08-26 16:55:35 -06:00
Cody Cutrer 805d605d5c optimize sub_accounts page
Avoid n queries for sub_account counts and course counts; instead do
a single query of each type for all visible accounts (if necessary;
sub_account count might be inferred from loaded sub_accounts)

Change-Id: I46aa607f485eda8e48effefe0c5ae72ee383ac80
Reviewed-on: https://gerrit.instructure.com/5295
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-08-26 16:16:56 -06:00
Zach Wily ef43714e82 fall back to term dates when an override exists but has nil dates
Change-Id: I4f7e81e4bd8e72bbaf6cc5128575e3841ee2f259
Reviewed-on: https://gerrit.instructure.com/5289
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-08-26 11:46:13 -06:00
Ryan Shaw 60b63648df don't show crumbs on dashboard
Change-Id: If63cf2ad12dfce81d8647ed9ac8e39d9f5168e8f
Reviewed-on: https://gerrit.instructure.com/5080
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Whitmer <brian@instructure.com>
2011-08-26 10:15:12 -06:00
Cody Cutrer 1f8d6ce158 :read_reports should control access to access reports
fixes #5096

Change-Id: I4b08c11dfb385ea4ddd36680a7f239a127edcb55
Reviewed-on: https://gerrit.instructure.com/5275
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-08-26 08:03:00 -06:00
Cody Cutrer 54d6fe4b2c fix some permissions checks refs #4952
need specific :manage_courses to change course's term or department
rather than generic :manage

Change-Id: I0bc841d4cb1f948abad26a37759957c43f7f564b
Reviewed-on: https://gerrit.instructure.com/5274
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-08-26 08:02:52 -06:00
Jacob Fugal c6dd22a4c3 show course items aligned to account outcomes
when displaying the aligned items to an outcome at the account level,
include items defined in any courses associated with the account.

also, finish killing off vestigial alignment reordering at the account
level

fixes #5140

Change-Id: I7ce8250d707f8a1283b130801f1d7c0ca7e0fe26
Reviewed-on: https://gerrit.instructure.com/5276
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-08-25 16:43:55 -06:00
Jon Jensen 1247d10f30 wimba advanced settings link, closes #5291
Change-Id: I63b00d6ca1dc5bd949e07084cbf11057201917fa
Reviewed-on: https://gerrit.instructure.com/5264
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
2011-08-25 15:11:52 -06:00
Cody Cutrer 556b5cdc66 allow teachers access according to course OR term dates
refs #4996

Change-Id: Ia20b265eb098195280f1ab07340925c47532f4ac
Reviewed-on: https://gerrit.instructure.com/5269
Reviewed-by: Brian Palmer <brianp@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-08-25 14:08:03 -06:00
Bracken Mosbacker 15c6635af0 allow importing question bank packages with the same ids
A qti-specific import allowed this before, but now it can
be configured for other migration types

closes #5044

Change-Id: I96e63725ca42937980c73f80f794848848cd59b1
Reviewed-on: https://gerrit.instructure.com/5268
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-08-25 14:00:31 -06:00
Brian Palmer 158fe8c10d fix respondus qti imports feedback positioning, closes #5302
put it on the individual answer or the question as appropriate, and
don't put the correct answer feedback on both the correct and incorrect
question feedback.

Change-Id: I63671d2c6ee6caa63e0e17b0d37c13ad3725cfef
Reviewed-on: https://gerrit.instructure.com/5251
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
2011-08-24 20:51:58 -06:00
Jon Jensen 032f40765d account-level option to disable eportfolios, closes #5169
also tweaked named_context_url to work better with UserProfile
contexts

Change-Id: If16ef16db507c8713436d0d88a1867f206ecdf48
Reviewed-on: https://gerrit.instructure.com/5225
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
2011-08-24 17:38:06 -06:00
Jon Jensen f97772ae0d fix wrong hostname in message emails
root account is now tracked as the ConversationMessage#context

this also fixes a bug where these emails didn't include the footer

Change-Id: If5db3839f65fc68625497a7c8d2ee0f0be682115
Reviewed-on: https://gerrit.instructure.com/5246
Reviewed-by: Zach Wily <zach@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-08-24 15:30:37 -06:00
Brian Palmer 9aad6b193f fix safefiles not setting session permissions properly
The specs didn't catch this because our user_session spec helper stubs
out PseudonymSession, so you'll have the user session available even if
you make a request to a different domain name, so the normal user
permissions were being applied. I've upgraded the specs to make sure
that the user isn't getting logged in on the safefiles
request.

Change-Id: I01b64a87bb51fbf2e947f5c2a1ae5471d1f1e216
Reviewed-on: https://gerrit.instructure.com/5244
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-08-24 15:17:20 -06:00
Brian Palmer 99d4540804 limit maximum per_page in api calls
Change-Id: Ia22e751b9430fd8f019bff7fcd406340c0532c2f
Reviewed-on: https://gerrit.instructure.com/5194
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-08-24 15:16:16 -06:00
Jon Jensen 8f8e7be519 prevent arbitrary profile viewing
Change-Id: I9db2ed670e4d7089149c07136ae9f12cea5d1502
Reviewed-on: https://gerrit.instructure.com/5249
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-08-24 15:07:01 -06:00
Zach Wily ef4282b4df fix looking up enrollment status with no course or section; refs #4996
Change-Id: I98b0dfd2ba641e996843a1c2ec9f2872ea91c081
Reviewed-on: https://gerrit.instructure.com/5248
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-08-24 14:30:15 -06:00
Cody Cutrer 167738fd16 really fix creating new terms
refs #4996

Change-Id: I978707ca64ffef39b650ed3d78a267af600427a5
Reviewed-on: https://gerrit.instructure.com/5245
Reviewed-by: Zach Wily <zach@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-08-24 14:10:16 -06:00
Cody Cutrer 540eb74e58 fix saving new terms refs #4996
Change-Id: Icae6cbd57d9f7c724e0f94c33b3c9cf27fc897de
Reviewed-on: https://gerrit.instructure.com/5240
Reviewed-by: Zach Wily <zach@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-08-24 12:38:48 -06:00
Cody Cutrer b6be7f19e7 clear out the wiki when resetting course content refs #4583
need to delete the WikiNamespace and the cached ref to the particular
wiki on the course.

Change-Id: Ia71b34b7a72974ddb2a8c1fb3f02538184f09160
Reviewed-on: https://gerrit.instructure.com/5239
Reviewed-by: Zach Wily <zach@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-08-24 12:37:04 -06:00
Cody Cutrer caae827136 alerts, closes #4317
* Daily job to evaluate alerts
   * Spawns a new job for each root account (for parallelization).
     It could be broken down to per-course level if needed (i.e.
     if there is a *huge* root account).
   * Evaluating criteria at a course level using efficient queries.
 * UI for CRUD on alerts
   * Render existing alerts
   * Delete existing alerts
   * Create a new alert
   * CRUD for criteria, recipients, repetition
   * Validations
 * Improve instructure_helper's formErrors to support passing errors
   for specific elements
 * Improve Rails' :include to be able to :exclude an :include
   inherited from a named scope
 * Specs!!
 * Note that we want to slowly roll this out, so there is a setting on
   root accounts to enable it

So I ran an alert with just an interaction criterion on a test
cluster against 50,000 courses, and it took less than 10 minutes
without any parallelization.  That seems like acceptable
performance to me (since there are only just over 3000 courses
in production that would even be elligible to have alerts sent
right now).  Of course, that's probably skewed because I'm sure
a bunch of those 50,000 courses were essentially empty.

Change-Id: Ie028ef206c9155b9a72fb2a820f3e0e516de562a
Reviewed-on: https://gerrit.instructure.com/4799
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-08-24 10:19:44 -06:00
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
Cody Cutrer 9c491b5ee1 speed up accounts' courses tab
don't load all associated courses into memory just for a count

Change-Id: I9d67d8297fcaf8c5289ff1f85cc4613e6c9b50c7
Reviewed-on: https://gerrit.instructure.com/5235
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: JT Olds <jt@instructure.com>
2011-08-24 10:00:31 -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 f673176f01 fix deleting ajax-loaded questions from question banks
fixes #5004

Change-Id: I79e31ac3569fedd1ca7e14c62dfea6964d730e8c
Reviewed-on: https://gerrit.instructure.com/5223
Tested-by: Hudson <hudson@instructure.com>
Tested-by: Selenium <selenium@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-08-23 15:58:39 -06:00
Brian Palmer b4de1b0e37 account list/show apis, for account_users
Change-Id: I787d05965b6dc5cee461f1b3041418de89d5304f
Reviewed-on: https://gerrit.instructure.com/4964
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-08-23 15:51:46 -06:00
Brian Palmer 21d7337a7f include basic user info in oauth response, closes #5247
Change-Id: I701c8e0517eaf78c334d059ca9a6db1ebf03c52e
Reviewed-on: https://gerrit.instructure.com/5199
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Mark Suman <marks@instructure.com>
2011-08-23 15:31:18 -06:00
Ryan Shaw f9892cd70d dont render wiki_page body at all if it was deleted
Change-Id: I15d765572fdbd5cfa36160839bc7a2e7d9a5ed20
Reviewed-on: https://gerrit.instructure.com/4727
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-08-23 15:19:56 -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
Ryan Shaw 544ffa0422 No % sign in Quiz Statistics
Change-Id: I7acb7cf8750159f766fd682b521f1c42dc1428e6
fixes: #5356
Reviewed-on: https://gerrit.instructure.com/5205
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
2011-08-23 12:01:48 -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
Ryan Shaw 5f51a08e9e fix submitting assignment using already uploaded file
this was because it was considering <input type="file">'s
that had no value.

Change-Id: I079308a5d72ea69ddaff61c4ad487aa2973f6cb4
fixes: #5353
Reviewed-on: https://gerrit.instructure.com/5200
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
2011-08-23 10:19:17 -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
Brian Palmer 09aebeade0 typo causing import buttons to disappear
Change-Id: I334d7ba797c3105f8dc801160752eb8b47b2dafb
Reviewed-on: https://gerrit.instructure.com/5204
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-08-23 09:11:29 -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 8825d83258 fix linkify issue
Change-Id: Iad7b48bfa653f6403c39c177cacc7dbe3db12258
Reviewed-on: https://gerrit.instructure.com/5216
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-08-22 21:34:29 -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