You are here

function quiz_email_results_format in Quiz 7.6

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.4 quiz.module \quiz_email_results_format()
  5. 6.5 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
Implements hook_mail().

File

./quiz.module, line 2154
quiz.module Main file for the 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', array(
        '@quiz' => QUIZ_NAME,
      )) . "\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', array(
        '@quiz' => QUIZ_NAME,
      )) . "\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";
    }
  }
}