Commit Graph

136 Commits

Author SHA1 Message Date
Kenneth Romney 31361b5255 extract lib/text_helper to gems/canvas_text_helper
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>
2014-04-30 15:18:40 +00:00
Jon Jensen d4b4129950 customize "Canvas" in registration confirmation email, fixes CAT-128
add a product_name account setting to allow schools to customize the
registration confirmation email. ostensibly this setting could be used
throughout canvas to allow greater customization, but let's not get ahead
of ourselves

test plan:
1. on your root account, set settings[:product_name] to something
2. /register as a new user
3. confirm that the "set a password" email uses that product name in the
   header and body

Change-Id: I6e0d5aa8ad80c4cda40e2aac1367364293843627
Reviewed-on: https://gerrit.instructure.com/33846
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Dave Donahue <ddonahue@instructure.com>
Product-Review: Marc LeGendre <marc@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
2014-04-25 18:51:23 +00:00
Joel Hough 3d9222409a uses conversation context tags for notifications
fixes CNVS-11269

test plan
- start conversations and send messages from new and old
 conversations between users who share no contexts, one context,
 two context, and >2 contexts
- ensure that the notification emails include shared courses next
 to the author's name
- ensure that messages sent from new conversations only include
 the selected context next to the author name

Change-Id: Ibc05752100dfb4b139c8dce64cfe1985987c6467
Reviewed-on: https://gerrit.instructure.com/30778
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Willesen <jonw@instructure.com>
QA-Review: Trevor deHaan <tdehaan@instructure.com>
Product-Review: Joel Hough <joel@instructure.com>
2014-03-05 18:05:18 +00:00
Joel Hough a8c9664761 no longer uses regru-premailer
fixes CNVS-11460

