[LON-CAPA-users] EXT question
Tue, 12 May 2009 14:24:17 -0700
Well, if you are calling a parameter from within the same problem
resource, i.e. from a part of the same problem in which your &EXT is
located, then the the ",'something goes here'" can be omitted.
The 'something goes here' is, in principle, a very long (tediously so)
string which identifies a specific (problem) resource within your
course. However it is simpler to include such a problem resource
within a published sequence in which the specific resource is
identified by a "map alias" parameter. You can set this parameter in
the advanced RAT for any given resource holder in the sequence to be
published. Once you include that published sequence in your course,
then the specific resource's "map alias" parameter (string) cam be
used in your &EXT call to retrieve some status or other (such as
'submission') relating to any partID.responseID for that resource.
I do not know the up-to-date state of this facility, but it seems to
work in those cases where I have required it.
I have only used it in published sequences, although I believe at some
point it was intended to work by setting the map alias directly in the
course parms. The latter never worked for me, but setting the 'map
alias' as an authored parameter of the published sequence does work
Map aliases need to be unique within a course. So choose them memorably.
That's my two bit's worth.... I hope it made sense.
On Tue, May 12, 2009 at 7:15 AM, <Robert_Brewington@er.monroe.edu> wrote:
> Once again, I am trying to use the powerful &EXT construct to retrieve
> information from LonCapa. I think this is supposed to be possible, but I
> can't guess the syntax after a couple of hours.
> The setup:
> <part id="A">
> <numericresponse id="answer">
> $answerFromA = &EXT('user.resource.resource.A.answer.submission', 'something
> goes here');
> The script line is my problem - I don't know what to put in the second
> parameter of the EXT call, to retrieve the submitted value of A.answer. I
> know that the enclosing map is given by &EXT('resource.map'); how do I
> navigate to the Problem1.A.answer?
> Thanks for any clues,
> _______________________________________________ LON-CAPA-users mailing list
Raymond J. Batchelor, Ph.D.
Department of Chemistry
Simon Fraser University