fixes GRADE-2160
Test plan:
- Create a course and assignment with Anonymous Peer reviews enabled
- Add 2 students with immediate notifications for peer reviews enabled
- Have both students submit to assignment
- As a student, go to Dashboard and click the Anonymous Peer Review link
under Recent Activity
- Check student's messages for Anonymous Peer Review notification and
follow the link
- Neither link should result in error
Change-Id: Ibd0cb0e72a5d370dfef15b1462a84a8b2a727b40
Reviewed-on: https://gerrit.instructure.com/199808
Tested-by: Jenkins
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Reviewed-by: Adrian Packel <apackel@instructure.com>
Reviewed-by: Gary Mei <gmei@instructure.com>
QA-Review: Adrian Packel <apackel@instructure.com>
Product-Review: Keith Garner <kgarner@instructure.com>
This will now show the last message that the user was part of in
the activity stream instead of the last message sent to anyone in
the parent conversation.
Fixes COMMS-1468
Test Plan:
* Have a course with at least one teacher and two students
* As the teacher, send a message to both students
* Go to student 1's dashboard and select the activity stream. Notice
the timestamp for the message
* Wait for 60 seconds
* As student 2, reply to the message (only reply to the teacher).
* If you have redis caching setup, flush the cache here by running
`redis-cli` in a terminal, then running `flushdb`
* As student 1, reload your dashboard and notice the timestamp for
the conversation hasn't been changed.
Change-Id: I51968966643f351faaf46bcdfce542ec77617039
Reviewed-on: https://gerrit.instructure.com/165893
Reviewed-by: Steven Burnett <sburnett@instructure.com>
QA-Review: Steven Burnett <sburnett@instructure.com>
Tested-by: Jenkins
Product-Review: Landon Gilbert-Bland <lbland@instructure.com>
categorize_stream_items now checks the :read permission instead of just
checking whether the assignment is published.
fixes ADMIN-530
test plan:
* create a peer review
* go to the course as a student
** see the peer review in the course activity
* remove peer reviews from the assignment
* flush redis cache
* student should no longer see the peer review on their recent activity
Change-Id: I4e047ae80a63729ac663c63cdba26a1548c65d48
Reviewed-on: https://gerrit.instructure.com/132654
Reviewed-by: Mysti Sadler <mysti@instructure.com>
Tested-by: Jenkins
QA-Review: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jon Willesen <jonw+gerrit@instructure.com>
name did not match usage, and all remaining usage can be satisfied in
other ways.
closes CNVS-38407
test plan: regression test message sending (immediate, delayed, and
dashboard notifications w/ stream items)
Change-Id: Ibe110527b4644cbaa417c53b2b53c2fd7e18dc9e
Reviewed-on: https://gerrit.instructure.com/120520
Tested-by: Jenkins
QA-Review: Heath Hales <hhales@instructure.com>
Reviewed-by: Matt Smith <msmith@instructure.com>
Reviewed-by: Benjamin Christian Nelson <bcnelson@instructure.com>
Reviewed-by: Jon Willesen <jonw+gerrit@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
fix some N+1 queries, repeated time_zone calls,
and add a temporary cache around expensive stream item code
Change-Id: Iae5c385d6fd5917d9f35626e2d160ad71074f498
Reviewed-on: https://gerrit.instructure.com/87012
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
refs #CNSV-26056
Change-Id: I2a87fa63249a882680d3ee0c76f08d458433f6f9
Reviewed-on: https://gerrit.instructure.com/69524
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
refs: PFS-2039, CNVS-18186, PFS-2040, CNVS-18187
**Test Plan
1. Create assignment in course
2. require peer reviews on assignment, and select anonymous peer
reviews.
3. create a couple student enrollments in course, and teacher
4. assign peer reviews for assignment
5. as on student submit an assignment.
6. as a user assigned to peer review go to home page make sure
anonymous user shows for user on peer review.
7. go to perform peer review, make sure the students name
who made the submission doesn't show.
8. make comment on review and make sure anonymous user shows
when student reviews comments.
9. do the above without anonymous review checked and make sure
the names are visible.
1. Enable crocdoc
2. submit an assignment with an attachment for an assignment
with anonymous peer reviews.
3. review assignment in crocdoc, user should not be able
to view or create annotations.
1. make sure that anonymous peer reviews are available when creating
an assignment
2. make sure anonymous peer reviews are not available when creating
a graded discussion.
Change-Id: I30220042ab9e30b226385398c63eb8792e640197
Reviewed-on: https://gerrit.instructure.com/56624
QA-Review: Adam Stone <astone@instructure.com>
Reviewed-by: John Corrigan <jcorrigan@instructure.com>
Tested-by: Jenkins
Product-Review: Brandon Broschinsky <brandonbr@instructure.com>
fixes CNVS-18522
the links for the dashboard stream items need to be generated with the
domain root account's shard activated, not the user's shard.
test-plan:
- have a course and user in root account A
- enroll the user in the course
- create some dashboard stream items for the user in the course (e.g.
new discussion, assignment, etc.)
- have the same user also associated with root account B on a distinct
shard
- view the user's dashboard while on account B's domain
- links to items in the course (on account A's shard) should have a
shortened global ID rather than just a local ID
- following those links should successfully take you to the course on
account A's domain
Change-Id: I75b269cf3f1eb3074a8f908dcd0c2249b325f8e6
Reviewed-on: https://gerrit.instructure.com/53961
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
this swaps out (most of) our ruby haax with i18nliner
test plan:
1. verify string extraction:
1. `rake i18n:generate` before and after this commit
2. confirm `config/locales/generated/en.yml` is identical
2. verify english defaults:
1. use canvas in english
2. confirm everything looks correct
3. verify translation keys/scopes:
1. run canvas w/ RAILS_LOAD_ALL_LOCALES=true and optimized js
2. use canvas in spanish
3. confirm that todo está bien
4. confirm you can now use i18nliner-y features:
1. call `t` without a key
2. use the fancy erb block syntax
Change-Id: I979479c0889fe7e31ee0c962a4bd1998ab54d711
Reviewed-on: https://gerrit.instructure.com/42785
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jennifer Stern <jstern@instructure.com>
Product-Review: Jennifer Stern <jstern@instructure.com>
QA-Review: Matt Fairbourn <mfairbourn@instructure.com>
refs CNVS-15830
test plan:
* involve yourself in a conversation
* on your dashboard, the last message and last author info should be
correct and not asplode
Change-Id: I997be1a0f40939d1999ffbc99ec7b28ed322ffbc
Reviewed-on: https://gerrit.instructure.com/41976
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>
refs CNVS-15830
this is deprecated in rails 3, and raises an error in rails 4
test plan:
* dashboard and course streams should still work
Change-Id: I180ae447ac7f384659d91d6e8382e5a7d5703576
Reviewed-on: https://gerrit.instructure.com/41788
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Nick Cloward <ncloward@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
fixes CNVS-1455
test plan:
- create a graded discussion that requires peer review
- the discussion should have a peer review icon in listings
- assign peer reviews to students
- the students should have a peer review link in their
activity stream
Change-Id: I416c876c9e21b5ce2a72c46fceb7a33bdfd3f96e
Reviewed-on: https://gerrit.instructure.com/36459
Reviewed-by: Joel Hough <joel@instructure.com>
Product-Review: Joel Hough <joel@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: David Josse <david@instructure.com>
closes: CNVS-9814
add support throughout our formatting layer
to give us a way to convert values
to the wall clock time of the timezone for
a course (or really any other way we choose),
and then apply that to several selected
date/time displays.
TEST PLAN:
- Login as a user who's part of a course
with at least some data in each tab
- Check the following areas to ensure that
the correct timezone-differentiated hover
text is showing up:
* Announcements -> Date Sent column
* Announcement Detail -> Date Sent (top right)
* Assignments -> Due Date column
* Assignment Detail -> Due Date (bottom table)
* Collaborations -> Start Date
* Discussions -> Last Post Date
* Discussions -> Due Date
* Discussion Detail -> Post date of each reply
* Modules -> (if locked) shows date to unlock
* Quizzes -> Due Date
* Syllabus -> Dates on the left
* Syllabus -> Due dates on the right
* Settings -> Course Details -> start/end date
* Settings -> Sections -> start/end date
* Recent activity page -> Everything
Change-Id: I048c2de85d9f9b196d35c6c65ae104dab7441eee
Reviewed-on: https://gerrit.instructure.com/34861
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Drew Bowman <dbowman@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
fixes: CNVS-12305
test plan:
summaries email should be formatted correctly with indentations.
twitter messages should not be longer than 140 characters.
Change-Id: I912a63b03c6c14de0c1d678063bb8fa33504d843
Reviewed-on: https://gerrit.instructure.com/33171
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Nathan Rogowski <nathan@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
1. make sure the returned stream item ids are relative to the user, not
the domain, since we need to look up the instances by those ids from
the user's shard later
2. make sure we actually handle shortened global ids, rather than
asploding
3. just cache stream items on the user's shard, not on every shard the
user visits. makes cache invalidation practical/possible
test plan:
1. set up canvas with redis and sharding
2. set up two additional shards (your user is in the initial/primary one)
3. enroll your user in a course in the second shard
4. as another user, do something that creates a stream item for the course
(e.g. create an announcement)
5. as the original user, confirm that:
1. you see the stream item on your shard's dashboard
2. you can dismiss the stream item
3. when you refresh the page, it is still dismissed
6. repeat step 4.
7. as the original user, confirm that:
1. you can see the stream item on the shard 3 dashboard
2. you can dismiss the stream item
3. when you refresh the page, it is still dismissed
8. as the original user, confirm that the items are dismissed from your
dashboard on all shards
Change-Id: I2c600685015640af36d9e33ac71e25cd536d7391
Reviewed-on: https://gerrit.instructure.com/24155
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Mark Ericksen <marke@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
fixes CNVS-5309
test steps:
- as a teacher, create a few discussion topics with graded
checked and due, begin and until dates are in the future, past
and current.
- as a student, view the discussions list and ensure that the
present and past topics are visible but the future is not.
- click the past discussion topic and make sure you are able to
view the discussion but not reply to it.
- click the present discussion and make sure that you can reply
to it.
- as the student and teacher, ensure that the visible discussion
topics appear in the stream items (dashboard) and the future
do not (for the student).
Change-Id: Ibb0a3d05ae830e764c8068a6c9d4ead804e91139
Reviewed-on: https://gerrit.instructure.com/20082
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Marc LeGendre <marc@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
To support instructors of MOOCs, making a submission comment
via gradebook or speedgrader should no longer create a
conversation message in the instructor's inbox. The
conversation will only exist in the sent folder.
If a private conversation between the teacher and student
already exists, the message will be added to the private
conversation and its state will not be modified for the teacher.
In general, the behavior of submission comments was changed so
that creating a submission comment does not create a message in
the author's inbox. Instead the message should appear in the
author's sent folder. This applies to all users (teachers and
students).
fixes #CNVS-1162
test plan:
- As a teacher, create a submission comment from gradebook.
Make sure the comment doesn't show up in the teacher's inbox.
- As a teacher, create a submission comment from speedgrader.
Make sure the comment doesn't show up in the teacher's inbox.
- In general, create submission comments as a teacher and a
student and run through the following combinations of states:
- Existing Private Conversations:
- If a private conversation between the student and the
teacher already exists, the state of the message should not
be updated for the submission comment author.
- If a private conversation between the student and the
teacher does not already exist, the message should only show
up in the sent folder for the submission comment author.
- Notification Preference: Mark new submission comments as read
- Setting this should still prevent incoming submission
comment messages from showing up in the instructor's inbox
or changing the state of an existing private conversation.
- Muted Assignments:
- When an assignment is unmuted and only one user has made
submission comments, that user should be treated as the
message author.
- When an assignment is unmuted and more than one user has
commented on the submission, the message is treated as a new
message for everyone.
Change-Id: Ic55cc64f181e8a0c560fe325bd31ea65082568d2
Reviewed-on: https://gerrit.instructure.com/16007
Reviewed-by: Zach Pendleton <zachp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
two major pieces:
* use context_type/context_id instead of context_code for
three relations so that sharding extensions will
automatically work
* deserialize stream item data as actual AR objects instead
of OpenObject (for similar reasons)
test plan:
* run the predeploy migration, but not the postdeploy one
* view your dashboard on a shard other than your home shard;
it should be identical to your home shard
* view courses that you are enrolled in with the same id but on
different shards. the activity stream should have the correct
data for the course in that shard, for both courses (i.e.
no mixing of data from the two shards)
* do actions that generate new stream items, and verify the new
items appear correctly for the above two steps
* run the postdeploy migration, wait for the job to finish, then
repeat the test plan
Change-Id: I8d5fcadb8d971acf7388a12e9151a3e927751f44
Reviewed-on: https://gerrit.instructure.com/15462
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
test plan:
1. log in as User A
2. send a message to User B
3. log in as User B
4. the conversation should show on the dashboard
5. reply to the conversation
6. the conversation should no longer show on the dashboard
Change-Id: I0da7cfd004deff2ae04e9d187f6171ed1b4b28b0
Reviewed-on: https://gerrit.instructure.com/15033
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
the new dashboard design categorizes recent activity into buckets that can be
expanded/collapsed, and inidividual messages can be dismissed. the categories
are announcements, conversations, discussions and assignments. this redesign
applies to the homepage dashboard, the group home page, and the course homepage
when "recent activity dashboard" is selected as the course home page type.o
the motiviation is that the dashboard should capture and present in one place
important information happening in all the user's courses or groups, and allow
for jumping into this information to see more details:
- announcements/discussions should show on the dashboard when they are created,
or when there are root replies to recent announcements
- conversations should show on the dashboard when there is new activity
- assignments should show on the dashboard when they are created, or when
changes are made at least a couple hours after being created
the presence of a dashboard item means there is activity for that item that may
be of interest to the user. additionally, the dashboard items will show
read/unread state (excluding assignments) for items which the user has not yet
viewed.
additionally, global messages such as course inivitations, account level
announcements, and new user messages have been restyled, but will keep their
place above the recent activity widget on the dashboard.
test plan:
- visit many exising user's dashboards and make sure they are functional in the
new style.
- visit canvas as a brand new user (no enrollments), a new user enrolled in
a new course and make sure the dashboard is restyled and the messaging makes
sense.
- make an account level announcement and make sure it shows up on user's
dashboards.
- create all different types of conversations: single, group, bulk private,
from submission comment, add user to convo, etc. and make sure the
appropriate dashboard items appear and make sense
- create discussions and announcements, reply to them at the root level and at
the sub entry level (sub entries will not make new dashboard items), test
from both a read and unread user's perspective, making sure dashboard items are
correct. (note that read/unread state will not be correct for existing items
before this code is applied, but should be correct for future items moving
forward)
- dismiss dashboard items and account announcements, make sure they stay
dismissed.
- test creating assignments, waiting > 2 hours, and updating due dates or other
assignment details. make sure items appear. note that unread state will not
exist for assignment notifications.
closes#10783
refs #11038
refs #11039
Change-Id: I276a8cb1fae4c8a46425d0a368455e15a0c470c5
Reviewed-on: https://gerrit.instructure.com/14540
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>