1
Hi all
Firt time using this nice module on a XOOPS 2.018.2 install.
In the results page i´m getting this:
Quote:
Fatal error: Call to a member function getVar() on a non-object in /home/wwwiepw/public_html/modules/myquiz/include/functions.php on line 432
here a snap from the whole function:
/*********************************************************/
/* Quizz Functions */
/*********************************************************/
## 2009 v4.0
function sendEmail($user ,$score ,$qid, $admemail)
{
global $xoopsConfig;
if (!is_object($user)) {
$user =& $GLOBALS["xoopsUser"];
}
$msg = _MYQUIZ_WHOINFORM."nn";
$msg .= sprintf(_MYQUIZ_WHOSOLVED, $user->getVar("uname"));
$msg .= "n";
$msg .= _MYQUIZ_RESULT." = ".$score."nn";
$msg .= _MYQUIZ_SEE. ": ". XOOPS_URL . "/modules//myquiz/index.php?qidi=".$qid."n";
$xoopsMailer =& getMailer();
$xoopsMailer->useMail();
$xoopsMailer->useMail();
$xoopsMailer->setToEmails($xoopsConfig['adminmail'],'$admemail');
$xoopsMailer->setFromEmail($xoopsConfig['adminmail']);
$xoopsMailer->setFromName($xoopsConfig['sitename']);
$xoopsMailer->setSubject(_MYQUIZ_RESULT);
$xoopsMailer->setBody($msg);
return $xoopsMailer->send();
}
the ofending line is:
$msg .= sprintf(_MYQUIZ_WHOSOLVED, $user->getVar("uname"));
BTW > i´m answering the quizz as an anonymous user (not registered)
Any fix/tip on this?
Another question..can we make the correct answer to be in shown in a random order?
Thank in advance