From: Sam H. v. a. <we...@ma...> - 2005-12-02 23:37:46
|
Log Message: ----------- 1-liner adding course hiding support. place a file named "hidden_directory" in a course directory and it will not show up in the courses list on the WeBWorK home page. it will still appear in the CourseAdmin module. The file can be added/removed via UNIX access or by using the FileManager module. Modified Files: -------------- webwork2/lib/WeBWorK/ContentGenerator: Home.pm Revision Data ------------- Index: Home.pm =================================================================== RCS file: /webwork/cvs/system/webwork2/lib/WeBWorK/ContentGenerator/Home.pm,v retrieving revision 1.10 retrieving revision 1.11 diff -Llib/WeBWorK/ContentGenerator/Home.pm -Llib/WeBWorK/ContentGenerator/Home.pm -u -r1.10 -r1.11 --- lib/WeBWorK/ContentGenerator/Home.pm +++ lib/WeBWorK/ContentGenerator/Home.pm @@ -94,6 +94,7 @@ foreach my $courseID (sort {lc($a) cmp lc($b) } @courseIDs) { next if $courseID eq "admin"; # done already above + next if -f "$coursesDir/$courseID/hide_directory"; my $urlpath = $r->urlpath->newFromModule("WeBWorK::ContentGenerator::ProblemSets", courseID => $courseID); print CGI::li(CGI::a({href=>$self->systemLink($urlpath, authen => 0)}, $courseID)); } |