Skip to content

Commit

Permalink
Change to the mail option, now a global option.
Browse files Browse the repository at this point in the history
  • Loading branch information
rkingdon committed Jun 18, 2004
1 parent b506fd4 commit 9af2f86
Show file tree
Hide file tree
Showing 4 changed files with 774 additions and 8 deletions.
13 changes: 5 additions & 8 deletions mod/dialogue/dialogues.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

require_once("../../config.php");
require_once("lib.php");
require_once("locallib.php");

require_variable($id); // Course Module ID

Expand Down Expand Up @@ -134,10 +135,8 @@
$item->conversationid = $conversation->id;
$item->userid = $USER->id;
$item->timecreated = time();
// set mailed flag if checkbox is not set
if (empty($_POST['sendthis'])) {
$item->mailed = 1;
}
// reverse the dialogue mail default
$item->mailed = !$dialogue->maildefault;
$item->text = $_POST[$textarea_name];
if (!$item->id = insert_record("dialogue_entries", $item)) {
error("Insert Entries: Could not insert dialogue record!");
Expand Down Expand Up @@ -197,10 +196,8 @@
$entry->conversationid = $conversation->id;
$entry->userid = $USER->id;
$entry->timecreated = time();
// set mailed flag if checkbox is not set
if (empty($_POST['sendthis'])) {
$entry->mailed = 1;
}
// reverse the dialogue default value
$entry->mailed = !$dialogue->maildefault;
$entry->text = $_POST['firstentry'];
if (!$entry->id = insert_record("dialogue_entries", $entry)) {
error("Insert Entries: Could not insert dialogue record!");
Expand Down
1 change: 1 addition & 0 deletions mod/dialogue/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

require_once("../../config.php");
require_once("lib.php");
require_once("locallib.php");

require_variable($id); // course

Expand Down
Loading

0 comments on commit 9af2f86

Please sign in to comment.