Jump to content
Sign in to follow this  
raypower

On-line examination system--Randomly copy some records from another table?

Recommended Posts

Hi,

I try to write an on-line examination system. In this system, I have an item store table, which hold all tests item for student. Once the student create new examination, the system should copy some records from the store (for example, 2 of 3) randomly for this examination. How can I to define the relationship?

Sample file is attached.

Thanks in advance.

Exam_2007.zip

Share this post


Link to post
Share on other sites

Without looking at your file (cause I can't be bothered, sorry!) I could suggest the following:

You need two relationships: the first lists all possible questions. Use it to generate a value list of primary keys. Using some nifty string functions, randomly pull the two or three values from the value list and put them paragraph delimited into a global field as a multi-key, and use this multi-key in the second relationship.

The random records will be displays in creation order. To randonly sort them, create an unstored number calc field with the function "Random" in the questions file and specify the portal to sort by this field.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.