Support » Plugin: Chained Quiz » No Username in mail results to admin

  • I’ve been setting up a quiz, but when i finish the quiz and the results are mailed to the admin (moi) there’s no username , so i get the results mailed but don’t know from whom they are

    It seems the variables are not filled out :

    to: Webmaster <Eddie@xxxxxxx.xxx>
    subj: User results on {{quiz-name}}

    i would really like to have a subject like <username> took the <quizname>
    or otherwise at least in the body of the email a hint who took the test 🙂

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author prasunsen

    (@prasunsen)

    It doesn’t yet support such variables, but thanks for the suggestion – we’ll consider adding them.

    Thanks for the quick response

    I sincerely hope you can create this as an optional feature.
    For anyone having the same issues as me , i have a fix that i implemented.
    if anyone is interrested i can share it , but it is a temporarily patch and will be overwritten with any new release of this great plugin 🙂

    ————————– email that is sent out now —————-

    Bedankt voor het invullen van de vragen Admin !

    Uitkomst : Ruim Voldoende !
    Resultaat : Prima Score !
    Punten : 19
    Gebruiker : Admin
    Email : admin@somedomain.com
    Je hebt 19 punten gehaald uit een aantal van 13 vragen.
    Het maximum aantal te behalen punten is 26 :
    0-12 : Onvoldoende!
    13-16 : voldoende, maar ruimte voor verbetering.
    17-21 : Ruim voldoende
    22-26 : Uitstekende score !
    —————————————————————–

    It is in dutch , but you can translate this yourself

    added {{user}} and {{email}}

    managed to get the user also in the subject now …

    Added the bold lines to the Quiz.php :

    —————————————————————-
    $current_user = wp_get_current_user();

    $subject = stripslashes(get_option(‘chained_admin_subject’));
    $subject = str_replace(‘{{quiz-name}}’, stripslashes($quiz->title), $subject);
    $subject = str_replace(‘{{user}}’, $current_user->user_login, $subject);

    —————————————————————–

    that allows me to use the {{user}} variable in the settings defined subject line also..

    Perhaps it can be done neater, but it works 🙂

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘No Username in mail results to admin’ is closed to new replies.