version 1.130, 2010/10/09 22:31:49
|
version 1.139, 2011/11/24 13:28:01
|
Line 400 sub insert_formularesponse {
|
Line 400 sub insert_formularesponse {
|
sub insert_functionplotresponse { |
sub insert_functionplotresponse { |
return ' |
return ' |
<functionplotresponse> |
<functionplotresponse> |
<spline /> |
<functionplotelements> |
<splinerule /> |
</functionplotelements> |
|
<functionplotruleset> |
|
</functionplotruleset> |
</functionplotresponse>'; |
</functionplotresponse>'; |
} |
} |
|
|
|
sub insert_spline { |
|
return ' |
|
<spline />'; |
|
} |
|
|
|
sub insert_backgroundplot { |
|
return ' |
|
<backgroundplot />'; |
|
} |
|
|
|
sub insert_plotobject { |
|
return ' |
|
<plotobject />'; |
|
} |
|
|
|
sub insert_plotvector { |
|
return ' |
|
<plotvector />'; |
|
} |
|
|
|
sub insert_functionplotrule { |
|
return ' |
|
<functionplotrule />'; |
|
} |
|
|
|
sub insert_functionplotvectorrule { |
|
return ' |
|
<functionplotvectorrule />'; |
|
} |
|
|
|
sub insert_functionplotvectorsumrule { |
|
return ' |
|
<functionplotvectorsumrule />'; |
|
} |
|
|
|
sub insert_functionplotcustomrule { |
|
return ' |
|
<functionplotcustomrule> |
|
<answer type="loncapa/perl"> |
|
# &fpr_val("label"), &fpr_f($x), &fpr_dfdx($x), &fpr_d2fdx2($x) |
|
# ($xs,$xe,$ys,$ye)=&fpr_vectorcoords("Name"), ($x,$y)=&fpr_objectcoords("Name") |
|
# &fpr_vectorlength("Name"), &fpr_vectorangle("Name") |
|
|
|
# Return 0 or 1 |
|
return 1; |
|
</answer> |
|
</functionplotcustomrule>'; |
|
} |
|
|
|
sub insert_functionplotruleset { |
|
return ' |
|
<functionplotruleset> |
|
<functionplotrule /> |
|
</functionplotruleset>'; |
|
} |
|
|
|
sub insert_functionplotelements { |
|
return ' |
|
<functionplotelements> |
|
<spline /> |
|
</functionplotelements>'; |
|
} |
|
|
sub insert_numericalresponse { |
sub insert_numericalresponse { |
return ' |
return ' |
<numericalresponse answer=""> |
<numericalresponse answer=""> |
Line 708 sub submit_ask_anyway {
|
Line 773 sub submit_ask_anyway {
|
return ' onclick="still_ask=true;'.$extra_action.'" '; |
return ' onclick="still_ask=true;'.$extra_action.'" '; |
} |
} |
|
|
|
sub submit_dont_ask { |
|
my ($extra_action) = @_; |
|
return ' onclick="is_submit=true;'.$extra_action.'" '; |
|
} |
|
|
|
|
sub textarea_sizes { |
sub textarea_sizes { |
my ($data)=@_; |
my ($data)=@_; |
my $count=0; |
my $count=0; |
Line 755 sub editfield {
|
Line 826 sub editfield {
|
# to make the edit look prettier |
# to make the edit look prettier |
$data =~ s/\n?[ \t]*$//; |
$data =~ s/\n?[ \t]*$//; |
|
|
return $description."\n".'<textarea style="width:100%" rows="'.$rows. |
return $description."\n".'<textarea style="width:99%" rows="'.$rows. |
'" cols="'.$cols.'" name="homework_edit_'. |
'" cols="'.$cols.'" name="homework_edit_'. |
$Apache::lonxml::curdepth.'" id="homework_edit_'. |
$Apache::lonxml::curdepth.'" id="homework_edit_'. |
$Apache::lonxml::curdepth.'" '.&element_change_detection(). |
$Apache::lonxml::curdepth.'" '.&element_change_detection(). |