[[PageOutline]] = Group Email = Refer to ticket #52 == Requirements == The instructor (or admin) should be able to send a group email A group can be: * Students registered in a course * Group members in a group * Each student Optional: * User can use and edit his/her own email template * Ownership such as private, public, or shared among some group * Email merge system, so template can have fields for variables * Allowing a user to see and copy group email addresses, so he/she can use a preferred email client == Implementation == === Getting email address === "send email" button on: 1. each type of page ;email addresses for 'to' field would be students who belongs to the type of page, for example i. all student if sent from course homepage ii. all group member if sent from group view page iii. student if sent from user view page 2. users tab page * email address of users are currently listed on the page. * currently having problem with ajaxlist to update Group filter by changing Course filter === Database Table === ==== SQL Code to create 2 tables and insert data for group email system ==== -- -- Table structure for table `email_templates` -- CREATE TABLE email_templates ( id int(11) NOT NULL auto_increment, `name` varchar(80) NOT NULL, description text NOT NULL, content text NOT NULL, availability tinyint(4) NOT NULL, creator_id int(11) NOT NULL default '0', created date NOT NULL default '0000-00-00', updater_id int(11) default NULL, updated date default NULL, PRIMARY KEY (id) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `sys_functions` -- INSERT INTO `sys_functions` (`id`, `function_code`, `function_name`, `parent_id`, `controller_name`, `url_link`, `permission_type`, `record_status`, `creator_id`, `created`, `updater_id`, `modified`) VALUES (1700, 'EMAIL_TEMPLATE', 'Email Templates', 0, 'emailer', 'emailer/index', 'AI', 'A', 0, '0000-00-00 00:00:00', NULL, NULL); -- -- Table structure for table `email_merges` -- CREATE TABLE `email_merges` ( `id` int(11) NOT NULL auto_increment, `key` varchar(80) NOT NULL, `value` varchar(80) NOT NULL, `field_name` varchar(80) NOT NULL, `created` datetime NOT NULL, `modified` datetime NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ; -- -- Dumping data for table `email_merges` -- INSERT INTO `email_merges` (`id`, `key`, `value`, `field_name`, `created`, `modified`) VALUES (1, 'Username', '<>', 'username', '2011-07-05 11:35:06', '2011-07-05 11:35:11'), (2, 'First Name', '<>', 'first_name', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), (3, 'Last Name', '<>', 'last_name', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), (4, 'Email Address', '<>', 'email', '0000-00-00 00:00:00', '0000-00-00 00:00:00');