test plan
regression tests on these notification messages:
- new announcement (text email and summary)
- new discussion topic (text email and summary)
- new discussion entry (text email and summary)
- summaries (text and html emails
- updated wiki page (text email, html email, and summary)

regression test on calendar event desrciption in ics

regression test on aria-labels for multiple choice quiz answer
inputs. radio and checkboxes

Change-Id: I229837357a8e1bc1bb887a1b047f86636a62209a
Reviewed-on: https://gerrit.instructure.com/31045
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>
2014-03-04 19:12:33 +00:00
Zach Pendleton 7ef5bf3ec4 add reply messaging to email notifications
fixes CNVS-5793

test plan:
  * set a user's notification settings to ASAP;
  * as another user, do the following and verify that
    the email received contains messaging informing the
    user that they can reply directly to the email:
  * send a conversation message;
  * comment on a discussion topic that the first user is
    subscribed to;
  * comment on one of the user's assignment submissions.

Change-Id: Iffe0763aad26579e5b5955f4f31e5e5242c14355
Reviewed-on: https://gerrit.instructure.com/29504
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Braden Anderson <banderson@instructure.com>
QA-Review: Matt Fairbourn <mfairbourn@instructure.com>
Product-Review: Zach Pendleton <zachp@instructure.com>
2014-02-14 15:31:23 +00:00
Joshua Simpson 1e81ea7caa move quiz into quizzes namespace as a precursor to enginifying
fixes CNVS-10679
this commit refactors quiz into a quizzes namespace. it contains various
shims to facilitate the data migration of polymorphic relationships
('Quiz' -> 'Quizzes::Quiz').  JIRA contains several tickets linked to
the above tickets in regards to removing these shims after the data
migration, as well as the strategies on reverting the shims once the
data migration is complete.
Change-Id: I30c566d60a87af6ee83e9d0041fdcb909ead6a89
Reviewed-on: https://gerrit.instructure.com/28573
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Derek DeVries <ddevries@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
Product-Review: Josh Simpson <jsimpson@instructure.com>
2014-01-24 00:08:46 +00:00
Stanley Stuart 03f4140295 only send notifications the first time for a quiz regrade
test plan:
  - Create two students in a course.
  - As one of the students, complete a quiz. In a different browser
    window, start taking the quiz as the other student.
  - As a teacher, in a diffrent browser than the student taking the
    quiz, regrade the quiz.
  - You should get a "Quiz Regrade Notification".
  - Now as the student who is taking the quiz, submit the quiz. Their
    quiz should get regraded and you should NOT get another Quiz Regrade
    Notification.

fixes CNVS-9485, CNVS-8358

Change-Id: I20d254e32001e0932f17a906703675589c333d35
Reviewed-on: https://gerrit.instructure.com/28955
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
Reviewed-by: Derek DeVries <ddevries@instructure.com>
Product-Review: Stanley Stuart <stanley@instructure.com>
2014-01-21 21:58:48 +00:00
Joel Hough adab5bbe24 add conversation subject line to notification messages
fixes CNVS-10397

test plan
- set conversation message notification preference to asap
- send a conversation message from new conversations
- check the receiving user's notification messages
- ensure that the subject of the conversation appears in the
 plain test and html versions of the message
- send a conversation message from old conversations
- check the receiving user's notification messages
- ensure that no subject appears in the plain test or html
 versions of the message
- set conversation message notification preference to delayed
- send a conversation message from new conversations
- ensure that the summary notification message shows the subject
- send a conversation message from old conversations
- ensure that the summary notification message does not show a
 subject

Change-Id: I5d333d6bb1daa16213974cc06b2c36aa74b53a73
Reviewed-on: https://gerrit.instructure.com/28740
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Matt Fairbourn <mfairbourn@instructure.com>
Reviewed-by: Braden Anderson <banderson@instructure.com>
Product-Review: Joel Hough <joel@instructure.com>
2014-01-17 22:22:27 +00:00
Cody Cutrer a00831b19b Merge pull request #379 from Kulgar/peer-reviews-bugs
Peer reviews bugs
2013-12-19 08:53:06 -08:00
Kulgar 6d6ad519d2 Modified the link in facebook/twitter templates as well. 2013-12-11 10:27:52 +01:00
Kulgar 4303605998 Solved URL bug in other email templates 2013-12-09 15:57:37 +01:00
Kulgar d9e86a5e1e Solving Email URL and Recipient 2013-12-09 15:57:31 +01:00
Jacob Fugal 34893f80bd remove uses of memoize
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>
2013-12-06 22:03:24 +00:00
Zach Pendleton 0cb357411c fix html escaping in submission comments emails
fixes CNVS-9731

test plan:
  * as a teacher in a course, set your 'submission comment'
    notification preference to ASAP;
  * as a student in that course, submit an assignment and
    make a submission comment with at least one line break
    in it;
  * as a site admin, navigate to /users/:id/messages, where
    :id is the id of the teacher;
  * find the submission comment message and click its html
    tab;
  * verify that the message appears without any html tags
    printed inline and that line breaks are preserved.

Change-Id: I38520113c3668d2442b68c846bc0018322ec9301
Reviewed-on: https://gerrit.instructure.com/26826
Reviewed-by: Zach Pendleton <zachp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Matt Fairbourn <mfairbourn@instructure.com>
Product-Review: Zach Pendleton <zachp@instructure.com>
2013-12-04 19:14:12 +00:00
Ian Hoerner be0339361e fixes typo in regrade notification
test plan
 - trigger regrade notification
 - verify typo fixed

Change-Id: I8639a9685d39b1ff59dad1507e3cc4b3c8858fb4
Reviewed-on: https://gerrit.instructure.com/25989
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Hannah Bottalla <hannah@instructure.com>
Product-Review: Hannah Bottalla <hannah@instructure.com>
QA-Review: Hannah Bottalla <hannah@instructure.com>
2013-11-06 23:05:26 +00:00
Jon Jensen 112ed0442a fix html escaping issue in enrollment notification email
fixes CNVS-8895

make links actually be links, instead of escaped html

test plan:
i'm fairly certain this template can't be triggered in the UI or even the
API (until CNVS-8900 is fixed), so the way to test this would be through
the console (that's where i saw the problem):

1. create a user
2. make sure the user is registered/active/etc./has a password
3. create a course (don't enroll the user yet)
4. in the console, do:
   c.enroll_user(u, 'TeacherEnrollment', enrollment_state: 'active')
5. check the user's messages
6. you should see the enrollment notification message, and there should
   be an actual link to the course, rather than a bunch of escaped html

Change-Id: I80a078bb4e7d5795889419d9a1a837517994b5c2
Reviewed-on: https://gerrit.instructure.com/25381
Reviewed-by: Landon Wilkins <lwilkins@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeff Belser <jbelser@instructure.com>
Product-Review: Marc LeGendre <marc@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
2013-10-18 18:53:31 +00:00
Jon Willesen 93b4c9dba6 fix domain in account merge notification emails
these email templates were passing in a user to
HostUrl.context_domain instead of an account.

fixes CNVS-7350

test plan:
 - setup a canvas installation with multi-tenancy enabled.
 - create 2 accounts on the same shard with different domains.
   do not use the default account or the default account's
   domain.
 - enable sis imports on both of the accounts.
 - make sure background jobs are running.
 - sis import a user on the first account.
 - go to the first account's users page and verify the user was
   imported.
 - sis import the same user to the second account. you can use
   the same csv file.
 - go to the second account's users page and verify the user was
   imported there as well.
 - go to /messages for the second account's user and find the
   "merge email communication channel" notification (it should
   be the only one). in both the plain text and html versions
   of the message, verify the domain in merge link is the
   domain of the first account.

Change-Id: I7e7b9d1ac9ed3546ca7a076f039b9f795bc87f3b
Reviewed-on: https://gerrit.instructure.com/23681
Reviewed-by: Zach Pendleton <zachp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Jon Willesen <jonw@instructure.com>
2013-08-26 16:04:44 +00:00
Stanley Stuart 9b76539a3e add the ability to regrade a quiz
This commit gives teachers the ability to regrade quizzes by using
different options per quiz question:

* Current Correct Only
* Full Credit (regardless of answer choice)
* Previous and Current Correct
* No Point change (for updating the display of a question)

Test Plan:
  You'll want to run through each question regrade option making sure
  scores change appropriately.

"I seldom end up where I wanted to go, but almost always end up where I
need to be." - Douglas Adams

Change-Id: I9dbb88154cd3ac630bf59dbf3e997a87f75649dc
Reviewed-on: https://gerrit.instructure.com/22018
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Derek DeVries <ddevries@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
Product-Review: Stanley Stuart <stanley@instructure.com>
2013-08-19 17:29:26 +00:00
Stanley Stuart 54fe29d405 add host to submission needs grading url
test plan:
  - as a teacher, make a quiz with a manually graded question type
  - as a student, take the quiz
  - as the teacher, you should get a notification that the submission
    needs grading, and the url should have the correct host in it (e.g.,
    should have the correct link that takes you to the quiz correctly).

fixes CNVS-7434

Change-Id: I3b853a7d461a4fb4eecbca92141f60d44d81bc6e
Reviewed-on: https://gerrit.instructure.com/23327
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Derek DeVries <ddevries@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
Product-Review: Stanley Stuart <stanley@instructure.com>
2013-08-14 22:09:04 +00:00
Stanley Stuart 959e979d00 change "Submission Needs Grading" notification type to "All Submissions"
test plan:
  - as a teacher, make a quiz that needs a manual grading type (such as
    essay question or file upload)
  - change your settings for "All Submissions" to "immediately"
  - as the student, turn in the quiz. as the teacher, you should
    receive a notification that the quiz needs grading.

fixes CNVS-7403

Change-Id: I5d090ede1b2de1fcdd822bd61cb251e5c744dce1
Reviewed-on: https://gerrit.instructure.com/23124
QA-Review: Myller de Araujo <myller@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Derek DeVries <ddevries@instructure.com>
Product-Review: Stanley Stuart <stanley@instructure.com>
2013-08-07 22:36:34 +00:00
Christina Chang cc91892353 render href link in collaboration email template 2013-07-31 09:39:21 -06:00
Bracken Mosbacker 89508bf997 make new migration UI the default
removed old migration UI.

Test Plan:
 * rejoice
 * zip file uploads in files UI for courses, groups, and users should work
 * the links /courses/:id/imports and /courses/:id/imports/list should redirect to new UI
 * the course copy api should work
 * doing a course copy in the UI should work
 * rejoice

closes CNVS-6499

Change-Id: Icd71c5f7bf8a97570f6572938b01504589a6a718
Reviewed-on: https://gerrit.instructure.com/21943
Reviewed-by: James Williams  <jamesw@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
2013-07-08 17:19:06 +00:00
Stanley Stuart d46cfcdc06 notify teachers when quiz needs reviewing
test plan:
  - as a teacher, make a quiz with a file upload question or essay
    question
  - as the student, take the quiz
  - as the teacher/site admin, check your messages
    (/users/:user_id/messages). You should see a notification that you
    need to grade the submission with a link to the quiz submission.
  - as the teacher, create a new quiz without a manually graded question
    type (e.g. just create a quiz with one question that is multiple
    choice)
  - as the student, take the quiz.
  - as the teacher, you should not have gotten a submission that you
    need to grade the quiz.

fixes CNVS-5730

Change-Id: I9831ad9a05e807f004d3e18cc82086d5fe7cf5a3
Reviewed-on: https://gerrit.instructure.com/20820
QA-Review: Myller de Araujo <myller@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Florence <ryanf@instructure.com>
Product-Review: Stanley Stuart <stanley@instructure.com>
2013-05-24 21:54:47 +00:00
Ethan Vizitei 83aa4c1a8b fix quiz submission notifications
FIXES CNVS-5540

make graded notifications come from quiz
submissions and not from regular submissions
so that we can accurately differentiate
between "graded" and "regraded".

Also makes sure that no messages get sent until
after essay questions on quizzes are graded.

Finally extracts the quiz_submission broadcast
policy into it's own object because there's
a lot of repetition there (did the same
for submission broadcast policy since I
was touching it anyway, could be a good pattern
for other broadcast policy definitions)

TEST PLAN:
  1) Log in as a student
  2) take a quiz with an essay question
  3) you should NOT get a notification
  4) login as a teacher, and grade that quiz
  5) the student should get a notification that
  their quiz has been graded
  6) that notification should NOT say that the
  quiz has been RE-graded.
  7) repeat, but grade from gradebook instead of
  speedgrader

