--- loncom/homework/edit.pm 2001/06/16 20:33:33 1.12 +++ loncom/homework/edit.pm 2001/06/16 21:23:11 1.13 @@ -223,5 +223,34 @@ sub rebuild_tag { } return $result; } + +sub text_arg { + my ($description,$name,$token,$size) = @_; + my $result; + if (!defined $size) { $size=20; } + my $arg=$token->[2]{$name}; + $result=$description.''; + return $result; +} + +sub select_arg { + my ($description,$name,$list,$token) = @_; + my $result; + my $optionlist=""; + my $selected=$token->[2]{$name}; + foreach my $option (@$list) { + if ( $selected eq $option ) { + $optionlist.="\n"; + } else { + $optionlist.="\n"; + } + } + $result.=$description.'