SimpleQuiz

2 years 5 months ago - 2 years 5 months ago #1 by Katrinne
SimpleQuiz was created by Katrinne
Hello!
I have a problem with a score. I create psychology test on my site and it's has the score result:
0-9 normal
10-18 slightly bad
19-29 bad
30-63 very bad

So I have problem with 9 and 10 scores

My settings now:

[score < 9]normal[/score]

[score > 10]slightly bad[/score]

[score > 19]bad[/score]

[score > 30]very bad[/score]

If users has 9 score or 10 score, He has the mail result without text, only score without comments

How to set greater than or equal to ten? Or less than or equal to nine?


Thanks a lot

Please Log in or Create an account to join the conversation.

2 years 5 months ago #2 by Christopher Mavros
Replied by Christopher Mavros on topic SimpleQuiz
Hello Katrinne and thank you for posting this question!

It is in fact somewhat confusing, but when explained it gets easy.
You can change your score filters in your Complete Text, to include all scores, like that:

[score < 10]normal[/score]
[score > 9]slightly bad[/score]
[score > 19]bad[/score]
[score > 30]very bad[/score]

When written like that, the first text (normal) appears when the score is less than 10, which actually means less than or equal to 9. The same happens for the second text (slightly bad). Checking if the score is greater than 9, actually means that we check if the score is equal to, or greater than 10.
I know that it is confusing at first, but it can really do what you need without using the greater than or equal (>=) or less than or equal (<=) operators.

Thanks again.

Christopher Mavros
mavrosxristoforos@gmail.com
If you like our extensions, please rate us on the JED!
The following user(s) said Thank You: Katrinne

Please Log in or Create an account to join the conversation.

2 years 5 months ago #3 by Katrinne
Replied by Katrinne on topic SimpleQuiz
Thank you very much! It's work

Please Log in or Create an account to join the conversation.

2 years 5 months ago - 2 years 5 months ago #4 by Christopher Mavros
Replied by Christopher Mavros on topic SimpleQuiz
Thank you! We're glad to read that!

Please feel free to leave a review for SimpleQuiz on the JED. It can really help!
https://extensions.joomla.org/extension/simplequiz/

Christopher Mavros
mavrosxristoforos@gmail.com
If you like our extensions, please rate us on the JED!

Please Log in or Create an account to join the conversation.

2 years 5 months ago - 2 years 5 months ago #5 by Katrinne
Replied by Katrinne on topic SimpleQuiz
I'm sorry again, it doesn't work again

To set result test completely

0-9 normal
10-18 slightly bad
19-29 bad
30-63 very bad

I change my score filters like that:

[score < 10]normal[/score]
[score > 9]slightly bad[/score]
[score < 19]slightly bad[/score]
[score > 18]bad[/score]
[score < 30]bad[/score]
[score > 29]very bad[/score]

but it's broken

In the mail result Complete Text is mixed up and repeat, like that:

Your score is: 20.

slightly bad
bad
bad

Please Log in or Create an account to join the conversation.

2 years 5 months ago #6 by Christopher Mavros
Replied by Christopher Mavros on topic SimpleQuiz
Some texts are repeated because the rules apply.
For example, a score of 20 is both larger than 18 and smaller than 30.

To achieve your desired result, you can write nested [score] tags, like that:

[score < 10]normal[/score]
[score > 9][score < 19]slightly bad[/score][/score]
[score > 18][score < 30]bad[/score][/score]
[score > 29]very bad[/score]

Christopher Mavros
mavrosxristoforos@gmail.com
If you like our extensions, please rate us on the JED!

Please Log in or Create an account to join the conversation.

Moderators: Christopher Mavros