Skip to content

Commit

Permalink
Merge branch 'MDL-60997-34' of git://github.com/junpataleta/moodle in…
Browse files Browse the repository at this point in the history
…to MOODLE_34_STABLE
  • Loading branch information
David Monllao authored and snake committed Feb 1, 2018
2 parents 350e280 + 34f90c2 commit 17fed89
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/classes/message/message.php
Expand Up @@ -101,6 +101,9 @@ class message {
/** @var string An email address which can be used to send an reply. */ /** @var string An email address which can be used to send an reply. */
private $replyto; private $replyto;


/** @var string A name which can be used with replyto. */
private $replytoname;

/** @var int Used internally to store the id of the row representing this message in DB. */ /** @var int Used internally to store the id of the row representing this message in DB. */
private $savedmessageid; private $savedmessageid;


Expand Down Expand Up @@ -130,6 +133,7 @@ class message {
'contexturl', 'contexturl',
'contexturlname', 'contexturlname',
'replyto', 'replyto',
'replytoname',
'savedmessageid', 'savedmessageid',
'attachment', 'attachment',
'attachname', 'attachname',
Expand Down
2 changes: 2 additions & 0 deletions lib/tests/message_test.php
Expand Up @@ -62,6 +62,7 @@ public function test_get_eventobject_for_processor() {
$message->contexturl = 'http://GalaxyFarFarAway.com'; $message->contexturl = 'http://GalaxyFarFarAway.com';
$message->contexturlname = 'Context name'; $message->contexturlname = 'Context name';
$message->replyto = "random@example.com"; $message->replyto = "random@example.com";
$message->replytoname = fullname($USER);
$message->attachname = 'attachment'; $message->attachname = 'attachment';
$content = array('*' => array('header' => ' test ', 'footer' => ' test ')); // Extra content for all types of messages. $content = array('*' => array('header' => ' test ', 'footer' => ' test ')); // Extra content for all types of messages.
$message->set_additional_content('test', $content); $message->set_additional_content('test', $content);
Expand Down Expand Up @@ -96,6 +97,7 @@ public function test_get_eventobject_for_processor() {
$this->assertSame($message->contexturl, $stdclass->contexturl); $this->assertSame($message->contexturl, $stdclass->contexturl);
$this->assertSame($message->contexturlname, $stdclass->contexturlname); $this->assertSame($message->contexturlname, $stdclass->contexturlname);
$this->assertSame($message->replyto, $stdclass->replyto); $this->assertSame($message->replyto, $stdclass->replyto);
$this->assertSame($message->replytoname, $stdclass->replytoname);
$this->assertSame($message->attachname, $stdclass->attachname); $this->assertSame($message->attachname, $stdclass->attachname);


// Extra content for fullmessage only. // Extra content for fullmessage only.
Expand Down

0 comments on commit 17fed89

Please sign in to comment.