WeBWorKWiring

From WeBWorK_wiki
Jump to navigation Jump to search
This article has been retained as a historical document. It is not up-to-date and the formatting may be lacking. Use the information herein with caution.

Data and temporary directories

There are several directories used for files generated by WeBWorK.

webwork2/DATA
stores system-wide data files, like the equation cache database. These are not temporary files. Eventually, this directory will be deprecated in favor of tables in an SQL database.
webwork2/tmp
the "system-wide private temp directory". It is used for files that are used internally by webwork and then discarded, like the files generated by running LaTeX. Typically, these files only exist for a single request to the system. Then they are deleted. (Or at least they should be deleted.)
webwork2/htdocs/tmp
the "system-wide public temp directory". It is used for generated files that must be accessed by web client, like equation images (which are stored in the "equations" subdirectory of this directory. These files stick around after the end of a request, as a cache, but they are "temporary" in that if they are deleted, the system can regenerate them.
(By way of your ApacheSetup, the URL http://yourserver.yourschool.edu/webwork2_files/ should point to webwork2/htdocs. Thus, the URL http://yourserver.yourschool.edu/webwork2_files/tmp will point to the system-wide public temp directory.)
webwork2/courses/COURSENAME/DATA
stores course-specific database files generated by the system, like GDBM databases. These are not temporary files. Eventaully, this directory will be deprecated in favor of SQL databases.
webwork2/courses/COURSENAME/html/tmp
the "course-specific public temp directory". It is used for generated files that are specific to a course and must be accessed by the client. Symlinks to PG auxiliary files (like static images) and generated graphs live here. If they are removed, they can be regenerated by the system.
(By way of your ApacheSetup, the URL http://yourserver.yourschool.edu/webwork2_courses/COURSENAME/ should point to webwork2/courses/COURSENAME/html. Thus, the URL http://yourserver.yourschool.edu/webwork2_courses/COURSENAME/tmp will point to the course-specific public temp directory.)

-- Main.SamHathaway - 27 Feb 2004