version 1.275, 2004/08/13 20:12:11
|
version 1.284, 2004/08/30 18:45:52
|
Line 84 my %colormap =
|
Line 84 my %colormap =
|
my $hurryUpColor = "#FF0000"; |
my $hurryUpColor = "#FF0000"; |
|
|
sub launch_win { |
sub launch_win { |
my ($mode,$script)=@_; |
my ($mode,$script,$toplinkitems)=@_; |
my $result; |
my $result; |
if ($script ne 'no') { |
if ($script ne 'no') { |
$result.='<script type="text/javascript">'; |
$result.='<script type="text/javascript">'; |
Line 99 sub launch_win {
|
Line 99 sub launch_win {
|
$result.='</script>'; |
$result.='</script>'; |
} |
} |
if ($mode eq 'link') { |
if ($mode eq 'link') { |
$result.='<a href="javascript:launch_navmapwin();void(0);">' |
&add_linkitem($toplinkitems,'launchnav','launch_navmapwin()', |
.&mt("Launch navigation in separate window")."</a> "; |
"Launch navigation window"); |
} |
} |
return $result; |
return $result; |
} |
} |
Line 119 window.status='Done.';
|
Line 119 window.status='Done.';
|
ENDCLOSE |
ENDCLOSE |
} |
} |
|
|
|
sub nav_control_js { |
|
my $nav=($ENV{'environment.remotenavmap'} eq 'on'); |
|
return (<<NAVCONTROL); |
|
var w_loncapanav_flag="$nav"; |
|
|
|
|
|
function gonav(url) { |
|
if (w_loncapanav_flag != 1) { |
|
go(url); |
|
} else { |
|
navwindow=window.open(url, |
|
"loncapanav","height=600,width=400,scrollbars=1"); |
|
} |
|
} |
|
NAVCONTROL |
|
} |
|
|
sub update { |
sub update { |
if ($ENV{'environment.remotenavmap'} ne 'on') { return ''; } |
if ($ENV{'environment.remotenavmap'} ne 'on') { return ''; } |
if (!$ENV{'request.course.id'}) { return ''; } |
if (!$ENV{'request.course.id'}) { return ''; } |
Line 161 sub real_handler {
|
Line 178 sub real_handler {
|
&Apache::loncommon::no_cache($r); |
&Apache::loncommon::no_cache($r); |
$r->send_http_header; |
$r->send_http_header; |
|
|
|
my %toplinkitems=(); |
|
|
if ($ENV{QUERY_STRING} eq 'collapseExternal') { |
if ($ENV{QUERY_STRING} eq 'collapseExternal') { |
&Apache::lonnet::put('environment',{'remotenavmap' => 'off'}); |
&Apache::lonnet::put('environment',{'remotenavmap' => 'off'}); |
&Apache::lonnet::appenv('environment.remotenavmap' => 'off'); |
&Apache::lonnet::appenv('environment.remotenavmap' => 'off'); |
Line 172 sub real_handler {
|
Line 191 sub real_handler {
|
swmenu.clearTimeout(swmenu.menucltim); |
swmenu.clearTimeout(swmenu.menucltim); |
$navstatus |
$navstatus |
MENU |
MENU |
|
} else { |
|
my $nothing = &Apache::lonhtmlcommon::javascript_nothing(); |
|
my $mainwindow='window.open('.$nothing.',"loncapaclient","",false);'; |
|
$menu=(<<MENU) |
|
swmenu=$mainwindow |
|
$navstatus |
|
MENU |
} |
} |
$r->print(<<"ENDSUBM"); |
$r->print(<<"ENDSUBM"); |
<html> |
<html> |
Line 206 ENDSUBM
|
Line 232 ENDSUBM
|
$r->print("<html><head>\n"); |
$r->print("<html><head>\n"); |
$r->print("<title>".&mt('Navigate Course Contents')."</title>"); |
$r->print("<title>".&mt('Navigate Course Contents')."</title>"); |
# ------------------------------------------------------------ Get query string |
# ------------------------------------------------------------ Get query string |
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},['register','sort']); |
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},['register','sort','showOnlyHomework']); |
|
|
# ----------------------------------------------------- Force menu registration |
# ----------------------------------------------------- Force menu registration |
my $addentries=''; |
my $addentries=''; |
my $more_unload; |
my $more_unload; |
|
my $body_only=''; |
if ($ENV{'environment.remotenavmap'} eq 'on') { |
if ($ENV{'environment.remotenavmap'} eq 'on') { |
$r->print('<script type="text/javascript"> |
$r->print('<script type="text/javascript"> |
function collapse() { |
function collapse() { |
Line 219 ENDSUBM
|
Line 246 ENDSUBM
|
</script>'); |
</script>'); |
# FIXME need to be smarter to only catch window close events |
# FIXME need to be smarter to only catch window close events |
# $more_unload="collapse()" |
# $more_unload="collapse()" |
|
$body_only=1; |
} |
} |
if ($ENV{'form.register'}) { |
if ($ENV{'form.register'}) { |
$addentries=' onLoad="'.&Apache::lonmenu::loadevents(). |
$addentries=' onLoad="'.&Apache::lonmenu::loadevents(). |
Line 232 ENDSUBM
|
Line 260 ENDSUBM
|
# Header |
# Header |
$r->print('</head>'. |
$r->print('</head>'. |
&Apache::loncommon::bodytag('Navigate Course Contents','', |
&Apache::loncommon::bodytag('Navigate Course Contents','', |
$addentries,'','',$ENV{'form.register'})); |
$addentries,$body_only,'', |
$r->print('<script>window.focus();</script>'. |
$ENV{'form.register'})); |
&Apache::loncommon::help_open_menu('','Navigation Screen','Navigation_Screen','',undef,'RAT')); |
$r->print('<script>window.focus();</script>'); |
|
|
$r->rflush(); |
$r->rflush(); |
|
|
# Check that it's defined |
# Check that it's defined |
if (!($navmap->courseMapDefined())) { |
if (!($navmap->courseMapDefined())) { |
|
$r->print(&Apache::loncommon::help_open_menu('','Navigation Screen','Navigation_Screen','',undef,'RAT')); |
$r->print('<font size="+2" color="red">Coursemap undefined.</font>' . |
$r->print('<font size="+2" color="red">Coursemap undefined.</font>' . |
'</body></html>'); |
'</body></html>'); |
return OK; |
return OK; |
Line 281 ENDSUBM
|
Line 310 ENDSUBM
|
} |
} |
|
|
if ($ENV{'environment.remotenavmap'} ne 'on') { |
if ($ENV{'environment.remotenavmap'} ne 'on') { |
$r->print(&launch_win('link','yes')); |
$r->print(&launch_win('link','yes',\%toplinkitems)); |
} |
} |
if ($ENV{'environment.remotenavmap'} eq 'on') { |
if ($ENV{'environment.remotenavmap'} eq 'on') { |
# $r->print("<a href='navmaps?collapseExternal'>" . |
&add_linkitem(\%toplinkitems,'closenav','collapse()', |
$r->print("<a href='javascript:collapse();void(0);'>" . |
"Close navigation window"); |
&mt("Close separate navigation window"). |
|
"</a> "); |
|
} |
} |
|
|
my $jumpToFirstHomework = 0; |
my $jumpToFirstHomework = 0; |
# Check to see if the student is jumping to next open, do-able problem |
# Check to see if the student is jumping to next open, do-able problem |
if ($ENV{QUERY_STRING} eq 'jumpToFirstHomework') { |
if ($ENV{QUERY_STRING} =~ /^jumpToFirstHomework/) { |
$jumpToFirstHomework = 1; |
$jumpToFirstHomework = 1; |
# Find the next homework problem that they can do. |
# Find the next homework problem that they can do. |
my $iterator = $navmap->getIterator(undef, undef, undef, 1); |
my $iterator = $navmap->getIterator(undef, undef, undef, 1); |
Line 325 ENDSUBM
|
Line 352 ENDSUBM
|
$r->print("<font size='+2'>All homework assignments have been completed.</font><br /><br />"); |
$r->print("<font size='+2'>All homework assignments have been completed.</font><br /><br />"); |
} |
} |
} else { |
} else { |
$r->print("<a href='navmaps?jumpToFirstHomework'>" . |
&add_linkitem(\%toplinkitems,'firsthomework', |
&mt("Go To My First Homework Problem")."</a> "); |
'location.href="navmaps?jumpToFirstHomework"', |
|
"Go To My First Homework Problem"); |
} |
} |
|
|
my $suppressEmptySequences = 0; |
my $suppressEmptySequences = 0; |
Line 335 ENDSUBM
|
Line 363 ENDSUBM
|
|
|
# Display only due homework. |
# Display only due homework. |
my $showOnlyHomework = 0; |
my $showOnlyHomework = 0; |
if ($ENV{QUERY_STRING} eq 'showOnlyHomework') { |
if ($ENV{'form.showOnlyHomework'} eq "1") { |
$showOnlyHomework = 1; |
$showOnlyHomework = 1; |
$suppressEmptySequences = 1; |
$suppressEmptySequences = 1; |
$filterFunc = sub { my $res = shift; |
$filterFunc = sub { my $res = shift; |
return $res->completable() || $res->is_map(); |
return $res->completable() || $res->is_map(); |
}; |
}; |
|
&add_linkitem(\%toplinkitems,'everything', |
|
'location.href="locatnavmaps?sort='.$ENV{'form.sort'}.'"', |
|
"Show Everything"); |
$r->print("<p><font size='+2'>".&mt("Uncompleted Homework")."</font></p>"); |
$r->print("<p><font size='+2'>".&mt("Uncompleted Homework")."</font></p>"); |
$ENV{'form.filter'} = ''; |
$ENV{'form.filter'} = ''; |
$ENV{'form.condition'} = 1; |
$ENV{'form.condition'} = 1; |
$resource_no_folder_link = 1; |
$resource_no_folder_link = 1; |
} else { |
} else { |
$r->print("<a href='navmaps?showOnlyHomework'>" . |
&add_linkitem(\%toplinkitems,'uncompleted', |
&mt("Show Only Uncompleted Homework")."</a> "); |
'location.href="navmaps?sort='.$ENV{'form.sort'}. |
|
'&showOnlyHomework=1"', |
|
"Show Only Uncompleted Homework"); |
} |
} |
|
|
$r->print("<form> |
my %selected=($ENV{'form.sort'} => 'selected=on'); |
|
my $sort_html=("<form> |
<nobr> |
<nobr> |
Sort by: |
<input type=\"hidden\" name=\"showOnlyHomework\" value=\"".$ENV{'form.showOnlyHomework'}."\" /> |
|
<input type=\"submit\" value=\"".&mt('Sort by:')."\" /> |
<select name=\"sort\"> |
<select name=\"sort\"> |
<option value=\"\"></option> |
<option value=\"default\" $selected{'default'}>".&mt('Default')."</option> |
<option value=\"title\">Title</option> |
<option value=\"title\" $selected{'title'} >".&mt('Title')."</option> |
<option value=\"duedate\">Duedate</option> |
<option value=\"duedate\" $selected{'duedate'}>".&mt('Duedate')."</option> |
</select> |
</select> |
<input type=\"submit\" name=\"Sort\" /> |
|
</nobr> |
</nobr> |
</form>"); |
</form>"); |
# renderer call |
# renderer call |
Line 370 ENDSUBM
|
Line 404 ENDSUBM
|
'suppressEmptySequences' => $suppressEmptySequences, |
'suppressEmptySequences' => $suppressEmptySequences, |
'filterFunc' => $filterFunc, |
'filterFunc' => $filterFunc, |
'resource_no_folder_link' => $resource_no_folder_link, |
'resource_no_folder_link' => $resource_no_folder_link, |
'r' => $r}; |
'sort_html'=> $sort_html, |
|
'r' => $r, |
|
'caller' => 'navmapsdisplay', |
|
'linkitems' => \%toplinkitems}; |
my $render = render($renderArgs); |
my $render = render($renderArgs); |
$navmap->untieHashes(); |
$navmap->untieHashes(); |
|
|
Line 642 sub timeToHumanString {
|
Line 679 sub timeToHumanString {
|
} |
} |
|
|
# Not this year, so show the year |
# Not this year, so show the year |
my $timeStr = strftime("on %A, %b %e %G at %I:%M %P", localtime($time)); |
my $timeStr = strftime("on %A, %b %e %Y at %I:%M %P", localtime($time)); |
$timeStr =~ s/12:00 am/00:00/; |
$timeStr =~ s/12:00 am/00:00/; |
$timeStr =~ s/12:00 pm/noon/; |
$timeStr =~ s/12:00 pm/noon/; |
return $timeStr; |
return $timeStr; |
Line 1381 sub render {
|
Line 1418 sub render {
|
#$currenturl=~s/^[^\/]+//; |
#$currenturl=~s/^[^\/]+//; |
|
|
$here = $jump = &Apache::lonnet::symbread($currenturl); |
$here = $jump = &Apache::lonnet::symbread($currenturl); |
} else { |
} |
&Apache::lonnet::logthis("Hrrm,"); |
|
|
|
} |
|
|
|
# Step three: Ensure the folders are open |
# Step three: Ensure the folders are open |
my $mapIterator = $navmap->getIterator(undef, undef, undef, 1); |
my $mapIterator = $navmap->getIterator(undef, undef, undef, 1); |
Line 1494 sub render {
|
Line 1528 sub render {
|
} |
} |
|
|
if ($printCloseAll && !$args->{'resource_no_folder_link'}) { |
if ($printCloseAll && !$args->{'resource_no_folder_link'}) { |
|
my ($link,$text); |
if ($condition) { |
if ($condition) { |
$result.="<a href=\"navmaps?condition=0&filter=&$queryString" . |
$link='"navmaps?condition=0&filter=&'.$queryString. |
"&here=" . Apache::lonnet::escape($here) . |
'&here='.&Apache::lonnet::escape($here).'"'; |
"\">".&mt('Close All Folders')."</a>"; |
$text='Close All Folders'; |
} else { |
} else { |
$result.="<a href=\"navmaps?condition=1&filter=&$queryString" . |
$link='"navmaps?condition=1&filter=&'.$queryString. |
"&here=" . Apache::lonnet::escape($here) . |
'&here='.&Apache::lonnet::escape($here).'"'; |
"\">".&mt('Open All Folders')."</a>"; |
$text='Open All Folders'; |
} |
} |
|
if ($args->{'caller'} eq 'navmapsdisplay') { |
|
&add_linkitem($args->{'linkitems'},'changefolder', |
|
'location.href='.$link,$text); |
|
} else { |
|
$result.='<a href='.$link.'>'.&mt($text).'</a>'; |
|
} |
$result .= "\n"; |
$result .= "\n"; |
} |
} |
|
|
# Check for any unread discussions in all resources. |
# Check for any unread discussions in all resources. |
if (!$args->{'resource_no_folder_link'}) { |
if ($args->{'caller'} eq 'navmapsdisplay') { |
my $totdisc = 0; |
my $totdisc = 0; |
my $haveDisc = ''; |
my $haveDisc = ''; |
my @allres=$navmap->retrieveResources(); |
my @allres=$navmap->retrieveResources(); |
Line 1525 sub render {
|
Line 1566 sub render {
|
} |
} |
if ($totdisc > 0) { |
if ($totdisc > 0) { |
$haveDisc =~ s/:$//; |
$haveDisc =~ s/:$//; |
my %lt = &Apache::lonlocal::texthash( |
my $navurl = $ENV{'QUERY_STRING'}; |
'mapr' => 'Mark all posts read', |
&add_linkitem($args->{'linkitems'},'clearbubbles', |
); |
'document.clearbubbles.submit()', |
$result .= (<<END); |
'Mark all posts read'); |
<a href="javascript:document.clearbubbles.submit()">$lt{'mapr'}</a> <a href="javascript:void(open('/adm/help/NavMaps_MarkPosts_Read.hlp', 'Help_for_NavMaps_MarkPosts', 'menubar=0,toolbar=1,scrollbars=1,width=350,height=400,resizable=yes'))" title="Online Help"><image src="/adm/help/gif/smallHelp.gif" border="0" alt="(Help: NavMaps_MarkPostsLink)" /></a> |
$result .= (<<END); |
<form name="clearbubbles" method="post" action="/adm/feedback"> |
<form name="clearbubbles" method="post" action="/adm/feedback"> |
<input type="hidden" name="navurl" value="$ENV{'QUERY_STRING'}" /> |
<input type="hidden" name="navurl" value="$ENV{'QUERY_STRING'}" /> |
<input type="hidden" name="navmaps" value="$haveDisc" /> |
<input type="hidden" name="navmaps" value="$haveDisc" /> |
</form> |
</form> |
END |
END |
|
} |
|
} |
|
|
|
if ($args->{'caller'} eq 'navmapsdisplay') { |
|
$result .= '<table><tr><td>'. |
|
&Apache::loncommon::help_open_menu('','Navigation Screen','Navigation_Screen','',undef,'RAT').'</td>'; |
|
if ($ENV{'environment.remotenavmap'} ne 'on') { |
|
$result .= '<td> </td>'; |
} else { |
} else { |
$result .= '<br />'; |
$result .= '</tr><tr>'; |
|
} |
|
$result.=&show_linkitems($args->{'linkitems'}); |
|
if ($args->{'sort_html'}) { |
|
if ($ENV{'environment.remotenavmap'} ne 'on') { |
|
$result.='<td> </td><td> </td><td> </td>'. |
|
'<td align="right">'.$args->{'sort_html'}.'</td></tr>'; |
|
} else { |
|
$result.='</tr><tr><td align="left"><br />'. |
|
$args->{'sort_html'}.'</td></tr>'; |
|
} |
} |
} |
|
$result .= '</table>'; |
|
} elsif ($args->{'sort_html'}) { |
|
$result.=$args->{'sort_html'}; |
} |
} |
|
|
$result .= "<br />\n"; |
$result .= "<br />\n"; |
if ($r) { |
if ($r) { |
$r->print($result); |
$r->print($result); |
Line 1614 END
|
Line 1677 END
|
my @resources; |
my @resources; |
my $code='';# sub { !(shift->is_map();) }; |
my $code='';# sub { !(shift->is_map();) }; |
if ($args->{'sort'} eq 'title') { |
if ($args->{'sort'} eq 'title') { |
@resources=$navmap->retrieveResources(undef, |
my $oldFilterFunc = $filterFunc; |
sub { !shift->is_map(); }); |
my $filterFunc= |
|
sub { |
|
my ($res)=@_; |
|
if ($res->is_map()) { return 0;} |
|
return &$oldFilterFunc($res); |
|
}; |
|
@resources=$navmap->retrieveResources(undef,$filterFunc); |
@resources= sort {lc($a->compTitle) cmp lc($b->compTitle)} @resources; |
@resources= sort {lc($a->compTitle) cmp lc($b->compTitle)} @resources; |
} elsif ($args->{'sort'} eq 'duedate') { |
} elsif ($args->{'sort'} eq 'duedate') { |
@resources=$navmap->retrieveResources(undef, |
@resources=$navmap->retrieveResources(undef, |
Line 1628 END
|
Line 1697 END
|
lc($a->compTitle) cmp lc($b->compTitle) |
lc($a->compTitle) cmp lc($b->compTitle) |
} |
} |
} @resources; |
} @resources; |
|
} else { |
|
#unknow sort mechanism or default |
|
undef($args->{'sort'}); |
} |
} |
|
|
|
|
while (1) { |
while (1) { |
if ($args->{'sort'}) { |
if ($args->{'sort'}) { |
$curRes = shift(@resources); |
$curRes = shift(@resources); |
Line 1838 if (location.href.indexOf('#curloc')==-1
|
Line 1911 if (location.href.indexOf('#curloc')==-1
|
return $result; |
return $result; |
} |
} |
|
|
|
sub add_linkitem { |
|
my ($linkitems,$name,$cmd,$text)=@_; |
|
$$linkitems{$name}{'cmd'}=$cmd; |
|
$$linkitems{$name}{'text'}=&mt($text); |
|
} |
|
|
|
sub show_linkitems { |
|
my ($linkitems)=@_; |
|
my @linkorder = ("launchnav","closenav","firsthomework","everything", |
|
"uncompleted","changefolder","clearbubbles"); |
|
|
|
my $result .= (<<ENDBLOCK); |
|
<td align="left"> |
|
<script type="text/javascript"> |
|
function changeNavDisplay () { |
|
var navchoice = document.linkitems.toplink[document.linkitems.toplink.selectedIndex].value; |
|
ENDBLOCK |
|
foreach my $link (@linkorder) { |
|
$result.= "if (navchoice == '$link') {". |
|
$linkitems->{$link}{'cmd'}."}\n"; |
|
} |
|
$result.='} |
|
</script> |
|
<form name="linkitems" method="post"> |
|
<nobr><select name="toplink">'."\n"; |
|
foreach my $link (@linkorder) { |
|
if (defined($linkitems->{$link})) { |
|
if ($linkitems->{$link}{'text'} ne '') { |
|
$result .= ' <option value="'.$link.'">'. |
|
$linkitems->{$link}{'text'}."</option>\n"; |
|
} |
|
} |
|
} |
|
$result .= '</select> <input type="button" name="chgnav" |
|
value="Go" onClick="javascript:changeNavDisplay()" /> |
|
</nobr></form></td>'."\n"; |
|
return $result; |
|
} |
|
|
1; |
1; |
|
|
package Apache::lonnavmaps::navmap; |
package Apache::lonnavmaps::navmap; |
Line 2222 sub getById {
|
Line 2334 sub getById {
|
sub getBySymb { |
sub getBySymb { |
my $self = shift; |
my $self = shift; |
my $symb = shift; |
my $symb = shift; |
|
|
my ($mapUrl, $id, $filename) = &Apache::lonnet::decode_symb($symb); |
my ($mapUrl, $id, $filename) = &Apache::lonnet::decode_symb($symb); |
my $map = $self->getResourceByUrl($mapUrl); |
my $map = $self->getResourceByUrl($mapUrl); |
return $self->getById($map->map_pc() . '.' . $id); |
my $returnvalue = undef; |
|
if (ref($map)) { |
|
$returnvalue = $self->getById($map->map_pc() .'.'.$id); |
|
} |
|
return $returnvalue; |
} |
} |
|
|
sub getByMapPc { |
sub getByMapPc { |
Line 2418 in the filter function.
|
Line 2535 in the filter function.
|
|
|
=cut |
=cut |
|
|
|
|
sub getResourceByUrl { |
sub getResourceByUrl { |
my $self = shift; |
my $self = shift; |
my $resUrl = shift; |
my $resUrl = shift; |
Line 3915 sub extractParts {
|
Line 4033 sub extractParts {
|
} |
} |
|
|
|
|
|
# These hashes probably do not need names that end with "Hash".... |
my %responseIdHash; |
my %responseIdHash; |
my %responseTypeHash; |
my %responseTypeHash; |
|
|
Line 3930 sub extractParts {
|
Line 4049 sub extractParts {
|
# So we have to use our knowlege of part names to figure out |
# So we have to use our knowlege of part names to figure out |
# where the part names begin and end, and even then, it is possible |
# where the part names begin and end, and even then, it is possible |
# to construct ambiguous situations. |
# to construct ambiguous situations. |
|
# |
|
my %response_type_by_id; |
foreach (split /,/, $metadata) { |
foreach (split /,/, $metadata) { |
if ($_ =~ /^([a-zA-Z]+)response_(.*)/) { |
if ($_ =~ /^([a-zA-Z]+)response_(.*)/) { |
my $responseType = $1; |
my $responseType = $1; |
Line 3945 sub extractParts {
|
Line 4066 sub extractParts {
|
my $responseId = join('_', @otherChunks); |
my $responseId = join('_', @otherChunks); |
push @{$responseIdHash{$partIdSoFar}}, $responseId; |
push @{$responseIdHash{$partIdSoFar}}, $responseId; |
push @{$responseTypeHash{$partIdSoFar}}, $responseType; |
push @{$responseTypeHash{$partIdSoFar}}, $responseType; |
|
$response_type_by_id{$responseId} = $responseType; |
} |
} |
} |
} |
} |
} |
} |
} |
my $resorder = &Apache::lonnet::metadata($self->src(),'responseorder'); |
my $resorder = &Apache::lonnet::metadata($self->src(),'responseorder'); |
|
# |
|
# Reorder the arrays in the %responseIdHash and %responseTypeHash |
if ($resorder) { |
if ($resorder) { |
my @resorder=split(/,/,$resorder); |
my @resorder=split(/,/,$resorder); |
foreach my $part (keys(%responseIdHash)) { |
foreach my $part (keys(%responseIdHash)) { |
Line 3963 sub extractParts {
|
Line 4087 sub extractParts {
|
$responseIdHash{$part}=\@neworder; |
$responseIdHash{$part}=\@neworder; |
} |
} |
} |
} |
|
# |
|
# Reorder the response types |
|
foreach my $partid (keys(%responseIdHash)) { |
|
delete($responseTypeHash{$partid}); |
|
foreach my $respid (@{$responseIdHash{$partid}}) { |
|
push(@{$responseTypeHash{$partid}}, |
|
$response_type_by_id{$respid}); |
|
} |
|
} |
$self->{RESPONSE_IDS} = \%responseIdHash; |
$self->{RESPONSE_IDS} = \%responseIdHash; |
$self->{RESPONSE_TYPES} = \%responseTypeHash; |
$self->{RESPONSE_TYPES} = \%responseTypeHash; |
} |
} |