version 1.37, 2005/06/10 20:43:10
|
version 1.41, 2006/03/26 19:44:45
|
Line 195 sub cleanup {
|
Line 195 sub cleanup {
|
&Apache::lonnet::logthis('Failed cleanup groupsort: hash'); |
&Apache::lonnet::logthis('Failed cleanup groupsort: hash'); |
} |
} |
} |
} |
|
return OK; |
} |
} |
|
|
# -------------------------------------------------------------- Read from file |
# -------------------------------------------------------------- Read from file |
Line 300 ENDADV
|
Line 301 ENDADV
|
} |
} |
|
|
# output start of web page |
# output start of web page |
my $html=&Apache::lonxml::xmlbegin(); |
my $js = <<END; |
$r->print(<<END); |
<script type="text/javascript"> |
$html |
|
<head> |
|
<title>The LearningOnline Network With CAPA Group Sorter</title> |
|
<script language='javascript'> |
|
function insertRowInLastRow() { |
function insertRowInLastRow() { |
opener.insertrow(opener.maxrow); |
opener.insertrow(opener.maxrow); |
opener.addobj(opener.maxrow,'e&2'); |
opener.addobj(opener.maxrow,'e&2'); |
Line 333 function orderchange(val,newval) {
|
Line 330 function orderchange(val,newval) {
|
document.forms.groupsort.submit(); |
document.forms.groupsort.submit(); |
} |
} |
</script> |
</script> |
</head> |
|
END |
END |
# read pertinent machine configuration |
# read pertinent machine configuration |
my $domain = $r->dir_config('lonDefDomain'); |
my $domain = $r->dir_config('lonDefDomain'); |
Line 351 END
|
Line 347 END
|
|
|
my $ctr = 0; |
my $ctr = 0; |
my $clen = scalar(keys %shash); |
my $clen = scalar(keys %shash); |
if ($clen > 1) { |
if (($clen > 1) || ($env{'form.readfile'})) { |
my %lt=&Apache::lonlocal::texthash( |
my %lt=&Apache::lonlocal::texthash( |
'fin'=> 'Finalize order of resources', |
'fin'=> 'Finalize order of resources', |
'gb' => 'Go Back', |
'gb' => 'Go Back', |
Line 363 END
|
Line 359 END
|
'pa' => 'Path', |
'pa' => 'Path', |
'in' => 'Include' |
'in' => 'Include' |
); |
); |
$r->print(&Apache::loncommon::bodytag('Sort Imported Resources')); |
$r->print(&Apache::loncommon::start_page('Sort Imported Resources', |
|
$js)); |
$r->print(<<END); |
$r->print(<<END); |
<b><font color="#888888">$lt{'fin'}</font></b> |
<b><font color="#888888">$lt{'fin'}</font></b> |
<form method='post' action='/adm/groupsort' name='groupsort' |
<form method='post' action='/adm/groupsort' name='groupsort' |
Line 407 END
|
Line 404 END
|
$r->print("<td colspan='2' bgcolor='$titleclr'><b>$lt{'ti'}</b></td>\n"); |
$r->print("<td colspan='2' bgcolor='$titleclr'><b>$lt{'ti'}</b></td>\n"); |
$r->print("<td bgcolor='$titleclr'><b>$lt{'pa'}</b></td></tr>\n"); |
$r->print("<td bgcolor='$titleclr'><b>$lt{'pa'}</b></td></tr>\n"); |
} else { |
} else { |
|
$r->print(&Apache::loncommon::start_page(undef,$js, |
|
{'only_body' => 1})); |
$r->print(<<END); |
$r->print(<<END); |
<body> |
|
<form method='post' action='/adm/groupsort' name='groupsort' |
<form method='post' action='/adm/groupsort' name='groupsort' |
enctype='application/x-www-form-urlencoded'> |
enctype='application/x-www-form-urlencoded'> |
<input type="hidden" name="fnum" value="$clen" /> |
<input type="hidden" name="fnum" value="$clen" /> |
Line 421 END
|
Line 419 END
|
my $key=$_; |
my $key=$_; |
$ctr++; |
$ctr++; |
my $iconname=&Apache::loncommon::icon($key); |
my $iconname=&Apache::loncommon::icon($key); |
if ($clen > 1) { |
if (($clen > 1) || ($env{'form.readfile'})) { |
$r->print("<tr><td bgcolor='$fileclr'>"); |
$r->print("<tr><td bgcolor='$fileclr'>"); |
if ($env{'form.readfile'}) { |
if ($env{'form.readfile'}) { |
$r->print(&checkbox($ctr-1)); |
$r->print(&checkbox($ctr-1)); |
Line 430 END
|
Line 428 END
|
} |
} |
} |
} |
$r->print(&hidden($ctr-1,$thash{$key},$key)); |
$r->print(&hidden($ctr-1,$thash{$key},$key)); |
if ($clen > 1) { |
if (($clen > 1) || ($env{'form.readfile'})) { |
$r->print("</td>"); |
$r->print("</td>"); |
unless ($env{'form.readfile'}) { |
unless ($env{'form.readfile'}) { |
$r->print("<td bgcolor='$fileclr'>". |
$r->print("<td bgcolor='$fileclr'>". |
Line 444 END
|
Line 442 END
|
$r->print("$key</td></tr>\n"); |
$r->print("$key</td></tr>\n"); |
} |
} |
} |
} |
if ($clen > 1) { |
if (($clen > 1) || ($env{'form.readfile'})) { |
$r->print("</table></td></tr></table></form>"); |
$r->print("</table></td></tr></table></form>"); |
} else { |
} else { |
$r->print(<<END); |
$r->print(<<END); |
Line 453 END
|
Line 451 END
|
</script> |
</script> |
END |
END |
} |
} |
$r->print(<<END); |
|
</body> |
$r->print(&Apache::loncommon::end_page()); |
</html> |
|
END |
|
|
|
return OK; |
return OK; |
} |
} |