Version 22 (modified by 13 years ago) ( diff ) | ,
---|
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:
- each type of page
;email addresses for 'to' field would be students who belongs to the type of page, for example
- all student if sent from course homepage
- all group member if sent from group view page
- student if sent from user view page
- 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
- email address of users are currently listed on the page.
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 INTOemail_merges
(id
,key
,value
,field_name
,created
,modified
) VALUES (NULL , 'Username', '<<USERNAME>>', 'username', , ), (NULL , 'First Name', '<<FIRSTNAME>>', 'first_name', , ), (NULL , 'Last Name', '<<LASTNAME>>', 'last_name', , ), (NULL , 'Email Address', '<<Email>>', 'email', , );
Attachments (1)
-
email.sql
(3.4 KB
) - added by 13 years ago.
sql code for tables related to group email functions
Download all attachments as: .zip