question about the Ace-gapfiller UI

question about the Ace-gapfiller UI

by yuqing xu -
Number of replies: 4

in the Ace-gapfiller UI document (here) ,sample result  is   below

sample picture

I use the tes0  in UI parameters and python3 question type ,but  I get the following result,

test pic

the document says "all other test cases should contain corresponding gap fillers", how to write the "corresponding gap fillers" in the test case to get the result as in the ducument?  

thanks in advance

In reply to yuqing xu

Re: question about the Ace-gapfiller UI

by Richard Lobb -
The UI doesn't appear to be processing your test case 0 as the source. Did you set the UI_source parameter to 'test0' or to 'tes0' (as you say above)? It should be test0.

Using this UI is harder than it looks, because you have to write a template that takes the student answer (a list of strings) and inserts those back into the code. We have a question type that does all this, though it's very complex, as it has lots of extra functionality you don't need.

Here are the exports of our prototype for the question type and the example question above, which uses it.
In reply to Richard Lobb

Re: question about the Ace-gapfiller UI

by yuqing xu -
thank you for your timely reply, I do set the UI_source parameter to 'test0' using {"ui_source":"test0"} .the student answer box is right as in the document
I want to learn your method in the sample custom template, but the link in your reply on "Demo of Ace-gapfiller UI" lost. would you check it and give me a demo file link?
In reply to yuqing xu

Re: question about the Ace-gapfiller UI

by Richard Lobb -
I've fixed the broken link (sorry about that), but I'm now puzzled about what has gone wrong with your question. If you post the XML export of your question I can look into it more closely.
In reply to Richard Lobb

Re: question about the Ace-gapfiller UI

by yuqing xu -
From your demo file,I found my error, the answer in the authoring form must be "length_of_items = len(items)", fill "len(items)" in the gapfiller field.,My error is "length_of_items = ",fill nothing in the gapfiller field.
my error is corrected
thanks again