Get radio button list order

I am making an online exam project and I am currently able to show choices for each question in random order. I want to control all currently open exam sessions so that each student gets a different order of choices during the time of the exam -- to avoid cheating.
I am thinking the best way is to retrieve choices radio button list items in order and insert them into a table by session and compare order for each new session asking for the same question.
Is this the best practice?
How do I get each item from the list and its order to be able to insert it into a table?
Thank you,
A

lake wrote:
I 'm not much of a math expert but ...
Let's say you have 5 radio choices 0...4, I am going out on a limb here and predicting there
are 120 combinations? (there are 5 choices for the first button, 4 choices for the second, 3 for the third,
2 for the second and 1 for the last?) So I think you could generate a table of permutations
something like this:
http://www.orafaq.com/forum/t/162827/0/
with      test_tab as
         (select 1 digit, 1 rn from dual union all
          select 2 digit, 2 rn from dual union all
          select 3 digit, 3 rn from dual union all
          select 4 digit, 4 rn from dual union all
          select 5 digit, 5 rn from dual
select t1.digit digit1, t2.digit digit2, t3.digit digit3,
t4.digit digit4, t5.digit digit5
from   test_tab t1, test_tab t2, test_tab t3,test_tab t4, test_tab t5
where  t1.rn != t2.rn
and    t1.rn != t3.rn
and    t1.rn != t4.rn
and    t1.rn != t5.rn
and    t2.rn != t3.rn
and    t2.rn != t4.rn
and    t2.rn != t5.rn
and    t3.rn != t4.rn
and    t3.rn != t5.rn
and    t4.rn != t5.rn
/note: I did not test that.
Ok so you would have at least one permutation table per number of radio buttons.
You would need to randomize the order in the table like assign dbms_random.random() to
a column say TMPSEQ and then order by TMPSEQ and assign rownum to some field (to get a nice simple key for the records) So then you need a package in plsql that retains
what was the last key (permuation) that was used. When it hits the max it would reset to 1.
I think you might actually have to create a different table for each question even if two questions
had the same number of choices because it would be possible
under unfortunate circumstances for the counter to be reset precisely at the beginning of another person's
test. which would totally wreck the effect you were going for :-) Now, I have tried this function:
http://www.orafaq.com/forum/mv/msg/162827/480976/0/#msg_480976
As I have choices from 1 to 4 I got 24 rows. Is there a way to separate those values? I want to bind each choice with a number from 1 to 4 and change their order based on the permutation I selected from the table. I think I need a function that returns character at certain position e.g. chatAt(str,i) so it would be like:
for i 1 to 4 loop
if(charAt(str,i)=1) then
Select chid into first_choice from choices where QID=:page_item and choiceNumber=1;
endif; ....other cases.... end loop
That would be my first choice in any permutation.
Is it best to create one SEQ for each question so each session just gets the next value of that question? How do I create SEQ's from PL SQL?
I also need to lock my SEQ to avoid access from multiple sessions at the same time if I wanted to save that SEQ for future use of displaying choices that were available like they were originally shown. Finally I need to return the list of choices in order to my radio LOV which I still don't know how to do! Probably a join between question table and my ordered choices on equal chid?
Edit: Maybe this way:
select TEXT display_value, CHID return_value
from table(order_choices(:P37_QID_ITEM))
Instead of the one shown in my earlier post?
Edited by: Cruncher on Jan 18, 2011 9:22 AM
Edited by: Cruncher on Jan 18, 2011 9:26 AM

