Permalink
Browse files

Change to the mail option, now a global option.

  • Loading branch information...
1 parent b506fd4 commit 9af2f862cf0ba1cb19f8b987527366666e2560fd rkingdon committed Jun 18, 2004
Showing with 774 additions and 8 deletions.
  1. +5 −8 mod/dialogue/dialogues.php
  2. +1 −0 mod/dialogue/index.php
  3. +767 −0 mod/dialogue/locallib.php
  4. +1 −0 mod/dialogue/view.php
View
@@ -15,6 +15,7 @@
require_once("../../config.php");
require_once("lib.php");
+ require_once("locallib.php");
require_variable($id); // Course Module ID
@@ -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!");
@@ -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!");
View
@@ -2,6 +2,7 @@
require_once("../../config.php");
require_once("lib.php");
+ require_once("locallib.php");
require_variable($id); // course
Oops, something went wrong.

0 comments on commit 9af2f86

Please sign in to comment.