Change-Id: Id057f6d7abb64906c03334031d0d66af1e25adb2
Reviewed-on: https://gerrit.instructure.com/20511
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Stanley Stuart <stanley@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
Reviewed-by: Cameron Matheson <cameron@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2013-05-15 21:29:18 +00:00
Zach Pendleton f2b6406726 use right host names on communication channel merge emails.
fixes CNVS-1608

test plan:
  * on a canvas installation with multi-tenancy enabled
    and cassandra being used for global lookups, create
    at least two accounts (A and B) on the same shard that
    don't share domain names;
  * create an active user account in account A;
  * create a duplicate user in account B through an SIS
    import;
  * verify that the duplicate user receives a merge
    notification and that the link in the email properly
    references account A, while the domain in the
    notification body references account B.

Change-Id: I44f84c082b319dd9129da8422a9e4c8c03103a13
Reviewed-on: https://gerrit.instructure.com/20615
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Mark Ericksen <marke@instructure.com>
QA-Review: Cam Theriault <cam@instructure.com>
Product-Review: Zach Pendleton <zachp@instructure.com>
2013-05-14 23:10:57 +00:00
Eric Berry ee59a60e66 resolved html emails including html tags
fixes CNVS-5493

test steps:

Trigger the following emails and ensure that the HTML and plain text
versions of the email appear proper.

