Closes FALCOR-183
Closes FALCOR-184
Closes FALCOR-255
Closes FALCOR-186
Closes FALCOR-187
Closes FALCOR-188
Closes FALCOR-189
Closes FALCOR-147
Closes FALCOR-148
Test Plan:
* As a student in an account with the Student Planner
feature flag enabled
* In a course with multiple upcoming due assignments
in the current and following weeks
* Test that the following API endpoints provide you
with the data described:
get '/api/v1/planner/items'
* Should return a list matching that of the todo
list endpoint, while adding an additional key
named `visible_in_planner`
get '/api/v1/planner/overrides'
* Should return a list of previously created
PlannerOverrides
get '/api/v1/planner/overrides/:override_id'
* Should return the specific override for the
passed in id
put '/api/v1/planner/overrides/:override_id'
* Should update an existing override's `visible`
value to match what was passed in the request. No
other values should be updated
post '/api/v1/planner/overrides'
* Should create a new PlannerOverride with the specified
`plannable_type`, `plannable_id`, and `visible` values.
`user_id` should match that of the user making the request
delete '/api/v1/planner/overrides/:override_id'
* Should set the PlannerOverride's `deleted_at` to when
the request was made, as well as updating the `workflow_state`
to `deleted`
Change-Id: I03890a525f8201a8df1d2f1290cdcd549ba548d7
Reviewed-on: https://gerrit.instructure.com/107495
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Dan Minkevitch <dan@instructure.com>
test plan:
- have some discussion topics that require students to post before
reading other replies
- have an observer linked to multiple students
- ensure that the observer can view replies on a discussion topic
after a linked student posts. test a different student with
each topic. (this feature used to work for at most 1 linked
student.)
fixes CNVS-36504
Change-Id: If8ac47038d64ef1d8c9ebfe4d71a60d6990383d2
Reviewed-on: https://gerrit.instructure.com/110743
Tested-by: Jenkins
Reviewed-by: James Williams <jamesw@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
test plan:
* create a group discussion with "Users must post before
seeing replies" enabled and add a reply to a subtopic
* conclude the course
* teachers should still be able to see the reply
closes #CNVS-36199
Change-Id: I7e21441d0789446fe4a798b9e560903045534231
Reviewed-on: https://gerrit.instructure.com/109335
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
closes CNVS-35932
closes CNVS-35931
test plan:
1. Create an announcement.
2. Go to the announcements index page at
/courses/:course_id/announcements.
3. Click the settings cog and select 'Close for Comments'.
4. Verify there is no error.
5. Refresh the page and verify the announcement has been closed for
comments (there should be a lock icon to the left of the settings
cog).
Change-Id: Ide9559622460e59dc089291345b4c1da8f0e12d2
Reviewed-on: https://gerrit.instructure.com/106609
Reviewed-by: Neil Gupta <ngupta@instructure.com>
Tested-by: Jenkins
Reviewed-by: Jeremy Neander <jneander@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Neil Gupta <ngupta@instructure.com>
also include date based logic for funsies
test plan:
* invite a teacher to a course
* decline the enrollment
* have a group in the course and create an announcement
* it shouldn't sent to the rejected teacher
closes #CNVS-35561
Change-Id: I597ca8c641a3cbb38b292818add9a1991572d617
Reviewed-on: https://gerrit.instructure.com/104889
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
mostly s/uniq/distinct/, and choosing a content type for render :text
Change-Id: I53a2e77d23ecc43162f70b4fd88303cc1539c20b
Reviewed-on: https://gerrit.instructure.com/104762
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
extract :points, :due_dates, and :availability_dates
from :settings
also allow {:all => true} shorthand in restrictions
test plan: specs (fine-grained locking is not supported in the
user-interface yet)
closes MC-99
Change-Id: I885192e6828b6628e73fcf4a532dda19143dd20a
Reviewed-on: https://gerrit.instructure.com/104163
Tested-by: Jenkins
Reviewed-by: James Williams <jamesw@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
This commit adds default values of false and not null constraints for
all boolean columns on the assignments, discussion_topics, and quizzes
tables. This commit also has a data fixup to backfill default values on
the boolean columns.
closes CNVS-34536
Test Plan:
* Do the following in a course with at least one closed grading period:
1. On the Assignments page, create an assignment with a due date in a
closed grading period using the "+" button on an assignment group.
2. As a teacher, try to toggle the "Post to SIS" setting for the
assignment from the Assignments page. Verify the setting changes.
3. Create a new assignment with a due date in a closed grading period
using the "+Assignment" button.
4. As a teacher, try to toggle the post to SIS setting for the
assignment from the Assignments page. Verify you can edit the
setting as you toggle the button.
Change-Id: I7c799bb3b194363836d900287be90ca13805508e
Reviewed-on: https://gerrit.instructure.com/101315
Reviewed-by: Neil Gupta <ngupta@instructure.com>
Reviewed-by: Derek Bender <djbender@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
Tested-by: Jenkins
Product-Review: Keith T. Garner <kgarner@instructure.com>
test plan:
- ensure in a course with "allow students to create discussion
topics" unchecked, the student-view student does not have
permission to create discussion topics
fixes CNVS-34855
Change-Id: I94f26290f0e9673cb372f6819daa7e6c94e39709
Reviewed-on: https://gerrit.instructure.com/101734
Reviewed-by: Dan Minkevitch <dan@instructure.com>
Tested-by: Jenkins
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
test plan:
* have a discussion topic
* post to the discussion as a student
* add the topic as a module item and require
students to contribute to it
* it should count the previous entry as a contribution
closes #CNVS-22214
Change-Id: Ie755f248285d685611b2d042605ece2ef128c24c
Reviewed-on: https://gerrit.instructure.com/100735
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: David Tan <dtan@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
Tested-by: Jenkins
test plan:
* have a discussion topic
* copy it
* the new discussion topic shouldn't have the old topic's
"posted at" date
closes #CNVS-34464
Change-Id: Ia886cc9f1522fbaf46b519c3da390568974a5442
Reviewed-on: https://gerrit.instructure.com/100795
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: David Tan <dtan@instructure.com>
Product-Review: Chris Ward <cward@instructure.com>
Tested-by: Jenkins
inherited settings rely on the generated method to
calculate whether the setting has been locked on the
account level
i should know, i wrote the code
test plan:
* have a course, make sure "disable comments on announcements"
is unchecked (in "more options")
* have a discussion topic in the course
* go to the account and check "disable comments on announcements"
and "lock this setting"
* go to the discussion topic's index
* it should not show the "Open for Comments" cog menu option
closes #CNVS-34433
Change-Id: I2aabd7de749cc8b9fce941753578ab3e2f4725b6
Reviewed-on: https://gerrit.instructure.com/100954
Tested-by: Jenkins
Reviewed-by: Dan Minkevitch <dan@instructure.com>
QA-Review: David Tan <dtan@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
test plan:
* create a course with a discussion
* soft-conclude the course (i.e. set the end date
in the past and restrict enrollments to the dates)
* create a new course section and edit it so
it ends on a future date and restrict enrollments
to the dates
* ensure that a student in this section
is still able to reply to discussions
closes #CNVS-34351
Change-Id: I31927a4e7a78758e18101e639a0d44638e6bea9f
Reviewed-on: https://gerrit.instructure.com/100648
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
should use the same migration_id + master/child content tags
so they'll be restricted/unlinked together
closes #MC-63
Change-Id: I815c76d79b7407ecbcb2bff88dea9c90188800eb
Reviewed-on: https://gerrit.instructure.com/99887
Reviewed-by: Dan Minkevitch <dan@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
Tested-by: Jenkins
refs #CNVS-32574
Change-Id: I3ba018a7110a7530c9af4a59c97422f626a749b6
Reviewed-on: https://gerrit.instructure.com/99260
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
Fixes CNVS-34215
Test Plan:
* Create an announcement
* As a student, see that the announcement is available to comments
* As an admin, enable the account setting to disable comments on announcements
* As a student, see that announcements have a locked icon and cannot have replies
* As an instructor, view the announcements page and click the settings icon for an announcement
* See that an "Open to Comments" option doesn't appear in the menu
* View (not edit) one specific announcement and click the settings icon
* See that an "Open for Comments" option doesn't appear in the menu
* As an admin, disable the account setting to disable comments on announcements
* As an instructor, view the announcements page and click the settings icon for an announcement
* See that an "Open to Comments" option appears in the menu and unlocks the announcement when clicked
* View (not edit) one specific announcement and click the settings icon
* See that an "Open for Comments" option appears in the menu
Change-Id: I99482c05a5d710095287108925cca969c76ec160
Reviewed-on: https://gerrit.instructure.com/99150
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Heath Hales <hhales@instructure.com>
Product-Review: Dan Minkevitch <dan@instructure.com>
Product-Review: Chris Ward <cward@instructure.com>
Tested-by: Jenkins
refs #CNVS-32574
Change-Id: Iaac099efac4162bd060e2b8d5a9e6bc5170ce02d
Reviewed-on: https://gerrit.instructure.com/94593
Reviewed-by: Dan Minkevitch <dan@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
Tested-by: Jenkins
Fixes CNVS-34218
Test Plan:
* Create a course; do NOT publish it
* Create a new Discussion in the course and save
* As a teacher, see that you have a Reply button for the Discussion
* See that you are able to add replies to the Discussion
* Enter Student View mode from the course Settings page
* Navigate to the Discussion
* The reply button should be visible and interactive
* Exit Student View mode
* Publish the course
* Enter Student View mode again and navigate to the Discussion
* The reply button should still be visible and interactive
Change-Id: I001088747776d2534c090b1d26b7593115af8fad
Reviewed-on: https://gerrit.instructure.com/99086
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Heath Hales <hhales@instructure.com>
Product-Review: Dan Minkevitch <dan@instructure.com>
closes MC-27
Change-Id: I06b81999b1f3113f8ece9fb9b34a4a0ea705d746
Reviewed-on: https://gerrit.instructure.com/98556
Reviewed-by: James Williams <jamesw@instructure.com>
Tested-by: Jenkins
Product-Review: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
Additionally, remove default time limit from recent
announcements posting so that all announcements are shown.
Fixes CNVS-34030
Test Plan:
* As a teacher, go to a Course's settings page
* Enable "Show recent announcments on homepage"
* Make sure you have the course homepage set to
the wiki front page
* Create multiple announcements
* Post them in a different order than you created them,
e.g. by using the `Delay Posting` setting
* Make sure that the announcements `posted_at` ranges
from longer than two weeks ago to further out than
two weeks from now
* View the homepage
* The recent announcement list should be ordered
by the date/time that you posted the announcement
and not in the order that they were created,
in order from most recent to least
* It should display all the relevant announcements,
even if they were posted longer that two weeks ago
or further out than two weeks from now
* Students should not see announcements that have
not yet been posted or that they don't otherwise
have access to
Change-Id: Ie575f8561614529b7fd6245a24ffe9fdad5d8111
Reviewed-on: https://gerrit.instructure.com/98610
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
QA-Review: David Tan <dtan@instructure.com>
Product-Review: Dan Minkevitch <dan@instructure.com>
Fixes CNVS-33938
Test Plan:
* Create an announcement
* As a student, see that the announcement is available to comments
* As an admin, enable the account setting to disable comments on announcements
* As a student, see that announcements have a locked icon and cannot have replies
* As an instructor, view the announcements page and click the settings icon for an announcement
* See that an "Open to Comments" option doesn't appear in the menu
* As an admin, disable the account setting to disable comments on announcements
* As an instructor, view the announcements page and click the settings icon for an announcement
* See that an "Open to Comments" option appears in the menu and unlocks the announcement when clicked
Change-Id: Ibc837d2f1d76ec85790a9f00e74b21e18971c738
Reviewed-on: https://gerrit.instructure.com/98418
Tested-by: Jenkins
Reviewed-by: Frederick Polgardy <fpolgardy@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Dan Minkevitch <dan@instructure.com>
fixes CNVS-32308
Test Plan:
- Have a course with Student enrollments, Group Set and Student Groups
- Create a Group Discussion and attach Group Set from step #1
- Hard or soft concluded a course
- As a student, navigate to the Group Discussion and notice
you can't leave a reply
Change-Id: Ic45cd71a21d6b667c407fd0250b2df2bfb3e1f98
Reviewed-on: https://gerrit.instructure.com/95970
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Heath Hales <hhales@instructure.com>
Product-Review: Steven Burnett <sburnett@instructure.com>
particularly for large roster courses
don't make permissions checks for each user
test plan:
* publishing a discussion topic should work like before
closes #CNVS-32618
Change-Id: I7efbcfff5fecd78f0bf7d7fb848e95a5145682eb
Reviewed-on: https://gerrit.instructure.com/93240
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins
QA-Review: David Tan <dtan@instructure.com>
Product-Review: Chris Ward <cward@instructure.com>
test plan:
1. Create course with a teacher, three students (a,b,c),
a ta, a designer, a role inherited from teacher, and
a role inherited from ta.
2. Create a group in the course that includes students
a and b.
3. As student a, post an announcement in the group.
4. Verify that the following receive the announcement:
b, ta, teacher, role inherited from teacher, and
role inherited from ta all receive the announcement.
5. Verify that the following do not receive the
announcement: c, and designer.
Additionally, verify that when a teacher has selected
to never receive announcement notifications that they
do not receive them from group announcements.
Change-Id: Idf23cb942f79002d778aaa6ae51526e3b18c1731
Fixes: PFS-5748
Reviewed-on: https://gerrit.instructure.com/94187
Reviewed-by: Tyson Brown <tbrown@instructure.com>
Reviewed-by: Dan Minkevitch <dan@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Chris Ward <cward@instructure.com>
Tested-by: Jenkins
child_topic_for was grabbing the old deleted child topics
test plan:
* create a course with two groups sets with one group each
* enroll a student in both groups
* have a graded discussion topic set for one group set
* then switch the topic to the other group set
* post to the discussion topic as a student with an attachment
* the attachment should show up properly in the speedgrader
sidebar
closes #CNVS-32912
Change-Id: Iac4a44751413be1a33d3d1abdb730655daa71712
Reviewed-on: https://gerrit.instructure.com/93945
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: David Tan <dtan@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
fixes CNVS-31042
test plan:
- create and publish some discussion topics
- lock some of the discussion topics via a module various ways
- students should not see the topics that are locked for them on the
discussions index page
- teachers should still see all the topic in the discussions index page
Change-Id: Ie6cc27c2539e5a915ce9243318f5505a04fb1e82
Reviewed-on: https://gerrit.instructure.com/91922
Reviewed-by: James Williams <jamesw@instructure.com>
Tested-by: Jenkins
QA-Review: David Tan <dtan@instructure.com>
Product-Review: Jon Willesen <jonw+gerrit@instructure.com>
test plan:
* should not send scheduler notificiations to students
with future enrollments (by date)
refs #CNVS-30884 #CNVS-31292
Change-Id: I1e543daab097f0bbbaad2d2d1e9de5afdaf2e46b
Reviewed-on: https://gerrit.instructure.com/88737
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
Filters pages from set of assignments rendered in modal
Filters pages from displayed content tags according to differentiated
assignments behavior
refs CYOE-263
Test Plan:
1. Create a wiki page, via pages index or modules + button
2. Ensure page can be added to module and is visible to students
3. Check edit page, "mastery paths content"
4. Ensure the page is no longer visible to students in modules, until
they are assigned it via an override.
5. Open the "add item to module" modal. Ensure the page does not appear
in the assignments section, only under pages.
Change-Id: I822d53dc562476ef422f4a3ee6004e0d1e132246
Reviewed-on: https://gerrit.instructure.com/87418
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Christian Prescott <cprescott@instructure.com>
test plan:
* create a course with a student
* create and publish a graded discussion topic
* the topic should show in the student's "Recent Activity" stream
with an unread indicator (blue dot)
closes #CNVS-30538
Change-Id: Id295c3f67ead51938f9b7a48bfb0db1c4e67b920
Reviewed-on: https://gerrit.instructure.com/87647
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
test plan:
- in a public course, unauthenticated users should have the
same restricted access as logged-in users who aren't enrolled
in the course, namely:
- the discussion topic index should not be accessible
(/courses/X/discussion_topics redirects to a login page)
- graded discussion topic descriptions are visible on the
assignments page, but posts are not shown
fixes CNVS-30262
Change-Id: I8a4351c6bab5ca06a3c0c89a51b38e3d8bed3d24
Reviewed-on: https://gerrit.instructure.com/84164
Tested-by: Jenkins
Reviewed-by: Joel Hough <joel@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
fixes CNVS-28942
also fixes DiscussionTopic#visible_for? caching and cleans up
the :read permission
test plan
- regression test announcement and discussion topic visibility
- create a discussion topic in a module
- lock the topic via the module
- attempt to view the discussion topic as a student
- ensure that the discussion topic is not visible
Change-Id: I08b229e5a38803fced57afa25780b11a1dc2773e
Reviewed-on: https://gerrit.instructure.com/78152
Tested-by: Jenkins
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Joel Hough <joel@instructure.com>
refs CYOE-67
Test Plan
0. `rake db:migrate` and compile assets. Enable the conditional release
feature flag in course settings.
1. Create a published WikiPage, assignment-free. Ensure it is visible
to errybody.
2. With the API, create an assignment with submission type 'wiki_page'.
A new page will be created for the assignment.
```sh
curl "http://canvas.dev:3000/api/v1/courses/1/assignments" \
-H "Content-Type: application/json" -H "Authorization: Bearer <token>" \
-X POST -d '{"assignment": {"name": "Page Asg", "published":true, \
"submission_types":["wiki_page"]}}'
```
3. Ensure the assignment is assigned to "Everyone" and the page is
visible to all.
4. Assign the assignment to a specific student or section. Ensure the
page is visible only to the assigned set.
```sh
curl "http://canvas.dev:3000/api/v1/courses/1/assignments/13" \
-H "Content-Type: application/json" -H "Authorization: Bearer <token>" \
-X PUT -d '{"assignment": {"only_visible_to_overrides": true }}'
curl "http://canvas.dev:3000/api/v1/courses/1/assignments/13/overrides" \
-H "Content-Type: application/json" -H "Authorization: Bearer <token>" \
-X POST -d '{"assignment_override": {"student_ids":[126]}}'
```
5. Ensure the DA behavior also applies to WikiPage#show and update and edit.
6. Ensure API behavior matches docs for Assignment and Page endpoints.
7. Ensure no regressions in non-page assignments, with and without CR
feature flag. Ensure no regressions in discussion topics and
announcements, including assigned discussions.
Change-Id: Ie53c6ffa4e4533cedd54f10aee3ba0b8a27aa4d5
Reviewed-on: https://gerrit.instructure.com/75139
Reviewed-by: Matt Berns <mberns@instructure.com>
Tested-by: Jenkins
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Product-Review: Christian Prescott <cprescott@instructure.com>
test plan:
* create a course role with the ability to
manage course content, but "View announcements" is disabled
* a user with that role should not see the Announcements tab
* having "Moderate forum" rights should not grant read
rights to read discussions and announcements (if those are
disabled)
* having "View announcements" or "View discussions" turned
off should prevent new announcements and new discussions
from showing in the dashboard or from sending
notifications to the restricted users
closes #CNVS-28438 #CNVS-28469 #CNVS-28541
Change-Id: I9178d30edb33a6e83c492189f4a6fd1e496c42fa
Reviewed-on: https://gerrit.instructure.com/76294
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Allison Weiss <allison@instructure.com>
test plan:
* create a group category with a group with a long name
(~200 characters)
* create a discussion topic with a short and set it
as a group discussion for the category
* the group discussion should have been created
* edit the discussion topic to have a long name (>100 characters)
* the group discussion should have been updated to reflect
the new topic's name (and truncated)
closes #CNVS-28244
Change-Id: Id996f975b7137cca9284c4b3a3022f2a1243cbff
Reviewed-on: https://gerrit.instructure.com/75252
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
test plan:
* create a group ungraded discussion topic
* post to it as a admin user not in a group
* change it to be a graded discussion
* it should save successfully
closes #CNVS-27993
Change-Id: I5ddc34f4053df0ffb6c819a121873c102e74b5c0
Reviewed-on: https://gerrit.instructure.com/74429
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
test plan:
* create a discussion topic for a course
* reply to the topic as a student
* delete the topic
* should be able to restore the discussion topic
(to an active state) using the "undelete" endpoint
e.g. /courses/:id/undelete/discussion_topic_(:topic_id)
closes #CNVS-27924
Change-Id: I146930c6e8cc55c93698cd4df72471247e895642
Reviewed-on: https://gerrit.instructure.com/74325
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
test plan:
* create a course with a group set and group
* create a group discussion topic for the set
* visit the discussion topic from the course
topics index
* click on the link in the alert box to go
to the group discussion topic
* the group topic should have a name including the
group name
closes #CNVS-13287
Change-Id: Icdba11c9545e7b029fdacb95d2d9ffdd1b3f1283
Reviewed-on: https://gerrit.instructure.com/73973
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Heath Hales <hhales@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
test plan:
* basic regression test of assignment overrides
closes #CNVS-27549
Change-Id: Ie463848b3831087efb3f9ec762dca6264055ee76
Reviewed-on: https://gerrit.instructure.com/73139
Tested-by: Jenkins
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Reviewed-by: Mike Nomitch <mnomitch@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
fixes CNVS-22360
Test Plan:
- create a course with multiple course
sections, multiple group sets (each with
many groups), and students in these
- create an assignment with overrides
for groups
- they work as expected
- adhoc and section overrides continue
to work as expected
- ditto for graded discussions
- check that discussion
alerts go out properly
- check that individually graded
group discussions work as intended
as well
- note: child discussions will still
be made for groups that dont have
overrides (this is unfortunate
but known)
- note: quizzes not included
in this PS
- when editing an assignment try to
assign a due date to a group not
in the assigned group set
- you cannot
- when editing an assignment that
is not a group assignment
- confirm that you cannot
assign a group override
- if an assignment override for a group
exists (and nobody else is assigned)
- check that a student not in that group
- does not have a spot in the GB
- gets redirected away from that assignment
if they go to the show page
- does not have that assignment factored
into their individual grade
- does not have that assignment show
up on their assignment index
- if the student is then added to that group
- all of the above conditions are reversed
NOTE: if a student has a grade already, they
will not 'lose visibility' until their grade is
taken away (so removing a student from a group
will reverse the above conditions only if they
are gradeless)
- check that the calendar accurately
reflects the due dates for group
overrides
- with MGP on
- test that group overrides act in the
same way as course_section overrides
in regards to grading period
Change-Id: Ia32f57feabbc719568901e0763130b3c2304c7ce
Reviewed-on: https://gerrit.instructure.com/69060
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Product-Review: Jason Sparks <jsparks@instructure.com>
test plan:
* create and publish a course with a graded discussion topic
* enroll a student in the course
* as the student, post a reply to the topic and attach a file
* it should not count toward the quota
closes #CNVS-27114
Change-Id: I6fb847a61a7a10a69dc035d5f5e1f15dda107a04
Reviewed-on: https://gerrit.instructure.com/71691
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Matt Goodwin <mattg@instructure.com>
refs #CNVS-26056
Change-Id: Ia94ee2fcfded1ec66cb77a19085b005c81304800
Reviewed-on: https://gerrit.instructure.com/70251
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
destroy! is now a method in rails
refs #CNVS-26056
Change-Id: I66e512265ff5cda6a12d7820e3cf69c77ef9e746
Reviewed-on: https://gerrit.instructure.com/69721
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
fixes CNVS-22766
test plan
- cause a discussion reply notification to be sent (by replying to
a discussion)
- follow the link in the notification
- ensure that the specific reply is scrolled into view
- do the same for announcements
Change-Id: I6a6f9fee7c9acd1e637486d607f71471f4664d6b
Reviewed-on: https://gerrit.instructure.com/69166
Tested-by: Jenkins
Reviewed-by: Matthew Wheeler <mwheeler@instructure.com>
QA-Review: Heath Hales <hhales@instructure.com>
Product-Review: Joel Hough <joel@instructure.com>
Fixes CNVS-25632
Test Plan:
Regression test discussions, especially unread
counts. We expect no behavior change.
Change-Id: I282a92491d3f15ecaacd3375e00e23acfda5eb7b
Reviewed-on: https://gerrit.instructure.com/69076
Tested-by: Jenkins
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Adrian Russell <arussell@instructure.com>
Product-Review: Matthew Wheeler <mwheeler@instructure.com>
fixes CNVS-25321
test plan
- create a graded discussion that is invisible due to
differentiated assignments (see ticket for repro steps)
- ensure that students who cannot see the discussion do not
receive a notification about the new discussion
Change-Id: I309b221b3641910809f9f073c8820e8331664f6f
Reviewed-on: https://gerrit.instructure.com/68526
Tested-by: Jenkins
Reviewed-by: Andrew Butterfield <abutterfield@instructure.com>
QA-Review: Adrian Russell <arussell@instructure.com>
Product-Review: Joel Hough <joel@instructure.com>
test plan:
* create an assignment, a quiz and a graded discussion topic,
all with "available to" set to a date in the past
* add each one as a module item with a "Must view" requirement
* as a student, should be able to view each item
(but unable to participate, since it's locked), and fulfill
the requirements
closes #CNVS-25428
Change-Id: I00c222556bdb56f5ae4f95bbf547d06f1fb3ae0c
Reviewed-on: https://gerrit.instructure.com/68106
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins
Product-Review: James Williams <jamesw@instructure.com>
fixes CNVS-22157
fixes CNVS-20681
refs CNVS-11976
test plan
- follow repro steps on the tickets
Change-Id: I4a4ed6666d094a0ce23324364f83d1ec9f7a4577
Reviewed-on: https://gerrit.instructure.com/67545
Tested-by: Jenkins
Reviewed-by: Andrew Butterfield <abutterfield@instructure.com>
QA-Review: Adrian Russell <arussell@instructure.com>
Product-Review: Joel Hough <joel@instructure.com>
turns out they can't be unpublished
test plan:
* create an announcement and delete it
* use the course undelete page
(/courses/X/undelete) to restore the announcement
closes #CNVS-25334
Change-Id: I6508e9b1b126c3384d0dde8c9cb94db262b9d435
Reviewed-on: https://gerrit.instructure.com/67905
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Ryan Allen <rallen@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
test plan:
* create a course with a group set and group
* create a group discussion topic
* it should create a subtopic in the group
* edit the original topic and unset
"This is a group discussion"
* the topic should no longer show up in the list
of group topics
closes #CNVS-1777
Change-Id: I1ceac3435c0c74edeea947baf8a0153dcb3a199c
Reviewed-on: https://gerrit.instructure.com/67328
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Ryan Allen <rallen@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
- Refactors related scopes for Switchman support.
- Adds an explicit shard context around the ScopedToUser call.
- Works around Rails loading with ActiveRecord descendants:
https://github.com/rails/rails/issues/3364
fixes CNVS-24104
test plan:
- Enroll a student in two different institutions on different shards
- Merge the student if necessary
- Enroll the student in course 1 on institution 1
- Add a discussion topic for course 1 from the student.
- Access the API discussion endpoint from institution 2
- Verify that you get results.
The cross-sharded API endpoint should look something like:
institution_2.instructure.com/api/v1/courses/{global_course_id}/discussion_topics
eg
institution_2.instructure.com/api/v1/courses/10000000000001/discussion_topics
The non-sharded API endpoint should look something like:
instiution_1.instructure.com/api/v1/courses/1/discussion_topics
Both should work.
Change-Id: I54da2f5e012924c10923a8894ad8263a67fcdb06
Reviewed-on: https://gerrit.instructure.com/66599
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Product-Review: Chris Wang <cwang@instructure.com>
test plan:
* create an announcement set to post 1 minute in the future
* wait 2 minutes and make sure that it posts
* copy the course and shift dates to a future date
* make sure that the announcement has not posted to students yet
refs #CNVS-21078
Change-Id: I8253e6965ba777f90651d99c5f5fac8c26ff2f8f
Reviewed-on: https://gerrit.instructure.com/66677
Tested-by: Jenkins
Reviewed-by: Dan Minkevitch <dan@instructure.com>
QA-Review: Ryan Allen <rallen@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
test plan:
* create a graded discussion topic
* delete it
* restore it through /courses/X/undelete
* it should be unpublished
closes #CNVS-24065
Change-Id: Ic00450074160b72a4ecabedd939f651dbaa1d4e5
Reviewed-on: https://gerrit.instructure.com/65275
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
test plan:
* create an unpublished course with a group
* add a user to a group
* create a discussion topic in the group
* it should not notify the group user
closes #CNVS-24074
Change-Id: Ic22900035dac06b103fee6819164de916bcc7e8f
Reviewed-on: https://gerrit.instructure.com/65272
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
fixes CNVS-22078
test plan:
- Make sure "Let students edit or delete their own discussion posts"
is enabled
- As a student reply to a discussion
- Conclude the students enrollment
- As the same student go to your reply and clicking the gear you
still have the ability to edit it
- Along the same vein test threaded discussions and side comments
Change-Id: I8e1fc84b097cb96b2fa28654eb299d3276c045d7
Reviewed-on: https://gerrit.instructure.com/62389
Reviewed-by: Brian Finney <bfinney@instructure.com>
Tested-by: Jenkins
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Product-Review: Jason Sparks <jsparks@instructure.com>
avoid an unnecssary join, and an unnecessary round-trip through ruby
test plan:
* load discussions page for a course
Change-Id: I22f7cecb9a83e2112bddb9ed0f1e4fa0e17f83b1
Reviewed-on: https://gerrit.instructure.com/63419
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
refs #CNVS-21317
Change-Id: Id9bbb04a92abd835af69ba5ec0c21ef758a8a324
Reviewed-on: https://gerrit.instructure.com/61146
Reviewed-by: Dan Minkevitch <dan@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
Tested-by: Jenkins
fixes CNVS-21495
test plan:
- Participate in a discussion as student 1
- Reply to student 1 as student 2
- Delete the discussion
- Reply to discussion notification email as student 1
- notice no recieving of new notification as student 2
- Optional: repeat ad infinitum
Change-Id: I4e0405af5d56a827834ac96aa3a9ccb7b2f97d73
Reviewed-on: https://gerrit.instructure.com/59782
Reviewed-by: Joel Hough <joel@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Tested-by: Jenkins
Product-Review: Peyton Craighill <pcraighill@instructure.com>
refs #CNVS-21596
Change-Id: I5dedaab90a2abe6bf288ff30401c9b31629b45b2
Reviewed-on: https://gerrit.instructure.com/59220
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
should improve performance when viewing as a course admin
test plan:
* modules index should work as before
refs #CNVS-21476 #CNVS-21317
Change-Id: I00ee7602a48bc78538e8034d562781059f6fabb8
Reviewed-on: https://gerrit.instructure.com/57276
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
test plan:
* create a discussion topic locked by date in the past
(i.e. now "closed for comments")
* copy the discussion topic to a new course, using the
"Remove Dates" option
* the new topic should not be locked
closes #CNVS-21707
Change-Id: I9e8adcaa5f8694da23172bcc1938a029f6cd0d9a
Reviewed-on: https://gerrit.instructure.com/57811
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
fixes the permissions of editing the discussions page
after you have been concluded in a course
fixes CNVS-20705
test plan:
- create a student
- create a discussion with that student
- as a teacher conclude his enrollment (but keep course active)
- as the student go back in and try to edit the discussion notice you can't
Change-Id: I9a29e923714783e618a8c5f4120ae4277cd6dab1
Reviewed-on: https://gerrit.instructure.com/55359
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Adam Stone <astone@instructure.com>
Product-Review: Hilary Scharton <hilary@instructure.com>
changed_state is defined by broadcast_policy, and uses an internal
broadcast policy variable called prior_version that isn't created if
save_without_broadcasting is called. send to stream blocks shouldn't
rely on it.
fixes CNVS-20556
test plan:
- with sentry enabled,
- import a discussion topic
- it shouldn't create an error report
Change-Id: Iea8a7b240b547d52d26daf7a6390bc8c3a1de976
Reviewed-on: https://gerrit.instructure.com/54471
Tested-by: Jenkins
Reviewed-by: John Corrigan <jcorrigan@instructure.com>
QA-Review: Adam Stone <astone@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
fixes CNVS-7271
test plan:
- make three announcments
- one created first but delayed post last
- one created second but immediately posts
- one created third but delayed post before
the first message
- when you go to the announcement index as a
student or teacher, announcements are sorted
by their post time, not by their created at
time
Change-Id: I455b686e08934a11282756d146ee4ba21816e58b
Reviewed-on: https://gerrit.instructure.com/53612
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Hilary Scharton <hilary@instructure.com>
fixes CNVS-16277
test plan:
* create a discussion topic
* open edit page
* change Allow liking, Only graders can like, Sort by likes
* verify that changes persist
* open topic show page
* verify that like buttons are present if Allow liking is enabled
and Only graders can like is disabled or the user can grade
* click on a Like button
* verify that the button is activated
* refresh the page
* verify that the rating persists
* verify that the number of likes on each entry is displayed
* enable Sort by likes
* wait a minute for the topic's cache to rebuild
* refresh the page
* verify that entries are sorted by number of likes
Change-Id: I8e329899c8b81832bdf9132438537bcd7a32e258
Reviewed-on: https://gerrit.instructure.com/42786
Reviewed-by: Joel Hough <joel@instructure.com>
Product-Review: Braden Anderson <braden@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Tested-by: Jenkins
Ordering by position is normally identical to ordering by post date.
The notable exception is when announcements are imported into a course.
In this case, the order is by position which is wonky because positions
are duplicated.
This patch changes the index to explicitly order by posted_at, or
delayed_post_at
Fixes CNVS-13028
Test Plan:
1. Create a course and add an announcement or two
2. Create another course and add an announcement or two
3. Return to the first course and add an announcement or two
4. Return to the second course and add an announcement or two
5. Return to the first course and import the announcement from the
second course (Hint: You will need delayed jobs running to complete
the import).
6. Visit the announcements index page on the first course and ensure
that the ordering of announcements is based on *creation time* or
*posting time*, and not on position
Change-Id: Ib1d1b155da197c1147fa87594152a722234190dd
Reviewed-on: https://gerrit.instructure.com/51527
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Adam Stone <astone@instructure.com>
Product-Review: Benjamin Porter <bporter@instructure.com>
Tested-by: Jenkins
iTunes requires that enclosure urls end with the media extension, even
if they are redirect urls
fixes CNVS-19718
test plan:
- in a course, upload a media file (like an mp3)
- create an announcement, link to the media file in the announcement,
and check the setting to allow the podcast feed
- save the announcement
- load the podcast rss feed, it should list the media file you uploaded
and the enclosure url should have .mp3 in it (end of url, before query
params)
- load the podcast feed in itunes
- it should work
Change-Id: I398a2cc0462405e27bf4f189fa9a2905df3b29db
Reviewed-on: https://gerrit.instructure.com/52092
Tested-by: Jenkins
Reviewed-by: Mike Nomitch <mnomitch@instructure.com>
QA-Review: Adam Stone <astone@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
fixes CNVS-19529
test plan:
- in a course, create the following types of announcements:
* a normal announcement that is visible
* an announcement that is post_delayed for the future
* an announcement that is closed for comments (create announcement, go
to show page and close for comments in the cog menu)
* an announcement that is deleted (create and the delete)
- view the announcement rss feed as a teacher and a student
- the teacher should see everything but the deleted discussion
- the student should just see the normal one and the closed for comments
one
Change-Id: I46dd583c01cbd7817f3d599cb3816bf386cf3266
Reviewed-on: https://gerrit.instructure.com/51095
Tested-by: Jenkins
Reviewed-by: Mike Nomitch <mnomitch@instructure.com>
Reviewed-by: John Corrigan <jcorrigan@instructure.com>
QA-Review: Adam Stone <astone@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
fixes CNVS-19639
test plan:
- in a course with DA on make a group discussion topic
(without an attached assignment)
- go to the group discussion topic index page
- make sure it shows up
- make sure that the courses assignment & discussion topic
indeces are working like normal
Change-Id: Ibe5802a32e59e4ae0fab21707d66fb3bcba1a7fd
Reviewed-on: https://gerrit.instructure.com/51695
QA-Review: Adam Stone <astone@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
Tested-by: Jenkins
fixes CNVS-16702
test plan:
- Create a course group, student, and group assignments associated to the group
set. (create a graded discussion, ungraded discussion, and regular assignment)
- As the student in the course, submit to the assignment and discussion assignments
- Delete the group set that the assignments are associated to
- go to the edit pages for the assignment and discussion assignments
- both should show the name of the deleted group in a disabled select field
- you should be able to edit and save all other settings, aside from group settings
- the submissions made by the student should still be associated with the
assignments in speedgrader (note: this should be true for online url and text
submissions. File submissions will go to an error page due to an unrelated issue)
- assignments without submsissions with an active group select dropdown should
not show the deleted group as an option
- assignments not associated with a group or associated with an active group
should show all expected behaviors
Change-Id: Ia3fb168b7a671a7df309883a381bc62d282960b2
Reviewed-on: https://gerrit.instructure.com/46411
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
Reviewed-by: John Corrigan <jcorrigan@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Hilary Scharton <hilary@instructure.com>
When the user is not logged in, or is not enrolled in the course, don't
show student comments on announcements.
Fixes CNVS-19270
Test Plan:
- Create an announcement in a *public* course as a teacher
- As a student, leave a reply on the announcement
- Verify that the reply shows up for students in the course, as well
as the teacher and account admins
- Log out, and verify that the comments are not visible to
a non-user
- Create an announcement in a non-public course and ensure that
student and teacher and admin can all see them properly
Change-Id: Ide381f6271a1de66ac85f6c7b0e2a2557190991d
Reviewed-on: https://gerrit.instructure.com/50595
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
Reviewed-by: Mike Nomitch <mnomitch@instructure.com>
QA-Review: Adam Stone <astone@instructure.com>
Product-Review: Benjamin Porter <bporter@instructure.com>
fixes CNVS-9825
test plan:
- as a teacher, create a course discussion, with 'Enable podcast feed'
checked
- reply (still as teacher), and include a link to an uploaded mp3 file
- as a student, reply with a link to another uploaded mp3
- if 'Include student replies in podcast feed' and the student access
the podcast feed (link is on the discussion show page), it should
include both mp3s. if that options is false, it should only include
the mp3 from the teacher.
- repeat the process for a group discussion, but notice that for group
discussions, 'Include student replies in podcast feed' is not an
option.
- group discussions should always include student replies in the feed
Change-Id: I54b8b3498d0d428576b904526702814930ec9d55
Reviewed-on: https://gerrit.instructure.com/50658
Tested-by: Jenkins
Reviewed-by: Mike Nomitch <mnomitch@instructure.com>
QA-Review: Adam Stone <astone@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
test plan:
* create a discussion
* note the "last post" date on the discussions index
* copy the course
* the new discussion should not have a "last post"
closes #CNVS-14623
Change-Id: I1ac54a9023a5e9a574e886b2b37bc945c74fe30f
Reviewed-on: https://gerrit.instructure.com/51212
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
The APIs for groups and courses allow the caller to supply a
?include[]=permissions flag. The call did not return permissions for
announcements, meaning that the mobile clients had to guess. If they
guessed wrong, then students would find out AFTER composing the message
that they didn't have permissions. With this change announcement
permissions are communicated as well.
fixes CNVS-18585
test plan:
- Setup a teacher who is part of a course
- call the show api, passing it include[]=permissions and see that
create_announcement is true
- Setup a student who is part of a course
- call the show api, passing it include[]=permissions and see that
create_announcement is false
- Setup a student who is part of a group
- call the show api, passing it include[]=permissions and see that
create_announcement is true
Change-Id: I04ce17416405f8bdf0c9fe0d63f3f29bd7cb07b6
Reviewed-on: https://gerrit.instructure.com/34413
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
QA-Review: Adam Stone <astone@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
fixes CNVS-18897
test plan:
- turn DA on
- make an active user with a verified email address
- make a group assignment discussion & assign to a
group this user is in & publish it
- check /users/:id/messages and the user
should have been notified about the post
- if they get 2 notifications that is okay
(it is a different bug)
- make an ungraded group discussion in a course
- check that participating users get
notifications as well
Change-Id: Ib83315bf109a72fc657f151182851eaa50e90983
Reviewed-on: https://gerrit.instructure.com/49618
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins
QA-Review: Adam Stone <astone@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
fixes the rss page crashing when a media link
was added to a discussion page.
fixes CNVS-10547
test plan:
- create a discussion with podcast and podcast reply enabled
- post a video from the side wiki bar(any format)
- click to get the rss feed of the current discussion
notice no crashing.
Change-Id: I02353a05ff10a3448f36693adca5893acfeef1c9
Reviewed-on: https://gerrit.instructure.com/49388
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
test plan:
- basic regression test of discussions
Change-Id: I36a8726f3c77c7197597de7e3ad67d0227e0cd1a
Reviewed-on: https://gerrit.instructure.com/48361
Reviewed-by: James Williams <jamesw@instructure.com>
Tested-by: Jenkins
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
fixes CNVS-7687
test plan:
- create a group discussion topic with an attachment
- go to one of the group subtopics
- the attachment should be shown there
- you should be able to download it
Change-Id: I5ab5e72e30717b745ebb5e329325574d68e0085c
Reviewed-on: https://gerrit.instructure.com/49179
Tested-by: Jenkins
Reviewed-by: Mike Nomitch <mnomitch@instructure.com>
QA-Review: Adam Stone <astone@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
test plan:
* create a group discussion topic
* put it in a module
* set up a "must contribute" requirement
* as a student who is a member of a group, reply to the
discussion topic
* confirm that the module completion requirement is fulfilled
fixes CNVS-1444
Change-Id: Ie76c2be03fbc1421528c3b917ea57caba9d99b7b
Reviewed-on: https://gerrit.instructure.com/49502
Tested-by: Jenkins
Reviewed-by: James Williams <jamesw@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
previously, admins needed the :manage_courses permission, which felt too
heavy for this use case.
fixes CNVS-17996
test plan:
- create a custom account admin role
- give them the :read_course_content permission
- go to a course with unpublished discussions
- they should be able to see them
Change-Id: I5a572ed0c59f7f2d1100b49d9857dce969f510df
Reviewed-on: https://gerrit.instructure.com/48322
Tested-by: Jenkins
Reviewed-by: Mike Nomitch <mnomitch@instructure.com>
QA-Review: Adam Stone <astone@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
test plan:
* create a group discussion
* set the "available from" date in the future
* visit the discussion as a student in the group
* should not be able to reply
* also should not be able to edit own replies as
a student if the topic is locked
* general regression testing on discussion topics,
specifically locking/unlocking and closing for comments
closes #CNVS-18320
Change-Id: Ib617df7e10f18978f7e0cc4912647de0eefb581f
Reviewed-on: https://gerrit.instructure.com/48396
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins
QA-Review: Adam Stone <astone@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
fixes CNVS-16816
test plan:
- make sure that the following are properly filtered
from modules with DA on/off
- quizzes
- assignments
- graded discussions
- ungraded discusisons
- wiki pages
- check for modules index & student progressions page
- discussion topic index properly filters with DA
ON and OFF
Change-Id: Id0e2e97d2d876dfb48968163bf140da42183a3c9
Reviewed-on: https://gerrit.instructure.com/45133
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Cameron Sutter <csutter@instructure.com>
QA-Review: Sean Lewis <slewis@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
test plan:
* basic regression test on assignments, discussion topics
gradebook, and modules (mostly make sure the basic
index/show/edit views aren't broken)
closes #CNVS-15563
Change-Id: I3411bfb7645b3c4bf8a4663e3e052b4402f899ba
Reviewed-on: https://gerrit.instructure.com/43609
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
test plan:
* create a non-graded discussion topic
* reply to the topic as a student
* edit the discussion to make it a graded assignment
that is locked (i.e. available until a past date)
* submissions for the student's entries should be
visible in speedgrader
closes #CNVS-8768
Change-Id: I1e93cb4d34138b4b37ac43681ba6d08eea89ec9b
Reviewed-on: https://gerrit.instructure.com/45461
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Matthew Wheeler <mwheeler@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
test plan:
* as a teacher, should be able to create replies for a topic
even if it is unpublished or "closed for comments"
(students should still not be allowed to)
* should be able to unpublish a discussion topic if no
students have replied to it (instead of if anybody has replied)
closes #CNVS-10384
Change-Id: Ieefebdd3f41709eda6e593d597d08a57c364992d
Reviewed-on: https://gerrit.instructure.com/45048
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Derek Hansen <dhansen@instructure.com>
test plan:
- with DA on and OFF
- assignments & discussions & quizzes & modules indices load
and filter properly for students/teachers
- assignments needing submitting/grading load and
filter properly
- grade summary page for students & teachers loads
and filters assignments properly
Change-Id: Ibff8ff0357360a7e09d500c2475885f3dfb7f495
Reviewed-on: https://gerrit.instructure.com/44215
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
refs CNVS-16708
test plan:
* post a new discussion topic for a group
* it should work
Change-Id: I0e98b1000383297f21273fe66f2175af9a69d009
Reviewed-on: https://gerrit.instructure.com/43874
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Braden Anderson <braden@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
unpublished topics were not granting :attach rights even to
teachers/topic owners
also fix the selenium specs for draft state
test plan:
* as a teacher,
* create a discussion topic and add an attachment
* save the form
* should have added the attachment correctly
* edit a discussion topic
* should have an option to edit/add an attachment
* should save correctly
fixes #CNVS-14245
Change-Id: Iac4b48b304b4d7eb68c9518bddbf60da70831811
Reviewed-on: https://gerrit.instructure.com/43365
Reviewed-by: Joel Hough <joel@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
fixes CNVS-16367
test plan:
- go to modules page and change stuff and save
- things dont break
- DA'd discussions/assignments/quizzes filter out
of the modules page for students
- the page for all student progressions works
as it should
Change-Id: I8403e4c508169e7f3750f3ddc7494f4a4ed3f371
Reviewed-on: https://gerrit.instructure.com/43113
Reviewed-by: Cameron Sutter <csutter@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Sean Lewis <slewis@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
test plan:
* create a course with a graded discussion with an
upcoming due date
* confirm that the gear menu on the index no longer
has an option to "Close for comments" (that didn't work)
* confirm that dragging the discussion into the
"Closed for Comments" group does not let you
drop it in
closes #CNVS-16029
Change-Id: I50c21fc528409c4d5e90344149d751ff25f86389
Reviewed-on: https://gerrit.instructure.com/42720
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: Matt Fairbourn <mfairbourn@instructure.com>
Product-Review: Janelle Seegmiller <jseegmiller@instructure.com>
Reviewed-by: Matthew Wheeler <mwheeler@instructure.com>
fixes CNVS-15925
test plan:
- quick regression test of DA
- focus on assignments/quiz/discussion/modules index pages
Change-Id: I0c6fe67f14e0692d54727839ece993037fc4f6ca
Reviewed-on: https://gerrit.instructure.com/41958
Reviewed-by: Cameron Sutter <csutter@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Sean Lewis <slewis@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
when draft state is enabled, it shouldn't grant
reply rights when a topic is closed for comments
test plan:
* create and publish a discussion topic
* close it for comments
* as a student, should not be able to add a reply
through the api
refs #CNVS-15563
Change-Id: I238f2e8956c9bd3136dfd69db5bb4d63c07102c0
Reviewed-on: https://gerrit.instructure.com/42282
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
fixes CNVS-15852
test plan:
* setup DA
* for assignments
- as a student, submit an assignment
- as a teacher, remove visibility from that student
- as a student, type in the url (/courses/:id/assignments/:id/submissions/:id)
for your submission for that assignment
> there should not be a link to resbumit the assignment
* for discussions
- as a student, using the API
> you should not be able to reply to a discussion for which you do not have
visibility
Change-Id: Ia4669626c745aac02ac9830865c5a5b2fd75cc37
Reviewed-on: https://gerrit.instructure.com/41947
Product-Review: Hilary Scharton <hilary@instructure.com>
Reviewed-by: Mike Nomitch <mnomitch@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Sean Lewis <slewis@instructure.com>
refs CNVS-15830
test plan:
* create a discussion topic that requires a user to post
* query the stream for that course via the API - the user_has_posted
field should be true or false, but not nil
Change-Id: I213f26951773301ef31668289eae2fc7f9001d49
Reviewed-on: https://gerrit.instructure.com/41975
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
fixes CNVS-15156
test plan:
- with DA on:
- submission:
- make a differentiated assignment
- turn in a submission as a student
- give the student a grade
- as the student, ensure you have the notification, and then
delete it
- as a teacher, take away visibility and delete their grade
- as the student, you should not have a new notification for grade
changing
- as a teacher, comment on this submission
- as the student, you get notified about the comment
- quiz:
- as a teacher make a differentiated quiz
- students without visibility dont get notified about it
- discussion:
- discussion notifications are broken so we cant QA
- with DA off:
- submission:
- comment on a submission as a teacher and make sure the
student is notified
- grade a student as a teacher and make sure the student
is notified
- quiz:
- making & assignment a quiz sends out notifications properly
- discussion:
- discussion notifications are broken so we cant QA
Change-Id: I891f9782b5ae70252e7949a6858896b73ac28871
Reviewed-on: https://gerrit.instructure.com/41025
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cameron Sutter <csutter@instructure.com>
QA-Review: Sean Lewis <slewis@instructure.com>
Product-Review: Hilary Scharton <hilary@instructure.com>
fixes CNVS-15356
Test Plan:
- Add a discussion to a course that has the following options:
* Group discussion
* Allow threaded replies
* Graded
* Set a due date of sometime in the future
- Make the course syllabus publicly available
- In another window (incognito) go to the syllabus
- The syllabus should load without problems.
Change-Id: I177555c6e0ac87554360361a95b1ff0a26d35883
Reviewed-on: https://gerrit.instructure.com/41176
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Fixes CNVS-13979
Test plan:
- As a teacher with access to a given course, create, but do not publish,
a new discussion topic in said course
- As a student enrolled in said course, hit
/api/v1/users/self/activity_stream and verify that the discussion
does not appear in the list
- As the teacher, publish the discussion
- As the student, hit /api/v1/users/self/activity_stream and verify that
the discussion now appears in the list
- As the teacher, unpublish the discussion
- As the student, hit /api/v1/users/self/activity_stream and verify that
the discussion no longer appears in the list
Change-Id: I8f6a75d9b4946f92adf7a5e413ecca0c6b00d65b
Reviewed-on: https://gerrit.instructure.com/40603
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Janelle Seegmiller <jseegmiller@instructure.com>
Reviewed-by: Matthew Wheeler <mwheeler@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
fixes CNVS-14093
test plan:
- turn on DA, create a graded discussion only assigned
to one group
- as a teacher or a student with visibility
- you can access the dicussion through the app or the api
- students without visibility arent included in participants
- as a student without visibility
- the discussion index doesn't show the discussion
- a direct link to the discussion will send you to the
discussion index with a flash error
- the API doesn't show the discussion
(show page, entries page, or replies page)
- cannot subscribe to the topic via the api
- with DA off, the discussion shows up normally
- a student in both sections has visibility
Change-Id: Icefef62695f73d38787d9af08ec26c595c2e4514
Reviewed-on: https://gerrit.instructure.com/39383
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cameron Sutter <csutter@instructure.com>
QA-Review: Anna Koalenz <akoalenz@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
fixes CNVS-4348
test plan:
- have a course that has an end date in the past
- create an announcment, it should not send a notification
- create an assignment, it should not send a notification
- create a discussion topic, it should not send a notification
Change-Id: Ic371d651ae00abe80c17e569f74e94e49c017708
Reviewed-on: https://gerrit.instructure.com/36229
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Braden Anderson <braden@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Drew Bowman <dbowman@instructure.com>
test plan:
* course migration regressions (canvas cc, course copy)
* in addition:
use the content migrations api to queue a content migration
for an account ("/accounts/:account_id/content_migrations")
to import a qti/cc package.
* confirm that the question banks from the package
that would have been normally imported into a course are now
imported into the account
closes #CNVS-12529
Change-Id: I2ef306341d2f7defe03c63a981679a3987f1aaa0
Reviewed-on: https://gerrit.instructure.com/34303
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
fixes CNVS-4475
pre-checkout plan:
* create a course
* open people->groups
* create a student group with multiple students
* open discussions
* create two topics
* make one topic a group assignment
test plan:
* open the topics you created
* verify that a "group discussion" option replaced "group assignment"
* verify that your group assignment is a group discussion
* verify that your group discussion uses the same group set
* verify that the old behavior of presenting child topics is retained
* verify that your non-group topic is not a group discussion
* verify that the "group discussion" flag cannot be changed for topics
with replies
* create a new discussion topic
* verify that "group discussion" is available for ungraded topics
* verify that changes to the field persist
* create a new graded group discussion topic
* post to one of the subtopics as a student in its group
* open the gradebook as the teacher
* verify that the student who posted has a submission but the other
group members do not
* verify that group members can be graded individually
Change-Id: Iada30628f0abdb7d7df4267d695553baf8b952d3
Reviewed-on: https://gerrit.instructure.com/33253
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Trevor deHaan <tdehaan@instructure.com>
Reviewed-by: Jon Willesen <jonw@instructure.com>
Product-Review: Braden Anderson <banderson@instructure.com>
instead of passing an :exportable option to
ActiveRecord::Associations, simply define a constant
on the class containing exportable associations and
attributes. This is due to :exportable breaking
ActiveRecord, and we can't simply monkey-patch in
config/initializers because models are included in
migrations before the initializers are run
Change-Id: I11f1a6b4570c397d8e01010c517bc6efdac7afca
Reviewed-on: https://gerrit.instructure.com/33235
Reviewed-by: Braden Anderson <banderson@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Anthus Williams <awilliams@instructure.com>
QA-Review: Anthus Williams <awilliams@instructure.com>
test plan:
* migration regressions
Change-Id: Ibed8d4820c05b9c69101b215932af32055c3e006
Reviewed-on: https://gerrit.instructure.com/33728
QA-Review: Clare Strong <clare@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
fixes CNVS-12182
test plan
- regression test on incoming mail
- use script/process_incoming_emails to manually trigger the processing
of incoming mail
Change-Id: Iccd74d8fe2b5af3d5eefe25a2736273e3bf559b0
Reviewed-on: https://gerrit.instructure.com/32794
Reviewed-by: Simon Williams <simon@instructure.com>
Reviewed-by: Braden Anderson <banderson@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Trevor deHaan <tdehaan@instructure.com>
Product-Review: Joel Hough <joel@instructure.com>
closes CNVS-12404
test plan:
- verify that importing calendar event data continues to work
- verify that importing with media tracks continues to work
- verify that importing discussion topics continues to work
Change-Id: Ia5c88cc179e3cc8075270d0d423e618f80d61234
Reviewed-on: https://gerrit.instructure.com/33314
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Trevor deHaan <tdehaan@instructure.com>
fixes CNVS-9044; fixes CNVS-12110
test plan:
* open discussions as a user with moderation permissions
* click the gear menu on a pinned discussion topic
* click the "Move To" option
* select a new position for the discussion topic
* verify that the discussion topic is moved
* refresh the page
* verify that the change persists
Change-Id: If118e41066d224dbb3153113c67372ecdd2b3007
Reviewed-on: https://gerrit.instructure.com/32423
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Willesen <jonw@instructure.com>
QA-Review: Trevor deHaan <tdehaan@instructure.com>
Product-Review: Braden Anderson <banderson@instructure.com>
also fix undeleting practice quizzes
fixes CNVS-11955
test plan:
- in a course, delete a quiz
- go to /courses/:id/undelete
- click the button to undelete the quiz
- it should work
- quick regression on undeleting quizzes/discussion_topics both linked and not
linked to assignments
Change-Id: I88d30d1baa5685e6c4f16280c9aa34c8965b31fe
Reviewed-on: https://gerrit.instructure.com/32217
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Reviewed-by: Josh Simpson <jsimpson@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
test plan:
* create a course with a discussion topic
* export the course
* create a new course
* add a user group in the new course
* import the package into the course
* should not fail or import as a group topic
fixes #CNVS-11377
Change-Id: Ied4c80ed48d6495bdee60f79948445141997d5e8
Reviewed-on: https://gerrit.instructure.com/31087
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Matt Fairbourn <mfairbourn@instructure.com>
test plan (non-draft-state):
- as a teacher
* create each of the following:
- assignment
- discussion
- page (hidden from students)
- page (not hidden from students)
- quiz (leaving it unpublished)
* add each of the above items to a module
* refresh the modules page
- each of the above items should be listed
- as a student
* navigate to the modules page
- the hidden page and quiz should not be listed
- all other items should be listed
* click on the first item in the module
* click through each of the 'Next' buttons
- only items listed in the module should be presented
test plan (draft-state):
- as a teacher
* create each of the following:
- assignment
- discussion
- page
- quiz
* add each of the above items to a module
* refresh the modules page
- each of the above items should be listed
- as a student
* navigate to the modules page
- only published items should be visible
* click on the first item in the module
* click through each of the 'Next' buttons
- only published items should be presented
* publishing items (as a teacher) should make them available to the
student in the module progression as well as the modules page
closes CNVS-10831
Change-Id: Ia84e56f42438ff531a4e15784eefaec2ead8ecdd
Reviewed-on: https://gerrit.instructure.com/30312
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
This was a beta api that didn't work out.
Test plan:
canvas should still work (sorry, this touches lots of stuff)
Change-Id: I31680b83f72f6d739ce74735ba40d7a760debb33
Reviewed-on: https://gerrit.instructure.com/29506
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
Change-Id: I9627b75a5473044f9902a5e171a79d4446772ed7
Reviewed-on: https://gerrit.instructure.com/29572
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
fixes CNVS-10341
test plan:
* before applying this commit, if possible:
* create a discussion
* add a reply as a student
* after applying this commit:
* open the discussion as the student
* verify that you can edit the reply you added before, but not
those from other users
* add a new reply
* without refreshing, verify that you can edit your new reply
* refresh the page
* verify that you can still edit your reply
* test basic canvas functionality (sorry)
Change-Id: Ifa654f7d853fd167d5bfbaee6184657209d58272
Reviewed-on: https://gerrit.instructure.com/28413
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
Reviewed-by: Jon Willesen <jonw@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: Braden Anderson <banderson@instructure.com>
fixes CNVS-9622
basically, stop with the assumption that lists must be contiguous,
so that we don't have to keep compacting them all the time. allows
for far simpler queries adding things to lists.
test plan:
* regression test on lists - files, context modules, assignments,
etc.
* basically make sure that adding new items puts them in the same
spot as it did before (bottom of list?), and that reordering
still works
Change-Id: I31c9ad4ed9b7db2b23e032617d4a01611c8e3c03
Reviewed-on: https://gerrit.instructure.com/26709
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
fixes CNVS-9263
test plan
be sure to test ungraded discussions, graded discussions, graded
group discussions (root level and group topics), and announcements
with draft state disabled
- ensure publish icons do not appear on discussion index page
- ensure publish button does not appear on discussion show page
- ensure that discussions for delayed posting are not visible to
students
with draft state enabled
- ensure that publish icons appear on the discussion index page and
that clicking them toggles the discussion's publish state
- ensure that publish button appears on the discussion show page
and that clicking it toggles the discusssion's publish state
- ensure that unpublished topics are not visible to students
- ensure that published topics are visible to students, even if
the topic is for delayed posting
- ensure that topics for delayed posting show a 'This topic will
open on' message on the topic show page
- ensure that [un]publishing the root topic of a graded group
discussion changes the group level discussion and vice versa
- ensure that announcements are published when posted and cannot
be unpublished
test plan for misc frontend fixes
- as a teacher, create a new discussion
- ensure it is unpublished
- as a student, create a new discussion
- ensure that it is published and that no publish button appears
on the topic show page or the topic index page
- as a teacher, create a new graded group discussion
- navigate to the group level topic
- publish the topic using the button on the show page
- ensure that the button switches to the 'Published' state
- as a teacher, create an announcement
- ensure that it is published
Change-Id: If0c46d232bc25776770012654af23e5cf10bbb45
Reviewed-on: https://gerrit.instructure.com/26654
QA-Review: Joel Hough <joel@instructure.com>
Reviewed-by: Jon Willesen <jonw@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Clare Strong <clare@instructure.com>
test plan:
in a course with draft state enabled,
1. create an assignment, module, discussion, quiz, and wiki page.
2. delete them all.
3. restore them via /courses/X/undelete.
4. they should come back unpublished.
note: once an item is "deleted", its published state is lost,
so we can't bring them back to their former state.
fixes CNVS-9838
Change-Id: Ie40ebc5123cf49dae2c6c1af380be954f9f80a75
Reviewed-on: https://gerrit.instructure.com/27036
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Sterling Cobb <sterling@instructure.com>
Product-Review: Jeff Fox
QA-Review: Myller de Araujo <myller@instructure.com>
fixes CNVS-9331
instead, as appropriate, use one of (or a combination of, if necessary):
* instance variable caching
* Rails.cache
* query caching (implicit)
also:
* remove the buggy cc.active_pseudonyms (didn't account for
sharding) in favor of cc.user.all_active_pseudonyms
* streamline assignments in the menu to not need to construct method
names
test-plan: N/A
Change-Id: Id0dec60464a283985e39493b90711b32cb5cca82
Reviewed-on: https://gerrit.instructure.com/26936
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
QA-Review: Jacob Fugal <jacob@instructure.com>
also make update_based_on_date more defensive (i.e. lock the row) for any
double jobs out in the wild. we don't delete jobs, so you could have dups
even without this bug, e.g. you set it for 1pm, then 2pm, then back to
1pm, et voilà, you now have 2 jobs at 1pm
fixes CNVS-9561
test plan:
1. under course settings, disable comments on announcements
2. create a new announcement w/ a delayed posting date
3. confirm that only one delayed job is created (you should not get
double-emailed)
4. create another announcement w/ a delayed posting date
5. change the posting date
6. revert to the original date
7. while there will be multiple jobs, you should still not get double-
emailed for the announcements
Change-Id: I86de7fc418599de86d9ef300ea7b3c2bf9f924b3
Reviewed-on: https://gerrit.instructure.com/26652
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeff Belser <jbelser@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
Product-Review: Marc LeGendre <marc@instructure.com>
fixes CNVS-9265
test plan
- ensure that the publish icon is not visible when the account
level draft state variable is unset
- ensure that the publish icon is visible when the account level
draft state setting is set
- ensure that ungraded topics with no replies can be published/unpublished
Change-Id: Ia93b91aa54812610e5c07e063f512e605d6235f2
Reviewed-on: https://gerrit.instructure.com/23470
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: Braden Anderson <banderson@instructure.com>
refs CNVS-4704
fake_arel gets us most of the way to rails3's arel, but with some
caveats. the workarounds (mostly) work in both, but it'll be nice to not
have them crufting around when we're on rails3. so only use the
workarounds in CANVAS_RAILS2 branches.
Change-Id: Ia1f5cfa6b10f83cdb8d9a6e397b12401d180118d
Reviewed-on: https://gerrit.instructure.com/26331
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
QA-Review: Jacob Fugal <jacob@instructure.com>
also force deleted_at to be utc
test plan
- delete a user
- the user should have deleted_at populated
- delete a quiz
- the quiz should have deleted_at populated
Change-Id: Ibf3442b832f648d754ac9959f053570bc8c06a19
Reviewed-on: https://gerrit.instructure.com/25585
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
test plan:
* enroll a student in course B
* create a delayed announcement for 10 min in the future
** on some course A
* perform a course migration from course A to course B
* wait 10 min
* verify that the student in course B receieved a notification
** for that announcement
Change-Id: Id93c12601cdcfdd62f120127e271267f6e93ad6c
Reviewed-on: https://gerrit.instructure.com/25334
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Marc LeGendre <marc@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
closes CNVS-6824
This adds a permissions attribute to the returned json for discussion topic
contexts (Course, Group).
The permissions attribute contains an optional permission of
"create_discission_topic" which returns true or false depending on whether the
current user can create discussion topics for the course or group. For
performance reasons this is only added to a single course/group json and not in
lists so the only call that will return it is /api/v1/<context>/<context_id>
where context is a course or group. Since we did not want to include this on
every response its a custom permissions attribute for course and groups in the
course_json or group_json serialization methods.
Using the includes parameter for the API supplying a value of "permissions"
will include the permissions with "create_discussion_topic" for a group and
course. When the object is serialized to json it checked to see if the model
implements a serialize_permissions method and calls that to render or override
permissions generated from the policies.
- Create a test Course. Make sure the course allows members to post topics.
- Add a student to the course.
- Make a call to /api/v1/courses/<id> where "<id>" is the id of the created
course.
- The response should include a permissions attribute with a boolean value for
"create_discission_topic" see the example below.
- Make a call to /api/v1/courses to return a list of course objects.
- The permissions attribute should not be included in the response.
- Create a test Group tied to the course created in the first step.
- Add a mamber to the group.
- Make a call to /api/v1/groups/<id> where "<id>" is the id of the created
group.
- The response should include a permissions attribute with a boolean value for
"create_discission_topic" see the example below.
- Make a call to /api/v1/groups to return a list of group objects.
- The permissions attribute should not be included in the response.
Example Response:
{
id: 42,
...
permissions: {
create_discission_topic: true
}
}
Change-Id: Ia02d5aa67e345740a93dd0f63e357e7cb5e1efd6
Reviewed-on: https://gerrit.instructure.com/24478
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Nick Cloward <ncloward@instructure.com>