version 1.452, 2009/05/30 21:52:30
|
version 1.457, 2009/06/09 22:50:28
|
Line 854 sub page_js {
|
Line 854 sub page_js {
|
|
|
return(<<ENDJS); |
return(<<ENDJS); |
<script type="text/javascript"> |
<script type="text/javascript"> |
|
// <![CDATA[ |
function pclose() { |
function pclose() { |
parmwin=window.open("/adm/rat/empty.html","LONCAPAparms", |
parmwin=window.open("/adm/rat/empty.html","LONCAPAparms", |
"height=350,width=350,scrollbars=no,menubar=no"); |
"height=350,width=350,scrollbars=no,menubar=no"); |
Line 893 sub page_js {
|
Line 893 sub page_js {
|
var newWin = window.open(url, wdwName, options); |
var newWin = window.open(url, wdwName, options); |
newWin.focus(); |
newWin.focus(); |
} |
} |
|
// ]]> |
</script> |
</script> |
$selscript |
$selscript |
ENDJS |
ENDJS |
Line 1248 sub parmmenu {
|
Line 1249 sub parmmenu {
|
my $tempkey; |
my $tempkey; |
$r->print(<<ENDSCRIPT); |
$r->print(<<ENDSCRIPT); |
<script type="text/javascript"> |
<script type="text/javascript"> |
|
// <![CDATA[ |
function checkall(value, checkName) { |
function checkall(value, checkName) { |
|
|
|
var li = "_li"; |
|
var displayOverview = ""; |
|
|
|
if (value == false) { |
|
displayOverview = "none" |
|
} |
|
|
for (i=0; i<document.forms.parmform.elements.length; i++) { |
for (i=0; i<document.forms.parmform.elements.length; i++) { |
ele = document.forms.parmform.elements[i]; |
ele = document.forms.parmform.elements[i]; |
if (ele.name == checkName) { |
if (ele.name == checkName) { |
document.forms.parmform.elements[i].checked=value; |
document.forms.parmform.elements[i].checked=value; |
|
document.getElementById(document.forms.parmform.elements[i].value.concat(li)).style.display = displayOverview; |
} |
} |
} |
} |
} |
} |
|
|
function checkthis(thisvalue, checkName) { |
function checkthis(thisvalue, checkName) { |
|
checkboxChecked(thisvalue); |
for (i=0; i<document.forms.parmform.elements.length; i++) { |
for (i=0; i<document.forms.parmform.elements.length; i++) { |
ele = document.forms.parmform.elements[i]; |
ele = document.forms.parmform.elements[i]; |
if (ele.name == checkName) { |
if (ele.name == checkName) { |
Line 1284 sub parmmenu {
|
Line 1296 sub parmmenu {
|
checkthis('contentclose','pscat'); |
checkthis('contentclose','pscat'); |
} |
} |
|
|
|
|
function checkvisi() { |
function checkvisi() { |
checkthis('hiddenresource','pscat'); |
checkthis('hiddenresource','pscat'); |
checkthis('encrypturl','pscat'); |
checkthis('encrypturl','pscat'); |
Line 1306 sub parmmenu {
|
Line 1317 sub parmmenu {
|
checkthis('maxtries','pscat'); |
checkthis('maxtries','pscat'); |
} |
} |
|
|
|
function hideParms() { |
|
document.getElementById('LC_parm_overview_parm_menu').style.display = "none"; |
|
} |
|
|
|
function showParms() { |
|
document.getElementById('LC_parm_overview_parm_menu').style.display = ""; |
|
} |
|
|
|
function checkboxChecked(id) { |
|
var li = "_li"; |
|
var id_li = id.concat(li); |
|
|
|
if (document.getElementById(id_li).style.display == "none") { |
|
document.getElementById(id_li).style.display = ""; |
|
} |
|
else { |
|
document.getElementById(id_li).style.display = "none"; |
|
} |
|
} |
|
// ]]> |
</script> |
</script> |
ENDSCRIPT |
ENDSCRIPT |
$r->print(); |
|
$r->print(&Apache::lonhtmlcommon::row_title(&mt('Select Parameters to View'))); |
$r->print(&Apache::lonhtmlcommon::row_title(&mt('Select Parameters to View'))); |
$r->print("\n".'<table id="LC_parm_overview_parm_menu"><tr>'); |
|
|
#part to print selected parms overview |
|
$r->print(&mt('Selected Parameters:').'<br />'); |
|
|
|
#print out all possible parms and hide them by default |
|
$r->print('<ul>'); |
|
foreach $tempkey (&keysindisplayorder($allparms,$keyorder)) { |
|
$r->print('<li id="'.$tempkey.'_li" value="'.$tempkey.'_li" name="pscat_li"'); |
|
if (!($$pscat[0] eq "all" || grep $_ eq $tempkey, @{$pscat})) { |
|
$r->print(' style="display:none"'); |
|
} |
|
$r->print(' />' |
|
.($$allparms{$tempkey}=~/\S/ ? $$allparms{$tempkey} : $tempkey) |
|
.'</li>' |
|
); |
|
} |
|
$r->print('</ul>' |
|
.'<p><a href="javascript:showParms()">' |
|
.&mt('Show detailed Parameter Selection') |
|
.'</a></p>' |
|
); |
|
|
|
&shortCuts($r,$allparms,$pscat,$keyorder); |
|
|
|
$r->print(&Apache::lonhtmlcommon::row_closure(1)); |
|
} |
|
|
|
sub parmboxes { |
|
my ($r,$allparms,$pscat,$keyorder)=@_; |
|
my $tempkey; |
|
|
|
#part to print the parm-list |
|
$r->print('<fieldset id="LC_parm_overview_parm_menu" style="display:none">' |
|
.'<legend>'.&mt('Parameter').'</legend>' |
|
."\n" |
|
.'<table>' |
|
); |
my $cnt=0; |
my $cnt=0; |
|
|
|
$r->print('<tr>'); |
foreach $tempkey (&keysindisplayorder($allparms,$keyorder)) { |
foreach $tempkey (&keysindisplayorder($allparms,$keyorder)) { |
$r->print("\n".'<td><label><input type="checkbox" name="pscat" '); |
$r->print("\n".'<td><label><input type="checkbox" name="pscat" '); |
$r->print('value="'.$tempkey.'"'); |
$r->print('value="'.$tempkey.'" '); |
|
$r->print('onclick="checkboxChecked(\''.$tempkey.'\')"'); |
if ($$pscat[0] eq "all" || grep $_ eq $tempkey, @{$pscat}) { |
if ($$pscat[0] eq "all" || grep $_ eq $tempkey, @{$pscat}) { |
$r->print(' checked="checked"'); |
$r->print(' checked="checked"'); |
} |
} |
Line 1322 ENDSCRIPT
|
Line 1391 ENDSCRIPT
|
: $tempkey) |
: $tempkey) |
.'</label></td>'); |
.'</label></td>'); |
$cnt++; |
$cnt++; |
if ($cnt==3) { |
if ($cnt==4) { |
$r->print("</tr>\n<tr>"); |
$r->print("</tr>\n<tr>"); |
$cnt=0; |
$cnt=0; |
} |
} |
} |
} |
$r->print('</tr>' |
$r->print('</tr>' |
.'<tr id="LC_parm_overview_parm_menu_selectors">' |
.'</table>' |
|
.'<hr />' |
|
.'<a href="javascript:hideParms()">' |
|
.&mt('Hide') |
|
.'</a>' |
|
); |
|
|
|
#&shortCuts($r,$allparms,$pscat,$keyorder); |
|
$r->print('</fieldset>'); |
|
} |
|
sub shortCuts { |
|
my ($r,$allparms,$pscat,$keyorder)=@_; |
|
|
|
#part to print out the shortcuts for parmselection |
|
$r->print('<table><tr id="LC_parm_overview_parm_menu_selectors">' |
.'<td valign="top">' |
.'<td valign="top">' |
.'<fieldset><legend><b>'.&mt('Parameter Selection').'</b></legend>' |
.'<fieldset><legend>'.&mt('Parameter Selection').'</legend>' |
.'<span class="LC_nobreak">' |
.'<span class="LC_nobreak">' |
.'• <a href="javascript:checkall(true, \'pscat\')">'.&mt('Select All').'</a>' |
.'• <a href="javascript:checkall(true, \'pscat\')">'.&mt('Select All').'</a>' |
.'</span>' |
.'</span>' |
Line 1345 ENDSCRIPT
|
Line 1428 ENDSCRIPT
|
.'</fieldset>' |
.'</fieldset>' |
.'</td>' |
.'</td>' |
.'<td colspan="2" valign="top">' |
.'<td colspan="2" valign="top">' |
.'<fieldset><legend><b>'.&mt('Add Selection for...').'</b></legend>' |
.'<fieldset><legend>'.&mt('Add Selection for...').'</legend>' |
.'<span class="LC_nobreak">' |
.'<span class="LC_nobreak">' |
.'• <a href="javascript:checkdates()">'.&mt('Problem Dates').'</a>' |
.'• <a href="javascript:checkdates()">'.&mt('Problem Dates').'</a>' |
.'</span>' |
.'</span>' |
Line 1365 ENDSCRIPT
|
Line 1448 ENDSCRIPT
|
.'</span>' |
.'</span>' |
.'</fieldset>' |
.'</fieldset>' |
.'</td>' |
.'</td>' |
.'</tr></table>' |
.'</tr></table>'); |
); |
|
} |
} |
|
|
sub partmenu { |
sub partmenu { |
Line 1425 sub usermenu {
|
Line 1507 sub usermenu {
|
$sections .= ' '.&mt('or').' '; |
$sections .= ' '.&mt('or').' '; |
$sections .= qq| |
$sections .= qq| |
<script type="text/javascript"> |
<script type="text/javascript"> |
|
// <![CDATA[ |
function group_or_section(caller) { |
function group_or_section(caller) { |
if (caller == "cgroup") { |
if (caller == "cgroup") { |
if (document.parmform.cgroup.selectedIndex != 0) { |
if (document.parmform.cgroup.selectedIndex != 0) { |
Line 1436 function group_or_section(caller) {
|
Line 1519 function group_or_section(caller) {
|
} |
} |
} |
} |
} |
} |
|
// ]]> |
</script> |
</script> |
|; |
|; |
} else { |
} else { |
$sections .= qq| |
$sections .= qq| |
<script type="text/javascript"> |
<script type="text/javascript"> |
|
// <![CDATA[ |
function group_or_section(caller) { |
function group_or_section(caller) { |
return; |
return; |
} |
} |
|
// ]]> |
</script> |
</script> |
|; |
|; |
} |
} |
Line 1490 sub displaymenu {
|
Line 1576 sub displaymenu {
|
$r->print(&Apache::lonhtmlcommon::topic_bar (2,&mt('Select Parameters'))); |
$r->print(&Apache::lonhtmlcommon::topic_bar (2,&mt('Select Parameters'))); |
$r->print(&Apache::lonhtmlcommon::start_pick_box()); |
$r->print(&Apache::lonhtmlcommon::start_pick_box()); |
&parmmenu($r,$allparms,$pscat,$keyorder); |
&parmmenu($r,$allparms,$pscat,$keyorder); |
$r->print(&Apache::lonhtmlcommon::row_closure()); |
$r->print(&Apache::lonhtmlcommon::end_pick_box()); |
|
&parmboxes($r,$allparms,$pscat,$keyorder); |
|
$r->print(&Apache::lonhtmlcommon::start_pick_box()); |
$r->print(&Apache::lonhtmlcommon::row_title(&mt('Select Parts to View'))); |
$r->print(&Apache::lonhtmlcommon::row_title(&mt('Select Parts to View'))); |
&partmenu($r,$allparts,$psprt); |
&partmenu($r,$allparts,$psprt); |
$r->print(&Apache::lonhtmlcommon::row_closure(1)); |
$r->print(&Apache::lonhtmlcommon::row_closure(1)); |
Line 2788 ENDOVER
|
Line 2875 ENDOVER
|
|
|
#$r->print('<table id="LC_parm_overview_scope"> |
#$r->print('<table id="LC_parm_overview_scope"> |
# <tr><td class="LC_parm_overview_level_menu">'); |
# <tr><td class="LC_parm_overview_level_menu">'); |
$r->print('<div class="LC_ContentBoxSpecial">'); |
$r->print('<div class="LC_Box">'); |
#$r->print('<h2 class="LC_hcell">Step 1</h2>'); |
#$r->print('<h2 class="LC_hcell">Step 1</h2>'); |
$r->print('<div>'); |
$r->print('<div>'); |
$r->print(&Apache::lonhtmlcommon::start_pick_box()); |
$r->print(&Apache::lonhtmlcommon::start_pick_box()); |
Line 2806 ENDOVER
|
Line 2893 ENDOVER
|
|
|
#$r->print('<table id="LC_parm_overview_controls"> |
#$r->print('<table id="LC_parm_overview_controls"> |
# <tr><td class="LC_parm_overview_parm_selectors">'); |
# <tr><td class="LC_parm_overview_parm_selectors">'); |
$r->print('<div class="LC_ContentBoxSpecial">'); |
$r->print('<div class="LC_Box">'); |
$r->print('<div>'); |
$r->print('<div>'); |
$r->print(&Apache::lonhtmlcommon::start_pick_box()); |
$r->print(&Apache::lonhtmlcommon::start_pick_box()); |
&parmmenu($r,\%allparms,\@pscat,\%keyorder); |
&parmmenu($r,\%allparms,\@pscat,\%keyorder); |
$r->print(&Apache::lonhtmlcommon::row_closure()); |
$r->print(&Apache::lonhtmlcommon::end_pick_box()); |
|
&parmboxes($r,\%allparms,\@pscat,\%keyorder); |
|
$r->print(&Apache::lonhtmlcommon::start_pick_box()); |
$r->print(&Apache::lonhtmlcommon::row_title(&mt('Select Parts to View'))); |
$r->print(&Apache::lonhtmlcommon::row_title(&mt('Select Parts to View'))); |
#$r->print('</td><td class="LC_parm_overview_restrictions">'. |
#$r->print('</td><td class="LC_parm_overview_restrictions">'. |
$r->print('<table>'. |
$r->print('<table>'. |
Line 2828 ENDOVER
|
Line 2916 ENDOVER
|
$r->print(&Apache::lonhtmlcommon::end_pick_box()); |
$r->print(&Apache::lonhtmlcommon::end_pick_box()); |
$r->print('</div></div>'); |
$r->print('</div></div>'); |
|
|
$r->print('<div class="LC_ContentBoxSpecial">'); |
$r->print('<div class="LC_Box">'); |
$r->print('<div>'); |
$r->print('<div>'); |
my $sortorder=$env{'form.sortorder'}; |
my $sortorder=$env{'form.sortorder'}; |
unless ($sortorder) { $sortorder='realmstudent'; } |
unless ($sortorder) { $sortorder='realmstudent'; } |