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>
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>
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>
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>
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>
the tmp file was getting closed before FileInContext does its thing.
Change-Id: Ib2145552e18f9162c0ae87e5626bb5c6a12a3a0b
Reviewed-on: https://gerrit.instructure.com/4772
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
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>
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>
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>
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>
These were found missing by watching the log of unindexed queries.
Change-Id: I1823eeb5e5e7dfc4351ced92a5a354aac05d97eb
Reviewed-on: https://gerrit.instructure.com/5261
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
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>
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>
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>
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>
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>
* 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>
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>
There are some places where we might call datetime_field() on a field twice.
That causes the field to double its date when it's submitted. We can also just
be careful when calling datetime_field(), but I'm not sure there's a valid use
case for calling it twice, given how much it jacks up the control.
fixes#3818
Change-Id: I79987486efeb5c77497183a41251a6990747fd52
Reviewed-on: https://gerrit.instructure.com/2291
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Reviewed-by: Brian Whitmer <brian@instructure.com>
Tested-by: Zach Wily <zach@instructure.com>
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>