[LON-CAPA-users] Retreiving Name of Course Document in a problem

lon-capa-users@mail.lon-capa.org lon-capa-users@mail.lon-capa.org
Wed, 12 Jul 2006 16:41:14 -0400


Hmm, this is basically what I am looking for - some reference to the
enclosing map, or a parent, or something. Maybe something like
resource.parent.parent.title or something...

I tried the construct
    &EXT('resource.title',&EXT('resource.map'));
and it still gave me the name of the problem (rather than the name of the
Course Document). I think the problem is that the
&EXT('resource.map') piece gives an empty string, rather than a map name.

Any clues?

Thanks,
brew

-----lon-capa-users-admin@mail.lon-capa.org wrote: -----

To: lon-capa-users@mail.lon-capa.org
From: Guy Albertelli II <guy@albertelli.com>
Sent by: lon-capa-users-admin@mail.lon-capa.org
Date: 07/12/2006 03:10PM
Subject: Re: [LON-CAPA-users] Retreiving Name of Course Document in a
problem

Hi Brew,

> 1) It does not give me the name of the Course Document resource, "Sheet
1"
> in this case. It gives me the title of the first problem on the page.
This
> seems to be the same as displaytitle, used in a style sheet.

Yep, the default is for it to give you the title of the resource within
which it is being called.

In the case you actually want the title of the enclosing map

&EXT('resource.title',&EXT('resource.map'));

Should do it for you.

> 2) When in author mode, if I view master.problem, resource.title is
empty.
> I spent a couple of hours trying different possible labels with no
results;
> now I see I have to publish every possibility and switch to Course
> administrator (or a student) to check that possibility. Why don't I see
> something as Author?

You don't need to switch to the Author role to author, you can author
even when your selected role is CC or ST if you have a valid Author
role.

That being said, &EXT('resource.title') in 2.2 will always return
something descriptive. (Although in CSTR space it'll just be the
filename of the resource.)


> 3) Which reminds me, is there some way to have two windows open, one as
> Author and one as Course administrator (or a student)? It is a pain to
> constantly switch back and forth. I run under Firefox, typically with 4
or
> 5 tabs to various resources. When one tab changes to Administrator, it
> seems to change them all.

By involving multiple machines. But I hope that now that you note that
you can author as CC you see this to be not needed as much.

--
guy@albertelli.com   0-7-1-7-27,137
_______________________________________________
LON-CAPA-users mailing list
LON-CAPA-users@mail.lon-capa.org
http://mail.lon-capa.org/mailman/listinfo/lon-capa-users