--- loncom/homework/bridgetask.pm 2006/03/29 04:53:42 1.127 +++ loncom/homework/bridgetask.pm 2006/03/29 20:33:50 1.128.2.2 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # definition of tags that give a structure to a document # -# $Id: bridgetask.pm,v 1.127 2006/03/29 04:53:42 albertel Exp $ +# $Id: bridgetask.pm,v 1.128.2.2 2006/03/29 20:33:50 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -455,11 +455,7 @@ sub start_Task { my $files = '<ul>'; foreach my $file (@files) { my $url="/uploaded/$domain/$user/portfolio$file"; - if (! &Apache::lonnet::stat_file($url)) { - $file = &mt('<font color="red"> Nonexistant file:</font> <tt>[_1]</tt>',$file); - } else { - $file = '<tt>'.$file.'</tt>'; - } + $file = '<tt>'.$file.'</tt>'; $files .= '<li>'.$file.'</li>'; } $files.='</ul>'; @@ -974,7 +970,7 @@ DONEBUTTON &Apache::structuretags::finalize_storage(); } } elsif ($target eq 'webgrade') { - $result.="</div>\n<hr />"; + $result.="</div>"; #$result.='<input type="submit" name="next" value="'. # &mt('Save & Next').'" /> '; #$result.='<input type="submit" name="end" value="'. @@ -1874,8 +1870,11 @@ sub start_IntroParagraph { if ($tagstack->[-2] eq 'Dimension') { $dimension{'intro'}=&Apache::lonxml::get_all_text('/introparagraph',$parser,$style); - } elsif ($target eq 'webgrade') { + } elsif ($tagstack->[-2] eq 'Task' && $target eq 'webgrade') { &Apache::lonxml::startredirection(); + } else { + &Apache:;lonxml::error("Invalid use of <IntroParagraph> inside of <".$tagstack->[-2].">"); + &Apache::lonxml::get_all_text('/introparagraph',$parser,$style); } } @@ -1884,7 +1883,7 @@ sub start_IntroParagraph { sub end_IntroParagraph { my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_; - if ($target eq 'webgrade') { + if ($tagstack->[-2] eq 'Task' && $target eq 'webgrade') { my $result = &Apache::lonxml::endredirection(); } }