* conversation message received
* new announcement
* new discussion entry
* new discussion topic
* updated wiki page
* summary (daily or weekly)

Change-Id: I9638badb500eeb6cb23e4a83bd8395cd5dc40608
Reviewed-on: https://gerrit.instructure.com/20296
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Eric Berry <ericb@instructure.com>
QA-Review: Eric Berry <ericb@instructure.com>
2013-05-10 16:48:50 +00:00
Zach Pendleton b1751ef05c only send reminder notifications for peer reviews.
fixes CNVS-5532

test plan:
  * create at least two students in a course with immediate
    notification preferences;
  * create a new assignment in their class with
    automatically assigned peer reviews and online
    submission;
  * create a rubric for the assignment;
  * as each of the two students, submit the assignment;
  * wait for the assignment due date to pass, then check
    each students' messages. verify that each has received
    one notification about their peer reviews.

Change-Id: I2ef5be7fedfa775e8ed60aa80545c34e88a53623
Reviewed-on: https://gerrit.instructure.com/20321
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Mark Ericksen <marke@instructure.com>
Product-Review: Zach Pendleton <zachp@instructure.com>
QA-Review: Zach Pendleton <zachp@instructure.com>
2013-05-07 22:23:14 +00:00
Joel Hough 1561947c66 add comment body to submission comment notification
fixes CNVS-5374

