]> git.mjollnir.org Git - moodle.git/commitdiff
Some tweaks to the appearance of messaging window
authormoodler <moodler>
Mon, 27 Aug 2007 03:22:16 +0000 (03:22 +0000)
committermoodler <moodler>
Mon, 27 Aug 2007 03:22:16 +0000 (03:22 +0000)
lang/en_utf8/message.php
message/discussion.php
message/lib.php
message/send.php
theme/standard/styles_layout.css

index 40ed225b737d0234fbe1a3ea06d1f37ff146adea..696dfff8006b71e8525c602092f4b45e531595de 100644 (file)
@@ -28,6 +28,7 @@ $string['incomingcontacts'] = 'Incoming Contacts ($a)';
 $string['keywords'] = 'Keywords';
 $string['keywordssearchresults'] = 'Search results: $a messages found';
 $string['maxmessages'] = 'Maximum number of messages to show in the discussion history';
+$string['mailsent'] = 'Your message was sent via email.';
 $string['message'] = 'Message';
 $string['messagehistory'] = 'Message History';
 $string['messages'] = 'Messages';
index d64a36f170264837305a65e3a0404128fe6ebc59..c52c41cbc9fe99ef11c80fcbc646f375cf0c53ce 100644 (file)
@@ -35,7 +35,7 @@
        <meta http-equiv="content-type" content="text/html; charset=utf-8" />
        <title><?php echo get_string('discussion', 'message').': '.fullname($user) ?></title>
      </head>
-     <frameset rows="110,*,0,200">
+     <frameset rows="110,*,0,220">
        <noframes><body><?php
            echo '<a href="discussion.php?id='.$userid.'&amp;noframesjs=1">'.get_string('noframesjs', 'message').'<a/>';
        ?></body></noframes>
     echo '</div></div>';
 
     print_footer('none');
-?>
\ No newline at end of file
+?>
index dd94482721a59cf0540dc577bb974abf10e70b66..e134fe03ef16de06fc25e467f0b31eec59f1ec75 100644 (file)
@@ -1022,9 +1022,9 @@ function message_post_message($userfrom, $userto, $message, $format, $messagetyp
             if (!empty($preference->message_emailaddress)) {
                 $userto->email = $preference->message_emailaddress;   // Use custom messaging address
             }
-            email_to_user($userto, $userfrom, $messagesubject, $messagetext, $messagehtml);
-            debugging('Mail was sent', DEBUG_NORMAL);
-            echo "mail was sent"; 
+            if (email_to_user($userto, $userfrom, $messagesubject, $messagetext, $messagehtml)) {
+                $CFG->messagewasjustemailed = true;
+            }
             sleep(3);
         }
     }
index afe3fb2147ce887ec7d01943289edaa1cbbc1500..522a5901a49bb20bdce9b3924aae41ed7fe07055 100644 (file)
         add_to_log(SITEID, 'message', 'write', 'history.php?user1='.$user->id.'&amp;user2='.$USER->id.'#m'.$messageid, $user->id);
     }
 
-    echo '<title></title></head>';
+    echo '<title> </title></head>';
 
 
     echo '<body class="message course-1" id="message-send">';
     echo '<center>';
     echo '<form id="editing" method="post" action="send.php">';
+    echo '<div>';
     echo '<input type="hidden" name="id" value="'.$user->id.'" />';
     echo '<input type="hidden" name="sesskey" value="'.$USER->sesskey.'" />';
 
     $usehtmleditor = (can_use_html_editor() && get_user_preferences('message_usehtmleditor', 0));
     if ($usehtmleditor) {
         echo '<table align="center"><tr><td align="center">';
-        print_textarea($usehtmleditor, 8, 34, 0, 0, 'message', '');
+        print_textarea($usehtmleditor, 7, 34, 0, 0, 'message', '');
         echo '</td></tr></table>';
+        echo '<input type="submit" value="'.get_string('sendmessage', 'message').'" />';
         use_html_editor('message', 'formatblock subscript superscript copy cut paste clean undo redo justifyleft justifycenter justifyright justifyfull lefttoright righttoleft insertorderedlist insertunorderedlist outdent indent inserthorizontalrule createanchor nolink inserttable');
         echo '<input type="hidden" name="format" value="'.FORMAT_HTML.'" />';
     } else {
         print_textarea(false, 5, 34, 0, 0, 'message', '');
         echo '<input type="hidden" name="format" value="'.FORMAT_MOODLE.'" />';
+        echo '<br /><input type="submit" value="'.get_string('sendmessage', 'message').'" />';
     }
-    echo '<br /><input type="submit" value="'.get_string('sendmessage', 'message').'" />';
+    echo '</div>';
     echo '</form>';
+    if (!empty($CFG->messagewasjustemailed)) {
+        notify(get_string('mailsent', 'message'), 'notifysuccess');
+    }
     echo '<div class="noframesjslink"><a target="_parent" href="discussion.php?id='.$userid.'&amp;noframesjs=1">'.get_string('noframesjs', 'message').'</a></div>';
     echo '</center>';
 
index b687a302d55737581f0ee4d4f72dfd60d9bb60ed..8d5ea60d358f0fabeab9d72547113722ab69b55f 100644 (file)
@@ -2455,6 +2455,10 @@ body#message-messages {
   padding:10px;
 }
 
+body#message-send .notifysuccess {
+  padding:1px;
+}
+
 /***
  *** Notes
  ***/
@@ -4041,4 +4045,4 @@ wikiadminactions {
   background: #eee;
   border: 1px dashed #ddd;
   padding: 3px;
-}
\ No newline at end of file
+}