[system] / trunk / webwork-modperl / lib / WeBWorK / ContentGenerator / Instructor / SetMaker.pm Repository:
ViewVC logotype

Diff of /trunk/webwork-modperl/lib/WeBWorK/ContentGenerator/Instructor/SetMaker.pm

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

Revision 2040 Revision 2112
1################################################################################ 1################################################################################
2# WeBWorK Online Homework Delivery System 2# WeBWorK Online Homework Delivery System
3# Copyright © 2000-2003 The WeBWorK Project, http://openwebwork.sf.net/ 3# Copyright © 2000-2003 The WeBWorK Project, http://openwebwork.sf.net/
4# $CVSHeader: webwork-modperl/lib/WeBWorK/ContentGenerator/Instructor/SetMaker.pm,v 1.4 2004/05/06 23:20:49 jj Exp $ 4# $CVSHeader: webwork-modperl/lib/WeBWorK/ContentGenerator/Instructor/SetMaker.pm,v 1.7 2004/05/07 21:04:07 jj 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.
557 $self->{localmsg} = "The name ".$r->param('new_set_name')." is not a valid set name. Use only letters, digits, -, _, and ."; 557 $self->{localmsg} = "The name ".$r->param('new_set_name')." is not a valid set name. Use only letters, digits, -, _, and .";
558 } else { 558 } else {
559 my $newSetName = $r->param('new_set_name'); 559 my $newSetName = $r->param('new_set_name');
560 $newSetName =~ s/^set//; 560 $newSetName =~ s/^set//;
561 $newSetName =~ s/\.def$//; 561 $newSetName =~ s/\.def$//;
562 $r->param('local_sets',$newSetName);
562 my $newSetRecord = $db->getGlobalSet($newSetName); 563 my $newSetRecord = $db->getGlobalSet($newSetName);
563 if (defined($newSetRecord)) { 564 if (defined($newSetRecord)) {
564 $self->{localmsg} = "The set name $newSetName is already in use. Pick a different name if you would like to start a new set."; 565 $self->{localmsg} = "The set name $newSetName is already in use. Pick a different name if you would like to start a new set.";
565 } else { # Do it! 566 } else { # Do it!
566 $newSetRecord = $db->{set}->{record}->new(); 567 $newSetRecord = $db->{set}->{record}->new();

Legend:
Removed from v.2040  
changed lines
  Added in v.2112

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9