[system] / trunk / webwork2 / lib / WeBWorK / ContentGenerator / CourseAdmin.pm Repository:
ViewVC logotype

Diff of /trunk/webwork2/lib/WeBWorK/ContentGenerator/CourseAdmin.pm

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

Revision 4311 Revision 4312
1################################################################################ 1################################################################################
2# WeBWorK Online Homework Delivery System 2# WeBWorK Online Homework Delivery System
3# Copyright © 2000-2006 The WeBWorK Project, http://openwebwork.sf.net/ 3# Copyright © 2000-2006 The WeBWorK Project, http://openwebwork.sf.net/
4# $CVSHeader: webwork2/lib/WeBWorK/ContentGenerator/CourseAdmin.pm,v 1.53 2006/07/24 23:28:41 gage Exp $ 4# $CVSHeader: webwork2/lib/WeBWorK/ContentGenerator/CourseAdmin.pm,v 1.54 2006/07/28 02:10:33 sh002i 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.
34use WeBWorK::Debug; 34use WeBWorK::Debug;
35use WeBWorK::Utils qw(cryptPassword writeLog listFilesRecursive); 35use WeBWorK::Utils qw(cryptPassword writeLog listFilesRecursive);
36use WeBWorK::Utils::CourseManagement qw(addCourse renameCourse deleteCourse listCourses archiveCourse 36use WeBWorK::Utils::CourseManagement qw(addCourse renameCourse deleteCourse listCourses archiveCourse
37 listArchivedCourses unarchiveCourse); 37 listArchivedCourses unarchiveCourse);
38use WeBWorK::Utils::DBImportExport qw(dbExport dbImport); 38use WeBWorK::Utils::DBImportExport qw(dbExport dbImport);
39
40use constant IMPORT_EXPORT_WARNING => "The ability to import and export
41databases is still under development. It seems to work but it is <b>VERY</b>
42slow on large courses. You may prefer to use webwork2/bin/wwdb or the mysql
43dump facility for archiving large courses. Please send bug reports if you find
44errors.";
39 45
40sub pre_header_initialize { 46sub pre_header_initialize {
41 my ($self) = @_; 47 my ($self) = @_;
42 my $r = $self->r; 48 my $r = $self->r;
43 my $ce = $r->ce; 49 my $ce = $r->ce;
296 CGI::a({href=>$self->systemLink($urlpath, params=>{subDisplay=>"unarchive_course"})}, "Unarchive Course"), 302 CGI::a({href=>$self->systemLink($urlpath, params=>{subDisplay=>"unarchive_course"})}, "Unarchive Course"),
297 CGI::hr(), 303 CGI::hr(),
298 $methodMessage, 304 $methodMessage,
299 305
300 ); 306 );
301
302 print CGI::p("The ability to import and to export databases is still under development.
303 It seems to work but it is <b>VERY</b> slow on large courses. You may prefer to
304 use webwork2/bin/wwdb or the mysql dump facility for archiving large courses.
305 Please send bug reports if you find errors. ");
306 307
307 my @errors = @{$self->{errors}}; 308 my @errors = @{$self->{errors}};
308 309
309 310
310 if (@errors) { 311 if (@errors) {
1391 $courseLabels{$courseID} = "$courseID (" . $tempCE->{dbLayoutName} . ")"; 1392 $courseLabels{$courseID} = "$courseID (" . $tempCE->{dbLayoutName} . ")";
1392 } 1393 }
1393 1394
1394 print CGI::h2("Export Database"); 1395 print CGI::h2("Export Database");
1395 1396
1397 print CGI::p(IMPORT_EXPORT_WARNING);
1398
1396 print CGI::start_form(-method=>"GET", -action=>$r->uri); 1399 print CGI::start_form(-method=>"GET", -action=>$r->uri);
1397 print $self->hidden_authen_fields; 1400 print $self->hidden_authen_fields;
1398 print $self->hidden_fields("subDisplay"); 1401 print $self->hidden_fields("subDisplay");
1399 1402
1400 print CGI::p({},"Select a course to export the course's database. Please note 1403 print CGI::p({},"Select a course to export the course's database. Please note
1592 my %databaseLabels = map { ($_ => $_) } @databaseFiles; 1595 my %databaseLabels = map { ($_ => $_) } @databaseFiles;
1593 1596
1594 ####### 1597 #######
1595 1598
1596 print CGI::h2("Import Database"); 1599 print CGI::h2("Import Database");
1600
1601 print CGI::p(IMPORT_EXPORT_WARNING);
1597 1602
1598 print CGI::start_form(-method=>"POST", -action=>$r->uri, -enctype=>&CGI::MULTIPART); 1603 print CGI::start_form(-method=>"POST", -action=>$r->uri, -enctype=>&CGI::MULTIPART);
1599 print $self->hidden_authen_fields; 1604 print $self->hidden_authen_fields;
1600 print $self->hidden_fields("subDisplay"); 1605 print $self->hidden_fields("subDisplay");
1601 1606

Legend:
Removed from v.4311  
changed lines
  Added in v.4312

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9