');
+ my $lastold=1;
+ for (my $prevvers=1;$prevvers<$currentversion;$prevvers++) {
+ my $url=$root.'.'.$prevvers.'.'.$extension;
+ if (&Apache::lonnet::metadata($url,'lastrevisiondate')<
+ $starttime) {
+ $lastold=$prevvers;
+ }
+ }
+ for (my $prevvers=$lastold;$prevvers<$currentversion;$prevvers++) {
+ my $url=$root.'.'.$prevvers.'.'.$extension;
+ $r->print('Version '.$prevvers.' ('.
+ localtime(&Apache::lonnet::metadata($url,'lastrevisiondate')).
+ ')');
+ if (&Apache::loncommon::fileembstyle($extension) eq 'ssi') {
+ $r->print(' Diffs');
+ }
+ $r->print(' ');
+ }
+ $r->print('
');
+ }
+ }
+ $r->print('
');
+ } else {
+ $r->print('
No content modifications yet.
');
+ }
+ &untiehash();
+ } else {
# is this a standard course?
my $standard=($ENV{'request.course.uri'}=~/^\/uploaded\//);
@@ -234,8 +437,11 @@ sub handler {
my $events='';
my $showdoc=0;
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},
- ['folder','foldername','showdoc']);
- unless ($ENV{'form.showdoc'}) { # got called from remote
+ ['folder','foldername']);
+ if ($r->uri=~/^\/adm\/coursedocs\/showdoc\/(.*)$/) {
+ $showdoc=$1;
+ }
+ unless ($showdoc) { # got called from remote
$forcestandard=($ENV{'form.folder'}=~/^default_/);
$forcesupplement=($ENV{'form.folder'}=~/^supplemental_/);
@@ -247,8 +453,7 @@ sub handler {
}
} else { # got called in sequence from course
$allowed=0;
- $showdoc=1;
- $script=&Apache::lonxml::registerurl(1,undef);
+ $script=''.&Apache::lonxml::registerurl(1,undef).'
ENDDOCUMENT
if ($allowed) {
$r->print(<
function makenewfolder(targetform,folderseq) {
var foldername=prompt('Name of New Folder','New Folder');
if (foldername) {
@@ -293,6 +500,20 @@ function makenewext(targetname) {
window.open('/adm/rat/extpickframe.html');
}
+function makesmppage() {
+ var title=prompt('Listed Title for the Page');
+ this.document.forms.newsmppg.importdetail.value=
+ title+'=/adm/$udom/$uname/$now/smppg';
+ this.document.forms.newsmppg.submit();
+}
+
+function makebulboard() {
+ var title=prompt('Listed Title for the Bulletin Board');
+ this.document.forms.newbul.importdetail.value=
+ title+'=/adm/$udom/$uname/$now/bulletinboard';
+ this.document.forms.newbul.submit();
+}
+
function finishpick() {
var title=this.document.forms.extimport.title.value;
var url=this.document.forms.extimport.url.value;
@@ -305,11 +526,21 @@ function finishpick() {
ENDNEWSCRIPT
}
# -------------------------------------------------------------------- Body tag
- $r->print(&Apache::loncommon::bodytag('Course Documents','',$events));
+ $r->print(''.
+ &Apache::loncommon::bodytag('Course Documents','',$events));
unless ($showdoc) {
+ if ($allowed) {
+ $r->print(<
+
+
+
+ENDCOURSEVERIFY
+ }
# --------------------------------------------------------- Standard documents
+ $r->print('
');
if (($standard) && ($allowed) && (!$forcesupplement)) {
- $r->print('