Similar Messages

  • How to show/hide individual radio buttons in a single radio button list

    Can I apply javascript to checkboxes in order to show/hide individual radio buttons in a single radio button list?

    Thanks, Niall,
    I'll give it a try . . .
    Yours,
    Robert Anderson
    SWRCB WebSupport
    1001 I Street
    Sacramento, CA 95814
    8th floor 59B
    (916) 341-5950
    [email protected]
    >>> Niall O'Donovan <[email protected]> 8/5/2010 1:47 PM >>>
    Hi,
    Yes, it can be done. You just need to reference the actual button, rather than the radio button group.
    It is best if you name the radio button group AND all of the individual radio buttons.
    If the radio button group was named "myRadioButtons" and the three rb were named "yesRB", "noRB", and "maybeRB". All of this is in the hierarchy.
    Then this script in the click event of the checkbox would work:
    if (this.rawValue == 1)
         myRadioButtons.maybeRB.presence = "hidden";
    else
         myRadioButtons.maybeRB.presence = "visible";
    Hope that helps,
    Niall

  • How can i get Radio buttons  and parameters  in a Single Straight Line

    Hi Experts,
    How can i get Radio buttons  and parameters  in a Single Straight Line...
    Example:
       r1 r2 p1 p2.....
    Cheers,
    Priya
    Points granted.

    Write the following code for the selection screen:
    DECLARATION OF PARAMETERS.
    SELECTION-SCREEN: BEGIN OF BLOCK select WITH FRAME TITLE text-001,
                      BEGIN OF LINE.
                      SELECTION-SCREEN COMMENT 1(10) FOR FIELD p_detail.
                      PARAMETERS p_detail RADIOBUTTON GROUP r1 DEFAULT 'X'.
                      SELECTION-SCREEN COMMENT 25(10)  FOR FIELD p_summry.
                      PARAMETERS p_summry RADIOBUTTON GROUP r1.
    SELECTION-SCREEN: END OF LINE,
                      END OF BLOCK select.
    this will solve your poblem surly. reward the points if you find helpful
    Regards,
    Siddarth

  • Radio button list

    I have a radio button group that looks like
    <input type="response" type="radio" value="Strongly Agree" id="Strongly Agree">
    <input type="response" type="radio" value="Strongly Disagree" id="Strongly Disagree">
    <input type="response" type="radio" value="Agree" id="Agree">
    <input type="response" type="radio" value="Disagree" id="Disagree">
    In my list, I have a separate column for each radio button in my list. How can save the correct selected value to my list? 
    I'm able to get the value of the selected radio, however, if "strongly agree" is selected, I want to save [yes] to that column in my list. Can you use a case statement using SPServices call?

    Hi
    another approach
    What if you use only one column: type: Choice column with all these 4 values, adn set as radio buttons
    Romeo Donca, Orange Romania (MCSE, MCITP, CCNA) Please Mark As Answer if my post solves your problem or Vote As Helpful if the post has been helpful for you.

  • Error in Process execution with Radio Button List

    Hello All,
    In HCM Processes & Forms, we have a scenario of employee rating. To accomodate the same in the Interactive form have used 'ISR_RadioButtonList' that have corresponding binding with Form scenario fields.Upon selecting the corresponding radio button, we were able to retain the values and send it across the approval levels as defined in the workflow. These fields were to be used as place holders for the 'Radio Buttons' to retain the values(when sent from one approver to another as defined in the workflow) and not to save in the back end.
    The form was working fine all the time and since we have upgraded to SP20 the form is giving error as "The Entered Value Is Not on the List of Valid Values."
    Regards,
    Poornima

    Thanks for your answer.
    It's what I had done but I had saved the ID in a private member of the class and there is <b>two</b> different objects involved : one to render the component ("buildContent()" method) and one to manage the Event produced !
    Now, I put the ID in a static field.
    Regards.
    Mathieu

  • How to get Radio button select event in my co

    Hi,
    I want to get the radio button selection event in my co,how can i get the event?

    Hi,
    841475 wrote:
    I want to get the radio button selection event in my co,how can i get the event?---There is no event for radio button.
    ---U need to explicitily set the event for the radio button.
    Action:FirePaatialAction
    Event:RadioEvent---Get the event in co by below code:
    if("RadioEvent".equals(pageContext.getParameter(EVENT_PARAM)))
    ---In radio button event..:)
    Regards
    Meher Irk

  • How to get radio button value in JavaScript

    I have a very simple radio button with two values: 1 and 2. I am trying to pass the value using a JavaScript call to a popup window. I am assuming there is a different method of obtaining the value, as
    var v_typ = document.getElementById("P1520_TYPE").value;doesn't work.

    Hi,
    If you are on Apex 3.x or higher, use JavaScript API function $v
    http://download.oracle.com/docs/cd/E14373_01/apirefs.32/e13369/javascript_api.htm#CHDEJEIG
    var v_typ = $v("P1520_TYPE");Regards,
    Jari

  • Getting Radio Button Value

    I have a radiogroup that get its values from a table (For example, the query returns 3 values: Image, Text, Both. And this values are shown in the application). My question is how to get the value selected when one of this is clicked.

    OK. You need to use a bit of javascript in your page. In the HTML header section of the page-definition add the following<script>
    function hideAndShow(val) {
    if (val=='I') {
      $f_Show_On_Value_Item('P90_Radio','P90_item1',val)
      $f_Hide_On_Value_Item('P90_Radio','P90_item2',val)
    $f_Hide_On_Value_Item('P90_Radio','P90_item3',val)
    if (val=='T') {
      $f_Show_On_Value_Item('P90_Radio','P90_item2',val)
      $f_Hide_On_Value_Item('P90_Radio','P90_item3',val)
      $f_Hide_On_Value_Item('P90_Radio','P90_item1',val)
    if (val=='B') {
      $f_Show_On_Value_Item('P90_Radio','P90_item1',val)
      $f_Show_On_Value_Item('P90_Radio','P90_item2',val)
       $f_Hide_On_Value_Item('P90_Radio','P90_item3',val)
    </script> For the HTML Form Attributes field of P90_Radio set
    onchange=hideAndShow(this.value)
    varad
    Edited by: varad acharya on Nov 25, 2009 12:53 PM

  • Getting form field values for radio button

    Hello to the forum.
    I have a form in which I want to control the value selected in a radio buttons field on whether to allow access to another field.
    I can't find info neither here nor in the examples.
    Anybody know how to do?
    Thank in advance.

    Hi,
    You can use the change event of the radio button list.
    Select the readio button list exclusion group, in script editor select the "change" event. As an example if we have two selections "aa" and "bb" which have values 1 and 2 respectively.
    You can write this Javascript code to change event.
    if(this.rawValue == 1)
    xfa.host.messageBox("aa");
    else if(this.rawValue == 2)
    xfa.host.messageBox("bb");
    Hope helps,
    Asiye

  • How to Use Switch Statement with Exclusion Group (radio buttons)?

    Wouldn't you know, just when I though I'd really be making progress, I've come across another problem I can't solve. In a homeowners insurance application I am building, there is an exclusion group that needs to set the value of several variables
    I have setup in the form properties/variables. These variables take on different values depending on the users choice.  For the exclusion group, in the object pallet, I have set the binding to normal, and have checked the "Specify Item Values" check box. Also the values for the choices have been assigned 1,2,3,4,5.
    Here is my code for the change event fir the exclusion group (This is exactly what I have tried). For now, the values for the variables to take on in the different cases, are completely arbitrary.
    switch (this.change.rawValue)              // I have tried so many things here
        case "1":                                        // I have tried the caption, single quotes in all combinations
            addLivingExp = "1";
            damageOthersProperty = "2";
            liabilityIncl = "3";
            maxCoverage = "4";
            minCoverage = "5";
            persProperty = "6";
            relatedPrivateStruct = "7";
            break;
        case "2":    
            addLivingExp = "10";
            damageOthersProperty = "20";
            liabilityIncl = "30";
            maxCoverage = "40";
            minCoverage = "50";
            persProperty = "60"
            relatedPrivateStruct = "70";
            break;
        case "3":    
            addLivingExp = "100";
            damageOthersProperty = "200";
            liabilityIncl = "300";
            maxCoverage = "400";
            minCoverage = "500";
            persProperty = "600"
            relatedPrivateStruct = "700";
            break;
        case "4":    
            addLivingExp = "1000";
            damageOthersProperty = "2000";
            liabilityIncl = "3000";
            maxCoverage = "4000";
            minCoverage = "5000";
            persProperty = "6000"
            relatedPrivateStruct = "7000";
            break;   
        case "5":    
            addLivingExp = "10000";
            damageOthersProperty = "20000";
            liabilityIncl = "30000";
            maxCoverage = "40000";
            minCoverage = "50000";
            persProperty = "60000"
            relatedPrivateStruct = "70000";
            break;   
        default:   
            minCoverage= 5;   
            break;
    There must be something obvious I am missing? Eternally grateful for advice on this.
    Stephen

    There are two issues in this script:
    1. You are not using the accessor 'value' to set form variables
    2. You are not correctly getting the value of the radio button list in the switch clause
    Please see the working script below.
    Ben Walsh
    www.avoka.com
    switch (this.rawValue) 
        case "1":                                       
            addLivingExp.value                  = "1";
            damageOthersProperty.value   = "2";
            liabilityIncl.value                      = "3";
            maxCoverage.value                 = "4";
            minCoverage.value                  = "5";
            persProperty.value                  = "6";
            relatedPrivateStruct.value        = "7";
            break;
        case "2":   
            addLivingExp.value                  = "10";
            damageOthersProperty.value   = "20";
            liabilityIncl.value                     = "30";
            maxCoverage.value                 = "40";
            minCoverage.value                  = "50";
            persProperty.value                  = "60"
            relatedPrivateStruct.value        = "70";
            break;
        case "3":   
            addLivingExp.value                 = "100";
            damageOthersProperty.value   = "200";
            liabilityIncl.value                     = "300";
            maxCoverage.value                 = "400";
            minCoverage.value                  = "500";
            persProperty.value                  = "600"
            relatedPrivateStruct.value        = "700";
            break;
        case "4":   
            addLivingExp.value                  = "1000";
            damageOthersProperty.value   = "2000";
            liabilityIncl.value                      = "3000";
            maxCoverage.value                 = "4000";
            minCoverage.value                  = "5000";
            persProperty.value                  = "6000"
            relatedPrivateStruct.value        = "7000";
            break; 
        case "5":   
            addLivingExp.value                  = "10000";
            damageOthersProperty.value   = "20000";
            liabilityIncl.value                      = "30000";
            maxCoverage.value                 = "40000";
            minCoverage.value                  = "50000";
            persProperty.value                  = "60000"
            relatedPrivateStruct.value        = "70000";
            break; 
        default:  
            minCoverage.value                 = 5;  
            break;

  • Dynamic Radio Buttons that offer dynamic output

    I am wondering if coldfusion has the abilty to perform the task
    I am looking for. I want to list radio buttons
    as options, and depending on which radio button the user selects,
    they are then offered a series of other radio buttons.
    Is this something coldfusion can handle, or would a different language
    be better suited for this?

    You are looking for a javascript solution.  CF or any backend can handle
    dealing with the data, sending back and forth data about what radio button
    list to show, etc easily.  But if you want no browser refreshes, then you
    need to look into javascript to display the list, use ajax to poll for
    refined radio button options, then display.  I recommend looking into jquery
    and CF.  CF can get the options from the database for you and serve to
    jquery which is run int he browser which will dictate how to display it
    nicely.
    http://api.jquery.com/radio-selector/
    <http://api.jquery.com/radio-selector/

  • Help with radio buttons and show/hide javascript

    Hi. I'm new working with LiveCycle and also pretty much at a basic/beginner level of javascripting. I'm creating a pdf fillable form and one of the tasks I've been given is to add a function where if Option A is chosen by the user, then the correspondng table will appear, and if Option B is chosen another table will appear. After some searching I Iearned more about how radio buttons can be used, so I created a set of radio buttons. I have tried several different things, the latest was making both tables "hidden", and then taking to the radio button list group and applying the show/hide script to each of the radio buttons in the group. Still nothing seems to be working as I want it to. The table remains hidden when I click on the . This is what the code looks like right now. I know I'm obviously doing something wrong, this seems like such a basic thing to code. Getting to the frustration point, if you can sort me out with what I am missing/overlooking please let me know. Many thanks!
    Note. The radio buttons are not in the same table, they are higher up in the form outside of the tables that I am trying to show/hide, but they are in the same subform. I don't know if that might be an issue?
    form1.#subform[0].RadioButtonList::click - (JavaScript, client)
    form1.#subform[0].RadioButtonList.#field[0]::click - (JavaScript, client)
       if ( RadioButtonList.#field[0].selectedIndex == 1)
         form1.#subform[0].Table1_Work.presence = "visible"
       else
       form1.#subform[0].Table1_Work.presence = "hidden"
    form1.#subform[0].RadioButtonList.#field[1]::click - (JavaScript, client)
       if ( RadioButtonList.#field[1].selectedIndex == 2)
        form1.#subform[0].Table1_Official.presence = "visible"
      else
         form1.#subform[0].Table1_Official.presence = "hidden"

    Hi,
    For starters you have unnamed pages, which is not a good idea. This makes it more difficult to reference objects. In your JavaScript you would have to resolve the node, however the simpliest route would be to name the page first. Something like "page1". Have a look at this example for referencing objects: http://assure.ly/kUP02y.
    Next I would not place the script in each of the radio buttons, as this is likely to cause conflicts and is doubling the script. The best place to put the script is in the click event of the radio button exclusion group. This contains all of the radio buttons. See an example here: http://assure.ly/h7whb8 and https://acrobat.com/#d=ALebgueDXjewHjGyYRdrmw.
    You syntax for JavaScript if/else statements is potentially incorrect. The script within the statements should be wrapped in curly brackets. While you can get away with it for single lines, I would not be inclined to take that approach. So:
    if (a test) {
         // do something
    else {
         // do something else
    With the radio button exclusion group you can use its rawValue, just specify it in the Object > Binding palette. So on the basis of chaning the page name:
    if (this.rawValue == "1") {
         page1.Table1_Work.presence = "visible";
    else {
         page1.Table1_Work.presence = "hidden";
    There is a syntax checker button in the Script Editor that should highlight errors.
    Niall

  • Dynamic Radio Button Creation

    Hi All,
    The Number of rows the query will return... i need to create that much of RadioButton For Approval & Rejection....
    eg.- If the row return to value suppose
    1) AOL - Radio Button For Rejection & Approval
    2) ACE - Radio Button For Rejection & Approval
    How to achieve it... please provide me the wayout..
    Thanks

    T.A.Anand wrote:
    Gyan,
    1. Create a stack Layout to hold all the radio buttons which you are going to create
    2. use the below code
    OAStackLayoutBean layout = (OAStackLayoutBean )webBean.findIndexedChildRecursive("stackLayoutID"); 
    for(int i=0;i<3;i++)
    OAMessageRadioButtonBean list =(OAMessageRadioButtonBean)createWebBean(pageContext,MESSAGE_RADIO_BUTTON_BEAN);
    list.setID("radioButton"+i);
    list.setName("RadioGroup");
    list.setValue(pageContext,"Value"+i); // to assign a value to differentiate selected radio button
    list.setText(pageContext,"Text"+i); // to assign text  Note: you can use setLable() also
    layout.addIndexedChild(list);
    }3. Use the below code to find out selected radio button
    String radioGroupValue = pageContext.getParameter("RadioGroup");  regards,
    Anand
    Edited by: T.A.Anand on 6 Oct, 2010 4:20 PMHi Anand,
    I already following your sample code in my code, but I cannot get the selected values...here's my code
    in PR
    OAStackLayoutBean layout = (OAStackLayoutBean)webBean.findChildRecursive("radioSL");
    for(int i=1;i<6;i++){
    OAMessageRadioButtonBean list = (OAMessageRadioButtonBean)createWebBean(pageContext,MESSAGE_RADIO_BUTTON_BEAN);
    list.setID("radiobutton"+i);
    list.setName("radiogroup");
    list.setValue(pageContext,"Value"+i);
    list.setText(pageContext,"text"+i);
    list.setViewUsageName("EvalSubVO");
    list.setViewAttributeName("Max"+i);
    layout.addIndexedChild(list);
    in PFR
    for(int i=0;i<j;i++){
    String xxgroupValues = pageContext.getParameter("radiogroup");
    String id = row.getAttribute("InitRespDtlId").toString();
    CallableStatement cs = txn.createCallableStatement(" begin TSEL_VM_PKG.updateAnswer(:1, :2, :3); end; ", 1);
    try
    cs.setString(1, id);
    cs.setString(2, xxgroupValues);
    cs.setString(3, xxgroupValues);
    cs.execute();
    cs.close();
    catch(SQLException sqle)
    sqle.printStackTrace();
    do you know why Anand? please help me....I'm Stuck... :(
    thanks in advance,
    regards,
    Eko Purnomo

  • Primary Key radio button not working

    Hello
    I created a toplink probject on my MacOS X 10.4.6 machine using JDev 10.3.1.0.4 SU2.
    It works well, but when I click the toplink map, then I click my definition under structure to the right.
    I have a view with:
    Associated table: <popup>
    Primary keys:
    <radio button list>
    Sequencing:
    The problem is located at the radio button list of the primary keys, if I click a radio button, the XML description file is updated, but I visualy see nothing, all radio buttons are always not selected.
    As a workaround, I click the pk I want, and then I verify the XML file for correct selection.
    Hope it will be fixed.
    Regards
    Kuon

    Found a new workarround.
    Changing look from MacOS X to Oracle.
    But I hope it will get fixed, MacOS look is better with text anti-aliasing.

  • Radio Button to make other field Mandatory

    I have two Radio Buttons that I want when clicked on (either one) to make a Number Field mandatory. I have viewed many websites on setting a mandatory field but the script I am using will not work. I have tried a couple ways of writing it but I seem to be missing something.
    I have used this script in the Show of: click & change
    Here is the script that I'm using right now.
    if  (this.rawValue==1)   
    AssemblyNu-1.mandatory ="error";
    else
    AssemblyNu-1.mandatory ="disabled";
    And this one:
    if (this.rawValue==2)
    AssemblyNu-1.mandatory ="error";
    else
    AssemblyNu-1.mandatory ="disabled";
    Thanks,
    HHud5757

    So, I put a quick form together to test your code.
    On the change event of the radio button list (not the radio button itself), I added:
    if (this.rawValue == 1) tfTest.mandatory = "error";
    else tfTest.mandatory = "disabled";
    In my case, the radio button with the value of 1 is the one I want to make the field mandatory. If you want either button to make it mandatory, then use:
    if (this.rawValue == 1 || this.rawValue == 2) tfTest.mandatory = "error";

Maybe you are looking for

  • PSE 7 bright vivid colors, doesn't match prints

    I tried searching for a thread to answer this question but I could not find something that really helped specifically. Use PSE7 to edit my jpg's and when I'm happy with the results then go to print, my prints do not match what I created on screen.  T

  • Control Framework tree control event not trigerring

    The event handle_node_double_click is not trigerring on the tree controls . I want to display the contents of the nodes on the text editor on trigerring of this event *& Report  ZCONTROLS_TREE_TEDIT_SPITTER REPORT  zcontrols_tree_tedit_spitter. DATA

  • Finding all assets in a movie

    Is there any way to see where all instances, movie clips, buttons, etc. are used in a movie? Sometimes I see a reference in AS and I think it would be easy to just have some sort of directory so when I see an asset linked, I can easily find where it

  • Can't download Acrobat Adobe Pro XI after purchased. It's said it's not available after 60 days.

    Hi I just buy new computer and would like to download Acrobat Adobe Pro XI on my new computer. The staff said I can downloaded it twice for 2 computers for 1 purchase. But now I can't load the program to my new computer. It's said it has been after 6

  • APPLE publishes 10 point Trouble Shooting Basics for FCPX

    Odd, because they can fix some of this, other aspects are built on users method and set up. At least it gives a glimmer of hope that they are listening to feedback from the feedback forms or in fact,they just know inherently at this point. There are