We decided this was extremely dangerous/error-prone and not that useful.
Change-Id: Ib0ff0c9d4ac8eeeb9d2088ed86be24991561a763
Reviewed-on: https://gerrit.instructure.com/3994
Reviewed-by: Zach Wily <zach@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
LDAP configuration now allows admins to set an
external URL to link to for the "I don't know my
password" link on the login page, instead of relying
on Canvas' default behavior.
fixes#4629
Change-Id: I3be2c810e1d6d773751c1a2f7c85a0059df1bc94
Reviewed-on: https://gerrit.instructure.com/3812
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
Added support for oauth 2 API requests. HTTP Basic
only works for Canvas-auth and LDAP accounts, but
oauth 2 will also work with SSO accounts. Also added
ability for users to create access tokens from the
profile page.
Change-Id: I13581b4e77bfa77bf11dbb732900012dd1e50ede
Reviewed-on: https://gerrit.instructure.com/3775
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
I also decreased the interval between adding the questions to the page,
the timeouts were excessive and made importing large banks take a very
long time.
Change-Id: Ia17d990c844f148ccd3d3c99d1fd6c7ee3938ff4
Reviewed-on: https://gerrit.instructure.com/3957
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: JT Olds <jt@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
Refs #4189
No need to create results synchronously in RubricAssociation#assess
just for Assignments - RubricAssessment#track_outcomes already
does that automatically. Just make it use send_later_if_production
instead of plain send_later so the spec still works.
Also, don't do the weird find_and_create in a loop to avoid a
minisculely possible race condition, to avoid creating two versions
off-the-bat.
Change-Id: If6948b9b4fae31782e47874ab1b1b6aa4dd8edb5
Reviewed-on: https://gerrit.instructure.com/3911
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: JT Olds <jt@instructure.com>
Extend simply_versioned to do explicit versioning, meaning keep
the last version up-to-date on save, but only create a new version
when explicitly asked to.
Change-Id: I922dcd5d6fe559a5a656c452131b535f55a2e3fa
Reviewed-on: https://gerrit.instructure.com/3894
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: JT Olds <jt@instructure.com>
Inside of user_content fields users can now build up
the structures needed to jQuery UI elements like tabs
or accordion. The system will check for elements with
the class name "enhanceable_content" and progressively
enhance those elements using jQuery UI calls.
Change-Id: Ic428deae1abe8527342a1ba57b52f19d67125e52
Reviewed-on: https://gerrit.instructure.com/3774
Tested-by: Hudson <hudson@instructure.com>
Tested-by: Selenium <selenium@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
the rubric may not actually belong to the current context. fixes#4579
Change-Id: Ia32cf7de207830eefdb55a274ecfac0de6584411
Reviewed-on: https://gerrit.instructure.com/3897
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Whitmer <brian@instructure.com>
Now when adding ?become_user_id=XXXX to a URL, the admin will be redirected to
a page where they confirm that they want to masquerade as that user. This is
to prevent people from being able to change who an admin is logged in as with
simple img links.
It also adds a "Stop Masquerading" link to the identity bar.
Thanks to Patrick Michaud for pointing this out. Fixed gh issue 22.
Change-Id: I196f9f1412022de371da7a8f4670bcd4a1c35653
Reviewed-on: https://gerrit.instructure.com/3904
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
the original commit was there because .find_elements
was broken in ff4 and IE but with the new version of
selenium-webdriver gem it works just fine. this is a
safer way of getting the element
This reverts commit ffefcc6005.
Change-Id: I7e7bca59d1b2a28e854a68eced50f6b0a683c277
Reviewed-on: https://gerrit.instructure.com/3809
Tested-by: Hudson <hudson@instructure.com>
Tested-by: Selenium <selenium@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
This is step 1. Once this is in production, we can drop the groups.type
column and all groups will revert to just being in the Group class.
Change-Id: I28cef0a2fe64236a3cfda031787c5e9fa36482fc
Reviewed-on: https://gerrit.instructure.com/3868
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
When cancelling out of creating a new quiz question,
it previously took two clicks to hide the form.
Change-Id: I0ff5ecc3b23ff5c2d716c5143d751bdb3070502a
Reviewed-on: https://gerrit.instructure.com/3820
Tested-by: Hudson <hudson@instructure.com>
Tested-by: Selenium <selenium@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
If IE sees any no-cache headers in a secure request, it won't be able to
download files that would be opened in a 3rd-party application. This is
because it will refuse to store the file in a temporary location (because of
the no-cache designation). For more information, see:
http://support.microsoft.com/default.aspx?scid=KB;EN-US;q316431&
We will just not send any cache headers for the file show action.
Change-Id: Id02b9bab9c6fe46b4e8f3d9198f8bb87d4b697f8
Reviewed-on: https://gerrit.instructure.com/3845
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
closes#4644
This information is protected according to FERPA rules.
Change-Id: Ib9fc87a6050dfc40d3e21373120150b9500b8343
Reviewed-on: https://gerrit.instructure.com/3836
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
It looks like the fast clicking is not always reliable, so now we wait for the
elements to disappear.
Change-Id: I3a6e2bd24df28d6a70943a8d896a149c58850b75
Reviewed-on: https://gerrit.instructure.com/3841
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
Tested-by: Selenium <selenium@instructure.com>
previous this was only supported for the main session cookie, not the
secondary psuedonym session cookie.
Change-Id: I4be70774baf49cfa1e3009ff6a83287c084a0e53
Reviewed-on: https://gerrit.instructure.com/3840
Reviewed-by: JT Olds <jt@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
so now you can do element.should have_class('my-class-name')
in your tests
Change-Id: Ief846da5cca0b397b3e9a69e387cabb16162676d
Reviewed-on: https://gerrit.instructure.com/3798
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
The option will still appear for existing quiz questions
that are set to that type, but no other questions will
be able to be created or changed to be "Missing Word"
questions anymore.
fixes#4091
Change-Id: Idc327fcce798f5d7f74583d7703954556edcf87d
Reviewed-on: https://gerrit.instructure.com/3819
Tested-by: Hudson <hudson@instructure.com>
Tested-by: Selenium <selenium@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Previously we were just checking every single attachment in the course, which
could take forever in the case of a course with many files. Now we walk the
file heirarchy, which should be much more efficient.
Change-Id: Iab131c7a41c78deff09a9b848eb5a59554f08ba3
Reviewed-on: https://gerrit.instructure.com/3808
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
So, we have several account level permissions, we just weren't
respecting them. Most notably is :manage_account_settings instead
of :manage, the generic permission.
Account users get all the generic permissions (:create, :read,
:update, :delete, :manage) because there are still lots of course
level things that check those permissions. We still want to keep
those intact until we fix all those other checks, so for account
level things we need to use specific permissions as much as possible.
Things that are either odd or not correctly checked (due to having
to work with courses as a context with the generic permission):
* Listing and searching Courses, and viewing Statistics, is
available to any account admin, because there aren't specific
permissions for them
* Rubrics are not linked to without :manage_outcomes, but are
accesible via direct URI
* External tools is available to any account admin
* Account reports uses the :read_reports permission, which is
described in the UI as "View usage reports for the course"
Change-Id: Ia0f9409659dfc421f1199f7c8ab93b43edcde511
Reviewed-on: https://gerrit.instructure.com/3735
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
IE will send an Accept: header that does not specify a preference for html, so
we need to make sure that the html rendering comes first. All other types are
explicitly requested, so the order doesn't matter.
Change-Id: I784b809754f8dd9fe3842f0cd3beecb04a17c7bc
Reviewed-on: https://gerrit.instructure.com/3789
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Instead of looking up the AccountUser directly by account and root
account, just ask the Account, which will follow the chain to the
root account, and the site admin account as well.
Change-Id: I4271561c69c4c353a4893a64ca2809cfb8b41c35
Reviewed-on: https://gerrit.instructure.com/3778
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
In this mode, any courses, sections or enrollments that aren't
referenced in the sis import will be deleted.
This is the back-end piece, support in the UI and API are coming next.
Change-Id: Ica634f9fa7008ef7b612c4ea43163792f5d54fa5
Reviewed-on: https://gerrit.instructure.com/3768
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: JT Olds <jt@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
This actually makes things worse... Who says that when we close the socket
after binding, that it will actually be immediately released? The best thing
to do is probably just to attempt to start the server, and catch the exception
if it can't bind, sleep, and try again.
This reverts commit 3c425c0cb7.
Change-Id: Iafca7b76cbdcc8ba17368d143dca361010a66ff4
Reviewed-on: https://gerrit.instructure.com/3773
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
- can attach a grading standard to a course
- interface for managing standards at the course
and account level
- added final grade to gradebook page
- added final grade to student grades page
- added final grade to gradebook csv export
fixes#3868
Change-Id: I555b9f66b621d8967e893e50a671748267da9373
Reviewed-on: https://gerrit.instructure.com/3025
Tested-by: Hudson <hudson@instructure.com>
Tested-by: Selenium <selenium@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
there was an issue where if you inserted equations into multiple
textareas on a page (e.g. two or more quiz questions), it would
usually only save the first one correctly (it depended on where
the caret was when the first one was inserted)
Change-Id: I8973dbe3a2f9f043a1616a9d24b5f15f757a2fdc
Reviewed-on: https://gerrit.instructure.com/3770
Tested-by: Hudson <hudson@instructure.com>
Tested-by: Selenium <selenium@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
Sometimes it can take awhile for the kernel to release the port that was
previously used. This will wait until we know it can be bound to.
Change-Id: I92a70e05865234c0d1dd78c6a63ec2282d48c19e
Reviewed-on: https://gerrit.instructure.com/2690
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Zach Wily <zach@instructure.com>
user_content will now work for any arbitrary RTE field, no matter if it
came from a column, a string nested three levels deep in a serialized
column, whatever.
let's call this technique "controlled XSS injection"
Change-Id: I56eed1f9b546ac7849dc60faa0f2b3801231131e
Reviewed-on: https://gerrit.instructure.com/3704
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
We render a list of folders to choose where to place a new uploaded file. With
a lot of folders that can be expensive, so we'll only show 2 levels. The long
term fix will be a more flexible content picker with ajax action.
Change-Id: Ia96e1a6886a17c6f1098ff59299cac5219e3fd62
Reviewed-on: https://gerrit.instructure.com/3711
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Rendering this partial on a course with lots of folders was taking a lot of
time. The helper should be much more efficient.
Change-Id: I55e603a9a19e04e0827f7f440fa80f58c50f59cb
Reviewed-on: https://gerrit.instructure.com/3710
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
This is permanent, if a stream item is updated it doesn't re-appear on
the dashboard. This is done by marking the stream item instance as
hidden, which means adding the hidden field to the two indexes.
Change-Id: Ifa544cef4ea2d46f4214e8317af4c9e3baed76eb
Reviewed-on: https://gerrit.instructure.com/3603
Tested-by: Hudson <hudson@instructure.com>
Tested-by: Selenium <selenium@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
I don't know if/how this test was working in the
past but i cannot get it to work on my local firefox
or on the selenium xp vm on bob. error thrown:
Selenium::WebDriver::Error::UnhandledError Exception:
com.google.common.collect.Maps$TransformedEntriesMap
cannot be cast to java.util.List
(java.lang.ClassCastException)
Change-Id: I679fc33f8dd02480a6cda4d92aed3320b8061290
Reviewed-on: https://gerrit.instructure.com/3675
Tested-by: Hudson <hudson@instructure.com>
Tested-by: Selenium <selenium@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
This alternate url can be used for strange setups where someone wants to wrap
their CAS login in an iframe. When logging in via this method, the iframe will
be exited after returning from the CAS server.
Change-Id: I53561f824451a8b7319c4a821aaada9a459e6226
Reviewed-on: https://gerrit.instructure.com/3669
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
There wasn't a good way in the interface to
disable a plugin other than the manually go through
and empty out all the text fields.
refs #4194
Change-Id: Ia095160323c907a43fb98f4f3fe85f1babf7eebc
Reviewed-on: https://gerrit.instructure.com/3544
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
refs #4487
This consolidates our ErrorReport class with our ErrorLogging mechanism,
it's all in ErrorReport now and you call ErrorReport.log_error or
ErrorReport.log_exception to both create an ErrorReport object, and call
the hooks similar to what ErrorLogging did so that plugins for other
error handling mechanisms can be injected.
ErrorReport has a category field now, similar to how ErrorLogging used
to take a type. the /error_reports UI can filter by category.
The plugin interface was designed with Hoptoad integration in mind, but
it should be pretty general.
Change-Id: I59f7a0d44cf4b6215ad13ff92d30e1d1af607b74
Reviewed-on: https://gerrit.instructure.com/3577
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
This should allow open source installs to now set up
their own Facebook apps if desired. The facebooker
gem is no longer required and configuration now
happens in a plugin instead of a yml file.
fixes#4509
Change-Id: Iec76dc8c31f0ad0276e992319f368826baa4ccc5
Reviewed-on: https://gerrit.instructure.com/3545
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
the attachment has its context set to the submission, which we don't
handle as a context anywhere currently. Rather than try to shoe-horn the
submission into a context role, we allow using the /files urls without
any context at all (we still check permissions on the attachment of
course). this fixes some safefiles issues as well.
Change-Id: Iec12b02f16f01f795f70a6f4ed8a152b7661e000
Reviewed-on: https://gerrit.instructure.com/3557
Tested-by: Hudson <hudson@instructure.com>
Tested-by: Selenium <selenium@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
An assignment can have a submission but no score, if that
happened the calculator dropped those submissions for
the final_grade instead of using a score of 0
closes#4491
Change-Id: Ic49816c887aec001ecdd9d99412dc588e2c891e6
Reviewed-on: https://gerrit.instructure.com/3552
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Whitmer <brian@instructure.com>
there was hidden brokenness that i exposed in a recent change
Change-Id: I02712d099a662bba672a2f1cc340b90d6164f177
Reviewed-on: https://gerrit.instructure.com/3529
Tested-by: Hudson <hudson@instructure.com>
Tested-by: Selenium <selenium@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
Students can now opt-in to receiving actual scores
in email/sms/facebook notifications about homework
grades. This ability can be manually disabled at
the root account level if necessary.
fixes#4479
Change-Id: I1b769bef140719578fa345ca519999a2834b00f8
Reviewed-on: https://gerrit.instructure.com/3473
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
gsub replacements need extra backslashes thanks to capture groups.
'\\\'' is the equivalent of $', which matches the string after the
previous match. so:
"'foo'".gsub(/'/, '\\\'') -> foo'foo
"'foo'".gsub(/'/, '\\\\\'') -> \'foo\'
Change-Id: If579316ac7665d5eb56b00eb93443c72e48d6d56
Reviewed-on: https://gerrit.instructure.com/3413
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
And show non-fatal errors to the importing user.
Change-Id: Ib1c28a3bedb0d7f0805c483721cf569db40d72c9
Reviewed-on: https://gerrit.instructure.com/3328
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
For some reason the click event on the other element isn't always triggering
the change event on the course id field. Hitting enter in the box more
reliably triggers it.
Change-Id: I33f465f05e0a7394dae1e515cdbda4a2917206a5
Reviewed-on: https://gerrit.instructure.com/3300
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
it wasn't clearing out a text field before typing, and it had a race condition
relying on the browser being slow.
Change-Id: I9024da2a67da99e1aef4486e156a13effd35e2dd
Reviewed-on: https://gerrit.instructure.com/3261
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
module content tags will rename a file if there is a
title set
closes#4343
Change-Id: I4e90921b8dab62b452f599135d683515bd342ba1
Reviewed-on: https://gerrit.instructure.com/3260
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
Sections can be manually cross-listed into another
course. Teachers/admins can use the search tool to
find a course, or manually enter it's id/sis_id
to select it as a destination. Cross-listed sections
and also be manually un-cross-listed.
fixes#3759
Change-Id: I65ac76c80e7cf2703ba3c5d4c63801b6b7a348a1
Reviewed-on: https://gerrit.instructure.com/3173
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
Module items that were tied to tableless class were getting the same
identifier, causing them to stomp on each other.
Change-Id: I577c7d3dbb86af7fb853b9548286841b7f001d03
Reviewed-on: https://gerrit.instructure.com/3236
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
added generic user_setting fu to conference classes so we can expose
conference-type-specific settings in the canvas ui
Change-Id: I37a30ad3643d358be1458f59da488f34f680bb8b
Reviewed-on: https://gerrit.instructure.com/3140
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Whitmer <brian@instructure.com>
this makes it so devices without flash (eg: iThings) can
view documents inline.
Includes a few other changes:
* add UI to account/settings page to enable/disable 3rd
party services (i.e. google docs previews, twitter, linkedIn)
-- you can disable these previews there.
* use DRYer API for embedding scribd docs this also makes
them ready if/when we switch to ssl
* open documents on show_preview page in a modal window
instead of inline in the list (which would grow a
little wider every time you mouse over it) fixes#4004
* use all available screen real-estate on files#show page
(before it would only use 400px of height).
fixes#4007
Change-Id: I0bb4b10c75c2217f35e0361bef61ca0b602533a9
Reviewed-on: https://gerrit.instructure.com/2662
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Whitmer <brian@instructure.com>
this commit fixes a bunch of problems with importing
a whole export package and updates the UI
refs #3396
Change-Id: Ia344b385e06df2f08bb75878234a7712a036e4b3
Reviewed-on: https://gerrit.instructure.com/3085
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
This imports the syllabus, rubrics, and modules
refs #3396
Change-Id: Ie7802aa5a064f8cee471af9bfe0a23bf224831a6
Reviewed-on: https://gerrit.instructure.com/3064
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
started the framework for importing the canvas flavored
common cartridge packages. There is also some minor
refactoring of the export step to allow for easy testing
of both exporting and importing
course settings, assignment groups, and external tools
are imported and tested with this commit
refs #3396
Change-Id: I4e8a2ebfc9df7e31f8859b189fea23f9584d7ef4
Reviewed-on: https://gerrit.instructure.com/3042
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Previously we were not skipping submissions for assignments that the user had
chosen to ignore. This change also makes sure that grade is set on the
submission as well as score. (Grade is usually set when score is, but not in
all cases.)
Also got rid of the "lookup assignment by name" fallback in the importer. This
could cause weirdness when a teacher had a deleted assignment in the
downloaded gradebook that they'd recreated with the same name. We are more
strict now about matching the assignments to what's in the course.
Change-Id: I980db994f5df77104a07e81c629a5800f3b40972
Reviewed-on: https://gerrit.instructure.com/2992
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
when you change the submission type for an assignment from
discussion_topic or quiz to something else and save, it
looks like the assignment is getting deleted.
fixes#3981
Change-Id: Ic9951b35afe9dc2d28eeb9a8f4ac0ff8c8bcaf13
Reviewed-on: https://gerrit.instructure.com/2543
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: JT Olds <jt@instructure.com>
Also added an explicit parse! method and made the processing of the CSV single
pass.
Change-Id: I0fdfefa5bae1c864d35da1c7975aa7691770a3e2
Reviewed-on: https://gerrit.instructure.com/2991
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
proactively found and fixed varchar(255)'s where we relied on mysql's
silent truncation. added validations for places where we want to
enforce these limits
made it so you can reuse titles/urls of deleted wiki pages, and added
validations to ensure sane urls and prevent orphaned pages
Change-Id: I15bcc0c7a751efba1a0f7548e9989ad2ea1792bf
Reviewed-on: https://gerrit.instructure.com/2935
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
The previous implementation had more random behavior, and would
partially give up after trying 5 times to reach an acceptable solution.
This new implementation is deterministic in deciding on the set of
possible candidates to assign from -- the only randomness is in choosing
from this pre-verified candidate set.
Change-Id: I27d247569de1dc8a6b00471c80d0287cab0da84d
Reviewed-on: https://gerrit.instructure.com/2930
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Whitmer <brian@instructure.com>
Teachers can specify that before students see any
messages in a topic they need to post at least once
in the topic themselves. This is used for
assignment topics or to help encourage students
to think for themselves instead of just posting
"what he said".
fixes#3871
Change-Id: I946b71ec47bfe135f06faff68598c6f19c088a27
Reviewed-on: https://gerrit.instructure.com/2370
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
closes#3958
This will be pretty slow for somebody who is a teacher in a lot of
courses, but I guess it's not any worse than the dashboard. We might
want to cache this eventually.
Change-Id: I26d68bc285fba0747cdc960a67b75e0329acb6cf
Reviewed-on: https://gerrit.instructure.com/2864
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
TextHelper#truncate_html doesn't appear to have this issue, because it
always splits and truncates on word boundaries (using String#split()).
Change-Id: I8bf301055818d7080d8e12859707458ba41e89f4
Reviewed-on: https://gerrit.instructure.com/2851
Reviewed-by: Zach Wily <zach@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
I also had to change the api spec stuff a bit, which caused some changes
in other specs.
Change-Id: I62e87fa4c9e79716455ca47ca342c9eec86ddc39
Reviewed-on: https://gerrit.instructure.com/2848
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
Each topic can now have its own podcast stream. Teachers
have to manually turn on the podcast for the topic, and
can specify whether student comments show up in the stream
or not.
fixes#3538
Change-Id: I19b1b44fc2eec864cfeb298163ef34a0b0181067
Reviewed-on: https://gerrit.instructure.com/2369
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Question banks can be aligned to outcomes that
are part of the same context. Whenever students
take a quiz with questions from the bank they'll
get evaluated for the linked outcomes based on
the points they got for each bank question.
Also fixed a bug which may or may not have existed
before this commit that unexpectedly deleted quiz
submissions when a user tried to re-take a quiz.
refs #3317
Change-Id: I744af3915672a5e260b078503e0bc648c238eca9
Reviewed-on: https://gerrit.instructure.com/2641
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Accounts can specify a destination email address or URL
endpoint that will receive messages as error reports are
created if the feedback button is enabled. This could
be configured before, but it wasn't straightforward
how to go about doing it.
fixes#3410
Change-Id: Ibd28ebf14c876fb216b14d3d56e622fc009aa2ba
Reviewed-on: https://gerrit.instructure.com/2739
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
- external tools can be added on the course/account
settings page
- external tools can be linked to from within modules
- clicking a tool in a module will load a new page
with the tool embedded in an iframe
- see context_external_tools for standard procedures
on retrieving settings for a specific link
fixes#4013
Change-Id: I8aa1934f8deac9af26d74036162b34fd1c4242e1
Reviewed-on: https://gerrit.instructure.com/2601
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
First, we were still occasionally getting shell expansion, so switching to the
other form of Kernel#exec fixes that. Second, we don't include ruby-debug in
the test modules (on purpose - we want tests to fail on an errant debugger
line left in.)
Change-Id: Ic18c73d248fd3d254112d79728c0bb824e95045e
Reviewed-on: https://gerrit.instructure.com/2666
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
This avoids a slew of redirects when a logged-in user hits "/". I've
added a 301 redirect from /dashboard to / for backwards compatibility.
If they're not logged in, they'll get redirected to /login. So the
visible behavior stays the same, it'll just be snappier for already
logged in users.
Change-Id: I1074d3e1f61033c9081b77cc2441211624ee2ec2
Reviewed-on: https://gerrit.instructure.com/2656
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Whitmer <brian@instructure.com>
If a teacher said students must view a file before
continuing, then the system needs to be sure to
mark the file as viewed whether it's actually downloaded
or just viewed inline. This wasn't happening
correctly.
Also DRYed up a few methods in the files controller.
fixes#4035
Change-Id: I5ed6fa6e556ed78d85319f99fe84ddee0b4d2033
Reviewed-on: https://gerrit.instructure.com/2640
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
Something about the way we were loading them before caused them to
not have the integration methods like get() and post() available. By
loading the base dirs and letting rspec auto-discover the files under
each base dir, we get better behavior.
Change-Id: Ice3a163ddb2311a02f3c125773b6ab05a0895814
Reviewed-on: https://gerrit.instructure.com/2592
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
User account associations were not being updated properly when updating pseudonym accounts multiple times.
Without this fix user account association updating breaks when the pseudonym account gets updated multiple times in a row
For ex.
pseudonym.account = account1
pseudonym.save
pseudonym.account = account2
pseudonym.save
After running the code above the update_user_assocations code would update the user association to point to the first account instead of the second account.
Change-Id: I0f2666458cd9b1e54afb52d26e2b4ec858dccd26
Reviewed-on: https://gerrit.instructure.com/2589
Reviewed-by: Brian Whitmer <brian@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
or an attachment.rb/attachment_fu rewrite. this is easier
Change-Id: I1140e089671bbefb973cef5a0859976ef367d802
Reviewed-on: https://gerrit.instructure.com/2499
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
if you try to delete an assignment group that still has
active assignments in it, it'll pop up a dialog where you
can choose either to delete the assignments in the group
or move assignments in the group to another group.
fixes#3403
Change-Id: Ie7bc0617ac5b639c946e347950e7d550b27ca384
Reviewed-on: https://gerrit.instructure.com/2495
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
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>
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>
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>
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>
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>
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>
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>
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>
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>
- 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>
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>
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>
We check responds_to?(:context) on many objects in our app, to duck type
context-owned objects. So in test mode when rspec is loaded, this causes
a lot of issues since every object ends up responding to :context.
Change-Id: I97f804e696e0e553b6fc7ef9b0700d0bdea7e9b2
Reviewed-on: https://gerrit.instructure.com/2221
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: JT Olds <jt@instructure.com>
This also prevents blank wiki pages from being created
when there are unsupported import types
closes#3739
Change-Id: I6c1aa7f34de07db83d6c45d134c5e967dc7506d9
Reviewed-on: https://gerrit.instructure.com/2195
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: JT Olds <jt@instructure.com>
- if you change the points possible for an assignment, the
'grade' column for submissions is no longer accurate.
This fix makes sure the grade column stays up to date (but
does not update any old versions of the submission)
- if you have a letter grade assignment, we should accept
lowercase versions of the grade if there's not an exact
match.
Change-Id: I6277c9a216e23bd068fc0381cac1da2e9d718d1a
Reviewed-on: https://gerrit.instructure.com/2193
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>