[LON-CAPA-users] modify value of custom responseparam

Gerd Kortemeyer lon-capa-users@mail.lon-capa.org
Sun, 17 Feb 2008 21:12:23 -0500


Hi,

On Feb 17, 2008, at 9:00 AM, Jay Sullivan wrote:

> I have the following in one of my problems:
>
> <responseparam name="cversion" default="1" type="integer"  
> description="version of comment displayed" />
>
> I am accessing this parameter inside the problem using:
>
> <script type="loncapa/perl">
> $commentversion = &EXT('resource.10.cversion');
> </script>
>
> That all seems to work fine. However, I would like to test being  
> able to externally change that parameter. If I view this problem in  
> a course as CC and choose Modify Parameter settings for this  
> resource I can see the parameter, but I can't change the value. The  
> drop-down box that I get is empty. What do I need to do to override  
> the source code version as CC?

I think the "type" parameter is the problem. LON-CAPA uses more  
cryptic type names for its parameters:

int_pos (positive non-zero integer)
int_zeropos (positive integer or zero)
int_any (or just "int" - negative, positive, and zero)
int_range (actually two integers, lower,upper)

Of course, this is extremely well documented ... not.

- Gerd.