Home News Contact Us Forum About Us Demos Products F.A.Q.
Shopping Cart
You currently have 0 items in your cart.


Recent Events
  • 31/12/2023 New Year SALE

    We are glad to announce New Year SALE. 25% discount for all our extensions. Use NY24 coupon code. Hurry up the discount is valid till 7 January.

  • 21/11/2023 BLACK FRIDAY 23 is coming

    BIG SALE, 35% discount for all our extensions. Use BF23 coupon code. Hurry up the discount is valid till 27 November.


2Checkout.com, Inc. is an authorized retailer of goods and services provided by ARI Soft. 2CheckOut




Follow us on twitter



Welcome, Guest
Please Login or Register.    Lost Password?

Get user results with BankQuestionId
(1 viewing) (1) Guest
component
Go to bottomPage: 12
TOPIC: Get user results with BankQuestionId
#59177
Get user results with BankQuestionId 7 Years, 11 Months ago Karma: 0
Hi,

I have a strange request for quiz results and I really need help on that.

I have 3 quizzes with 12 questions each.
and I want to get results for user summing 1 question from each quiz.
So what I did is add the questions to the same bank in order to group the results.

The scenario is as follows

Code:


Quiz 1          Quiz2           Quiz3          RESULTS

Q1_q1_(bank1)   Q2_q1_(bank1)   Q3_q1_(bank1)  Result = Q1_q1(bank1)_Score + Q2_q1_(bank1)_Score + Q3_q1_(bank1)_Score
Q1_q2_(bank2)   Q2_q2_(bank2)   Q3_q2_(bank2)  Result = Q1_q2(bank2)_Score + Q2_q2_(bank2)_Score + Q3_q2_(bank1)_Score
Q1_q3_(bank3)   Q2_q3_(bank3)   Q3_q3_(bank3)  Result = Q1_q3(bank3)_Score + Q2_q3_(bank3)_Score + Q3_q3_(bank1)_Score
Q1_q4_(bank4)   Q2_q4_(bank4)   Q3_q4_(bank4)  Result = Q1_q4(bank4)_Score + Q2_q4_(bank4)_Score + Q3_q4_(bank1)_Score


etc...

I noticed that the question information and the BankQuestionId are in table "ariquizstatistics"
I am having really hard time to query the database with all fields and tables.

Can you please help me on that ?

Thank you
Last Edit: 2016/12/10 10:56 By militosconsulting.Reason: misstyped
The administrator has disabled public write access.
 
#59179
Re:Get user results with BankQuestionId 7 Years, 11 Months ago Karma: 0
Hi,
I think I found it.

In case someone else needs that, this is the query :
Code:

$query = "select t.`QuestionCategoryId`, sum(maxScore)\n"
    . "from (\n"
    . "SELECT a.`QuestionCategoryId`,max(c.score) maxScore,b.UserId,c.`BankQuestionId` FROM `tct_ariquizstatistics` c \n"
    . "join `tct_ariquizquestion` a on c.`BankQuestionId`=a.`QuestionId`\n"
    . "join `tct_ariquizstatisticsinfo` b on b.`StatisticsInfoId`=c.`StatisticsInfoId`\n"
    . "WHERE a.`Status` =1 and c.`Completed`=1 and b.UserId = " . $userId . "\n"
    . "GROUP BY b.UserId,a.`QuestionCategoryId`,c.`BankQuestionId`\n"
    . " ) t\n"
    . "GROUP BY t.`QuestionCategoryId`";



Now the only think I need to do is to embed after the test is finished.
The administrator has disabled public write access.
 
#59183
Re:Get user results with BankQuestionId 7 Years, 11 Months ago Karma: 760
Hello,

It is possible to create a plugin which will add a new placeholder to text text templates (for example {Total_Stat} placeholder will be replaced with data which will be generated by the plugin). If you are familiar with PHP, we can send a sample plugin by email and you can modify it for your needs.

Regards,
ARI Soft
The administrator has disabled public write access.
 
#59188
Re:Get user results with BankQuestionId 7 Years, 11 Months ago Karma: 0
Hi,

Thank you for your answer.

Please send my the Sample plugin !

Thank you very much
The administrator has disabled public write access.
 
#59198
Re:Get user results with BankQuestionId 7 Years, 11 Months ago Karma: 760
Check your mail please.

Regards,
ARI Soft
The administrator has disabled public write access.
 
#59199
Re:Get user results with BankQuestionId 7 Years, 11 Months ago Karma: 760
UPDATE: Your mail sever sent the following reply:

"Your message to *** was automatically rejected: Not enough disk space".

Regards,
ARI Soft
The administrator has disabled public write access.
 
Go to topPage: 12