--- loncom/homework/structuretags.pm 2011/02/06 18:43:10 1.487 +++ loncom/homework/structuretags.pm 2011/06/06 17:43:51 1.488 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # definition of tags that give a structure to a document # -# $Id: structuretags.pm,v 1.487 2011/02/06 18:43:10 www Exp $ +# $Id: structuretags.pm,v 1.488 2011/06/06 17:43:51 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -411,7 +411,9 @@ sub setup_rndseed { delete($env{'form.resetdata'}); delete($env{'form.newrandomization'}); } - if (defined($rndseed) && $rndseed ne int($rndseed)) { + $rndseed=~s/\,/\:/g; + $rndseed=~s/[^\w\d\:\-]//g; + if ((defined($rndseed)) && ($rndseed!~/^[\d\-]+\:[\d\-]+/)) { $rndseed=join(':',&Apache::lonnet::digest($rndseed)); } if ($Apache::lonhomework::history{'resource.CODE'}) { @@ -642,7 +644,7 @@ $show_all
- ';