[LON-CAPA-users] Part list/order

hkng hkng at fsu.edu
Tue Jul 30 19:25:48 EDT 2013


I like to use it with the sty file together with css file. Each time it
encounters a part tag, I like it to display

Part A

and then automatically increments the counter. However, some problems have
only one part but have the part tag (even though it is not need). In that
case I do not want to display "Part A". So my thought is if there is only
one part, the script within the sty file can bypass the display.

It would be great if visibleparts can be incorporated in the EXT function.
This will make it more robust.

Thanks,
-hk


On Tue, Jul 30, 2013 at 7:00 PM, Stuart Raeburn <raeburn at msu.edu> wrote:

> Hi,
>
>  Is there a way to determine the number of parts in a problem using the EXT
>> function? or the part order?
>>
>
> No, not currently.
>
> Could you provide more details of how and where you would like to use this
> information?
>
> The expression: &EXT('resource.0.hiddenparts')**; will give you a list of
> part IDs of hidden parts (set via Parameter) for the current user.
>
> I could also add an additional item to lonnet::EXT(), e.g., accessible
> via: &EXT('resource.visibleparts'), to return a comma-separated list of
> part IDs for parts viewable by the current user (in course context). The
> implementation would make use of $res->parts() from lonnavmaps.pm
>
> On a separate note, when authoring a problem you can also set up a counter
> in the problem itself, e.g., at the beginning of the problem you could
> include:
> <script type="loncapa/perl">$numparts = 0; </script>
>
> and then include an additional script block within each part containing:
> <script type="loncapa/perl">$numparts ++; </script>
>
> The total number of displayed parts would then be available after all
> parts had been parsed.
>
>
> Stuart Raeburn
> LON-CAPA Academic Consortium
>
>
>
> Quoting hkng <hkng at fsu.edu>:
>
>  Hi,
>>
>> Is there a way to determine the number of parts in a problem using the EXT
>> function? or the part order?
>>
>> Thanks,
>> -hk
>>
>>
> ______________________________**_________________
> LON-CAPA-users mailing list
> LON-CAPA-users at mail.lon-capa.**org <LON-CAPA-users at mail.lon-capa.org>
> http://mail.lon-capa.org/**mailman/listinfo/lon-capa-**users<http://mail.lon-capa.org/mailman/listinfo/lon-capa-users>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.lon-capa.org/pipermail/lon-capa-users/attachments/20130730/eefefe3a/attachment.html>


More information about the LON-CAPA-users mailing list