Commit Graph

6 Commits

Author SHA1 Message Date
Simon Williams ca778d679a fix notification link to student submission page
using polymorphic_url, if you pass a second parameter, it gets added to
the query string instead of the main url, so this was creating urls that
looked like .../submissions?id=123 instead of .../submissions/123.  the
whole reason we can't just use the submission object is because these
urls are named for submissions, but use the user id as the id parameter.
luckily, since assignments only have course as a possible context, we
can use the built in rails url method directly

fixes CNVS-19299

test plan:
- have a teacher set up to receive submission notifications immediately
- as a student, submit to an assignment
- the link in the message for the student submission page should go to
  the right place

Change-Id: I68914781eb9bed2dd34223c597cfdb2db223d4d1
Reviewed-on: https://gerrit.instructure.com/51017
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2015-03-26 22:02:06 +00:00
Cody Cutrer d6312b7e0d use url helpers in messages
fixes CNVS-11838

and then choose the host more intelligently to use one the user
can actually log in to

test plan
- have accounts on two shards, referred to as "account 1" and
 "account 2" from now on
- have account domains that are resolvable for the accounts,
 referred to as account1.canvas.dev and account2.canvas.dev from
 now on
- have account 2 trust account 1 by POSTing to
 account2.canvas.dev/api/v1/accounts/<account 2 id>/trust_links
 with a site admin's auth token and setting
 trust_link[managing_account_id] to account 1's global id.
 you can now use users from account 1 on account 2

- regression test notifications, especially considering
 notifications generated by account 2 that are sent to account 1
 users.
- account 1 users should have links that use account1.canvas.dev
 and have global ids for referenced objects that live on
 account 2's shard,
 e.g. account1.canvas.dev/courses/2~1/discussion_topics/2~30
- avatars should use the avatar owner's account domain
- account 2 users should have links that use account2.canvas.dev
 and have local ids,
 e.g. account2.canvas.dev/courses/1/discussion_topics/30
- following the links when the user receiving the notification is
 logged in should take the user to the linked object
- following the links when not logged in should take the user to
 a login page that they are able to log in to
- be sure to at least check:
 context file downloads links (e.g. discussion topic attachments)
 file downloads links (e.g. conversation message attachments)
 avatars links
 conversation notifications
 discussion notifications
 peer review notifications

Change-Id: Idebd247fee99a2b973d3fa6f4f2fca0e723d99a5
Reviewed-on: https://gerrit.instructure.com/31867
Tested-by: Jenkins
Reviewed-by: Matthew Wheeler <mwheeler@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: Joel Hough <joel@instructure.com>
2015-02-18 23:07:57 +00:00
Eric Berry acfe36bcc5 twitter link sending to correct url
fixes CNVS-5147

test steps:
- trigger a twitter notification and ensure the link is pointing to
  the correct url (without 'mr' in the url)

Change-Id: Ib70b67039e919720c941c15ec1d20eca652d478b
Reviewed-on: https://gerrit.instructure.com/19882
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
Product-Review: Marc LeGendre <marc@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
2013-04-26 16:02:03 +00:00
Joel Hough 51f4737ca3 determine link protocol in messages from HostUrl
fixes CNVS-1521

test plan
- send affected messages from a host that uses http
- ensure that messages use http for links
- send affected messages from a host that uses https
- ensure that messages use https for links

Change-Id: Ie1fca1e92572c004d58e051bf190fed2ec145191
Reviewed-on: https://gerrit.instructure.com/17834
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
2013-02-19 22:18:40 -07:00
Bracken Mosbacker 6c6147b350 i18n assignment messages
make it stop.

Change-Id: I07ac240d0def58730dc2fe2135605543884158ec
Reviewed-on: https://gerrit.instructure.com/4494
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-06-30 10:42:47 -06:00
Brian Whitmer 2c5c268982 add twitter to notification preferences
Twitter recently stopped offering whitelist
exceptions for things like direct messaging.  We are
trying to work around the limitations by having
a user direct message themselves instead of having
some global account user that direct messages everyone.

Also added a "short_host" method for HostUrl that
in the future we can use to generate short-ish links
to include in tweets.  For now the links are somewhat
short, at least.

refs #4045

Change-Id: Iad59b979b166d572827a8ce16d3f9fcdd57d512d
Reviewed-on: https://gerrit.instructure.com/2938
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
2011-06-14 11:57:48 -06:00