';
+ }
+
+ print_footer();
+?>
\ No newline at end of file
Index: blocks/quickmail/tabs.php
===================================================================
--- blocks/quickmail/tabs.php (.../vendor/moodle/1.9weekly) (revision 0)
+++ blocks/quickmail/tabs.php (.../branches/1.9.5-LAE1.0/Quickmail) (revision 139)
@@ -0,0 +1,28 @@
+wwwroot/blocks/quickmail/email.php?id=$course->id&instanceid=$instanceid", get_string('compose', 'block_quickmail'));
+ $row[] = new tabobject('history', "$CFG->wwwroot/blocks/quickmail/emaillog.php?id=$course->id&instanceid=$instanceid", get_string('history', 'block_quickmail'));
+ $rows[] = $row;
+
+ print_tabs($rows, $currenttab);
+?>
\ No newline at end of file
Index: blocks/quickmail/lang/ja_utf8/block_quickmail.php
===================================================================
--- blocks/quickmail/lang/ja_utf8/block_quickmail.php (.../vendor/moodle/1.9weekly) (revision 0)
+++ blocks/quickmail/lang/ja_utf8/block_quickmail.php (.../branches/1.9.5-LAE1.0/Quickmail) (revision 139)
@@ -0,0 +1,34 @@
+$a';
+$string['attachmentoptional'] = '添付 (任意)';
+$string['blockname'] = 'クイックメール';
+$string['check'] = 'すべてを選択';
+$string['clearhistory'] = 'すべての履歴をクリア';
+$string['compose'] = '作成';
+$string['date'] = '日時';
+$string['delete'] = '削除';
+$string['deletefail'] = '削除が失敗しました。';
+$string['deletesuccess'] = '正常に削除されました。';
+$string['email'] = 'メール';
+$string['emailfail'] = 'メールエラー:';
+$string['emailfailerror'] = 'エラーが発生したため、下記のユーザにメール送信されませんでした ...';
+$string['emailstop'] = 'メールアドレスが無効にされています:';
+$string['history'] = '履歴';
+$string['messageerror'] = 'メッセージを入力してください!';
+$string['nogroupmembers'] = 'グループメンバーなし';
+$string['notingroup'] = 'グループ外';
+$string['sendemail'] = 'メールを送信する';
+$string['subjecterror'] = '題名を入力してください!';
+$string['successfulemail'] = 'メールが正常に送信されました。';
+$string['to'] = 'To';
+$string['toerror'] = 'メールの受信者を選択してください!';
+$string['uncheck'] = 'すべての選択を解除';
+
+?>
Property changes on: blocks/quickmail/lang/ja_utf8/block_quickmail.php
___________________________________________________________________
Added: svn:executable
+ *
Index: blocks/quickmail/lang/en/block_quickmail.php
===================================================================
--- blocks/quickmail/lang/en/block_quickmail.php (.../vendor/moodle/1.9weekly) (revision 0)
+++ blocks/quickmail/lang/en/block_quickmail.php (.../branches/1.9.5-LAE1.0/Quickmail) (revision 139)
@@ -0,0 +1,38 @@
+$a';
+$string['attachmentoptional'] = 'Attachment (Optional)';
+$string['blockname'] = 'Quickmail';
+$string['check'] = 'Check All';
+$string['clearhistory'] = 'Clear History';
+$string['compose'] = 'Compose';
+$string['date'] = 'Date';
+$string['delete'] = 'Delete';
+$string['deletefail'] = 'Delete(s) Failed';
+$string['deletesuccess'] = 'Delete(s) Successful';
+$string['email'] = 'Email';
+$string['emailfail'] = 'email error:';
+$string['emailfailerror'] = 'The following users were not emailed due to...';
+$string['emailstop'] = 'disabled email address:';
+$string['history'] = 'History';
+$string['messageerror'] = 'Must have a message!';
+$string['nogroupmembers'] = 'No group members';
+$string['notingroup'] = 'Not in a group';
+$string['sendemail'] = 'Send Email';
+$string['subjecterror'] = 'Must have a subject!';
+$string['successfulemail'] = 'Email(s) sent successfully';
+$string['to'] = 'To';
+$string['toerror'] = 'Must select recipients for the email!';
+$string['uncheck'] = 'Uncheck All';
+?>
Index: blocks/quickmail/lang/he_utf8/block_quickmail.php
===================================================================
--- blocks/quickmail/lang/he_utf8/block_quickmail.php (.../vendor/moodle/1.9weekly) (revision 0)
+++ blocks/quickmail/lang/he_utf8/block_quickmail.php (.../branches/1.9.5-LAE1.0/Quickmail) (revision 139)
@@ -0,0 +1,41 @@
+$a';
+$string['attachmentoptional'] = 'קובץ מצורף (אופציונלי)';
+$string['blockname'] = 'דוא\"ל מהיר';
+$string['check'] = 'בחר הכל';
+$string['clearhistory'] = 'נקה היסטוריה';
+$string['compose'] = 'כתוב דוא\"ל';
+$string['date'] = 'תאריך';
+$string['delete'] = 'מחק';
+$string['deletefail'] = 'מחיקה נכשלה';
+$string['deletesuccess'] = 'מחיקה הצליחה';
+$string['email'] = 'דוא\"ל';
+$string['emailfail'] = 'שגיאה בדוא\"ל';
+$string['emailfailerror'] = 'הדוא\"ל לא נשלח בהצלחה למשתמשים הבאים בגלל ש...';
+$string['emailstop'] = 'כתובות דוא\"ל מנוטרלות';
+$string['history'] = 'היסטוריה';
+$string['messageerror'] = 'חייבת להיות הודעה';
+$string['nogroupmembers'] = 'אין חברי קבוצות';
+$string['notingroup'] = 'לא נמצא בקבוצה';
+$string['quickmail:cansend'] = 'יכול לשלוח דוא\"לים דרך תוכנת quickmail';
+$string['sendemail'] = 'שלח דואר';
+$string['subjecterror'] = 'חייב להיות נושא!';
+$string['successfulemail'] = 'הדוא\"ל נשלח בהצלחה!';
+$string['to'] = 'אל';
+$string['toerror'] = 'חייב לבחור נמענים עבור הדוא\"ל';
+$string['uncheck'] = 'בטל בחירה לכל';
+
+?>
Index: blocks/quickmail/lang/hu_utf8/block_quickmail.php
===================================================================
--- blocks/quickmail/lang/hu_utf8/block_quickmail.php (.../vendor/moodle/1.9weekly) (revision 0)
+++ blocks/quickmail/lang/hu_utf8/block_quickmail.php (.../branches/1.9.5-LAE1.0/Quickmail) (revision 139)
@@ -0,0 +1,38 @@
+$a';
+$string['attachmentoptional'] = 'Melléklet (Opcionális)';
+$string['blockname'] = 'Quickmail';
+$string['check'] = 'Összes ellenőrzése';
+$string['clearhistory'] = 'Előzmények törlése';
+$string['compose'] = 'Új levél';
+$string['date'] = 'Dátum';
+$string['delete'] = 'Töröl';
+$string['deletefail'] = 'Törlés sikertelen';
+$string['deletesuccess'] = 'Törlés sikeres';
+$string['email'] = 'Email';
+$string['emailfail'] = 'email hiba:';
+$string['emailfailerror'] = 'A következő felhasználók nem kaptak levelet...';
+$string['emailstop'] = 'letiltott levélcím:';
+$string['history'] = 'Előzmény';
+$string['messageerror'] = 'Üres levelet nem küldhet!';
+$string['nogroupmembers'] = 'Nincsen csoport tag';
+$string['notingroup'] = 'Nincs a csoportban';
+$string['sendemail'] = 'Levél küldése';
+$string['subjecterror'] = 'Üres tárggyal nem küldhet levelet!';
+$string['successfulemail'] = 'A levél(ek) sikeresen elküldve';
+$string['to'] = 'Címzett';
+$string['toerror'] = 'Válasszon címzettet a levelének!';
+$string['uncheck'] = 'Összes kijelölés megszüntetése';
+
+?>
Property changes on: blocks/quickmail/lang/hu_utf8/block_quickmail.php
___________________________________________________________________
Added: svn:executable
+ *
Index: blocks/quickmail/lang/it_utf8/block_quickmail.php
===================================================================
--- blocks/quickmail/lang/it_utf8/block_quickmail.php (.../vendor/moodle/1.9weekly) (revision 0)
+++ blocks/quickmail/lang/it_utf8/block_quickmail.php (.../branches/1.9.5-LAE1.0/Quickmail) (revision 139)
@@ -0,0 +1,41 @@
+$a non esiste';
+$string['attachmentoptional'] = 'Allegato (Opzionale)';
+$string['blockname'] = 'Quickmail';
+$string['check'] = 'Seleziona Tutti';
+$string['clearhistory'] = 'Cancella Storico';
+$string['compose'] = 'Invia';
+$string['date'] = 'Data';
+$string['delete'] = 'Elimina';
+$string['deletefail'] = 'Cancellazione Fallita';
+$string['deletesuccess'] = 'Cancellazione Eseguita';
+$string['email'] = 'Email';
+$string['emailfail'] = 'errore e-mail:';
+$string['emailfailerror'] = 'Le e-mail non sono state inviate ai seguenti utenti, a causa di...';
+$string['emailstop'] = 'indirizzo e-mail disabilitato:';
+$string['history'] = 'Storico';
+$string['messageerror'] = 'Devi scrivere un messaggio!';
+$string['nogroupmembers'] = 'Nessun membro del Gruppo';
+$string['notingroup'] = 'Non appartiene a nessun Gruppo';
+$string['quickmail:cansend'] = 'Può inviare mail con Quickmail';
+$string['sendemail'] = 'Invia E-mail';
+$string['subjecterror'] = 'Devi specificare un Soggetto!';
+$string['successfulemail'] = 'E-mail inviate con successo';
+$string['to'] = 'A';
+$string['toerror'] = 'Devi selezionare dei destinatari per la mail!';
+$string['uncheck'] = 'Deseleziona Tutti';
+
+?>
Index: blocks/quickmail/lang/es/block_quickmail.php
===================================================================
--- blocks/quickmail/lang/es/block_quickmail.php (.../vendor/moodle/1.9weekly) (revision 0)
+++ blocks/quickmail/lang/es/block_quickmail.php (.../branches/1.9.5-LAE1.0/Quickmail) (revision 139)
@@ -0,0 +1,42 @@
+$a';
+$string['blockname'] = 'Correo';
+$string['check'] = 'Marcar todos';
+$string['clearhistory'] = 'Borrar el histrico';
+$string['composenew'] = 'Crear nuevo Correo';
+$string['date'] = 'Fecha';
+$string['delete'] = 'Eliminar';
+$string['deletefail'] = 'Fallo al eliminar';
+$string['deletesuccess'] = 'Eliminar exitoso';
+$string['email'] = 'Email';
+$string['emailfail'] = 'error de email:';
+$string['emailfailerror'] = 'A los siguientes usuarios no se les envi el correo debido a...';
+$string['emailhistory'] = 'Historial de Correos';
+$string['emailstop'] = 'direccion de correo deshabilitada:';
+$string['messageerror'] = 'Debe escribir algn mensaje!';
+$string['nogroupmembers'] = 'Grupo sin miebros';
+$string['notingroup'] = 'Sin pertenencia a grupos';
+$string['sendemail'] = 'Enviar correo';
+$string['subjecterror'] = 'Debe especificar un tema!';
+$string['successfulemail'] = 'Correo(s) enviados exitosamente';
+$string['to'] = 'Destinatario';
+$string['toerror'] = 'Debe indicar uno o mas destinatarios!';
+$string['uncheck'] = 'Desmarcar todos';
+$string['view'] = 'Ver';
+$string['attachmentalt'] = 'Adjunte un archivo a su correo';
+
+
+?>
Index: blocks/quickmail/lang/fr/block_quickmail.php
===================================================================
--- blocks/quickmail/lang/fr/block_quickmail.php (.../vendor/moodle/1.9weekly) (revision 0)
+++ blocks/quickmail/lang/fr/block_quickmail.php (.../branches/1.9.5-LAE1.0/Quickmail) (revision 139)
@@ -0,0 +1,37 @@
+$a n\'existe pas';
+$string['blockname'] = 'Quickmail';
+$string['check'] = 'Tout slectionner';
+$string['clearhistory'] = 'Supprimer l\'historique ';
+$string['composenew'] = 'Composer un nouveau Courriel';
+$string['date'] = 'Date';
+$string['delete'] = 'Supprimer';
+$string['deletefail'] = 'Erreur dans Suppression(s)';
+$string['deletesuccess'] = 'Suppression(s) russie(s)';
+$string['email'] = 'Courriel';
+$string['emailfail'] = 'Pas de Courriel pour les utilisateurs suivants:';
+$string['emailhistory'] = 'Historique Quickmail';
+$string['messageerror'] = 'Message obligatoire!';
+$string['noemailssent'] = 'Aucune courriel envoy';
+$string['sendemail'] = 'Envoyez Courriel';
+$string['subjecterror'] = 'Sujet obligatoire!';
+$string['successfulemail'] = 'Envoi Courriel(s) russi!';
+$string['to'] = 'A';
+$string['toerror'] = 'Destinataire(s) obligatoire!';
+$string['uncheck'] = 'Tout dselectionner';
+$string['view'] = 'Examiner';
+
+
+?>
+
Index: blocks/quickmail/lang/en_utf8/block_quickmail.php
===================================================================
--- blocks/quickmail/lang/en_utf8/block_quickmail.php (.../vendor/moodle/1.9weekly) (revision 0)
+++ blocks/quickmail/lang/en_utf8/block_quickmail.php (.../branches/1.9.5-LAE1.0/Quickmail) (revision 139)
@@ -0,0 +1,41 @@
+$a';
+$string['attachmentoptional'] = 'Attachment (Optional)';
+$string['blockname'] = 'Quickmail';
+$string['check'] = 'Check All';
+$string['clearhistory'] = 'Clear History';
+$string['compose'] = 'Compose';
+$string['date'] = 'Date';
+$string['delete'] = 'Delete';
+$string['deletefail'] = 'Delete(s) Failed';
+$string['deletesuccess'] = 'Delete(s) Successful';
+$string['email'] = 'Email';
+$string['emailfail'] = 'email error:';
+$string['emailfailerror'] = 'The following users were not emailed due to...';
+$string['emailstop'] = 'disabled email address:';
+$string['history'] = 'History';
+$string['messageerror'] = 'Must have a message!';
+$string['nogroupmembers'] = 'No group members';
+$string['notingroup'] = 'Not in a group';
+$string['quickmail:cansend'] = 'Can send emails with Quickmail';
+$string['quickmail:canrecv'] = 'Appears in Quickmail recipient list';
+$string['sendemail'] = 'Send Email';
+$string['subjecterror'] = 'Must have a subject!';
+$string['successfulemail'] = 'Email(s) sent successfully';
+$string['to'] = 'To';
+$string['toerror'] = 'Must select recipients for the email!';
+$string['uncheck'] = 'Uncheck All';
+
+?>
Index: blocks/quickmail/lang/pt_utf8/block_quickmail.php
===================================================================
--- blocks/quickmail/lang/pt_utf8/block_quickmail.php (.../vendor/moodle/1.9weekly) (revision 0)
+++ blocks/quickmail/lang/pt_utf8/block_quickmail.php (.../branches/1.9.5-LAE1.0/Quickmail) (revision 139)
@@ -0,0 +1,42 @@
+$a';
+$string['attachmentoptional'] = 'Anexo (Opcional)';
+$string['blockname'] = 'Correio Rápido';
+$string['check'] = 'Seleccionar todos';
+$string['clearhistory'] = 'Apagar Historial';
+$string['compose'] = 'Compor mensagem';
+$string['date'] = 'Data';
+$string['delete'] = 'eliminar';
+$string['deletefail'] = 'Não foi possível eliminar';
+$string['deletesuccess'] = 'Eliminado(s) com Sucesso';
+$string['email'] = 'Correio electrónico';
+$string['emailfail'] = 'Erro no correio electrónico:';
+$string['emailfailerror'] = 'Não foi enviado correio para os seguintes utilizadores devido a ...';
+$string['emailstop'] = 'desactivado o endereço de correio:';
+$string['history'] = 'Historial';
+$string['messageerror'] = 'Deve escrever um Assunto!';
+$string['nogroupmembers'] = 'Não há membros no grupo';
+$string['notingroup'] = 'Não pertence a um grupo';
+$string['quickmail:cansend'] = 'Pode enviar mensagens com Correio Rápido';
+$string['sendemail'] = 'Enviar Correio';
+$string['subjecterror'] = 'Deve escrever um Assunto!';
+$string['successfulemail'] = 'Correio enviado com sucesso!';
+$string['to'] = 'Para';
+$string['toerror'] = 'Deve seleccionar destinatário(s) da mensagem!';
+$string['uncheck'] = 'Desmarcar Todos';
+$string['view'] = 'Ver';
+
+?>
Index: blocks/quickmail/lang/ja/block_quickmail.php
===================================================================
--- blocks/quickmail/lang/ja/block_quickmail.php (.../vendor/moodle/1.9weekly) (revision 0)
+++ blocks/quickmail/lang/ja/block_quickmail.php (.../branches/1.9.5-LAE1.0/Quickmail) (revision 139)
@@ -0,0 +1,34 @@
+$a';
+$string['attachmentoptional'] = '添付 (任意)';
+$string['blockname'] = 'クイックメール';
+$string['check'] = 'すべてを選択';
+$string['clearhistory'] = 'すべての履歴をクリア';
+$string['compose'] = '作成';
+$string['date'] = '日時';
+$string['delete'] = '削除';
+$string['deletefail'] = '削除が失敗しました。';
+$string['deletesuccess'] = '正常に削除されました。';
+$string['email'] = 'メール';
+$string['emailfail'] = 'メールエラー:';
+$string['emailfailerror'] = 'エラーが発生したため、下記のユーザにメール送信されませんでした ...';
+$string['emailstop'] = 'メールアドレスが無効にされています:';
+$string['history'] = '履歴';
+$string['messageerror'] = 'メッセージを入力してください!';
+$string['nogroupmembers'] = 'グループメンバーなし';
+$string['notingroup'] = 'グループ外';
+$string['sendemail'] = 'メールを送信する';
+$string['subjecterror'] = '題名を入力してください!';
+$string['successfulemail'] = 'メールが正常に送信されました。';
+$string['to'] = 'To';
+$string['toerror'] = 'メールの受信者を選択してください!';
+$string['uncheck'] = 'すべての選択を解除';
+
+?>
Property changes on: blocks/quickmail/lang/ja/block_quickmail.php
___________________________________________________________________
Added: svn:executable
+ *
Index: blocks/quickmail/lang/sk/block_quickmail.php
===================================================================
--- blocks/quickmail/lang/sk/block_quickmail.php (.../vendor/moodle/1.9weekly) (revision 0)
+++ blocks/quickmail/lang/sk/block_quickmail.php (.../branches/1.9.5-LAE1.0/Quickmail) (revision 139)
@@ -0,0 +1,41 @@
+$a';
+$string['blockname'] = 'Quickmail';
+$string['check'] = 'Oznai vetkch';
+$string['clearhistory'] = 'Vymaza histriu';
+$string['composenew'] = 'Psanie novho mailu';
+$string['date'] = 'Dtum';
+$string['delete'] = 'Vymaza';
+$string['deletefail'] = 'Vymazanie sa nepodarilo';
+$string['deletesuccess'] = 'Vymazanie spen';
+$string['email'] = 'Email';
+$string['emailfail'] = 'Chyba v emaile:';
+$string['emailfailerror'] = 'Nasledovnm uvateom nebol poslan email z dvodu...';
+$string['emailhistory'] = 'Histria Quickmailu';
+$string['emailstop'] = 'zablokovan emailov adresa:';
+$string['messageerror'] = 'Mus ma sprvu!';
+$string['noemailssent'] = 'iadne zaznamenan sprvy';
+$string['nogroupmembers'] = 'iadni lenovia skupiny';
+$string['notingroup'] = 'Nie je v skupine';
+$string['sendemail'] = 'Posla sprvu';
+$string['subjecterror'] = 'Treba zada predmet sprvy!';
+$string['successfulemail'] = 'Mail(y) boli spene poslan!';
+$string['to'] = 'Komu';
+$string['toerror'] = 'Je potrebn vybra prjemcu sprvy!';
+$string['uncheck'] = 'Odznai vetkch';
+$string['view'] = 'Pohad';
+
+
+?>
Index: blocks/quickmail/lang/de_utf8/block_quickmail.php
===================================================================
--- blocks/quickmail/lang/de_utf8/block_quickmail.php (.../vendor/moodle/1.9weekly) (revision 0)
+++ blocks/quickmail/lang/de_utf8/block_quickmail.php (.../branches/1.9.5-LAE1.0/Quickmail) (revision 139)
@@ -0,0 +1,42 @@
+$a';
+$string['blockname'] = 'Quickmail';
+$string['check'] = 'Alle markieren';
+$string['clearhistory'] = 'Bisher gesendete Mails lschen?';
+$string['composenew'] = 'Neue Email verfassen';
+$string['date'] = 'Datum';
+$string['delete'] = 'Lschen';
+$string['deletefail'] = 'Lschen(s) fehlgeschlagen';
+$string['deletesuccess'] = 'Lschen(s) erfolgreich';
+$string['email'] = 'Email';
+$string['emailfail'] = 'Fehler Email:';
+$string['emailfailerror'] = 'Die nachstehenden Teilnehmer sind nicht erreichbar...';
+$string['emailhistory'] = 'Bisher gesendete Emails';
+$string['emailstop'] = 'Deaktivierte Emailadressen:';
+$string['messageerror'] = 'Sie mssen eine Nachricht eintragen!';
+$string['nogroupmembers'] = 'Keine Mitglieder in Gruppen';
+$string['notingroup'] = 'Nicht in einer Gruppe';
+$string['sendemail'] = 'Email senden';
+$string['subjecterror'] = 'Sie mssen einen Betreff angeben!';
+$string['successfulemail'] = 'Email(s) wurden erfolgreich gesendet';
+$string['to'] = 'Zu';
+$string['toerror'] = 'Sie mssen mindestens einen Teilnehmer fr eine Email auswhlen!';
+$string['uncheck'] = 'Alle Markierungen aufheben';
+$string['view'] = 'Ansicht';
+$string['attachmentalt'] = 'Einen Anhang zur Email hinzufgen';
+
+
+?>
\ No newline at end of file
Property changes on: blocks/quickmail/lang/de_utf8/block_quickmail.php
___________________________________________________________________
Added: svn:executable
+ *
Index: blocks/quickmail/db/mysql.sql
===================================================================
--- blocks/quickmail/db/mysql.sql (.../vendor/moodle/1.9weekly) (revision 0)
+++ blocks/quickmail/db/mysql.sql (.../branches/1.9.5-LAE1.0/Quickmail) (revision 139)
@@ -0,0 +1,14 @@
+# $Id: mysql.sql,v 1.3 2006/04/19 22:39:18 michaelpenne Exp $
+
+create table prefix_block_quickmail_log
+ ( id int(10) unsigned not null auto_increment,
+ courseid int(10) unsigned not null,
+ userid int(10) unsigned not null,
+ mailto text not null,
+ subject varchar(255) not null,
+ message text not null,
+ attachment varchar(255) not null,
+ format tinyint(3) unsigned not null default 1,
+ timesent int(10) unsigned not null,
+ PRIMARY KEY (id)
+ );
\ No newline at end of file
Index: blocks/quickmail/db/postgres7.php
===================================================================
--- blocks/quickmail/db/postgres7.php (.../vendor/moodle/1.9weekly) (revision 0)
+++ blocks/quickmail/db/postgres7.php (.../branches/1.9.5-LAE1.0/Quickmail) (revision 139)
@@ -0,0 +1,32 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
Index: blocks/quickmail/db/access.php
===================================================================
--- blocks/quickmail/db/access.php (.../vendor/moodle/1.9weekly) (revision 0)
+++ blocks/quickmail/db/access.php (.../branches/1.9.5-LAE1.0/Quickmail) (revision 139)
@@ -0,0 +1,49 @@
+:
+//
+// component_name should be the same as the directory name of the mod or block.
+//
+// Core moodle capabilities are defined thus:
+// moodle/:
+//
+// Examples: mod/forum:viewpost
+// block/recent_activity:view
+// moodle/site:deleteuser
+//
+// The variable name for the capability definitions array follows the format
+// $__capabilities
+//
+// For the core capabilities, the variable is $moodle_capabilities.
+
+
+$block_quickmail_capabilities = array(
+
+ 'block/quickmail:cansend' => array(
+
+ 'captype' => 'write',
+ 'contextlevel' => CONTEXT_BLOCK,
+ 'legacy' => array(
+ 'teacher' => CAP_ALLOW,
+ 'editingteacher' => CAP_ALLOW,
+ 'coursecreator' => CAP_ALLOW,
+ 'admin' => CAP_ALLOW
+ )
+ ),
+);
+
+?>
\ No newline at end of file
Index: blocks/quickmail/db/mysql.php
===================================================================
--- blocks/quickmail/db/mysql.php (.../vendor/moodle/1.9weekly) (revision 0)
+++ blocks/quickmail/db/mysql.php (.../branches/1.9.5-LAE1.0/Quickmail) (revision 139)
@@ -0,0 +1,43 @@
+prefix."block_quickmail_log
+ ( id int(10) unsigned not null auto_increment,
+ courseid int(10) unsigned not null,
+ userid int(10) unsigned not null,
+ mailto text not null,
+ subject varchar(255) not null,
+ message text not null,
+ attachment varchar(255) not null,
+ format tinyint(3) unsigned not null default 1,
+ timesent int(10) unsigned not null,
+ PRIMARY KEY (`id`)
+ )");
+ }
+
+ return $result;
+}
Index: blocks/quickmail/db/postgres7.sql
===================================================================
--- blocks/quickmail/db/postgres7.sql (.../vendor/moodle/1.9weekly) (revision 0)
+++ blocks/quickmail/db/postgres7.sql (.../branches/1.9.5-LAE1.0/Quickmail) (revision 139)
@@ -0,0 +1,14 @@
+# $Id: postgres7.sql,v 1.4 2006/05/19 19:47:47 mark-nielsen Exp $
+
+create table prefix_block_quickmail_log (
+ id serial,
+ courseid integer not null default 0,
+ userid integer not null default 0,
+ mailto text not null default '',
+ subject varchar(255) not null default '',
+ message text not null default '',
+ attachment varchar(255) not null default '',
+ format int4 not null default 1,
+ timesent integer not null default 0,
+ PRIMARY KEY (id)
+);
\ No newline at end of file
Index: blocks/quickmail/db/upgrade.php
===================================================================
--- blocks/quickmail/db/upgrade.php (.../vendor/moodle/1.9weekly) (revision 0)
+++ blocks/quickmail/db/upgrade.php (.../branches/1.9.5-LAE1.0/Quickmail) (revision 139)
@@ -0,0 +1,27 @@
+
\ No newline at end of file
Index: blocks/quickmail/styles.php
===================================================================
--- blocks/quickmail/styles.php (.../vendor/moodle/1.9weekly) (revision 0)
+++ blocks/quickmail/styles.php (.../branches/1.9.5-LAE1.0/Quickmail) (revision 139)
@@ -0,0 +1,37 @@
+/***
+*** General Table Styles
+***/
+
+.blocks-quickmail .generaltable .r0 {
+ background-color: #f0f0f0;
+}
+
+.blocks-quickmail .generaltable .r1 {
+ background-color: #fafafa;
+}
+
+/***
+*** Flexible Table Styles (emaillog.php)
+***/
+
+body#blocks-quickmail-emaillog table#emaillog .header {
+ text-align: left;
+}
+
+body#blocks-quickmail-emaillog table#emaillog .header .commands {
+ display: inline;
+}
+
+body#blocks-quickmail-emaillog table#emaillog td {
+ border-left-width: 1px;
+ border-right-width: 1px;
+ border-left-style: solid;
+ border-right-style: solid;
+ vertical-align: bottom;
+ border-color: #DDDDDD;
+}
+
+body#blocks-quickmail-emaillog table#emaillog .header,
+body#blocks-quickmail-emaillog table#emaillog .cell {
+ padding: 4px;
+}
\ No newline at end of file
Index: blocks/quickmail/email.html
===================================================================
--- blocks/quickmail/email.html (.../vendor/moodle/1.9weekly) (revision 0)
+++ blocks/quickmail/email.html (.../branches/1.9.5-LAE1.0/Quickmail) (revision 139)
@@ -0,0 +1,98 @@
+
+
+
Index: blocks/quickmail/config_instance.html
===================================================================
--- blocks/quickmail/config_instance.html (.../vendor/moodle/1.9weekly) (revision 0)
+++ blocks/quickmail/config_instance.html (.../branches/1.9.5-LAE1.0/Quickmail) (revision 139)
@@ -0,0 +1,41 @@
+
+
+
+
+ :
+
+
+ config->groupmode, '', '', 0, false, $this->course->groupmodeforce);
+ helpbutton('groupmode', get_string('groupmode'));
+
+ if ($this->course->groupmodeforce) {
+ // if On, then the dropdown is disabled and wont submit,
+ // which means we loose Quickmails groupmode setting.
+ echo '';
+ }
+ ?>
+
+
+
+
+
+
+
+
+
\ No newline at end of file
Index: blocks/quickmail/javascript.php
===================================================================
--- blocks/quickmail/javascript.php (.../vendor/moodle/1.9weekly) (revision 0)
+++ blocks/quickmail/javascript.php (.../branches/1.9.5-LAE1.0/Quickmail) (revision 139)
@@ -0,0 +1,22 @@
+/**
+ * JavaScript for checking or unchecking
+ * all the students or all students in a group.
+ *
+ * @param toggle Check All/None
+ * @param start the first checkbox to be changed
+ * @param end the last checkbox to be changed
+ * return boolean
+ **/
+function block_quickmail_toggle(toggle, start, end) {
+ // Element ID
+ var id = 'mailto'+start;
+
+ // iterate through all of the appropriate checkboxes and change their state
+ while(document.getElementById(id) && start != end) {
+ document.getElementById(id).checked = toggle;
+ start++;
+ id = 'mailto'+start;
+ }
+
+ return false;
+}
\ No newline at end of file
Index: blocks/quickmail/email.php
===================================================================
--- blocks/quickmail/email.php (.../vendor/moodle/1.9weekly) (revision 0)
+++ blocks/quickmail/email.php (.../branches/1.9.5-LAE1.0/Quickmail) (revision 139)
@@ -0,0 +1,392 @@
+libdir.'/blocklib.php');
+
+ $id = required_param('id', PARAM_INT); // course ID
+ $instanceid = optional_param('instanceid', 0, PARAM_INT);
+ $action = optional_param('action', '', PARAM_ALPHA);
+
+ $instance = new stdClass;
+
+ if (!$course = get_record('course', 'id', $id)) {
+ error('Course ID was incorrect');
+ }
+
+ require_login($course->id);
+ $context = get_context_instance(CONTEXT_BLOCK, $instanceid);
+
+ if ($instanceid) {
+ $instance = get_record('block_instance', 'id', $instanceid);
+ } else {
+ if ($quickmailblock = get_record('block', 'name', 'quickmail')) {
+ $instance = get_record('block_instance', 'blockid', $quickmailblock->id, 'pageid', $course->id);
+ }
+ }
+
+/// This block of code ensures that Quickmail will run
+/// whether it is in the course or not
+ if (empty($instance)) {
+ $groupmode = groupmode($course);
+ if (has_capability('block/quickmail:cansend', get_context_instance(CONTEXT_BLOCK, $instanceid))) {
+ $haspermission = true;
+ } else {
+ $haspermission = false;
+ }
+ } else {
+ // create a quickmail block instance
+ $quickmail = block_instance('quickmail', $instance);
+
+ $groupmode = $quickmail->groupmode();
+ $haspermission = $quickmail->check_permission();
+ }
+
+ if (!$haspermission) {
+ error('Sorry, you do not have the correct permissions to use Quickmail.');
+ }
+
+ // TO DO: Revise quickmail to auto-install support for the block/quickmail:canrecv capability.
+ // This code is commmented out because Quickmail will not function out-of-the-box with 'canrecv' logic in place
+ // if (!$courseusers = get_users_by_capability($context, 'block/quickmail:canrecv', 'u.*', 'u.lastname, u.firstname', '', '', '', '', false)) {
+ if (!$courseusers = get_users_by_capability($context, 'moodle/course:view', 'u.*', 'u.lastname, u.firstname', '', '', '', '', false)) {
+ error('No course users found to email');
+ }
+
+ if ($action == 'view') {
+ // viewing an old email. Hitting the db and puting it into the object $form
+ $emailid = required_param('emailid', PARAM_INT);
+ $form = get_record('block_quickmail_log', 'id', $emailid);
+ $form->mailto = explode(',', $form->mailto); // convert mailto back to an array
+
+ } else if ($form = data_submitted()) { // data was submitted to be mailed
+ confirm_sesskey();
+
+ if (!empty($form->cancel)) {
+ // cancel button was hit...
+ redirect("$CFG->wwwroot/course/view.php?id=$course->id");
+ }
+
+ // prepare variables for email
+ $form->subject = stripslashes($form->subject);
+ $form->subject = clean_param(strip_tags($form->subject, ''), PARAM_RAW); // Strip all tags except multilang
+ $form->message = clean_param($form->message, PARAM_CLEANHTML);
+
+ // make sure the user didn't miss anything
+ if (!isset($form->mailto)) {
+ $form->error = get_string('toerror', 'block_quickmail');
+ } else if (!$form->subject) {
+ $form->error = get_string('subjecterror', 'block_quickmail');
+ } else if (!$form->message) {
+ $form->error = get_string('messageerror', 'block_quickmail');
+ }
+
+ // process the attachment
+ $attachment = $attachname = '';
+ if (has_capability('moodle/course:managefiles', $context)) {
+ $form->attachment = trim($form->attachment);
+ if (isset($form->attachment) and !empty($form->attachment)) {
+ $form->attachment = clean_param($form->attachment, PARAM_PATH);
+
+ if (file_exists($CFG->dataroot.'/'.$course->id.'/'.$form->attachment)) {
+ $attachment = $course->id.'/'.$form->attachment;
+
+ $pathparts = pathinfo($form->attachment);
+ $attachname = $pathparts['basename'];
+ } else {
+ $form->error = get_string('attachmenterror', 'block_quickmail', $form->attachment);
+ }
+ }
+ } else {
+ require_once($CFG->libdir.'/uploadlib.php');
+
+ $um = new upload_manager('attachment', false, true, $course, false, 0, true);
+
+ // process the student posted attachment if it exists
+ if ($um->process_file_uploads('temp/block_quickmail')) {
+
+ // original name gets saved in the database
+ $form->attachment = $um->get_original_filename();
+
+ // check if file is there
+ if (file_exists($um->get_new_filepath())) {
+ // get path to the file without $CFG->dataroot
+ $attachment = 'temp/block_quickmail/'.$um->get_new_filename();
+
+ // get the new name (name may change due to filename collisions)
+ $attachname = $um->get_new_filename();
+ } else {
+ $form->error = get_string("attachmenterror", "block_quickmail", $form->attachment);
+ }
+ } else {
+ $form->attachment = ''; // no attachment
+ }
+ }
+
+ // no errors, then email
+ if(!isset($form->error)) {
+ $mailedto = array(); // holds all the userid of successful emails
+
+ // get the correct formating for the emails
+ $form->plaintxt = format_text_email($form->message, $form->format); // plain text
+ $form->html = format_text($form->message, $form->format); // html
+
+ // run through each user id and send a copy of the email to him/her
+ // not sending 1 email with CC to all user ids because emails were required to be kept private
+ foreach ($form->mailto as $userid) {
+
+ // Added by Damon 9/7/07 to fix problem with sending to large numbers of people
+ // 300 seconds is 5 minutes
+ set_time_limit(300);
+
+ if (!$courseusers[$userid]->emailstop) {
+ $mailresult = email_to_user($courseusers[$userid], $USER, $form->subject, $form->plaintxt, $form->html, $attachment, $attachname);
+ // checking for errors, if there is an error, store the name
+ if (!$mailresult || (string) $mailresult == 'emailstop') {
+ $form->error = get_string('emailfailerror', 'block_quickmail');
+ $form->usersfail['emailfail'][] = $courseusers[$userid]->lastname.', '.$courseusers[$userid]->firstname;
+ } else {
+ // success
+ $mailedto[] = $userid;
+ }
+ } else {
+ // blocked email
+ $form->error = get_string('emailfailerror', 'block_quickmail');
+ $form->usersfail['emailstop'][] = $courseusers[$userid]->lastname.', '.$courseusers[$userid]->firstname;
+ }
+ }
+
+ // cleanup - delete the uploaded file
+ if (isset($um) and file_exists($um->get_new_filepath())) {
+ unlink($um->get_new_filepath());
+ }
+
+ // prepare an object for the insert_record function
+ $log = new stdClass;
+ $log->courseid = $course->id;
+ $log->userid = $USER->id;
+ $log->mailto = implode(',', $mailedto);
+ $log->subject = addslashes($form->subject);
+ $log->message = addslashes($form->message);
+ $log->attachment = $form->attachment;
+ $log->format = $form->format;
+ $log->timesent = time();
+ if (!insert_record('block_quickmail_log', $log)) {
+ error('Email not logged.');
+ }
+
+ if(!isset($form->error)) { // if no emailing errors, we are done
+ // inform of success and continue
+ redirect("$CFG->wwwroot/course/view.php?id=$course->id", get_string('successfulemail', 'block_quickmail'));
+ }
+ }
+ // so people can use quotes. It will display correctly in the subject input text box
+ $form->subject = s($form->subject);
+
+ } else {
+ // set them as blank
+ $form->subject = $form->message = $form->format = $form->attachment = '';
+ }
+
+/// Create the table object for holding course users in the To section of email.html
+
+ // table object used for printing the course users
+ $table = new stdClass;
+ $table->cellpadding = '10px';
+ $table->width = '100%';
+
+ $t = 1; // keeps track of the number of users printed (used for javascript)
+ $cols = 4; // number of columns in the table
+
+ if ($groupmode == NOGROUPS) { // no groups, basic view
+ $table->head = array();
+ $table->align = array('left', 'left', 'left', 'left');
+ $cells = array();
+
+ foreach($courseusers as $user) {
+ if (isset($form->mailto) && in_array($user->id, $form->mailto)) {
+ $checked = 'checked="checked"';
+ } else {
+ $checked = '';
+ }
+
+ $cells[] = "id\" name=\"mailto[]\" />".
+ "';
+ $t++;
+ }
+ $table->data = array_chunk($cells, $cols);
+ } else {
+ $groups = new stdClass; // holds the groups to be displayed
+ $buttoncount = 1; // counter for the buttons (used by javascript)
+ $ingroup = array(); // keeps track of the users that belong to groups
+
+ // determine the group mode
+ if (has_capability('moodle/site:accessallgroups', $context)) {
+ // teachers/admins default to the more liberal group mode
+ $groupmode = VISIBLEGROUPS;
+ }
+
+ // set the groups variable
+ switch ($groupmode) {
+ case VISIBLEGROUPS:
+ $groups = groups_get_all_groups($course->id);
+ $groups = array_keys($groups);
+ break;
+
+ case SEPARATEGROUPS:
+ $groups = groups_get_user_groups($course->id);
+ $groups = array_keys($groups);
+ break;
+ }
+
+ // Add a fake group for those who are not group members
+ $groups[] = 0;
+
+ $notingroup = array();
+ if ($allgroups = groups_get_all_groups($course->id)) {
+ $allgroups = array_keys($allgroups);
+ foreach ($courseusers as $user) {
+ $nomembership = true;
+ foreach ($allgroups as $group) {
+ if (groups_is_member($group, $user->id)) {
+ $nomembership = false;
+ break;
+ }
+ }
+ if ($nomembership) {
+ $notingroup[] = $user->id;
+ }
+ }
+ }
+
+ // set up the table
+ $table->head = array(get_string('groups'), get_string('groupmembers'));
+ $table->align = array('center', 'left');
+ $table->size = array('100px', '*');
+
+ foreach($groups as $group) {
+ $start = $t;
+ $cells = array(); // table cells (each is a check box next to a user name)
+ foreach($courseusers as $user) {
+ if (groups_is_member($group, $user->id) or // is a member of the group or
+ ($group == 0 and in_array($user->id, $notingroup)) ) { // this is our fake group and this user is not a member of another group
+
+ if (isset($form->mailto) && in_array($user->id, $form->mailto)) {
+ $checked = 'checked="checked"';
+ } else {
+ $checked = '';
+ }
+
+ $cells[] = "id\" name=\"mailto[$user->id]\" />".
+ "';
+ $t++;
+ }
+ }
+ $end = $t;
+
+ // cell1 has the group picture, name and check button
+ $cell1 = '';
+ if ($group) {
+ $groupobj = groups_get_group($group);
+ $cell1 .= print_group_picture($groupobj, $course->id, false, true).' ';
+ }
+ if ($group) {
+ $cell1 .= groups_get_group_name($group);
+ } else {
+ $cell1 .= get_string('notingroup', 'block_quickmail');
+ }
+ if (count($groups) > 1 and !empty($cells)) {
+ $selectlinks = ''.get_string('selectall').' /
+ '.get_string('deselectall').'';
+ } else {
+ $selectlinks = '';
+ }
+ $buttoncount++;
+
+ // cell2 has the checkboxes and the user names inside of a table
+ if (empty($cells) and !$group) {
+ // there is no one that is not in a group, so no need to print our 'nogroup' group
+ continue;
+ } else if (empty($cells)) {
+ // cells is empty, so there are no group members for that group
+ $cell2 = get_string('nogroupmembers', 'block_quickmail');
+ } else {
+ $cell2 = '