Re:Export Essay answers 9 Years, 10 Months ago
|
Karma: 0
|
Hello, I'm not finding a quizexportresults.php file under that directory. Would it be in another location?
|
|
|
|
|
Re:Export Essay answers 9 Years, 10 Months ago
|
Karma: 0
|
I think that your suggestion of editing the form is the better solution. Thanks!
I've started to edit the PHP files associated with the guest user form, but I'm unsure as to which files to edit to populate the correct labels. I'm also struggling to have it post the user input to the backend of ARI Quiz, so that I could sort the results by 'Name', 'Email', 'Address', or 'Phone'. Could you look at my site and point me in the right direction?
www.uactt.com/index.php?option=com_ariquiz&view=quiz&quizId=1&Itemid=139
|
|
|
Last Edit: 2015/01/26 23:44 By jliddiard.Reason: Forgot URL
|
|
Re:Export Essay answers 9 Years, 10 Months ago
|
Karma: 760
|
See <joomla_directory>\components\com_ariquiz\models\forms\quizform\guestform.xml file.
Regards,
ARI Soft
|
|
|
|
|
Re:Export Essay answers 9 Years, 10 Months ago
|
Karma: 0
|
I've updated that file with the following:
Code: |
<?xml version="1.0" encoding="UTF-8"?>
<form>
<params addpath="/administrator/components/com_ariquiz/elements">
<param type="text" name="UserName" size="50" label="COM_ARIQUIZ_LABEL_NAME" description="" />
<param type="text" name="Email" size="50" label="COM_ARIQUIZ_LABEL_EMAIL" description="" />
<param type="text" name="mailAddress" size="50" label="COM_ARIQUIZ_LABEL_ADDRESS" description="" />
<param type="text" name="phone" size="50" label="COM_ARIQUIZ_LABEL_PHONE" description="" />
</params>
<params addpath="/administrator/components/com_ariquiz/elements" group="readonly">
<param type="literal" name="UserName" label="COM_ARIQUIZ_LABEL_NAME" description="" />
<param type="literal" name="Email" label="COM_ARIQUIZ_LABEL_EMAIL" description="" />
<param type="literal" name="mailAddress" label="COM_ARIQUIZ_LABEL_ADDRESS" description="" />
<param type="literal" name="phone" label="COM_ARIQUIZ_LABEL_PHONE" description="" />
</params>
|
as well as view.html.php with:
Code: |
class AriQuizSubViewQuizFormGuestForm extends AriSubView
{
function display($quiz, $tpl = null)
{
$userQuizModel = AriModel::getInstance('Userquiz', 'AriQuizModel');
$ticketId = $userQuizModel->getGuestTicketId($quiz->QuizId);
$data = array('UserName' => '', 'Email' => '', 'mailAddress' => '', 'phone' => '');
$readOnly = false;
if (!empty($ticketId))
{
$userQuiz = $userQuizModel->getStatisticsInfoByTicketId($ticketId, 0, array(ARIQUIZ_USERQUIZ_STATUS_PROCESS, ARIQUIZ_USERQUIZ_STATUS_PREPARE), $quiz->QuizId);
if (!is_null($userQuiz))
{
$extraData = $userQuiz->parseExtraDataXml($userQuiz->ExtraData);
$data['UserName'] = AriUtils::getParam($extraData, 'UserName');
$data['Email'] = AriUtils::getParam($extraData, 'Email');
$data['mailAddress'] = AriUtils::getParam($extraData, 'mailAddress');
$data['phone'] = AriUtils::getParam($extraData, 'phone');
foreach ($data as $key => $value)
{
if (empty($value))
$data[$key] = ' ';
}
foreach ($extraData as $key => $value)
if (!isset($data[$key]))
$data[$key] = $value;
$readOnly = true;
}
}
else
{
$data['Email'] = AriUtils::getParam($_COOKIE, 'aq_email', '');
$data['UserName'] = AriUtils::getParam($_COOKIE, 'aq_name', '');
$data['mailAddress'] = AriUtils::getParam($_COOKIE, 'aq_address', '');
$data['phone'] = AriUtils::getParam($_COOKIE, 'aq_phone', '');
}
|
Which brings up the form field, validates that there is something there, and pushes the user into the quiz. However, the 'title' next to the input field appears as COM_ARIQUIZ_LABEL_ADDRESS and COM_ARIQUIZ_LABEL_PHONE instead of with a proper title. Also, the data captured in those two fields, is not passed to the result table on the backend of ARI Quiz in a formatted column. What do I need to add to correct the titles, and how do I get the captured data to appear in a useable form?
THANK YOU!
|
|
|
|
|
Re:Export Essay answers 9 Years, 10 Months ago
|
Karma: 760
|
1. Add labels (COM_ARIQUIZ_LABEL_ADDRESS and COM_ARIQUIZ_LABEL_PHONE) to <joomla_directory>/language/en-GB/en-GB.com_ariquiz.ini file.
2. Do you want to show new fields on "Quizzes results" page on component backend? If yes, it requires to extend data grid and add these fields. See <joomla_directory>\administrator\components\com_ariquiz\controllers\quizresults.php, <joomla_directory>\administrator\components\com_ariquiz\views\quizresults\view.html.php and <joomla_directory>\administrator\components\com_ariquiz\models\quizresults.php files.
Regards,
ARI Soft
|
|
|
|
|
Re:Export Essay answers 9 Years, 10 Months ago
|
Karma: 0
|
Thank you for the help!
I'm having an issue with a certificate not generating. This is the error that I receive after passing the quiz and pressing the certificate button:
Code: |
Fatal error: Class 'JText' not found in /home/content/u/t/a/utahactt/html/components/com_ariquiz/controllers/quizcomplete.php on line 533
|
Where can I define the JText class, or point the correct file? Thanks!
Best,
Jon
|
|
|
|
|
|