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>