--- loncom/homework/structuretags.pm 2011/01/13 18:41:48 1.465.2.13 +++ loncom/homework/structuretags.pm 2011/01/13 18:11:45 1.485 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # definition of tags that give a structure to a document # -# $Id: structuretags.pm,v 1.465.2.13 2011/01/13 18:41:48 raeburn Exp $ +# $Id: structuretags.pm,v 1.485 2011/01/13 18:11:45 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -177,7 +177,7 @@ function file_deletion_check(formname) { } var str = new RegExp("^HWFILE.+_delete\$"); var delboxes = new Array(); - for (i=0; i'."\n"; } - foreach my $field ('questiontype','rndseed') { + foreach my $field ('trial','questiontype') { if ($env{"form.grade_$field"} ne '') { $result .= ''."\n"; } } - } } elsif ($target eq 'tex') { $result .= 'INSERTTEXFRONTMATTERHERE'; @@ -1847,6 +1831,7 @@ sub ordered_show_check { return $in_order_show; } + sub start_startpartmarker { my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_; my $result=''; @@ -1855,7 +1840,7 @@ sub start_startpartmarker { $result.=&mt('Marker for the start of a part. Place end marker below to wrap in-between tags into a new part.').''; $result.=&Apache::edit::end_table(); - } + } return $result; } @@ -1885,6 +1870,10 @@ sub end_endpartmarker { return @result; } + + + + sub start_part { my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_; if (!$Apache::lonxml::metamode) { @@ -1975,7 +1964,7 @@ sub start_part { } } elsif ($target eq 'web') { if ($status eq 'CAN_ANSWER') { - my $problemstatus = &get_problem_status($Apache::inputtags::part); + my $problemstatus = &get_problem_status($Apache::inputtags::part); my $probrandomize = &Apache::lonnet::EXT("resource.$Apache::inputtags::partlist[0].type"); my $probrandtries = &Apache::lonnet::EXT("resource.$Apache::inputtags::partlist[0].randomizeontries"); my $num = scalar(@Apache::inputtags::partlist)-1; @@ -1993,7 +1982,7 @@ sub start_part { $result .= &randomizetry_part_header($problemstatus,$reqtries,$num); } } - $result.=''; + $result.=''; } } } @@ -2207,7 +2196,7 @@ sub end_startouttext { .'' .'' .&Apache::lonhtmlcommon::dragmath_button($areaid,1) - .'' + .'' .'' .&Apache::edit::insertlist($target,$token) .''