[LON-CAPA-users] Anyway to get a resource's folder name into a problem?

Michael Dugdale loncapa_admin at johnabbott.qc.ca
Mon Aug 27 10:44:27 EDT 2012


Many thanks, will give this a try.

Cheers,
Michael

On 2012-08-27, at 9:58 AM, Raymond Batchelor <batchelo at sfu.ca> wrote:

> @path = split('/', &EXT("request.uri"));
> $foldername = $path[(scalar @path) -2];
> 
> works for me.
> 
> There is probably a better way, though.
> 
> 
> 
> ----- Original Message -----
> From: "Raymond Batchelor" <batchelo at sfu.ca>
> To: "Discussion list for LON-CAPA users" <lon-capa-users at mail.lon-capa.org>
> Sent: Monday, 27 August, 2012 05:57:50
> Subject: Re: [LON-CAPA-users] Anyway to get a resource's folder name into	a	problem?
> 
> I haven't used this, but I believe you might be able to extract what you want from the function
> 
> &EXT("request.uri")
> 
> or &EXT("request.filename")
> 
> 
> 
> 
> 
> ----- Original Message -----
> From: "Michael Dugdale" <michael.dugdale at johnabbott.qc.ca>
> To: "Discussion list for LON-CAPA users" <lon-capa-users at mail.lon-capa.org>
> Sent: Sunday, 26 August, 2012 13:33:51
> Subject: [LON-CAPA-users] Anyway to get a resource's folder name into a	problem?
> 
> Hi,
> 
> I was wondering if there was a way (e.g., through an &EXT function) to get a resource's folder name?
> 
> E.g., if I place a problem in the folder "boojum", that the problem could determine that name and use it?
> 
> Any help would be appreciated.
> 
> Cheers,
> Michael
> 
> 
> Michael Dugdale
> Co-chair
> Department of Physics
> John Abbott College
> 21,275 Lakeshore Road
> Ste. Anne de Bellevue, Québec
> H9X 3L9, Canada
> (514) 457-6610 Ext. 5888
> michael.dugdale at johnabbott.qc.ca
> 
> 
> 
> 
> 
> 
> _______________________________________________
> LON-CAPA-users mailing list
> LON-CAPA-users at mail.lon-capa.org
> http://mail.lon-capa.org/mailman/listinfo/lon-capa-users
> _______________________________________________
> LON-CAPA-users mailing list
> LON-CAPA-users at mail.lon-capa.org
> http://mail.lon-capa.org/mailman/listinfo/lon-capa-users
> _______________________________________________
> LON-CAPA-users mailing list
> LON-CAPA-users at mail.lon-capa.org
> http://mail.lon-capa.org/mailman/listinfo/lon-capa-users




More information about the LON-CAPA-users mailing list