[LON-CAPA-users] EXT question

Ray Batchelor lon-capa-users@mail.lon-capa.org
Wed, 13 May 2009 22:16:08 -0700

Hi Brew,

On Wed, May 13, 2009 at 6:20 PM,  <Robert_Brewington@er.monroe.edu> wrote:
> Ah, found my first problem - Firefox was blocking popups. The RAT needs
> popups to work... So now I am seeing the screens Ray suggests.
> So now I have set the mapalias parameter in four different places, in hopes
> of one working:
> In WholeThing.sequence, I named the mapalias "A" for Part 0. I think this is
> the one Ray indicates should work.

I'm not sure I understand what you mean by this.  I did not think that
sequences had parts, as such.   The way I would think about it is that
I would set the map alias for a particular problem within the
sequence.   I assume that the significance of "part 0" is that the
alias refers to the problem as an entire entity regardless of how many
parts it has.

> Just for fun, I also set "B" to point to parameter_inputMass_mapalias, the
> mapalias for the particular part id="inputMass".
> I set mapalias in the published First  problem to be "C". Ray has indicated
> that this will not work, but just trying to be thorough...

I'm not sure I understand what you mean by this.
So I probably did not intend to indicate this.... or at least I would
use different words to describe what I think.

> I also randomly tried to set the parameter in the part id=inputMass problem
> directly with
> <parameter name="mapalias" id="110" default="D" type="string_type"
> description="mapalias" />. Interestingly, this seems to override the 'B' I
> set in the sequence.
> Now, in Second.problem I have:
> $v1 = &EXT('user.resource.resource.inputMyMass.myMass.submission',
> &EXT("A"));  # Ray says should work

No. I don't think I said that.
My suggestion would be like the following:


provided that the .problem resource to which the alias A has been
assigned exists within a published sequence in your course, somewhere.

As for the others you are suggesting, I'm not sure I follow, at all,
what you have done, or are trying to do.
In my mind, the map alias parameter is always associated with a
particular .problem resource in a published sequence.  This may not be
the only way to do this, but it is a way that works.

I do not believe that I have ever tried defining a map alias in a
.problem resource.  Only within a .sequence, but referring to a
particular problem within the sequence.

So, to be explicit, here is an example:

Suppose I publish ProbA.problem and it has any number of parts.
Suppose that part id="11" in ProbA.problem  has a response with id="12".

Next I create a sequence -- let's call it My.sequence.
In that sequence I import any number of problems, one of which is
ProbA.problem.  Now, in the 'Advanced edit' mode I click on the
resource holder containing ProbA.problem and use "Set Parameters" to
set the parameter "Resource alias name for conditions [Part: 0]
parameter_0_mapalias" to be  AAA.

I save and publish My.sequence and import it into either the Main
Course Documents or some other folder in my course.

Next, I create or edit a different problem -- let's call it ProbB.problem.
In a perl script block within ProbB.problem I define:

I publish ProbB.problem and include it somewhere in my course...
(possibly within My.sequence or in a different published sequence, or
even in a DOCS folder, or the Main Course Docs.  I don't think it
matters, although I could be wrong.  Usually I would have put it in a
different published sequence, merely because that is the way I have
wanted to construct my course.

Now I should find that if a student has made a submission for
ProbA.problem, then variable $subA in ProbB.problem should have the
value of the student's submission to part11 response12 of