self-platform-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Self-platform-dev] Exporting courses


From: Dinesh Joshi
Subject: Re: [Self-platform-dev] Exporting courses
Date: Thu, 1 May 2008 16:16:37 +0530

On Wed, Apr 30, 2008 at 9:58 PM,  <address@hidden> wrote:
>  I have been testing the export feature, from trunk. I added the test
>  function of the htmlExport module as an External method (with id
>  testhtmlexport) to have the htmlExport script work. In that way I get the
>  zip file in the /tmp dir of my instance system.
>
>  But I have some problems and some notes about the exporting.
>
>  There is a strip html function (in getHTMLContent) that clean html tags,
>  even img tags, before doing the copyimages? Then the images are not found,
>  is it possible? I omitted this function to follow testing. Maybe it is
>  necessary to change the order of functions.
>
>  Then I also got wrong paths when calculating the path to images in the
>  instance resources, as well as in the rewritten src (I got missing / or
>  broken paths).
>
>  Finally, I don't know why/how the generated zip file is supposed to be in
>  <portal_url>/export/<zip>, and I could not get the file through the
>  browser (but it was in the tmp dir, with the text content exported and the
>  resulting files zipped).

Must be some confusion. Update your copy with the latest version from
the CVS and try now. As rajiv mentioned add the LocalFS instance with
the id as "export". Here are some clarifications on what htmlExport
does.

1. Retrieves all the objects in the course and builds the tree
structure that you see initially.
2. Retrieves the content of all objects and extracts only the body
tag's content.
3. Concatenates all body tags, collects the img tags and rewrites them.
4. Creates a temporary directory in /tmp with a unique id
5. Dumps the entire HTML content as index.html in the directory created in ( 4 )
6. Collects the images and adds them to a directory called "resources"
7. It zips up the directory created in ( 4 ) and names it as course.zip
8. Serves the user course.zip

The reason the directory is created in /tmp is because its required
only temporarily.

-- 
Regards,
Dinesh A. Joshi




reply via email to

[Prev in Thread] Current Thread [Next in Thread]