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?

Sorting questions and categories for frontend
(1 viewing) (1) Guest
component
Go to bottomPage: 1
TOPIC: Sorting questions and categories for frontend
#55146
Sorting questions and categories for frontend 8 Years, 9 Months ago Karma: 0
Wow I am surprised I can't see how to do this...

My questions need to be in a certain order for when the user takes the quiz on the frontend. I also have my questions split up into questions categories.

How do I order the questions and questions categories so that the questions are displayed in the order I want on the front end?

I hope this is possible as it is a must have feature for us.

Thanks
Last Edit: 2015/07/06 16:53 By BurlingtonGreen.
The administrator has disabled public write access.
 
#55147
Re:Sorting questions and categories for frontend 8 Years, 9 Months ago Karma: 747
Hello,

It is possible to order questions, for this use buttons in "Order" column on quiz questions page. The ordering will be ignored if "Random questions" parameter is set to "Yes" on quiz settings.

Currently the extension doesn't support ability to change order of question categories.

Regards,
ARI Soft
The administrator has disabled public write access.
 
#55157
Re:Sorting questions and categories for frontend 8 Years, 9 Months ago Karma: 0
Okay that is good then. I guess I can work around not being able to order question categories. What order do the categories take automatically. Is it lowest ID first? This is definitely a feature request I would like to make.

The reason I didn't find how to order the questions is that when I am on Quizzes and I click "manage quiz questions" I get the message no records found. I was thinking this is a bug as I have been adding questions to quizzes by:

- Creating a quiz
- Creating a bank category
- Creating a question in the question bank and assigning it to a bank category
- Creating a question category and then assigning it to the quiz and then assigning a bank category to it

I didn’t realize I could add questions because I had miss the icon for “manage quiz questions” (since this is the only way to access it and not the menu on the right). This is a much easier way to do it. I guess the reason why we don’t see the questions the way I added them is that the questions can be added in randomly since you have the option of only adding a set number of questions from a bank category.
Last Edit: 2015/07/07 11:55 By BurlingtonGreen.
The administrator has disabled public write access.
 
#55158
Re:Sorting questions and categories for frontend 8 Years, 9 Months ago Karma: 747
It is possible to set order for questions which are added directly into a quiz (on quiz questions page which appears when "Questions" button in toolbar or "Manage quiz questions" icon is clicked on quizzes page). It is not possible to change questionsI order if they are loaded form a question category question pool. In this case questions will be selected in random order from question bank.

If you want to sort question categories by category id on frontend part, open <joomla_directory>/administrator/components/com_ariquiz/modules/userquiz.php file, find the following code in "composeUserQuiz" method:

Code:


if ($paging == 'SeparateByCat')
{
$catPagesMapping = array();



and replace it with the following one:

Code:


if ($paging == 'SeparateByCat')
{
         $questions = AriUtils::sortAssocArray($questions, 'QuestionCategoryId', 'asc', 'natural');
$catPagesMapping = array();



PS: We will ability to set order for question categories in a future version of the extension.

Regards,
ARI Soft
The administrator has disabled public write access.
 
#55159
Re:Sorting questions and categories for frontend 8 Years, 9 Months ago Karma: 0
Thanks.

Maybe in a future release, in the Manage Quiz Questions you could have a placeholder record that states X questions from blah category. This could be used for categories that are set to pull automatically questions from the bank. The purpose of this record would be to show that there is indeed other questions in this quiz plus you could add the ability to sort at what point these category of questions would be displayed in the quiz.
The administrator has disabled public write access.
 
Go to topPage: 1