[LON-CAPA-users] 2 questions

Mills, Douglas G dmills at illinois.edu
Thu Oct 31 16:55:31 EDT 2019


HI Stuart,

I'm finding actually that IF the parameters are inserted between part tags, the green notification that it will randomize every N tries appears in the authoring space. However, randomization does not occur, neither in the authoring space nor when published publicly  (which of course means that it is randomizable anyway, maybe that has an effect on the published version? I'm just using the public publication as a quick test and an easy way for a collaborator with whom I don't have a shared course for testing to have a look. It's not what we'll ultimately do with these.). If I take the same problem and remove the part tags, the green notification does not appear in the authoring space and, as you describe below, it randomizes after every submission.

Doug
 
DOUGLAS G MILLS
Director of Instructional Technology
 
Department of Chemistry

University of Illinois at Urbana-Champaign
Chemistry Annex Box A2
601 S. Mathews | M/C 712
Urbana, IL 61801
217.244.5739 | fax: 217.244.8029 | dmills at illinois.edu
chemistry.illinois.edu <http://chemistry.illinois.edu>
 
 <http://illinois.edu/>

Under the Illinois Freedom of Information Act any written communication to or from university employees regarding university business is a public record and may be subject to public disclosure. 
 

On 10/31/19, 12:47 PM, "LON-CAPA-users on behalf of Raeburn, Stuart" <lon-capa-users-bounces at mail.lon-capa.org on behalf of raeburn at msu.edu> wrote:

    Doug,
    
    Answer to question 1:
    
    Authors can include parameters within a problem to cause the randomization to change after N tries, by setting the questiontype parameter to randomizetry, and the randomizeontries to N, e.g.,
    
        <parameter description="Question Type" name="type" default="randomizetry" type="string_questiontype" />
        <parameter description="Tries before new Variation (if Qn. Type=randomizetry)" name="randomizeontries" default="3" type="int_pos" />
    
    If you use the colorful editor, and select "Parameters for a part" in an Insert drop-down list item, you can then insert these parameters by using the "Use template" drop-down list to selecting either "Question type" or "Tries before new Variation (if Qn. Type=randomizetry)".  In the first case, enter a value of: randomizetry in the Default: textbox, and in the second enter the desired number of tries (e.g., 3) in the Default: textbox.
    
    If the questiontype parameter is set to randomizetry, but randomizeontries is not set, then a default value of N = 1 is used.
    
    In course context when you include a parameter within a problem itself, that parameter will be listed in the "Resource Level" default column when displaying Content Settings for that particular resource.  (The resource level default can be overridden by setting a value for the same parameter in the  "in Course" for Resource column in table mode, i.e., further to the right).
    
    Currently, including a randomizeontries parameter within a problem does not change the behavior when viewing in Authoring Space (N=1 applies), although the parameter you set will be in effect when viewing in course context.  In addition, when the randomizetry parameter is included within a problem, the text: "New Problem Variation After Every N tries" is displayed in course context, but not when viewing in Authoring Space.
    
    I have filed a bug (6917) and have implemented code changes so viewing in Authoring Space is consistent with viewing in course context. (See bugs.loncapa.org/show_bug.cgi?id=6917 for details).
    
    Answer to question 2:
    
    If the problem is a cs or ci stringresponse type problem, then in a script block you could loop over the attempt history and retrieve the "Computer's answer" for a particular attempt via: 
    
    &EXT("user.resource.$i:resource.<partID>.<responseID>.answerstring") 
    
    (you would remove the text: "INTERNAL:" from the value returned by the &EXT()), and you could retrieve the submission for that particular attempt via: 
    
    &EXT("user.resource.$i:resource..<partID>.<responseID>.submission")
    
    where $i is the transaction counter, as discussed in an earlier thread on this list (see: mail.lon-capa.org/pipermail/lon-capa-users/2018-October/005362.html).
    
    However, rendering both the instance of the question for the randomseed in effect, and the computer's answer for a responseitem that is not ci or cs stringresponse, would require implementing a change within LON-CAPA to display the output from rendering for these different targets with the current randomseed, along with an "Additional tries with new problem variation" button to proceed to access additional attempt(s) with the new randomseed.  I have filed an enhancement request for this, see: bugs.loncapa.org/show_bug.cgi?id=6918 
    
    I do not know whether questiontype=randomizetry is in use by any instructors.  This questiontype was originally implemented to satisfy a request from ECE instructor(s) in the uiuc domain, but I believe ECE course(s) at uiuc no longer use LON-CAPA.
    
    Aside from the use of a questiontype set to randomizetry, you could also explore (a) the use of conditional blocks within a  .problem, or (b) the use of a .page containing multiple instances of the same resource, linked together by conditional links, as ways of accomplishing your goal (albeit with a potential side effect on points possible totals for a folder and/or course when using the standard gradebook).
    
    Stuart Raeburn
    LON-CAPA Academic Consortium
    ________________________________________
    From: LON-CAPA-users <lon-capa-users-bounces at mail.lon-capa.org> on behalf of Mills, Douglas G <dmills at illinois.edu>
    Sent: Wednesday, October 30, 2019 10:31 AM
    To: Discussion list for LON-CAPA users
    Cc: Mills, Douglas G
    Subject: [LON-CAPA-users] 2 questions
    
    Happy Fall -- it seems to be arriving here in Champaign Urbana at least.
    
    I am wondering:
    
    (1) Is there a parameter that can be coded into a problem to refresh variables after x number of attempts? I know this can be done in the content parameters and that that is the preferred Lon-Capa approach, giving instructors greater autonomy over such decisions, but for specific problems in a specific course, the instructors are interested in after, say 3 tries, giving the student the answer to the current version of the problem and presenting a re-randomized version. Which leads to my second question:
    
    (2) If in the scenario above we randomize a problem after x number of tries, is there a way to refer to the previous randomized values so that in addition to the new version the student can be shown something like "The problem you were trying to solve was ... and the correct answer to that problem is ..." ? There are so many possibilities for creative implementations in Lon-Capa I'm pretty sure I can figure out a way of accomplishing this, but thought I'd go ahead and ask first since there are also so many ways of accessing behind-the-scenes information in Lon-Capa.
    
    Thanks all!
    
    Doug
    
    DOUGLAS G MILLS
    Director of Instructional Technology
    
    Department of Chemistry
    
    University of Illinois at Urbana-Champaign
    Chemistry Annex Box A2
    601 S. Mathews | M/C 712
    Urbana, IL 61801
    217.244.5739 | fax: 217.244.8029 | dmills at illinois.edu<mailto:dmills at illinois.edu>
    chemistry.illinois.edu<https://urldefense.com/v3/__http://chemistry.illinois.edu__;!ioFpBMP7lJU!gOCbiOWHLwvFScFV1aNI_fjEUaKMpXzdwLuCxxoih9u3BrPrU6mZgHi62jSZFA$>
    
    [/var/folders/kv/f3wpy1cs51521x5grm_qx4tw0000gn/T/com.microsoft.Outlook/WebArchiveCopyPasteTempFiles/P698ojxP4tc7j8gMqgPv+E4KQAAAABJRU5ErkJggg==]<https://urldefense.com/v3/__http://illinois.edu/__;!ioFpBMP7lJU!gOCbiOWHLwvFScFV1aNI_fjEUaKMpXzdwLuCxxoih9u3BrPrU6mZgHjEpsLawg$>
    
    Under the Illinois Freedom of Information Act any written communication to or from university employees regarding university business is a public record and may be subject to public disclosure.
    
    



More information about the LON-CAPA-users mailing list