From: Mike G. v. a. <we...@ma...> - 2009-02-11 03:41:44
|
Log Message: ----------- Added ability to automatically create some directories -- so far only html_temp when archiving the course. Modified Files: -------------- webwork2/lib/WeBWorK/ContentGenerator: CourseAdmin.pm Revision Data ------------- Index: CourseAdmin.pm =================================================================== RCS file: /webwork/cvs/system/webwork2/lib/WeBWorK/ContentGenerator/CourseAdmin.pm,v retrieving revision 1.82 retrieving revision 1.83 diff -Llib/WeBWorK/ContentGenerator/CourseAdmin.pm -Llib/WeBWorK/ContentGenerator/CourseAdmin.pm -u -r1.82 -r1.83 --- lib/WeBWorK/ContentGenerator/CourseAdmin.pm +++ lib/WeBWorK/ContentGenerator/CourseAdmin.pm @@ -926,6 +926,7 @@ $msg .= $CIchecker->updateTableFields($rename_oldCourseID, $table_name); } print CGI::p({-style=>'color:green; font-weight:bold'}, $msg); + } ($tables_ok,$dbStatus) = $CIchecker->checkCourseTables($rename_oldCourseID); @@ -1846,6 +1847,13 @@ } print CGI::p({-style=>'color:green; font-weight:bold'}, $msg); } + if ($r->param("upgrade_course_tables") ) { + + $CIchecker -> updateCourseDirectories(); # needs more error messages + + + + } ($tables_ok,$dbStatus) = $CIchecker->checkCourseTables($archive_courseID); @@ -1977,8 +1985,10 @@ ); } else { print CGI::p({style=>"text-align: center"}, - CGI::submit(-name => "decline_archive_course", -value => "Don't archive"),CGI::br(), - "Directory structure needs to be repaired manually before archiving." + CGI::br(), + "Directory structure needs to be repaired manually before archiving.",CGI::br(), + CGI::submit(-name => "decline_archive_course", -value => "Don't archive"), + CGI::submit(-name => "upgrade_course_tables", -value => "Attempt to upgrade directories"), ); } |