PREP 2015 Question Authoring - Archived

Spaces not showing in Correct Answer

Spaces not showing in Correct Answer

by Daniele Arcara -
Number of replies: 2
This is a minor problem, since it shows up correctly in the 'Answer Preview' column, but I thought I would point it out anyway, in case it is an easy fix.

I was working on a problem with a drop-down menu as answer. The text within the drop-down menu had spaces, and they did not show in the 'Correct Answer' column (while they did show in the 'Answer Preview' column):


I will avoid putting the whole code here, but here are the relevant parts:

"",   #For multiple choice questions with a drop down menu

$popup = PopUp(["???", "the series is convergent by the Divergence Test", "the series is divergent by the Divergence Test", "the Divergence Test is inconclusive"], "the Divergence Test is inconclusive");

a. We can therefore say that [______________]{$popup} (choose one).

In reply to Daniele Arcara

Re: Spaces not showing in Correct Answer

by Davide Cervone -
This is a flaw in the underlying String object (which was only intended for a single word, not a phrase). The copy of that we used in the PREP2015 course was patched to work around this problem (I am putting together patches to be submitted for the official release based on the issues we discovered during the PRPR course). You can download that from the templates/macros directory and put that in your own course templates/macros directory on your own server. That should take care of the problem until the patches become part of an official release.