function quiz_email_results_format in Quiz 7
Same name and namespace in other branches
- 8.4 quiz.module \quiz_email_results_format()
- 6.6 quiz.module \quiz_email_results_format()
- 6.3 quiz.module \quiz_email_results_format()
- 6.4 quiz.module \quiz_email_results_format()
- 6.5 quiz.module \quiz_email_results_format()
- 7.6 quiz.module \quiz_email_results_format()
- 7.4 quiz.module \quiz_email_results_format()
This functions returns the default email subject and body format which will be used at the end of quiz.
Related topics
2 calls to quiz_email_results_format()
- quiz_admin_settings in ./
quiz.admin.inc - This builds the main settings form for the quiz module.
- quiz_mail in ./
quiz.module - Implements hook_mail().
File
- ./
quiz.module, line 2434 - Quiz Module
Code
function quiz_email_results_format($type, $target) {
global $user;
if ($type == 'subject') {
if ($target == 'author') {
return t('!title Results Notice from !sitename');
}
if ($target == 'taker') {
return t('!title Results Notice from !sitename');
}
}
if ($type == 'body') {
if ($target == 'author') {
return t('Dear !author') . "\n\n" . t('!taker attended the quiz !title on !date') . "\n" . t('Test Description : !desc') . "\n" . t('!taker got !correct out of !total points in !minutes minutes. Score given in percentage is !percentage') . "\n" . t('You can access the result here !url') . "\n";
}
if ($target == 'taker') {
return t('Dear !taker') . "\n\n" . t('You attended the quiz !title on !date') . "\n" . t('Test Description : !desc') . "\n" . t('You got !correct out of !total points in !minutes minutes. Score given in percentage is !percentage') . "\n" . t('You can access the result here !url') . "\n";
}
}
}