[system] / trunk / webwork2 / bin / integrity_check.pl Repository:
ViewVC logotype

View of /trunk/webwork2/bin/integrity_check.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 6070 - (download) (as text) (annotate)
Fri Jun 26 00:58:52 2009 UTC (3 years, 10 months ago) by gage
File size: 1724 byte(s)
syncing HEAD with webwork2.2.4.7 on 6/25/2009

    1 #!/usr/bin/env perl
    2 ################################################################################
    3 # WeBWorK Online Homework Delivery System
    4 # Copyright © 2000-2007 The WeBWorK Project, http://openwebwork.sf.net/
    5 # $CVSHeader: webwork2/bin/wwdb_upgrade,v 1.17 2007/08/13 22:59:50 sh002i Exp $
    6 #
    7 # This program is free software; you can redistribute it and/or modify it under
    8 # the terms of either: (a) the GNU General Public License as published by the
    9 # Free Software Foundation; either version 2, or (at your option) any later
   10 # version, or (b) the "Artistic License" which comes with this package.
   11 #
   12 # This program is distributed in the hope that it will be useful, but WITHOUT
   13 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
   14 # FOR A PARTICULAR PURPOSE.  See either the GNU General Public License or the
   15 # Artistic License for more details.
   16 ################################################################################
   17 
   18 use strict;
   19 use warnings;
   20 use Getopt::Std;
   21 use Data::Dumper;
   22 
   23 BEGIN {
   24   die "WEBWORK_ROOT not found in environment.\n"
   25     unless exists $ENV{WEBWORK_ROOT};
   26 }
   27 
   28 use lib "$ENV{WEBWORK_ROOT}/lib";
   29 use WeBWorK::CourseEnvironment;
   30 use WeBWorK::Utils::CourseIntegrityCheck;
   31 use WeBWorK;
   32 
   33 our ($opt_v);
   34 getopts("v");
   35 
   36 if ($opt_v) {
   37   $WeBWorK::Debug::Enabled = 1;
   38 } else {
   39   $WeBWorK::Debug::Enabled = 0;
   40 }
   41 
   42 
   43 my $courseName = "tmp_course";
   44 
   45 my $ce = new WeBWorK::CourseEnvironment(
   46                {webwork_dir=>$ENV{WEBWORK_ROOT},
   47                 courseName=> $courseName
   48                });
   49 
   50 
   51 print "ce ready $ce";
   52 
   53 my $CIchecker = new WeBWorK::Utils::CourseIntegrityCheck($ce);
   54 
   55 my $return = $CIchecker->checkCourseDirectories();
   56 
   57 print "result $return";
   58 1;

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9