[LON-CAPA-users] EXT question

Ray Batchelor lon-capa-users@mail.lon-capa.org
Tue, 12 May 2009 17:32:27 -0700


Hi Brew,

$v0=&EXT('user.resource.resource.inputMyMass.myMass.submission','BusProblem');

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
sequence).

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
course.


Cheers,
Ray

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',
> &EXT("BusProblem"));
> $v3 = &EXT('user.resource.resource.inputMyMass.myMass.submission',
> &EXT("resource.BusProblem"));
> $v4 = &EXT('user.resource.resource.inputMyMass.myMass.submission',
> &EXT("resource.map.BusProblem"));
> $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,
> brew
>
> lon-capa-users-admin@mail.lon-capa.org wrote: -----
>
> To: lon-capa-users@mail.lon-capa.org
> From: Ray Batchelor <batchelo@sfu.ca>
> Sent by: lon-capa-users-admin@mail.lon-capa.org
> 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
> fine.
>
>
> 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.
>
> Cheers,
> Ray
>
>
>
>
> 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:
>>
>> Problem1.problem
>> <problem>
>> <part id="A">
>> <numericresponse id="answer">
>> ...
>>
>> Problem2.problem
>> <problem>
>>
>> <script>
>> $answerFromA = &EXT('user.resource.resource.A.answer.submission',
>> 'something
>> goes here');
>> </script>
>>
>> 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,
>> brew
>>
>> _______________________________________________ LON-CAPA-users mailing
>> list
>> LON-CAPA-users@mail.lon-capa.org
>> http://mail.lon-capa.org/mailman/listinfo/lon-capa-users
>
>
>
> --
> Raymond J. Batchelor, Ph.D.
> Department of Chemistry
> Simon Fraser University
> Burnaby, BC
> Canada
> V5A 1S8
> _______________________________________________
> LON-CAPA-users mailing list
> LON-CAPA-users@mail.lon-capa.org
> http://mail.lon-capa.org/mailman/listinfo/lon-capa-users
>
>
> _______________________________________________ LON-CAPA-users mailing list
> LON-CAPA-users@mail.lon-capa.org
> http://mail.lon-capa.org/mailman/listinfo/lon-capa-users



-- 
Raymond J. Batchelor, Ph.D.
Department of Chemistry
Simon Fraser University
Burnaby, BC
Canada
V5A 1S8