version 1.78, 2020/09/07 02:25:32
|
version 1.80, 2020/10/08 12:02:07
|
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 262 sub problem_selector {
|
Line 262 sub problem_selector {
|
$seq_str .= (' 'x2). |
$seq_str .= (' 'x2). |
'<a target="preview" href="'.$link.'">'.&mt('view').'</a>'; |
'<a target="preview" href="'.$link.'">'.&mt('view').'</a>'; |
$seq_str .= "</td>". &Apache::loncommon::end_data_table_row()."\n"; |
$seq_str .= "</td>". &Apache::loncommon::end_data_table_row()."\n"; |
$rb_count++; |
|
} |
} |
|
$rb_count++; |
} |
} |
} |
} |
} |
} |
Line 290 sub problem_selector {
|
Line 290 sub problem_selector {
|
} |
} |
} |
} |
$Str .= &Apache::loncommon::end_data_table().&Apache::loncommon::end_scrollbox()."\n"; |
$Str .= &Apache::loncommon::end_data_table().&Apache::loncommon::end_scrollbox()."\n"; |
|
if (!$rb_count) { |
|
if ($byres) { |
|
$Str = '<p class="LC_info">'.&mt('No gradable problems found').'</p>'; |
|
} elsif ($AcceptedResponseTypes eq '.') { |
|
$Str = '<p class="LC_info">'.&mt('No problems found').'</p>'; |
|
} else { |
|
$Str = '<p class="LC_info">'.&mt('No analyzable problems found').'</p>'; |
|
} |
|
} |
return $Str; |
return $Str; |
} |
} |
|
|