Subject: [LON-CAPA-dev] upload url

From: [email-masked]
Date: Mon, 26 Feb 2007 00:00:35 -0500 (EST)

Hi,

Looking for some advice. I have a $symb and a username.

What is the best call to get the uploadfile url for a problem?

I'm trying to gather a group of essay response uploads for download as a 
zip file.

Mark

----------------------------------------------------------------------------
Mark Lucas					email: [email-masked]
252D Clippinger Lab  				phone: (740)597-2984
Department of Physics and Astronomy             fax:   (740)593-0433
Ohio University
Athens, OH 45701

---

From: Guy Albertelli II <[email-masked]>
Date: Mon, 26 Feb 2007 01:59:32 -0500 (EST)

Hi Mark,

> I'm trying to gather a group of essay response uploads for download as a 

This would be  BUG#5179

You'll need to do a Apache::lonnet::restore() to get the current problem
state information for a particular student/symb.

Then (looking at the document loncapa/doc/datastorage)

resource.partid.responseid.uploadedurl
                    # url to use to grab the file that was used for
                    # the submission

resource.partid.responseid.uploadedfile
                    # filename of the upload file that is to be used
                    # for the submission

resource.partid.responseid.portfiles
                    # comma sepearted list of student portfolio files
                    # for the submission

Are the fields in the hash from restore() that have the info that you
need.

lonnet::filelocation() will take a
 /uploaded/domain/username/portfolio/.... url spec and turn it into a
 local filesystem location.

lonnet::repcopy() can be used to make a local copy for the file come
into existance (it fetchs it properly from the library server). So 

if (!-e $filelocation) { &Apache::lonnet::repcopy($filelocation); }

should bring it around. 

Need anything else?

-- 
[email-masked]   0-7-0-9-27,137