version 1.79, 2020/09/12 20:21:30
|
version 1.81, 2023/07/12 15:09:41
|
Line 73 use LONCAPA;
|
Line 73 use LONCAPA;
|
|
|
Input: a navmaps resource |
Input: a navmaps resource |
|
|
Retunrs: a scalar containing html for a rendering of the problem |
Returns: a scalar containing html for a rendering of the problem |
within a table. |
within a table. |
|
|
=cut |
=cut |
Line 85 sub render_resource {
|
Line 85 sub render_resource {
|
## |
## |
## Render the problem |
## Render the problem |
my ($base) = ($resource->src =~ m|^(.*/)[^/]*$|); |
my ($base) = ($resource->src =~ m|^(.*/)[^/]*$|); |
$base="http://".$ENV{'SERVER_NAME'}.$base; |
$base=&Apache::lonnet::absolute_url().$base; |
my ($src,$symb)=($resource->link,&escape($resource->shown_symb)); |
my ($src,$symb)=($resource->link,&escape($resource->shown_symb)); |
my $rendered_problem = &Apache::lonnet::ssi_body($src.'?symb='.$symb); |
my $rendered_problem = &Apache::lonnet::ssi_body($src.'?symb='.$symb); |
$rendered_problem =~ s/<\s*form\s*/<nop /g; |
$rendered_problem =~ s/<\s*form\s*/<nop /g; |
Line 198 sub problem_selector {
|
Line 198 sub problem_selector {
|
my %partsseen; |
my %partsseen; |
foreach my $part (@{$res->parts}) { |
foreach my $part (@{$res->parts}) { |
my (@response_ids,@response_types); |
my (@response_ids,@response_types); |
if ($res->is_tool) { |
if (($include_tools) && ($res->is_tool)) { |
@response_ids = (); |
@response_ids = (); |
@response_types = ('tool'); |
@response_types = ('tool'); |
} else { |
} else { |