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>
a rubric should only be deleted once it's not
being used anymore. It should only be unbookmarked
from a given context when it's not being used in
that context anymore.
fixes#3309
Change-Id: Icb8a79baeb0c0ec2195b7e19b1d9768eadfeb97e
Reviewed-on: https://gerrit.instructure.com/2518
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: JT Olds <jt@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
An API request is defined as any path beginning with /api
Change-Id: I715a0b63bbe1d6025cab9cf5b2f1bd062b321eab
Reviewed-on: https://gerrit.instructure.com/2562
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
Reviewed-by: JT Olds <jt@instructure.com>
I removed the api_routes plugin, since the code is currently too tied to
canvas to be pulled out into a generic plugin anyway. The yardoc
templates now live in doc/templates, and I've done some major cleanup
and refactoring -- they don't have much in common with the default YARD
templates anymore, and they work much better as API documentation.
The styling is now a little bit more "canvas-like" now, too.
Change-Id: I80edd02e63d7815a292306741f2e8ea52872aae2
Reviewed-on: https://gerrit.instructure.com/2535
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: JT Olds <jt@instructure.com>
even if a user isn't logged the next/prev buttons
should still show up... they do everywhere else
fixes#3929
Change-Id: I8415b17bcb00c3c8b5b845919f892ac13dc3c58e
Reviewed-on: https://gerrit.instructure.com/2470
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
I don't think objects or embeds will work on this page, but this will at least
make the page load.
Change-Id: I3c2062709885748010416340b6b8a1263b67f6c6
Reviewed-on: https://gerrit.instructure.com/2566
Reviewed-by: Zach Wily <zach@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
the gradebook page has a progress bar which currently
waits until all data for the gradebook is loaded before
hiding the progress bar and showing the datagrid.
Seems like it makes more sense to show the gradebook
sooner and just populate it as data comes in so at
least it's partly usable. This is a minor change right
now, but it'll make it possible to do more lazy
loading of the gradebook in the future.
fixes#3955
Change-Id: Ie4f486bdc0dd1373d4119822ec706fcdbd329b2f
Reviewed-on: https://gerrit.instructure.com/2501
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
It looks like all the formulas were getting concatenated
into a single formula on save.
fixes#3980
Change-Id: Ibefc62621b684de180ca15567694bda0f5a8221d
Reviewed-on: https://gerrit.instructure.com/2542
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
- got rid of a bunch of rescue statements
- gradebook remembers hidden columns
- attendance columns are hidden in the gradebook
by default, with option added to show them
refs #3263
refs #3264
Change-Id: I786ad2c8d6795d4de3f6d279cde601d95d77091a
Reviewed-on: https://gerrit.instructure.com/2500
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Ryan Shaw <ryan@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>
there's a user_content enhancement that tries to prevent
giant images from messing up the page layout, but it
wasn't working for quiz content.
fixes#3300
Change-Id: I3a7c0dec84fe0bb552c5a90b5ec2fb7c53c599fc
Reviewed-on: https://gerrit.instructure.com/2498
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>
if it's not the current user, put the user's name in
the breadcrumb on the quiz history page instead of
just "History".
fixes#1261
Change-Id: I71f413aec3e405f59e32ff35ac1de19f22110ab3
Reviewed-on: https://gerrit.instructure.com/2464
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
also did a code cleanup while I was at it
fixes#3697
Change-Id: I5bd161bda243a33aa1666fce48d6f58dfca061e4
Reviewed-on: https://gerrit.instructure.com/2150
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
This is super performance sensitive, so we're throwing best practices
out the window a bit here. Hopefully someday we can integrate this into
our security framework better and remove this duplication of logic.
Change-Id: I845db50ffab02769d91272fdc0ce3825d9a670c1
Reviewed-on: https://gerrit.instructure.com/2488
Reviewed-by: Zach Wily <zach@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Whitmer <brian@instructure.com>
we no longer support this functionality, but the option
never got removed.
fixes#3944
Change-Id: Id68be09ea0f7636873dd641e608f31c74caf68fa
Reviewed-on: https://gerrit.instructure.com/2477
Reviewed-by: Brian Whitmer <brian@instructure.com>
Tested-by: Hudson <hudson@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>
the link really was kind of hard to find
fixes#3227
Change-Id: Ia6ee04e944336f60cd2061ec9a44194c46511e31
Reviewed-on: https://gerrit.instructure.com/2476
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Mark Suman <marks@instructure.com>