also adds attachment list and media comment message

test plan
- as a teacher, make a submission comment
- as a student, make a submission comment in reply
- ensure that the notification messages sent out include the
 comment text
- make a submission comment that includes attachments
- ensure that the notification message sent out includes a list
 of the attachments and the download links work

Change-Id: If8f2e40a435ff16b91a4545e3631f0c15802c9aa
Reviewed-on: https://gerrit.instructure.com/20140
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Eric Berry <ericb@instructure.com>
Product-Review: Marc LeGendre <marc@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
2013-05-02 20:02:11 +00:00
Eric Berry 85fb4ca243 added missing translations to notifications
fixes CNVS-5506

test steps:
- create notifications for the following in another language and
  ensure that the translations show properly

  1. New File Added (SMS)
  2. New Files Added (SMS)
  3. New Student Organized Group (Summary)

Change-Id: I27ff75b52793586f933ef24fcee2d7ab3ded8800
Reviewed-on: https://gerrit.instructure.com/20193
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Mark Ericksen <marke@instructure.com>
Product-Review: Marc LeGendre <marc@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
2013-05-01 20:15:20 +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
Jon Jensen b2507982f5 restore footer in plaintext emails, fix host in html email footer link
fixes CNVS-5421

the plaintext footer broke in e01a6d14

additionally, html emails always link to HostUrl.default_host, which
usually will not be correct

test plan:
1. do something that triggers an email notification
2. look at the plaintext version of it
3. it should have a footer with a link to set your communication prefs
4. the html email should also have a footer with a link, and it should
   point to the correct host for your user

Change-Id: Ie4109b6d2b40a018e22e85522a5cd749fac633aa
Reviewed-on: https://gerrit.instructure.com/19836
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Cam Theriault <cam@instructure.com>
Reviewed-by: Eric Berry <ericb@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
2013-04-25 16:26:08 +00:00
Jon Jensen d70ce51b37 disallow html in translations, fixes CNVS-5413
make i18n:check reject anything that looks html-y, since we should be
using wrappers (or markdown) instead

test plan:
1. generate the following emails and confirm that the html version is ok:
   * content_export_failed
   * content_export_finished
   * merge_email_communication_channel
   * migration_export_ready
   * migration_import_failed
   * new_context_group_membership
2. go to the quiz detail page as a student and confirm it loads/looks
   correct (specifically where it says the number of questions below the
   title)

Change-Id: I0b8bfb0628a081859915c33764bfc3ce49690e8d
Reviewed-on: https://gerrit.instructure.com/19823
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Cam Theriault <cam@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
2013-04-23 16:56:51 +00:00
Mark Ericksen ff77f2b36a stop truncating new announcement full text in email
fixes CNVS-5103

testing notes:
===============
* generate a "new announcement" message
  with a body longer than 500 characters.
* verify the full body is in the plain-text
  version of the message

Change-Id: I245aa7ecec09cce6d33154ab14be759698fd95ec
Reviewed-on: https://gerrit.instructure.com/19588
Reviewed-by: Jon Willesen <jonw@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
Product-Review: Mark Ericksen <marke@instructure.com>
2013-04-17 22:29:57 +00:00
Eric Berry ffd0fe56c3 HTMLify the outbound email messages and update the /messages UI
All of the outbound email notifications have been updated to have
a matching HTML version of the email in order for us to send multi-
part emails. There has also been some tweaking of the other email
messages (summary, plain text, etc) with a better looking layout

fixes CNVS-4728
fixes CNVS-4795

test steps:
- generate email messages for each template and review the results
  in the users message list view (/users/1/messages)

