[system] / branches / rel-2-4-patches / webwork2 / lib / WeBWorK / ContentGenerator / CourseAdmin.pm Repository:
ViewVC logotype

Diff of /branches/rel-2-4-patches/webwork2/lib/WeBWorK/ContentGenerator/CourseAdmin.pm

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

Revision 6074 Revision 6075
1################################################################################ 1################################################################################
2# WeBWorK Online Homework Delivery System 2# WeBWorK Online Homework Delivery System
3# Copyright © 2000-2007 The WeBWorK Project, http://openwebwork.sf.net/ 3# Copyright © 2000-2007 The WeBWorK Project, http://openwebwork.sf.net/
4# $CVSHeader$ 4# $CVSHeader: webwork2/lib/WeBWorK/ContentGenerator/CourseAdmin.pm,v 1.86 2009/07/07 18:19:43 apizer Exp $
5# 5#
6# This program is free software; you can redistribute it and/or modify it under 6# This program is free software; you can redistribute it and/or modify it under
7# the terms of either: (a) the GNU General Public License as published by the 7# the terms of either: (a) the GNU General Public License as published by the
8# Free Software Foundation; either version 2, or (at your option) any later 8# Free Software Foundation; either version 2, or (at your option) any later
9# version, or (b) the "Artistic License" which comes with this package. 9# version, or (b) the "Artistic License" which comes with this package.
374 print CGI::start_ol(); 374 print CGI::start_ol();
375 375
376 my @courseIDs = listCourses($ce); 376 my @courseIDs = listCourses($ce);
377 foreach my $courseID (sort {lc($a) cmp lc($b) } @courseIDs) { 377 foreach my $courseID (sort {lc($a) cmp lc($b) } @courseIDs) {
378 next if $courseID eq "admin"; # done already above 378 next if $courseID eq "admin"; # done already above
379 next if $courseID eq "modelCourse"; # modelCourse isn't a real course so don't create missing directories, etc
379 my $urlpath = $r->urlpath->newFromModule("WeBWorK::ContentGenerator::ProblemSets", courseID => $courseID); 380 my $urlpath = $r->urlpath->newFromModule("WeBWorK::ContentGenerator::ProblemSets", courseID => $courseID);
380 my $tempCE = new WeBWorK::CourseEnvironment({ 381 my $tempCE = new WeBWorK::CourseEnvironment({
381 %WeBWorK::SeedCE, 382 %WeBWorK::SeedCE,
382 courseName => $courseID, 383 courseName => $courseID,
383 }); 384 });
388 my ($directories_ok, $str2) = $CIchecker->checkCourseDirectories(); 389 my ($directories_ok, $str2) = $CIchecker->checkCourseDirectories();
389 print CGI::li(CGI::a({href=>$self->systemLink($urlpath, authen => 0)}, $courseID), 390 print CGI::li(CGI::a({href=>$self->systemLink($urlpath, authen => 0)}, $courseID),
390 CGI::code( 391 CGI::code(
391 $tempCE->{dbLayoutName}, 392 $tempCE->{dbLayoutName},
392 ), 393 ),
393 ($courseID eq "modelCourse" or $directories_ok) ? "" : CGI::span({style=>"color:red"},"Directory structure or permissions need to be repaired. "), 394 $directories_ok ? "" : CGI::span({style=>"color:red"},"Directory structure or permissions need to be repaired. "),
394 ($courseID eq "modelCourse" or $tables_ok ) ? CGI::span({style=>"color:green"},"Database tables ok") : CGI::span({style=>"color:red"},"Database tables need updating."), 395 $tables_ok ? CGI::span({style=>"color:green"},"Database tables ok") : CGI::span({style=>"color:red"},"Database tables need updating."),
395 396
396 ); 397 );
397 398
398 } 399 }
399 400

Legend:
Removed from v.6074  
changed lines
  Added in v.6075

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9