You are here

function quiz_email_results_format in Quiz 6.4

Same name and namespace in other branches
  1. 8.4 quiz.module \quiz_email_results_format()
  2. 6.6 quiz.module \quiz_email_results_format()
  3. 6.3 quiz.module \quiz_email_results_format()
  4. 6.5 quiz.module \quiz_email_results_format()
  5. 7.6 quiz.module \quiz_email_results_format()
  6. 7 quiz.module \quiz_email_results_format()
  7. 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
Implementation of hook_mail().

File

./quiz.module, line 2302
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";
    }
  }
}