Change-Id: I1fd9cf2b134209e42c8d174f19b50963e6502f6a
Reviewed-on: https://gerrit.instructure.com/18942
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
Product-Review: Eric Berry <ericb@instructure.com>
2013-04-03 20:03:34 +00:00
Zach Pendleton 3efc58683b preserve html line breaks in discussion entry emails.
fixes CNVS-4514

test plan:
  * set up a student or teacher with asap notifications
    on discussion entries;
  * as a student or teacher that shares a class with the
    first user, reply to an existing discussion topic and
    include some line breaks in your response;
  * verify that the first user's discussion entry
    notification and verify that line breaks are preserved.

Change-Id: Iabfbc8db55e883d01621434400ce234a9b3a0e33
Reviewed-on: https://gerrit.instructure.com/18467
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Reviewed-by: Joel Hough <joel@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
2013-03-11 14:24:19 -06:00
Eric Berry 69ddd1451e added html template for multipart emails
this allows you to create a message with the suffix .email.html.erb
and it will be automatically included in the multipart email

test steps:
- create an email template (e.g. assignment_graded.email.html.erb)
- send a message with that template
- check your email and make sure that it shows as HTML

Change-Id: Ic27bc2f3ddf7795f5e4323d36ad7fe863583ee7d
Reviewed-on: https://gerrit.instructure.com/17981
Reviewed-by: Zach Pendleton <zachp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
2013-03-01 17:26:29 -07:00
Mark Ericksen 91f957bba0 clean up Notification creation in 'rake db:initial_setup'
identify "Reminder" category notifications as deprecated

fixes CNVS-3918, CNVS-3824

Explicitly run through 'rake db:load_notifications'

Testing Notes:
===========
* Run 'rake db:load_notifications'
* verify that it runs without error
* verify the 3 "Reminder" category entries
   have their category changed to "DEPRECATED - Reminder"
   Those are the following entries:
   * Assignment Publishing Reminder
   * Assignment Grading Reminder
   * Assignment Due Date Reminder
* If desired, define a new notification type in
   /app/messages/notification_types.yml
   and verify that after rake task is run,
   the new entry appears.
* Test setup of new database

Change-Id: Ib5dc69c7adc7a643f08ada94d9048274d8cd4e12
Reviewed-on: https://gerrit.instructure.com/17948
QA-Review: Marc LeGendre <marc@instructure.com>
Reviewed-by: Joel Hough <joel@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2013-02-22 17:15:05 -07:00
Zach Pendleton dbb259e62d support html emails.
fixes CNVS-65, CNVS-3921

test plan:
  * copy app/messages/new_discussion_entry.email.erb to
    /app/messages/new_discussion_entry.email.html.erb;
  * create a new discussion in a class with at least two
    users (who have their discussion entry notifications
    set to "immediately");
  * as user 1, post a reply to the discussion;
  * verify that user 2 receives a multipart email with
    an html part and a plaintext part.

Change-Id: I30e3e15fa53817767c770491ab8c19286281e0aa
Reviewed-on: https://gerrit.instructure.com/17964
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Willesen <jonw@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
2013-02-22 12:37:36 -07: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
Zach Pendleton ceefa4a463 stop truncating discussion entry notification messages.
fixes CNVS-3949

when sending email notifications re: a new discussion entry,
include the whole entry instead of a truncated, 200
character version.

test plan:
  * create a new discussion post in a class with at least
    two users;
  * set the users' "discussion entry" notification policies
    to ASAP;
  * as user A, post a discussion entry to the previously
    created topic that is longer than 200 characters;
  * as a site admin, navigate to /users/:id/messages, where
    :id is the user ID of user B;
  * verify that user B has received a notification of user
    A's entry and that the notification contains the entire
    body of user A's entry (i.e. it has not been truncated).

Change-Id: I2b524ea5a36cf8e142522d8498e4aba80b8aa554
Reviewed-on: https://gerrit.instructure.com/17789
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Eric Berry <ericb@instructure.com>
Tested-by: Eric Berry <ericb@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
2013-02-19 10:39:05 -07:00
Eric Berry eb72ceefad updated host url to the proper website as used on the link
fixes CNVS-3542

