[LON-CAPA-cvs] cvs: loncom /interface londocs.pm
www
lon-capa-cvs@mail.lon-capa.org
Fri, 11 Oct 2002 18:06:32 -0000
www Fri Oct 11 14:06:32 2002 EDT
Modified files:
/loncom/interface londocs.pm
Log:
Further work on verify and version check
Index: loncom/interface/londocs.pm
diff -u loncom/interface/londocs.pm:1.25 loncom/interface/londocs.pm:1.26
--- loncom/interface/londocs.pm:1.25 Thu Oct 10 13:17:11 2002
+++ loncom/interface/londocs.pm Fri Oct 11 14:06:32 2002
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Documents
#
-# $Id: londocs.pm,v 1.25 2002/10/10 17:17:11 www Exp $
+# $Id: londocs.pm,v 1.26 2002/10/11 18:06:32 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -225,6 +225,19 @@
$r->send_http_header;
return OK if $r->header_only;
+ if ($ENV{'form.verify'}) {
+
+ my $loaderror=&Apache::lonnet::overloaderror($r);
+ if ($loaderror) { return $loaderror; }
+
+ $r->print('<html><head><title>Verify Content</title></head>'.
+ &Apache::loncommon::bodytag('Verify Course Documents'));
+
+ } elsif ($ENV{'form.versions'}) {
+ $r->print('<html><head><title>Check Versions</title></head>'.
+ &Apache::loncommon::bodytag('Check Course Document Versions'));
+
+ } else {
# is this a standard course?
my $standard=($ENV{'request.course.uri'}=~/^\/uploaded\//);
@@ -329,7 +342,7 @@
unless ($showdoc) {
if ($allowed) {
$r->print(<<ENDCOURSEVERIFY);
-<form name="courseverify">
+<form action="/adm/coursedocs" method="post" name="courseverify">
<input type="submit" name="verify" value="Verify Content" />
<input type="submit" name="versions" value="Check Resource Versions" />
</form>
@@ -512,8 +525,9 @@
$r->print("<h1>Uploaded Document</h1><p>It is recommended that you use an up-to-date virus scanner before handling this file.</p><p><table>".
&entryline(0,"Click to download or use your browser's Save Link function",$showdoc).'</table></p>');
}
- $r->print('</body></html>');
- return OK;
+ }
+ $r->print('</body></html>');
+ return OK;
}
1;