--- loncom/homework/inputtags.pm 2001/08/18 07:56:51 1.44 +++ loncom/homework/inputtags.pm 2001/11/12 20:27:28 1.46 @@ -23,11 +23,13 @@ sub initialize_inputtags { @Apache::inputtags::previous=(); # id of current part, 0 means that no part is current (inside only $Apache::inputtags::part=''; - # list of problem date statuses, the first element is for - #if there is a second element it is for the current + # list of problem date statuses, the first element is for + # if there is a second element it is for the current @Apache::inputtags::status=(); - #hash of defined params for the current response + # hash of defined params for the current response %Apache::inputtags::params=(); + # list of all ids, for , these get join()ed and prepended + @Apache::inputtags::import=(); } sub start_input { @@ -54,8 +56,12 @@ sub start_textarea { if ( $cols eq '') { $cols = 80; } my $rows = &Apache::lonxml::get_param('rows',$parstack,$safeeval); if ( $rows eq '') { $rows = 10; } - $result= '"; - } + if ($Apache::inputtags::status[-1] eq 'CAN_ANSWER') { + return ""; + } + } &end_input; return ''; } @@ -83,8 +91,12 @@ sub start_textline { my $id=$Apache::inputtags::response['-1']; my $oldresponse = $Apache::lonhomework::history{"resource.$partid.$id.submission"}; - $result= ''; + if ($Apache::inputtags::status[-1] eq 'CAN_ANSWER') { + $result= ''; + } else { + $result=''.$oldresponse.''; + } } elsif ($target eq 'edit') { $result=&Apache::edit::tag_start($target,$token, &Apache::lonxml::description($token));