dcsimg
www.webdeveloper.com
Results 1 to 2 of 2

Thread: Possible to select of shuffle questions?

  1. #1
    Join Date
    Jan 2009
    Posts
    1

    Possible to select of shuffle questions?

    Hi all,

    My problem is the following: i have a XML doc and i'm using it with a swf file. It's a questions database and i was wondering if it's possible to make program of something so that i can choose how many questions i want to show prior doing the test? And is it possible to shuffle those questions?

    A piece of the xml file is as follows:

    <q2>
    <id>ID No. Q21</id>
    <qtitle>Title</qtitle>
    <q>the question here</q>
    <a>answer 1</a>
    <b>answer 2</b>
    <c>answer 3</c>
    <d>answer 4</d>
    <ans>1</ans>
    <correct>%21</correct>
    <wrong>%21</wrong>
    <fig></fig>
    <link>for explaination</link>
    </q2>

    Thanks in advance!

  2. #2
    Join Date
    May 2008
    Posts
    381
    Regarding shuffling/randomizing them, this would be more of a Flash issue...not an XML issue, unless you're working with the XML itself without using any Flash libraries to manipulate the XML. In the case of working with the XML itself, I know of no such way to do this.

    As for selecting the number of questions before doing the test, you might be better off using something like QUESTION rather than Q2, Q3, Q4, etc. and limiting the number of questions using XPath (e.g. position() < 20 for less than 20 questions) if that is available unless I'm missing something.
    Last edited by rpgfan3233; 01-31-2009 at 05:24 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles