test plan:
1. make a request to the user activity stream api
2. observe the course data
3. make sure it matches what the course api would
return
Change-Id: I13cae11545567a5662bb247f96f93f823d301d52
Reviewed-on: https://gerrit.instructure.com/11725
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
Create upvotes in the upvoting user's shard, so we can query for them,
and make the upvote_count and post_count cached counts update properly
cross-shard.
Remove a foreign key constraint that was preventing users on other
shards from posting items to a collection.
Create stream_item_instances on the user's shard, and make sure to query
them from there.
Further work should be done to optimize :include so that we can
efficient pull in the stream items for the instances.
test plan: as a user on one shard, interact with a collection on another
shard -- posting to it, upvoting/downvoting, cloning items from that and
other shards. verify you don't get errors, missing data, or incorrect
counts.
Change-Id: I91aeebd404cd20663a533b2f38c08ec90c65868e
Reviewed-on: https://gerrit.instructure.com/11228
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
When a new item is created, all users following the collection will get
an activity stream post, except for the user who created the item.
This stream item type doesn't show up in the existing dashboard, but is
returned by the API.
test plan: use the api to create two users, and a collection, and have
them both follow the collection. Have user A create an item in the
collection. Verify that user B gets a stream item, but user A doesn't.
Change-Id: I84b6e537ce913e17e9480074ecce08bc99f3e14b
Reviewed-on: https://gerrit.instructure.com/11205
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
They weren't using the course/group for the context_code, so they would
only show up in the global stream.
Note this doesn't fix existing stream items, just new ones going
forward.
test plan: add an assignment or generate any other sort of notification
that gets sent to the stream. verify that it shows up both on the
dashboard and on the individual course/group stream.
Change-Id: Icfa1430545e80c575c76960a7267ae1d7d8ddad4
Reviewed-on: https://gerrit.instructure.com/10842
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
These were hard coded to always return 21 items, same as the dashboard
screens in the web UI. They're now fully pagniated, though the per_page
default in this case is 21, to match the old behavior.
test plan: make an api call to users/self/activity_stream and
courses/X/activity_stream, and verify the pagniation. this touches the
code for the activity stream in the ui in a refactor, but shouldn't have
any visible changes.
Change-Id: I8da63eb4e03bb616d66d0af27efa30ef786dd3dd
Reviewed-on: https://gerrit.instructure.com/10678
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
fixes#8403
test plan:
* import an external content package with discussion topics
* make sure to find a discussion topic that has no author
* on the dashboard of a user that has a stream item about that topic
it should not show that the current user is the author
Change-Id: I681be31462a82591d60665dce967aa1548ef3a07
Reviewed-on: https://gerrit.instructure.com/10579
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
also added checkbox (and api support, etc.) to assignment submission
forms and gradebook2
test plan:
1. create a group assignment
2. as a student, go to submit the assignment
3. ensure the group comment checkbox is present and unchecked on all
submission forms (file upload, text entry, etc.)
4. ensure that checking it sends a group comment and leaving it
unchecked does not
5. go to the submission details
6. ensure that the group comment checkbox is unchecked by default
7. as a teacher, go to the speedgrader and ensure the checkbox is
unchecked
8. go to the gradebook and ensure the checkbox is unchecked
9. go to gradebook2 and ensure it is unchecked and functional (wasn't
present before)
10. delete all comments and go to the dashboard. ensure that when you go
to add the first comment, you have a working group comment checkbox
(if there are existing comments on the stream item, you won't have a
real comment form, just a link that looks like a text area)
Change-Id: I009b797c2b391c20f41f33c7c0b8afdd4b57dbd3
Reviewed-on: https://gerrit.instructure.com/8978
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
display stream items for new and updated appointment groups, as well as
when someone signs up another user (e.g. group signup)
removed unused message templates, fixed date_string range to just show a
single date if date parts are the same
test plan:
1. publish an appointment group and ensure all pertinent students get a
dashboard notification
2. add times to an appointment group and ensure all pertinent students
get a dashboard notification
3. sign up a group for a timeslot and ensure all other group members
get a dashboard notification
Change-Id: Id0dec52c0376fb6e14b0f26bb60e4695b25f7591
Reviewed-on: https://gerrit.instructure.com/7938
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
Discussions have an option to not allow users to see replies
until they've posted themselves. This worked correctly on the
discussion page itself, but the user would still see the
replies in their stream
This also removes that option, and the delayed posting option
from group discussion topics. These settings are useless in
that context because all users are admins and can see the
topics anyway.
Test Plan:
* create a topic in a course and check the box "Replies are not visible until after users post"
* post a reply to that topic as the teacher
* log in as a student in that course and go to your dashboard
* you should see the topic in the stream but not the response you created as a teacher
closes#4706
Change-Id: I0c50a3adb8e18ea74d209f4c9a5ac429b7faaf0e
Reviewed-on: https://gerrit.instructure.com/6684
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
"Mute Assignment" links in gradebook and speedgrader
stop all announcements, emails, and stream items for grades
and comments from appearing until the teacher unmutes the
assignment.
Change-Id: Id74b305b568ff86e2a0e6f9319cfa40bb98b1bcd
Reviewed-on: https://gerrit.instructure.com/5779
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Zach Pendleton <zachp@instructure.com>
Stop storing recent messages in conversation stream, as streams
don't exist on user level and so can't reflect user differences
in deleted messages.
Change-Id: I4750f7c58bf80e9f06060eb089fe83cfc5668d2b
Reviewed-on: https://gerrit.instructure.com/5646
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
update_all's update hash doesn't have any magic performed on bare Time
objects; it assumes any Time object it's given is already in UTC. using
a TimeWithZone object (regardless of timezone), which Fixnum#ago and
friends happen to return, is still fine.
Change-Id: I297b2a3211b896b5225ebcfaaee3c1eb56e55fb6
Reviewed-on: https://gerrit.instructure.com/5351
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
and ContextMessages out
Change-Id: I70a17794a2054b865c719114e41537927e97dc6d
Reviewed-on: https://gerrit.instructure.com/4877
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
This was already a small issue if the job queue was on a different
database driver than the main database, and it'll become more important
as more AR connections are introduced.
Change-Id: I204becadd32bb935df096e8c937a04bb6962f0b2
Reviewed-on: https://gerrit.instructure.com/4601
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
We're only using submission stream items for displaying submission comments,
so the body is not necessary and a waste of space.
Change-Id: Ic214eb53565368c3550f8238a83f6120a624e62b
Reviewed-on: https://gerrit.instructure.com/3126
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>