[system] / trunk / webwork / system / cgi / cgi-scripts / profHousekeeping.pl Repository:
ViewVC logotype

Diff of /trunk/webwork/system/cgi/cgi-scripts/profHousekeeping.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 8 Revision 152
45my $courseDirectory = $Global::coursesDirectory . $Course . $Global::dirDelim; 45my $courseDirectory = $Global::coursesDirectory . $Course . $Global::dirDelim;
46my $courseScriptsDirectory = getCourseScriptsDirectory; 46my $courseScriptsDirectory = getCourseScriptsDirectory;
47my $databaseDirectory = getCourseDatabaseDirectory; 47my $databaseDirectory = getCourseDatabaseDirectory;
48my $htmlURL = getCourseHtmlURL; 48my $htmlURL = getCourseHtmlURL;
49my $scriptDirectory = getWebworkScriptDirectory; 49my $scriptDirectory = getWebworkScriptDirectory;
50my $htmlDirectory = getCourseHtmlDirectory;
50my $templateDirectory = getCourseTemplateDirectory; 51my $templateDirectory = getCourseTemplateDirectory;
51my $dat = getDat; 52my $dat = getDat;
52 53
53require "${scriptDirectory}$Global::DBglue_pl"; 54require "${scriptDirectory}$Global::DBglue_pl";
54require "${scriptDirectory}$Global::FILE_pl"; 55require "${scriptDirectory}$Global::FILE_pl";
138 hiddens('user', 'key', 'course'), 139 hiddens('user', 'key', 'course'),
139 $cgi->hidden(-name=>'filename', -value=>$Global::courseEnvironmentFile), "\n", 140 $cgi->hidden(-name=>'filename', -value=>$Global::courseEnvironmentFile), "\n",
140 $cgi->hidden(-name=>'ext', -value=>'ph'), "\n", 141 $cgi->hidden(-name=>'ext', -value=>'ph'), "\n",
141 $cgi->endform(), "\n", 142 $cgi->endform(), "\n",
142 $cgi->p, "This lets you edit the Course Environment File for $Course."; 143 $cgi->p, "This lets you edit the Course Environment File for $Course.";
144
145
146# html/index.html
147$filename = "${htmlDirectory}index.html";
148#($date, $label, @stat);
149if (-e $filename) {
150 @stat = stat($filename);
151 $date = $stat[9];
152 $date = formatDateAndTime($date);
153 $date =~ s|\s*at.*||;
154 $label = " Last Changed $date";
155}
156
157print heading('Index', "5. Edit Course index.html File for $Course:"),
158 $cgi->startform(-action=>"${cgiURL}profEditCourseFiles.pl"),
159 $cgi->submit(-value=>'Edit Course index.html File'), "$label\n",
160 hiddens('user', 'key', 'course'),
161 $cgi->hidden(-name=>'filename', -value=>"index.html"), "\n",
162 $cgi->hidden(-name=>'ext', -value=>'html'), "\n",
163 $cgi->endform(), "\n",
164 $cgi->p, "This lets you edit the Course index.html File for $Course.";
143 165
144 166
145print &htmlBOTTOM("profHousekeeping.pl", \%inputs); 167print &htmlBOTTOM("profHousekeeping.pl", \%inputs);
146 168
147# begin Timing code 169# begin Timing code

Legend:
Removed from v.8  
changed lines
  Added in v.152

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9