--- loncom/homework/default_homework.lcpm 2011/08/03 03:37:23 1.152.2.1 +++ loncom/homework/default_homework.lcpm 2011/05/21 14:08:06 1.153 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # used by lonxml::xmlparse() as input variable $safeinit to Apache::run::run() # -# $Id: default_homework.lcpm,v 1.152.2.1 2011/08/03 03:37:23 raeburn Exp $ +# $Id: default_homework.lcpm,v 1.153 2011/05/21 14:08:06 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -341,7 +341,7 @@ sub caparesponse_check_list { $appendunit='%'.$appendunit; } # Zero does not need a dimension - if (($element =~ /^[0\.]+$/) && ($unit!~/\w/) && ($answerunit=~/\w/)) { + if (($element==0) && ($unit!~/\w/) && ($answerunit=~/\w/)) { $appendunit=$answerunit; } if ($appendunit ne '') { @@ -1125,11 +1125,24 @@ sub class { return $course; } +sub classid { + my $courseid = &EXT('request.course.id'); + $courseid = '' if $courseid eq ""; + return $courseid; +} + sub firstname { my $firstname = &EXT('environment.firstname'); $firstname = '' if $firstname eq ""; return $firstname; } + +sub middlename { + my $middlename = &EXT('environment.middlename'); + $middlename = '' if $middlename eq ""; + return $middlename; +} + sub lastname { my $lastname = &EXT('environment.lastname');