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
Expand Up @@ -15,6 +15,7 @@


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


require_variable($id); // Course Module ID require_variable($id); // Course Module ID


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


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


require_variable($id); // course require_variable($id); // course


Expand Down

0 comments on commit 9af2f86

Please sign in to comment.