[system] / branches / rel-2-3-dev / webwork2 / lib / WeBWorK / ContentGenerator / Instructor / SetMaker.pm Repository:
ViewVC logotype

Diff of /branches/rel-2-3-dev/webwork2/lib/WeBWorK/ContentGenerator/Instructor/SetMaker.pm

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

Revision 2959 Revision 2960
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.32 2004/10/21 01:22:51 sh002i Exp $ 4# $CVSHeader: webwork-modperl/lib/WeBWorK/ContentGenerator/Instructor/SetMaker.pm,v 1.33 2004/10/25 22:37:32 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.
707 } elsif ($r->param('new_local_set')) { 707 } elsif ($r->param('new_local_set')) {
708 if ($r->param('new_set_name') !~ /^[\w.-]*$/) { 708 if ($r->param('new_set_name') !~ /^[\w.-]*$/) {
709 $self->addbadmessage("The name ".$r->param('new_set_name')." is not a valid set name. Use only letters, digits, -, _, and ."); 709 $self->addbadmessage("The name ".$r->param('new_set_name')." is not a valid set name. Use only letters, digits, -, _, and .");
710 } else { 710 } else {
711 my $newSetName = $r->param('new_set_name'); 711 my $newSetName = $r->param('new_set_name');
712 $newSetName =~ s/^set//; 712 # if we want to munge the input set name, do it here
713 $newSetName =~ s/\.def$//;
714 $r->param('local_sets',$newSetName); 713 $r->param('local_sets',$newSetName);
715 my $newSetRecord = $db->getGlobalSet($newSetName); 714 my $newSetRecord = $db->getGlobalSet($newSetName);
716 if (defined($newSetRecord)) { 715 if (defined($newSetRecord)) {
717 $self->addbadmessage("The set name $newSetName is already in use. Pick a different name if you would like to start a new set."); 716 $self->addbadmessage("The set name $newSetName is already in use. Pick a different name if you would like to start a new set.");
718 } else { # Do it! 717 } else { # Do it!

Legend:
Removed from v.2959  
changed lines
  Added in v.2960

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9