Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

I want to create simple Quiz page, Please guide me.


Go to End


2 Posts   2116 Views

Avatar
Suriya

Community Member, 5 Posts

12 October 2009 at 11:49pm

Example Tables and fields :

---Table question_group ---
1. id (Number PK)
2. group_name (String)

--- Table questions ---
1. id (Number PK)
2. Question (String)
3. Choice 1 (String)
4. Choice 2 (String)
5. Choice 3 (String)
6. Choice 4 (String)
7. Answer (Number 1 digit : 1,2,3,4)
8. Group_ID (Number relations id table question_group)

Flow of create Question:
1. Create Question Group
2. Create question and select group_id

I have adobe Flash Quiz application. It can work with XML file and I want to use SilverStrip framework for backend management this module (create,edit,delete ) and return xml to Flash Application.

Example XML FIle :
<Quiz>
<question>
<quiz>What is it?</quiz>
<choice_1>Cat</choice_1>
<choice_2>Cat</choice_1>
<choice_3>Cat</choice_1>
<choice_4>Cat</choice_1>
<answer>2</answer>
</question>
<question>
........Bla Bla Bla ....
</question>
</Quiz>

Help me or guide me please.
Thank you.

Avatar
dalesaurus

Community Member, 283 Posts

13 October 2009 at 12:50pm

Well you could query the data into arrays with SQLQuery ( http://doc.silverstripe.org/doku.php?id=sqlquery ) then use PHP AMF ( http://www.amfphp.org/ ) to pipe it into your flash app with very little manpiulation.

Alternatively you could use a simple XML template to shift it out from easy-to-retrieve DataObjects: http://doc.silverstripe.org/doku.php?id=templates&s=template%20xml#calling_templates_from_php_code