version 1.442, 2009/04/05 17:31:04
|
version 1.445, 2009/05/08 22:47:01
|
Line 1321 sub parmmenu {
|
Line 1321 sub parmmenu {
|
|
|
</script> |
</script> |
ENDSCRIPT |
ENDSCRIPT |
$r->print(); |
$r->print(); |
|
$r->print(&Apache::lonhtmlcommon::row_title(&mt('Select Parameters to View'))); |
$r->print("\n".'<table id="LC_parm_overview_parm_menu"><tr>'); |
$r->print("\n".'<table id="LC_parm_overview_parm_menu"><tr>'); |
my $cnt=0; |
my $cnt=0; |
foreach $tempkey (&keysindisplayorder($allparms,$keyorder)) { |
foreach $tempkey (&keysindisplayorder($allparms,$keyorder)) { |
Line 1382 ENDSCRIPT
|
Line 1383 ENDSCRIPT
|
} |
} |
|
|
sub partmenu { |
sub partmenu { |
my ($r,$allparts,$psprt)=@_; |
my ($r,$allparts,$psprt)=@_; |
|
|
$r->print('<select multiple="multiple" name="psprt" size="8">'); |
$r->print('<select multiple="multiple" name="psprt" size="8">'); |
$r->print('<option value="all"'); |
$r->print('<option value="all"'); |
$r->print(' selected="selected"') unless (@{$psprt}); |
$r->print(' selected="selected"') unless (@{$psprt}); |
Line 1400 sub partmenu {
|
Line 1402 sub partmenu {
|
$r->print('>'.$$allparts{$tempkey}.'</option>'); |
$r->print('>'.$$allparts{$tempkey}.'</option>'); |
} |
} |
} |
} |
$r->print('</select>'); |
$r->print('</select>'); |
} |
} |
|
|
sub usermenu { |
sub usermenu { |
Line 1417 sub usermenu {
|
Line 1419 sub usermenu {
|
|
|
my $g_s_header=''; |
my $g_s_header=''; |
my $g_s_footer=''; |
my $g_s_footer=''; |
|
|
if (%sectionhash) { |
if (%sectionhash) { |
$sections=&mt('Section:').' <select name="csec"'; |
$sections=&mt('Section:').' <select name="csec"'; |
if (%grouphash && $parmlev ne 'full') { |
if (%grouphash && $parmlev ne 'full') { |
Line 1484 function group_or_section(caller) {
|
Line 1486 function group_or_section(caller) {
|
} |
} |
|
|
if (%sectionhash || %grouphash) { |
if (%sectionhash || %grouphash) { |
$g_s_header='<fieldset><legend>'.&mt('Group/Section').'</legend><div>'; |
$r->print(&Apache::lonhtmlcommon::row_title(&mt('Group/Section'))); |
$g_s_footer='</div></fieldset>'; |
$r->print($sections.$groups); |
} |
} |
|
|
$r->print('<b>' |
$r->print(&Apache::lonhtmlcommon::row_title(&mt('User'))); |
.$g_s_header |
$r->print(&mt('For User [_1] or Student/Employee ID [_2] at Domain [_3]' |
.$sections |
|
.$groups |
|
.$g_s_footer |
|
.'<fieldset><legend>'.&mt('User').'</legend><div>' |
|
.&mt('For User [_1] or Student/Employee ID [_2] at Domain [_3]' |
|
,'<input type="text" value="'.$uname.'" size="12" name="uname" />' |
,'<input type="text" value="'.$uname.'" size="12" name="uname" />' |
,'<input type="text" value="'.$id.'" size="12" name="id" /> ' |
,'<input type="text" value="'.$id.'" size="12" name="id" /> ' |
,$chooseopt) |
,$chooseopt)); |
.'</div></fieldset>' |
|
.'</b>' |
|
); |
|
} |
} |
|
|
sub displaymenu { |
sub displaymenu { |
my ($r,$allparms,$allparts,$pscat,$psprt,$keyorder)=@_; |
my ($r,$allparms,$allparts,$pscat,$psprt,$keyorder)=@_; |
$r->print('<table border="1"><tr><th>'.&mt('Select Parameters to View').'</th><th>'. |
$r->print('<div class="LC_ContentBoxSpecial">'); |
&mt('Select Parts to View').'</th></tr><tr><td>'); |
$r->print('<h2 class="LC_hcell">Step 2</h2>'); |
|
$r->print('<div class="LC_BoxPadding">' ); |
|
$r->print(&Apache::lonhtmlcommon::start_pick_box()); |
|
|
&parmmenu($r,$allparms,$pscat,$keyorder); |
&parmmenu($r,$allparms,$pscat,$keyorder); |
$r->print('</td><td valign="top" align="center">'); |
$r->print(&Apache::lonhtmlcommon::row_title(&mt('Select Parts to View'))); |
&partmenu($r,$allparts,$psprt); |
&partmenu($r,$allparts,$psprt); |
$r->print('</td></tr></table>'); |
$r->print(&Apache::lonhtmlcommon::end_pick_box()); |
|
$r->print('</div></div>'); |
} |
} |
|
|
sub mapmenu { |
sub mapmenu { |
my ($r,$allmaps,$pschp,$maptitles)=@_; |
my ($r,$allmaps,$pschp,$maptitles)=@_; |
$r->print('<b>'.&mt('Select Enclosing Map or Folder').'</b> '); |
|
|
$r->print(&Apache::lonhtmlcommon::row_title(&mt('Select Enclosing Map or Folder'))); |
$r->print('<select name="pschp">'); |
$r->print('<select name="pschp">'); |
$r->print('<option value="all">'.&mt('All Maps or Folders').'</option>'); |
$r->print('<option value="all">'.&mt('All Maps or Folders').'</option>'); |
foreach (sort {$$allmaps{$a} cmp $$allmaps{$b}} keys %{$allmaps}) { |
foreach (sort {$$allmaps{$a} cmp $$allmaps{$b}} keys %{$allmaps}) { |
Line 1524 sub mapmenu {
|
Line 1523 sub mapmenu {
|
$r->print('>'.$$maptitles{$_}.($$allmaps{$_}!~/^uploaded/?' ['.$$allmaps{$_}.']':'').'</option>'); |
$r->print('>'.$$maptitles{$_}.($$allmaps{$_}!~/^uploaded/?' ['.$$allmaps{$_}.']':'').'</option>'); |
} |
} |
$r->print("</select>"); |
$r->print("</select>"); |
|
|
} |
} |
|
|
sub levelmenu { |
sub levelmenu { |
my ($r,$alllevs,$parmlev)=@_; |
my ($r,$alllevs,$parmlev)=@_; |
$r->print('<b>'.&mt('Select Parameter Level'). |
|
&Apache::loncommon::help_open_topic('Course_Parameter_Levels').'</b> '); |
$r->print(&Apache::lonhtmlcommon::row_title(&mt('Select Parameter Level').&Apache::loncommon::help_open_topic('Course_Parameter_Levels'))); |
$r->print('<select name="parmlev">'); |
$r->print('<select name="parmlev">'); |
foreach (reverse sort keys %{$alllevs}) { |
foreach (reverse sort keys %{$alllevs}) { |
$r->print('<option value="'.$$alllevs{$_}.'"'); |
$r->print('<option value="'.$$alllevs{$_}.'"'); |
Line 1538 sub levelmenu {
|
Line 1538 sub levelmenu {
|
} |
} |
$r->print('>'.&mt($_).'</option>'); |
$r->print('>'.&mt($_).'</option>'); |
} |
} |
$r->print("</select>"); |
$r->print("</select>"); |
} |
} |
|
|
|
|
Line 1862 sub assessparms {
|
Line 1862 sub assessparms {
|
} |
} |
|
|
if (!$pssymb) { |
if (!$pssymb) { |
$r->print('<table border="1"><tr><td>'); |
|
|
$r->print('<div class="LC_ContentBoxSpecial">'); |
|
$r->print('<h2 class="LC_hcell">Step 1</h2>'); |
|
$r->print('<div class="LC_BoxPadding">' ); |
|
$r->print(&Apache::lonhtmlcommon::start_pick_box()); |
|
|
&levelmenu($r,\%alllevs,$parmlev); |
&levelmenu($r,\%alllevs,$parmlev); |
$r->print('</td>'); |
|
if ($parmlev ne 'general') { |
if ($parmlev ne 'general') { |
$r->print('<td>'); |
&mapmenu($r,\%allmaps,$pschp,\%maptitles); |
&mapmenu($r,\%allmaps,$pschp,\%maptitles); |
} |
$r->print('</td>'); |
|
} |
$r->print(&Apache::lonhtmlcommon::end_pick_box()); |
$r->print('</tr></table>'); |
$r->print('</div></div>'); |
|
|
&displaymenu($r,\%allparms,\%allparts,\@pscat,\@psprt,\%keyorder); |
&displaymenu($r,\%allparms,\%allparts,\@pscat,\@psprt,\%keyorder); |
} else { |
} else { |
my ($map,$id,$resource)=&Apache::lonnet::decode_symb($pssymb); |
my ($map,$id,$resource)=&Apache::lonnet::decode_symb($pssymb); |
Line 1880 sub assessparms {
|
Line 1886 sub assessparms {
|
'<br /><label><b>'.&mt('Show all parts').': <input type="checkbox" name="psprt" value="all"'. |
'<br /><label><b>'.&mt('Show all parts').': <input type="checkbox" name="psprt" value="all"'. |
($env{'form.psprt'}?' checked="checked"':'').' /></b></label><br />'); |
($env{'form.psprt'}?' checked="checked"':'').' /></b></label><br />'); |
} |
} |
&usermenu($r,$uname,$id,$udom,$csec,$cgroup,$parmlev,\@usersgroups); |
$r->print('<div class="LC_ContentBoxSpecial">'); |
|
$r->print('<h2 class="LC_hcell">Step 3</h2>'); |
|
$r->print('<div class="LC_BoxPadding">' ); |
|
$r->print(&Apache::lonhtmlcommon::start_pick_box()); |
|
&usermenu($r,$uname,$id,$udom,$csec,$cgroup,$parmlev,\@usersgroups); |
|
|
|
$r->print(&Apache::lonhtmlcommon::end_pick_box()); |
|
$r->print('</div></div>'); |
|
|
$r->print('<p>'.$message.'</p>'); |
$r->print('<p>'.$message.'</p>'); |
|
|
Line 3590 ENDOVER
|
Line 3603 ENDOVER
|
} |
} |
# Menu to select levels, etc |
# Menu to select levels, etc |
|
|
$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('<h2 class="LC_hcell">Step 1</h2>'); |
|
$r->print('<div class="LC_BoxPadding">' ); |
|
$r->print(&Apache::lonhtmlcommon::start_pick_box()); |
&levelmenu($r,\%alllevs,$parmlev); |
&levelmenu($r,\%alllevs,$parmlev); |
if ($parmlev ne 'general') { |
if ($parmlev ne 'general') { |
$r->print('<td class="LC_parm_overview_map_menu">'); |
#$r->print('<td class="LC_parm_overview_map_menu">'); |
&mapmenu($r,\%allmaps,$pschp,\%maptitles); |
&mapmenu($r,\%allmaps,$pschp,\%maptitles); |
$r->print('</td>'); |
#$r->print('</td>'); |
} |
} |
$r->print('</td></tr></table>'); |
$r->print(&Apache::lonhtmlcommon::end_pick_box()); |
|
$r->print('</div></div>'); |
$r->print('<table id="LC_parm_overview_controls"> |
#$r->print('</td></tr></table>'); |
<tr><td class="LC_parm_overview_parm_selectors">'); |
|
|
#$r->print('<table id="LC_parm_overview_controls"> |
|
# <tr><td class="LC_parm_overview_parm_selectors">'); |
|
$r->print('<div class="LC_ContentBoxSpecial">'); |
|
$r->print('<div class="LC_BoxPadding">' ); |
|
$r->print(&Apache::lonhtmlcommon::start_pick_box()); |
&parmmenu($r,\%allparms,\@pscat,\%keyorder); |
&parmmenu($r,\%allparms,\@pscat,\%keyorder); |
$r->print('</td><td class="LC_parm_overview_restrictions"> |
|
<table class="LC_parm_overview_restrictions">'. |
$r->print(&Apache::lonhtmlcommon::row_title(&mt('Select Parts to View'))); |
|
#$r->print('</td><td class="LC_parm_overview_restrictions">'. |
|
$r->print('<table>'. |
'<tr><th>'.&mt('Parts').'</th><th>'.&mt('Section(s)'). |
'<tr><th>'.&mt('Parts').'</th><th>'.&mt('Section(s)'). |
'</th><th>'.&mt('Group(s)').'</th></tr><tr><td>'); |
'</th><th>'.&mt('Group(s)').'</th></tr><tr><td>'); |
&partmenu($r,\%allparts,\@psprt); |
&partmenu($r,\%allparts,\@psprt); |
Line 3613 ENDOVER
|
Line 3637 ENDOVER
|
$r->print('</td><td>'); |
$r->print('</td><td>'); |
&groupmenu($r,\@selected_groups); |
&groupmenu($r,\@selected_groups); |
$r->print('</td></tr></table>'); |
$r->print('</td></tr></table>'); |
$r->print('</td></tr></table>'); |
#$r->print('</td></tr></table>'); |
|
$r->print(&Apache::lonhtmlcommon::end_pick_box()); |
|
$r->print('</div></div>'); |
|
|
|
$r->print('<div class="LC_ContentBoxSpecial">'); |
|
$r->print('<div class="LC_BoxPadding">' ); |
my $sortorder=$env{'form.sortorder'}; |
my $sortorder=$env{'form.sortorder'}; |
unless ($sortorder) { $sortorder='realmstudent'; } |
unless ($sortorder) { $sortorder='realmstudent'; } |
&sortmenu($r,$sortorder); |
&sortmenu($r,$sortorder); |
|
$r->print('</div></div>'); |
|
|
$r->print('<p><input type="submit" name="dis" value="'.&mt('Display').'" /></p>'); |
$r->print('<p><input type="submit" name="dis" value="'.&mt('Display').'" /></p>'); |
|
|
# Build the list data hash from the specified parms |
# Build the list data hash from the specified parms |
|
|
my $listdata; |
my $listdata; |
Line 4575 ENDINPUTDATE
|
Line 4604 ENDINPUTDATE
|
} elsif ($defkeytype{$tempkey} eq 'string_yesno') { |
} elsif ($defkeytype{$tempkey} eq 'string_yesno') { |
my $yeschecked=''; |
my $yeschecked=''; |
my $nochecked=''; |
my $nochecked=''; |
if (&rulescache($tempkey.'_value') eq 'yes') { $yeschecked='checked="checked"'; } |
if (&rulescache($tempkey.'_value') eq 'yes') { $yeschecked=' checked="checked"'; } |
if (&rulescache($tempkey.'_value') eq 'no') { $nochecked='checked="checked"'; } |
if (&rulescache($tempkey.'_value') eq 'no') { $nochecked=' checked="checked"'; } |
|
|
$r->print(<<ENDYESNO); |
$r->print(<<ENDYESNO); |
<label><input type="radio" name="$tempkey\_value" value="yes" $yeschecked /> $lt{'yes'}</label><br /> |
<label><input type="radio" name="$tempkey\_value" value="yes"$yeschecked /> $lt{'yes'}</label><br /> |
<label><input type="radio" name="$tempkey\_value" value="no" $nochecked /> $lt{'no'}</label> |
<label><input type="radio" name="$tempkey\_value" value="no"$nochecked /> $lt{'no'}</label> |
ENDYESNO |
ENDYESNO |
} else { |
} else { |
$r->print('<input type="text" size="20" name="'.$tempkey.'_value" value="'.&rulescache($tempkey.'_value').'" />'); |
$r->print('<input type="text" size="20" name="'.$tempkey.'_value" value="'.&rulescache($tempkey.'_value').'" />'); |