test plan:
- fill out the form to enroll in a canvas.net class
- ensure registration email contains proper website url

Change-Id: I95bf478bdb66cf8c693ed6c4cea364ba4c4fdb73
Reviewed-on: https://gerrit.instructure.com/17480
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Mark Ericksen <marke@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
2013-02-11 09:06:06 -07:00
Eric Berry 04543fd454 notification url redirects to specific announcement
fixes CNVS-3224

test steps:
- create an announcement which is sent to students
- ensure that the links in the announcements directs to the
  announcement page and not the index page

Change-Id: Id0987d409ead5103679745e6129938e6985dfb22
Reviewed-on: https://gerrit.instructure.com/17374
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Willesen <jonw@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
2013-02-08 13:11:52 -07:00
Zach Pendleton 1a9ffccfe4 show right course domain for new users in course invites.
fixes #CNVS-2581

when sending a course invitation, rely on the course's
HostUrl instead of the user's HostUrl. This ensures that
new users will see the proper domain (e.g. the domain of
the course) instead of "canvas.instructure.com."

test plan:
  * register a new user - a user w/o an account in canvas -
    for a course;
  * view the email sent and verify that it displays the
    domain of the course and not the default domain.

Change-Id: I37f09037100d42f0d9fe52eb2172c6562ff3e976
Reviewed-on: https://gerrit.instructure.com/16512
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Mark Ericksen <marke@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
2013-01-10 16:37:08 -07:00
Dave Donahue 6ab15d087b bug: if override due date is before default due date on an assignment, it is not applied
fixes #CNVS-2309

Problem:
Overriding a due date to be earlier than the default was having no
effect because the default date was getting lumped in with the overrides
and treated the same way when deciding which to use.

Solution:
If there are applicable overrides, don't take the default into account.

Notes:
The issue was happening as a result of the way the VariedDueDate class
indiscriminately lumped due dates together and returned the last one.
Part of the solution was removing the VariedDueDate class and instead
relying on the override methods on an Assignment. This was done not
only to fix the bug at hand but also to move toward a more consistent
interface for handling varied due dates.

