--- loncom/interface/loncommon.pm 2003/09/09 18:46:28 1.114 +++ loncom/interface/loncommon.pm 2003/09/10 15:06:34 1.115 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common routines # -# $Id: loncommon.pm,v 1.114 2003/09/09 18:46:28 www Exp $ +# $Id: loncommon.pm,v 1.115 2003/09/10 15:06:34 matthew Exp $ # # Copyright Michigan State University Board of Trustees # @@ -2542,6 +2542,23 @@ sub csv_samples_select_table { } =pod + +=item clean_excel_name($name) + +Returns a replacement for $name which does not contain any illegal characters. + +=cut + +sub clean_excel_name { + my ($name) = @_; + $name =~ s/[:\*\?\/\\]//g; + if (length($name) > 31) { + $name = substr($name,0,31); + } + return $name; +} + +=pod =item * check_if_partid_hidden($id,$symb,$udom,$uname)