[LON-CAPA-users] EXT question
Tue, 12 May 2009 17:32:27 -0700
The above should work if your course contains the published sequence
in which the initial problem has the parameter defined as 'BusProblem'
(using the RAT to set the parameter and then republishing the
This should be recognized by any problem in the course. Of course you
can never see this effect in construction space, only in the actual
On Tue, May 12, 2009 at 3:24 PM, <Robert_Brewington@er.monroe.edu> wrote:
> Ray, this is basically what I am looking for. What is the painful string?
> I tried setting the mapalias for the first problem to "BusProblem". This
> problem has a partid inputMyMass with numericresponse id myMass.
> Then in the second problem I tried a number of things like
> $v1 = &EXT('user.resource.resource.inputMyMass.myMass.submission',
> $v3 = &EXT('user.resource.resource.inputMyMass.myMass.submission',
> $v4 = &EXT('user.resource.resource.inputMyMass.myMass.submission',
> $v5 = &EXT("BusProblem.inputMass.myMass.submission");
> but with no success yet.
> It feels like if I could just get the syntax of the second parameter, it
> would suddenly start to work. Or, if someone knows the form of the Very
> Painful String, that is fine too (although not as cool and clean). I can
> deal with painful if it works.
> I have used the example code from the albertel EXT examples for some time;
> they work great for retrieving values from partids in the current problem.
> The difficulty here is retrieving values from a separate problem.
> I have not been trying to do this as a sequence, since there are no
> decisions being made based on the information; just using it as parameters
> to the parts of the various problems. I guess I could look at putting all
> the problems in a straight line sequence with the mapalias. Ray (or
> whoever!), any examples of how this is done (setting the mapalias,
> retrieving a value from another resource)? Hmm, I don't know how I can look
> at someone else's RAT examples.
> Getting closer,
> firstname.lastname@example.org wrote: -----
> To: email@example.com
> From: Ray Batchelor <firstname.lastname@example.org>
> Sent by: email@example.com
> Date: 05/12/2009 05:24PM
> Subject: Re: [LON-CAPA-users] EXT question
> 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',
>> 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
> Raymond J. Batchelor, Ph.D.
> Department of Chemistry
> Simon Fraser University
> Burnaby, BC
> V5A 1S8
> LON-CAPA-users mailing list
> _______________________________________________ LON-CAPA-users mailing list
Raymond J. Batchelor, Ph.D.
Department of Chemistry
Simon Fraser University