|
Computer Science Technical Database |
|
Course Web Pages
Document: course-web-pages
Last Modified: Mon Sep 3 17:58:39 EDT 2001
Introduction
This document details information about the maintaining of course web pages
as proposed by the Prism Committee. After a trial period, this proposal was
accepted.
Creating a New Web Page
Let us assume that you wish to create a web page for the summer course "4532"
in the 1998-99 academic session. To do this, you would perform the following
steps:
Step 1 Change into the directory /cs/dept/www/course_archive/1998-99/S.
$ cd /cs/dept/www/course_archive/1998-99/S
Step 2 Create a 4352 directory.
$ mkdir 4352
Step 3 Check that the permissions are such that the web server can get into the
newly created directory. A mode of 755 is a good standard mode to use for
your web directory.
$ ls -ld 4352
drwx------ 9 bob faculty 512 Nov 19 13:12 4352/
$ chmod 755 4352
$ ls -ld 4352
drwxr-xr-x 9 bob faculty 512 Nov 19 13:12 4352/
Step 4 Place a Welcome.html or index.html file in the new directory
as the home page for the course.
Step 5 Make sure that the home page is readable by the web server. Mode 644 is a
good standard mode for web files.
$ ls -al index.html
-rwx------ 1 bob faculty 1527 Nov 19 13:13 index.html
$ chmod 644 index.html
$ ls -al index.html
-rw-r--r-- 1 bob faculty 1527 Nov 19 13:13 index.html
You can now access the web page at the following web URL:
http://www.cs.yorku.ca/course_archive/1998-99/S/4532
At the beginning of the term, /cs/dept/www/course will be made to
point at the appropriate term directory for the appropriate academic year in
/cs/dept/www/course_archive, just like the course directories.
Because the purpose of course_archive is for archiving, you
should never delete your course from course_archive, or move the files
from one year or term into another year or term directory. If your course
spans multiple terms, simply copy the course directory into its new location.
The tech staff can help you if you have problems.
Security
If you would like to restrict access to a portion of your web hierarchy, you
can do this with a .htaccess file. The .htaccess file is placed
in the directory in which you wish to restrict access. Here is a sample
.htaccess file for restricting access to web pages to York addresses:
<Limit GET>
order deny,allow
deny from all
allow from .yorku.ca
</Limit>
In this example, first all hosts are denied access, and then the "allow" line
allows accesses from York machines only. If you allow ".cs.yorku.ca", this
allows access to your web pages from only Computer Science machines. If you
allow access to "milo.cs.yorku.ca", this allows access to your web pages
from only the specific machine milo. The .htaccess file affects all
the web pages created underneath the directory where the .htaccess file
resides.
Troubleshooting
- If you cannot access your course directory, check that the permissions are
such that the web server can access your course directory. Mode 755 is best.
- If you get a "forbidden" message when trying to access your course
web page, it may be that the file is not readable, or you may have used a
.htaccess file to limit access and you may have excluded your own
access.
The Details
Now that you have seen an example of how the new course web page system
works, here are all the fine details:
- The Computer Science web hierarchy is stored in /cs/dept/www on the Unix systems.
- /cs/dept/www/course_archive contains a corresponding directory for
each academic year. For example, for the 1998-99 academic year, there is a
directory /cs/dept/www/course_archive/1998-99.
- Each academic year directory in /cs/dept/www/course_archive contains
a directory for each term. For example, in
/cs/dept/www/course_archive/1998-99, you find directories F, W, and S
for Fall, Winter, and Summer terms respectively.
- To create a course directory for a particular course in a particular
academic year, and term, change into the appropriate directory in
course_archive, and create a directory there. For example, to create
a 1020 directory for the 1998-99 summer session, change into the
/cs/dept/www/course_archive/1998-99/S directory, and create a directory
1020.
- When you create a course directory in the appropriate academic year/term
directory in /cs/dept/www/course_archive, that course directory will be
automatically added to the index of that academic year/term web page. That is,
if you create a directory /cs/dept/www/course_archive/1998-99/S/1020,
1020 will now appear in the web page listing the courses in 1998-99, Summer
term.
- To list all the courses for a particular year/term, simply use the
following URL:
http://www.cs.yorku.ca/course_archive/ACADYEAR/TERM
where ACADYEAR is the academic year and TERM is the term. For example, to see
the list of course web pages for summer 1998, you would use the following URL:
http://www.cs.yorku.ca/course_archive/1998-99/S.
- For a shortcut, /cs/dept/www/course points to the current academic
year and term. For example, in the fall of 1998-99, /cs/dept/www/course
will point to /cs/dept/www/course_archive/1998-99/F. Students can then
use the URL http://www.cs.yorku.ca/course to see a list of courses in
the current term.
How Does It All Work
To make this new course system work, the tech staff must perform the following
steps once per academic year:
- Create a new directory for the academic year in
/cs/dept/www/course_archive. For example, for the 1998-99 academic
session, /cs/dept/www/course_archive/1998-99 must be created.
- Create the three term directories in each academic year directory. For
example, in /cs/dept/www/course_archive/1998-99, three directories need
to be created - F, W, and S for Fall, Winter, and Summer terms respectively.
- In each academic year directory, there must exist a file index.html
that specifies the academic year, and gives the selection for Fall, Winter,
and Summer terms. This is so that if a student uses a URL that specifies an
academic year, but not a term or course, he will be given the option to select
a term.
- In each term directory, there must be two files -- a file called
HEADER.html which contains the header for the course selection web
page, including a York logo, and a title, and a file README.html which
is the footer for the course selection web page, providing links to the
courses in the previous years. README.html is a symbolic link to a
master footer file so that as years are added to the archive, the archived
courses are available on all the web pages with a single update.
- The new academic year must be added to the master README.html
footer file.
If you have questions about the course web pages, please
contact the technical staff.
(webmaster@cs.yorku.ca)