134
134
return filename[filename.rindex('.')+1:].upper() + " file"
135
135
except ValueError:
138
def send_terms_of_service(req):
140
Sends the Terms of Service document to the req object.
141
This consults conf to find out where the TOS is located on disk, and sends
142
that. If it isn't found, it sends a generic message explaining to admins
143
how to create a real one.
146
req.sendfile(conf.tos_path)
149
"""<h1>Terms of Service</h1>
150
<p><b>*** SAMPLE ONLY ***</b></p>
151
<p>This is the text of the IVLE Terms of Service.</p>
152
<p>The administrator should create a license file with an appropriate
153
"Terms of Service" license for your organisation.</p>
154
<h2>Instructions for Administrators</h2>
155
<p>You are seeing this message because you have not configured a Terms of
156
Service document.</p>
157
<p>When you configured IVLE, you specified a path to the Terms of Service
158
document (this is found in <b><tt>lib/conf/conf.py</tt></b> under
159
"<tt>tos_path</tt>").</p>
160
<p>Create a file at this location; an HTML file with the appropriately-worded
162
<p>This should be a normal XHTML file, except it should not contain
163
<tt>html</tt>, <tt>head</tt> or <tt>body</tt> elements - it should
164
just be the contents of a body element (IVLE will wrap it accordingly).</p>
165
<p>This will automatically be used as the license text instead of this
166
placeholder text.</p>