--- trunk/webwork/system/cgi/cgi-scripts/profHousekeeping.pl 2001/06/15 16:24:03 8 +++ trunk/webwork/system/cgi/cgi-scripts/profHousekeeping.pl 2001/08/17 22:02:48 152 @@ -47,6 +47,7 @@ my $databaseDirectory = getCourseDatabaseDirectory; my $htmlURL = getCourseHtmlURL; my $scriptDirectory = getWebworkScriptDirectory; +my $htmlDirectory = getCourseHtmlDirectory; my $templateDirectory = getCourseTemplateDirectory; my $dat = getDat; @@ -142,6 +143,27 @@ $cgi->p, "This lets you edit the Course Environment File for $Course."; +# html/index.html +$filename = "${htmlDirectory}index.html"; +#($date, $label, @stat); +if (-e $filename) { + @stat = stat($filename); + $date = $stat[9]; + $date = formatDateAndTime($date); + $date =~ s|\s*at.*||; + $label = " Last Changed $date"; +} + +print heading('Index', "5. Edit Course index.html File for $Course:"), + $cgi->startform(-action=>"${cgiURL}profEditCourseFiles.pl"), + $cgi->submit(-value=>'Edit Course index.html File'), "$label\n", + hiddens('user', 'key', 'course'), + $cgi->hidden(-name=>'filename', -value=>"index.html"), "\n", + $cgi->hidden(-name=>'ext', -value=>'html'), "\n", + $cgi->endform(), "\n", + $cgi->p, "This lets you edit the Course index.html File for $Course."; + + print &htmlBOTTOM("profHousekeeping.pl", \%inputs); # begin Timing code @@ -188,4 +210,4 @@ } $out; -} \ No newline at end of file +}