--- loncom/homework/structuretags.pm 2011/01/13 18:41:48 1.465.2.13 +++ loncom/homework/structuretags.pm 2011/01/07 05:09:32 1.484 @@ -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.484 2011/01/07 05:09:32 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -144,7 +144,7 @@ function image_response_click (which, e) var y= e.clientY-getY(img_element)+Geometry.getVerticalScroll(); var click = x+':'+y; input_element.value = click; - img_element.src = '/adm/randomlabel.png?token='+token+'&clickdata='+click; + img_element.src = '/adm/randomlabel.png?token='+token+'&clickdata='+click; } // ]]> @@ -154,12 +154,10 @@ JS sub setmode_javascript { return <<"ENDSCRIPT"; ENDSCRIPT } @@ -177,7 +175,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 +1829,7 @@ sub ordered_show_check { return $in_order_show; } + sub start_startpartmarker { my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_; my $result=''; @@ -1855,7 +1838,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 +1868,10 @@ sub end_endpartmarker { return @result; } + + + + sub start_part { my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_; if (!$Apache::lonxml::metamode) { @@ -1975,7 +1962,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 +1980,7 @@ sub start_part { $result .= &randomizetry_part_header($problemstatus,$reqtries,$num); } } - $result.=''; + $result.=''; } } } @@ -2207,7 +2194,7 @@ sub end_startouttext { .'' .'' .&Apache::lonhtmlcommon::dragmath_button($areaid,1) - .'' + .'' .'' .&Apache::edit::insertlist($target,$token) .''