version 1.58, 2009/03/25 15:49:53
|
version 1.59.12.1, 2010/09/11 19:08:23
|
Line 158 sub problem_selector {
|
Line 158 sub problem_selector {
|
resptype=>$resptype}); |
resptype=>$resptype}); |
my $checked = ''; |
my $checked = ''; |
if ($env{'form.problemchoice'} eq $value) { |
if ($env{'form.problemchoice'} eq $value) { |
$checked = 'checked="checked" '; |
$checked = ' checked="checked"'; |
} |
} |
my $title = $res->compTitle; |
my $title = $res->compTitle; |
if (! defined($title) || $title eq '') { |
if (! defined($title) || $title eq '') { |
($title) = ($res->src =~ m:/([^/]*)$:); |
($title) = ($res->src =~ m:/([^/]*)$:); |
} |
} |
$seq_str .= '<tr>'. |
$seq_str .= '<tr>'. |
qq{<td><input type="radio" id="$rb_count" name="problemchoice" value="$value" $checked /></td>}. |
qq{<td><input type="radio" id="$rb_count" name="problemchoice" value="$value"$checked /></td>}. |
'<td><label for="'.$rb_count.'">'.$resptype.'</label></td>'. |
'<td><label for="'.$rb_count.'">'.$resptype.'</label></td>'. |
'<td><label for="'.$rb_count.'">'.$title.'</label>'; |
'<td><label for="'.$rb_count.'">'.$title.'</label>'; |
if (scalar(@response_ids) > 1) { |
if (scalar(@response_ids) > 1) { |
Line 262 END
|
Line 262 END
|
(' 'x4). |
(' 'x4). |
'<a href="javascript:checkall(false)">'.&mt('Unselect All').'</a>'; |
'<a href="javascript:checkall(false)">'.&mt('Unselect All').'</a>'; |
$Str .= $/.'<table>'.$/; |
$Str .= $/.'<table>'.$/; |
my $iterator = $navmap->getIterator(undef, undef, undef, 1); |
my ($iterator,$sequence_string,@Accumulator); |
my $sequence_string; |
|
my $seq_id = 0; |
my $seq_id = 0; |
my @Accumulator = (&new_accumulator($env{'course.'.$cid.'.description'}, |
if (&Apache::loncommon::needs_gci_custom()) { |
'', |
my $cdom = $env{'course.'.$cid.'.domain'}; |
'', |
my $cnum = $env{'course.'.$cid.'.num'}; |
$seq_id++, |
my $mapurl = "/uploaded/$cdom/$cnum/default_1261144274.sequence"; |
$inputname)); |
my $map = $navmap->getResourceByUrl($mapurl); |
|
my $firstResource = $map->map_start(); |
|
my $lastResource = $map->map_finish(); |
|
$iterator = $navmap->getIterator($firstResource,$lastResource,undef,1); |
|
@Accumulator = (&new_accumulator($map->compTitle, |
|
$map->src, |
|
$map->symb, |
|
$seq_id++, |
|
$inputname)); |
|
} else { |
|
$iterator = $navmap->getIterator(undef, undef, undef, 1); |
|
@Accumulator = (&new_accumulator($env{'course.'.$cid.'.description'}, |
|
'', |
|
'', |
|
$seq_id++, |
|
$inputname)); |
|
} |
my @Sequence_Data; |
my @Sequence_Data; |
while (my $curRes = $iterator->next()) { |
while (my $curRes = $iterator->next()) { |
if ($curRes == $iterator->END_MAP) { |
if ($curRes == $iterator->END_MAP) { |