Change-Id: If9d24725a19b134d5d92d3a5c08d6794f466fa9c
Reviewed-on: https://gerrit.instructure.com/16406
QA-Review: Myller de Araujo <myller@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
2013-01-09 09:37:00 -07:00
Jeremy Stanley 6edaff4a7d VDD: notifications; closes #10896
The following changes have been made:
 - Assignment Created
  - students see the due date that applies to them
  - admins see "Multiple Dates"
 - Assignment Due Date Changed
  - students see the due date that applies to them;
    they receive no notification if their date doesn't change
  - admins receive a separate notification for each due
    date that changes, that they have access to;
    the message indicates which section or group applies
    (section-limited TAs will not get messages about due dates
    in sections they can't see)
 - Assignment Submitted Late
  - the message text does not change, but the student's overridden
    due date is checked
 - Group Assignment Submitted Late
  - same as previous

There were some bugs fixed along the way:
 - no longer send duplicate Assignment Submitted and
   Assignment Resubmitted notifications when an assignment
   is resubmitted
 - Group Assignment Submitted Late actually goes out
   (there was a typo in the whenever clause)

Test plan:
 - Create a course with two sections and a teacher
 - Enroll a student in each section
 - Enroll a section-limited TA in each section
 - Make sure everybody involved is signed up for "Due Date"
   notifications, ASAP
 - Using the API, Create an assignment with a default due date
   (in the past) and an overridden due date for section 2
   (in the future).  the assignment and override must be
   created in the same request (use the "Create an assignment"
   API and supply assignment[assignment_overrides]; it may
   be easier to use a JSON request body)
 - Verify that everybody got an "Assignment Created"
   message (use /users/X/messages)
   - the teacher should see "Multiple Dates",
     as should the TA in section 2 (because the default date
     is still visible to him)
   - the student and the TA in section 1 should see
     the default due date
   - the student in section 2 should see the overridden
     due date
 - "Due Date Changed" messages will not go out for assignments
   that were created less than 3 hours ago (by design, and not
   new with this changeset), so for the remaining items, you
   either need to wait 3 hours, or falsify created_at for the
   assignment you just made...
 - Change the default due date for the assignment, leaving it
   in the past
  - Everybody except the student in section 2 should get a
    notification with the new date
 - Change the overridden due date for section 2, leaving it
   in the future
  - everybody except the teacher and TA in section 1 should get
    a notification about the new date
  - the teacher and section-2 TA's notifications should indicate
    that they apply to section 2 (the student's should not)
 - submit the assignment as each student
  - the teacher should get one notification about each submission:
    the one about the student in section 1 should say it's late;
    the one about the student in section 2 should not
 - submit again
  - the teacher should get one notification about each submission:
    the one about the student in section 1 should say it's late;
    the one about the student in section 2 should not, and should
     be identified as a resubmission
     (there is no late-re-submission notification)

Change-Id: I26e57807ea0c83b69e2b532ec8822f6570ba1701
Reviewed-on: https://gerrit.instructure.com/14662
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
2012-11-14 09:04:07 -07:00
Stanley Stuart 3a6a8a6433 fixes #9481 - wrong invitation message for designers
Fixed a typo in the email and summary templates for Messages

Test Plan:
  1. Login to a canvas test course as a teacher
  2. Click on "Settings"
  3. Click on the "Users" tab
  4. Click on "Add Users"
  5. In the 'Add More' drop down menu select "Designers"
  6. Type in the email address for an account you wish to add to the course
  7. Click "Continue…"
  8. Click "OK Looks Good, Add these 2 Users"
  9. Log into the test accounts within Canvas for the accounts you just added
    and accept the invitation.
  10. Log into the test accounts within Canvas for the accounts you just added
  and accept the invitation.
  11. Click on your profile name in the upper right corner of Canvas.
  12. Click on "Home" on the left navigation pane to go to your Dashboard page.
  13. Ensure that for the designer's acceptance, it should say:
    "<user> just accepted", NOT "<user> justed accepted>"

Change-Id: Iba6be76b0d5ae818dc06b9a694cc1dd53a86cec2
Reviewed-on: https://gerrit.instructure.com/14444
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Amber Taniuchi <amber@instructure.com>
Reviewed-by: Dave Donahue <dave@12spokes.com>
2012-11-08 09:26:11 -07:00
Jeremy Stanley fe56193ec8 remove half-baked assignment reminders feature
we're doing work and consuming storage keeping track of reminder
information that nobody is consuming.

should we decide to implement assignment reminders in the future,
reverting this commit would be an excellent start; then a
delayed_job that periodically called remind! on each result of
AssignmentReminder.needs_sending would get us most of the
way there.

Change-Id: I2b110cab79d53229b30c9fef64aac646b719a700
Reviewed-on: https://gerrit.instructure.com/14569
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2012-10-29 11:20:34 -06:00
Jon Jensen 210341787a email footer i18n, fixes #11164
string extraction so this can get translated.

test plan:
1. switch to a locale that has a translation for messages.email.footer (or
   create one if needed)
2. do something that causes you to get an email notification
3. check your email (or /messages)
4. the footer message about communication preferences should be translated

Change-Id: Idf66eba616bbbbafff9d8b1c645055f0853063d4
Reviewed-on: https://gerrit.instructure.com/14244
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
2012-10-09 09:53:11 -06:00
Jacob Fugal 962a44ce67 remove disastrously unconventional trailing slashes; fixes #9721
Change-Id: I4af72de9edfaa1fd5be1e844f4b89e640f9e5c4b
Reviewed-on: https://gerrit.instructure.com/12689
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bryan Madsen <bryan@instructure.com>
2012-08-02 16:54:48 -06:00
Cody Cutrer 29cf0db046 remove WikiNamespace fixes #9121
no user visible behavior change

test plan:
 * make sure existing wiki contents haven't disappeared
 * make sure a new course gets a wiki that functions correctly
 * make sure wiki rss feeds are still functional
 * try to access the wiki from a new course from multiple requests
   simultaneously; it should get a single wiki that's not conflated

Change-Id: I339b56c39d7868dbdec3df4007291a429272b1cf
Reviewed-on: https://gerrit.instructure.com/12432
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2012-07-30 09:15:04 -06:00