Test plan:
(We need two users here because Canvas doesn't notify you about
files you upload yourself. We'll call them Student and Teacher
here, but they don't actually have to be these things.)
* As Student, enable notifications for new files in Profile.
* As Teacher, upload a file.
* Within an hour or so (everything about notifications occurs
in low-priority background tasks), Student should receive
a notification for the file.
* As Teacher, upload multiple files.
* Student should eventually receive a notification that
X number of files were added.
Note that files are batched over a five-minute period; that is,
if a file is added to a course within five minutes of a previous
file, it will be counted in the same batch.
Change-Id: I09b5f497cae1d726b7aaf85824e98e69e45b0c1b
Reviewed-on: https://gerrit.instructure.com/12346
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
other changes:
- makes it possible to add a student to multiple sections in the course
- pagination of the user lists
- converted user tab js to coffee and backbone
test plan:
- as a teacher go to /courses/*/settings#tab-users
- verify that multiple students can be linked/unlinked to an observer
- verify that users can be added to and removed from multiple sections
- verify that 'Resend Invitation' and 'Remove from course' work
Change-Id: I0f64f72f1937348817990b6f13b6310185b68a73
Reviewed-on: https://gerrit.instructure.com/10865
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Joe Tanner <joe@instructure.com>
fixes#6227
test plan: Make a non-SIS course. Verify that teachers and designers can
still delete and reset the course, but TAs cannot.
They shouldn't see the buttons to do so, either.
Change-Id: I413a7646eaf7132b6b41d51bce4b05bb1b490b1c
Reviewed-on: https://gerrit.instructure.com/12151
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
fixes#8845
originally, this issue was that if a student was concluded from a course
they would still show up in the list of students to be added to both
collaborations and conferences. this commit fixes that and also prevents
the student view student from showing up in the list of students when
creating a new conference.
test plan
- be a teacher in a course with a few students and collaborations and
conferences enabled
- go to a collaboration and a conference and see the students listed
there (when starting a new collaboration/conference)
- conclude a student from the course
- click student student view, then leave student view
- back in the collaborations and conferences, the concluded student
should no longer be listed, and test student should not be listed
Change-Id: I08da39a79ef1508e53064adf54bfacac0c527457
Reviewed-on: https://gerrit.instructure.com/12100
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Sam Olds <sam@instructure.com>
test plan:
* create two courses via SIS CSV
* enroll a user in course 1 via SIS CSV by course_id only
* xlist course 1's default section to course 2
* enroll another user in course 1 via SIS CSV by course_id only again
* the user should end up in the xlisted section in course 2
Change-Id: I3a114d70a109594a56915b705de77b87a177e966
Reviewed-on: https://gerrit.instructure.com/12122
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
fixes#9159
the student view student was showing up as one of the users listed on the
collaborations page, but adding the student view student to a collaboration
resulted in an error. this simply removes the student view student as an option
on the page and disallows the student view student from using collaborations.
test plan:
- in a course with collaborations enabled
- enter student view
- go to the collaboration page, you should receive an unauthorized message
- leave student view
- go to the collaborations page
- the student view student should not be in the list
- select all and create
- the collaboration should work
Change-Id: I574f4f2caa6b0627dcd1a91acd4cb3699be4583a
Reviewed-on: https://gerrit.instructure.com/11927
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
fixes#8360
there was a race condition where the delayed job that was created after
a submission was graded or an assignment's points were changed could have run
before the original transaction finished, meaning it would have recomputed the
grades with an incorrect score. this ensures that the delayed job is not
created until after the transaction commits.
test plan: this is difficult to test, and was confirmed using timing data from
logs, but you could try setting a breakpoint in the old code after the delayed
job was created in the callback and confirming that it ran with old data.
Change-Id: Iaff08f080702df6e0817a2075898428bfd19e67e
Reviewed-on: https://gerrit.instructure.com/11960
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
test plan:
- make a course publicly available
- try to view its syllabus page without being logged in
Change-Id: I16c39a47006669c847ca57508fb4752769aa95f1
Reviewed-on: https://gerrit.instructure.com/11886
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
test plan:
1. create a course
2. enable self enrollment
3. reset the course
4. it should work
Change-Id: Ib9c1f1b971538d0277e42a31d4b441b49be21146
Reviewed-on: https://gerrit.instructure.com/11810
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Joe Tanner <joe@instructure.com>
test plan:
* add two sections to a course
* add a teacher or ta to a section, and limit them to that section
* as that teacher, go to GB2
* you should not be able to view any enrollments outside of that
section
Change-Id: I3d7dd17828cb79aaf162b0947640e2fa7da7952d
Reviewed-on: https://gerrit.instructure.com/11705
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
test plan:
* enroll a limited teacher, and a student in a different section
* download the csv as that teacher; it should not include the
student
Change-Id: I46af8f5d4bbf03e6c921bdd4269900d33e28b112
Reviewed-on: https://gerrit.instructure.com/11714
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
fixes#8750
they will automatically transition to invited when the course is published
test plan:
* invite a student to an unpublished course via the api
* the student shouldn't get a notification
* publish the course
* the student should get a notification
Change-Id: I16795085acd4198b54ec5cf440335845f733c195
Reviewed-on: https://gerrit.instructure.com/11664
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
This fixes an tricky condition where setting the sis_course_id in the course
create api only worked if you were also passing the offer => true parameter.
This was because offering the course caused the workflow state to change, and
the object to be saved without validation first, which set up the root account
needed for the real save which validates the uniqueness of the sis_course_id
using that root account. Since validations happen before before_saves, when
offer wasn't present and the first save tried to do validations, they failed.
test plan:
- hit the api course create endpoint with an sis_course_id and without the
offere parameter
- it should succeed
Change-Id: I8fdfa5654c5a5a06609418224e96ee6aef0628da
Reviewed-on: https://gerrit.instructure.com/11642
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
test plan:
* ensure current specs pass, and no functionality changes
Change-Id: I7296f63421eb8041c1f33277244e6b745197e972
Reviewed-on: https://gerrit.instructure.com/11619
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
The lookup for copied files was only getting the filename
of copied files instead of the whole path.
Test Plan:
* In a wiki page link to a file in the course in a sub-folder
* change the link to be like /courses/###/file_contents/course%20files/sub_dir/file_name.jpg
* Copy the course. The image should appear in the new course and the src= should be like /files/###/preview
closes#7736
Change-Id: Ib2510fdf587399f54f896774a346acbd1992f2d5
Reviewed-on: https://gerrit.instructure.com/11154
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
test plan:
1. sign up as a teacher
2. sign up as a student with a course code
1. confirm that you are auto-logged in as soon as you submit valid info
in the form
3. sign up as a student without a course code
4. sign up as an observer
1. confirm that you are auto-enrolled in the child's courses
5. test the log in form
Change-Id: I581de48095e85ca869b9ded101fe143ffadb9c9a
Reviewed-on: https://gerrit.instructure.com/11111
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
this adds show/create/edit/delete api actions for groups. currently create
only allows creating community groups. the changes to these controller
functions should be backwards compatible with course and student groups.
anyone should be able to create a community (for now), but only moderators or
account admins are allowed to edit/delete them.
test plan:
- test the four api actions from the command line
- make sure managing course and student groups still works (there should be no
visible changes here)
Change-Id: I9cac73ab434b0ba464ecfe399ab42174eff9b48a
Reviewed-on: https://gerrit.instructure.com/11148
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
The settings for the course grading scheme, hiding the
final grade, and the storage quota weren't being copied.
Test Plan:
* On course settings increase file storage limit, set a course grading scheme, and select option to hide totals in student grades summary
* Copy course, make sure option to copy settings is selected
* On new course, check that all properties are set
closes#8541
Change-Id: I3cb9b84b425412412e04eddf8a8a8448970e9d5b
Reviewed-on: https://gerrit.instructure.com/11078
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
adds a 6-character self enrollment code. the longer version is still
supported (since links may be in the wild). courses that already have
self enrollment enabled will get a new 6-char code when someone self-
enrolls or goes to the course settings page.
test plan:
1. on the old code, create a course and enable self enrollment
2. save the self enrollment url (for step 6)
3. on this new code, go to the course settings page
4. confirm that you see the new 6-char code in the link
5. confirm that the code was saved on the course (check db or console)
6. as a student, confirm that you can enroll using the old link
7. as a student, confirm that you can enroll using the new link
8. create another course and enable self enrollment
9. as a student, confirm that you can enroll using the new link
Change-Id: I6d549b50febc3dcb596a7c6b882701aa58b5441b
Reviewed-on: https://gerrit.instructure.com/10835
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Jon Jensen <jon@instructure.com>
fixes#7202
test plan:
* Use postgres
* Have pg_collkey installed
* Add users whose last names are subsets of each other
* Grade CSV, speedgrader, accounts page, etc. should sort them correctly
(shorter last name first; case insensitively)
Change-Id: Idec2a9f0e89c4f4479b4fd54136291273ba49ad9
Reviewed-on: https://gerrit.instructure.com/10497
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Mark Ericksen <marke@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
test plan:
* import a course via SIS
* publish and conclude the course via the UI
* re-import the course via SIS (still 'active') status
* the course should stay concluded
Change-Id: Ieba993d1aac65a3e0872edec5deda2731f70e165
Reviewed-on: https://gerrit.instructure.com/10422
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
* add the foreigner gem so plugins can begin adding foreign keys
immediately
* add an extension to do less locking when creating foreign keys
on postgres 9.1+
* fix a few pieces of code that either don't properly clean up
foreign dependencies, or create objects in the wrong order
to maintain referential integrity
* change the specs to truncate all tables in a single command
for postgres (to avoid referential integrity errors; also
slightly faster)
test plan:
* no user visible functionality should change
Change-Id: I185e478b99fbe598d408912053c34a064aa9c461
Reviewed-on: https://gerrit.instructure.com/10580
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
test plan:
* enable grade publishing for an account, using instructure_csv format
* set up some endpoint to publish to
* publish grades for a course
* ensure course_id and course_sis_id are sent to the endpoint
Change-Id: I480c50f3e9ae4dc277fc5b69810b60402773dbad
Reviewed-on: https://gerrit.instructure.com/10634
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Don't create a new attachment if there is one already that
is just deleted
Test Plan:
* Run specs
Change-Id: I0ba43bb181d15bf56a7b0fd66affb8a60b11abd1
Reviewed-on: https://gerrit.instructure.com/10585
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Test Plan:
* Set the syllabus body, navigation settings and default view for a course
* copy the course without selecting the course settings option
* those items should not be copied into the new course
closes#8391
Change-Id: Idd0efe85273d23881a3f3bfd0e04eb226d505a08
Reviewed-on: https://gerrit.instructure.com/10433
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Test Plan:
* Create an assignment before a daylight savings shift, like Jan 5 12pm
* Copy the course and shift the dates so they go past the shift, like Jun 5
* The copied date should be at the same time of day as the original
closes#8312
Change-Id: Ic5f974c399b050b7cf841d663fa881a77f309b1c
Reviewed-on: https://gerrit.instructure.com/10460
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
fixes#8389
test plan:
* create a course
* invite and accept a teacher (or create and add a teacher via SIS)
* change the dates for the term the course is in to the future
* the teacher should not be able to get read-only access to the course
Change-Id: I0474e6d5a46fd3b95a319281d18f9115371c8d75
Reviewed-on: https://gerrit.instructure.com/10425
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
closes#7561
Test plan:
- create some appointment groups:
- make one with multiple courses
- make one with a course, and then add more courses after saving
- make one restricted to some (not all) sections in a course [1]
- make one that has students sign up in groups [1]
- make sure that only students that match the above criteria are able
to see/reserve those appointment groups
[1] you can only choose the group-signup option or restrict
appointment groups to certain sections on creation (these options
won't be availabe when editing later)
Change-Id: I1cff5fb4ed233882c2061f8fd8a7ba6f2d4959b0
Reviewed-on: https://gerrit.instructure.com/9407
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
fixes#7386
test plan:
* create a course and enroll a student via SIS
* DO NOT publish the course
* change course date restrictions to be in the past
* as the student, you should not be able to access the course
* manually conclude the student
* as the student, you should not be able to access the course
Change-Id: I268ba0562eb8ca5aae9ef62ca1ac34dd39993487
Reviewed-on: https://gerrit.instructure.com/10303
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
These values are usually set on a course before copying and
shouldn't be overwritten
Test Plan:
* Copy a course and set a different name, code, and dates for the new course
* Those different values should not be overwritten when the copy is finished
closes#8263#8344
Change-Id: I88524638f93a18e23e7aa53e22d9dcba0988e6c9
Reviewed-on: https://gerrit.instructure.com/10289
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
these stopped being used around oct 2010
order by LOWER(title), ouch
Change-Id: I91999e553887c719fb5912f39cc012eeae9bcfb6
Reviewed-on: https://gerrit.instructure.com/10277
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
hide parent events and show section-level events in syllabus. also start
showing (manageable) appointment groups
fix notifications so that they don't go out for parent events but do go
out for section-level events
test plan:
1. create a section-level event
2. confirm that notifications are sent for the section-level events but
not for the parent event
3. confirm that the section-level dates/times appear in the syllabus but
the parent ones do not
4. create an appointment group and confirm that it appears in the syllabus
Change-Id: I0851edceb4f12656aca8152abdcec4cb02ce9f23
Reviewed-on: https://gerrit.instructure.com/10253
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
File in the root folder of a course we being copied into
and extra folder called "course files" in the destination
course. And media object references linking to non-existant
.flv files in the course when copied.
Test Plan:
* Create some files in the root of a course
* Create a media comment on a wiki page or the course syllabus
* Copy the course
* The files should be in the root in the new course and the media comment should work
closes#8299
Change-Id: I505007d195c962eb249975f7e6d4afc9733fb59e
Reviewed-on: https://gerrit.instructure.com/10254
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
fixes#7484, and also allows teachers to view the content of these
date-concluded, unpublished courses, which they couldn't before.
test plan: as a teacher who is *not* also an admin, visit a course that
was never published, but is now "soft" concluded because the term it's in is
concluded. verify that you can view course content, and copy the course
content into another course.
Change-Id: I8af6213e8f2ecf0ffc758acee0080e6ffbf9b9dc
Reviewed-on: https://gerrit.instructure.com/10163
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Test Plan:
* Create a course with stuff with dates
* Copy the course and set the date adjustment
* Stuff in new course should have adjusted dates
closes#8162
Change-Id: I8d75f410a37b8cc4323001581e74c6a43c1979ab
Reviewed-on: https://gerrit.instructure.com/10156
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
The course menu configuration and locale settings were being
lost on course copy. The locking/editing settings for wiki
pages was also being lost.
Test Plan:
* Make a custom ordering of the course menu, set the locale to spanish, and set a wiki page option to hide the page from students
* Copy that course into another one.
* Those set properties should be copied into the new course
closes#8133#8157#8134
Change-Id: I4e2b7ef8b89ac2000bbf8e3e26745c37972dd97e
Reviewed-on: https://gerrit.instructure.com/10059
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
permissions weren't set up quite right, so student view didn't work in
unpublished courses. this adds special permission so that student view always
works in a course.
test-plan:
- in an unpublished course, enter student view
- it should load the course, and you should be able to interact (submit
assignments, view grades, comment in discussions, etc)
Change-Id: I2581f1483a6d2bc74282dfffe6cc13b75fd29211
Reviewed-on: https://gerrit.instructure.com/9937
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
we tried to get away with the student view student not having a pseudonym, and
it worked until we got to file upload assignments. you need a pseudonym to
upload files, so we have to give the fake student one.
test-plan:
- before downloading, make sure you have a student view student created who
does not have a pseudonym
- run migration and make sure that student now does have a pseudonym
- make sure a new student view student gets a pseudonym on creation
- submit a file upload assignment while in student view
Change-Id: I1a494c36cebf2b94a74cc9e531ac64b220fbfe36
Reviewed-on: https://gerrit.instructure.com/9785
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
start tracking root_account_ids more consistently for messages, and
aggregate them on the conversation. add a scope when masquerading such
that conversations tied to other root accounts are hidden. a masquerader
must have access to all root accounts a conversation belongs to in order
to see it (unless the masquerader is a site admin)
test plan:
1. enroll a user in courses under two different root accounts (let's call
them accounts A and B)
2. as the user, log in under the account domain for A and send some
messages
3. log in under the account domain for B and send some messages to
the existing conversations, as well as to some new recipients
4. set up an account admin with access only to B
5. log in as the admin, and masquerade as the user
6. ensure you can only see conversations created under B (none of the ones
that are solely A, or both A and B)
7. log in as a site admin, and masquerade as the user
8. ensure you can see conversations from both accounts
Change-Id: I4a26b8b8914fd531103bb92c3d4442de843d9986
Reviewed-on: https://gerrit.instructure.com/9767
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Jon Jensen <jon@instructure.com>
allows course admins to view the course from a student perspective. this is
accessible from a button on the course/settings page. They should be able to
interact with the course as a student would, including submitting homework and
quizzes. Right now there is one student view student per course, so if the
course has multiple administrators, they will all share the same student view
student.
There are a few things that won't work in student view the way the
would for a normal student, most notably access to conversations is disabled.
Additionally, any publicly visible action that the teacher takes while in
student view will still be publicly visible -- for example if the teacher posts
a discussion topic/reply as the student view student, it will be visible to the
whole class.
test-plan:
- (the following should be tried both as a full teacher and as
a section-limited course admin)
- set up a few assignments, quizzes, discussions, and module progressions in
a course.
- enter student view from the coures settings page.
- work through the things you set up above.
- leave student view from the upper right corner of the page.
- as a teacher you should be able to grade the fake student so that they can
continue to progress.
- the student should not show up in the course users list
- the student should not show up at the account level at all:
* total user list
* statistics
Change-Id: I886a4663777f3ef2bdae594349ff6da6981e14ed
Reviewed-on: https://gerrit.instructure.com/9484
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
This adds the ability for ContentMigration to copy courses
by exporting to a content package and then importing that
package. For attachments it just creates a new Attachment
object instead of exporting/importing them.
The course copy API did not change.
The endpoints used by the course copy UI did change and this
commit doesn't allow selective copying, it only has the
option to copy everything. Selective copying will come in
another commit.
There are also various bug fixes for export/import
Test Plan:
* copy a course through the API
* copy a course through the Content Imports path
* copy a course through the Copy Cours button on the course settings page
* export a course
refs #4645
Change-Id: Ie577329ab7caaea8dfb9359542224a1a2657e167
Reviewed-on: https://gerrit.instructure.com/9742
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
affects: course model, api
test plan:
* add a course with the api, included a public description;
* verify that public description field is returned and
exists on the course in the db.
Change-Id: If2766cf7ba946af5cb8a5cafebaa8209754ec2b3
Reviewed-on: https://gerrit.instructure.com/9723
Tested-by: Cody Cutrer <cody@instructure.com>
Tested-by: Zach Wily <zach@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>