'.&mt('Sort list by').' ');
- $r->print('');
- $r->print(''.&mt('Enclosing Map or Folder').' ');
- foreach (sort keys %{$allkeys}) {
+ $r->print(' ');
+}
+
+sub usermenu {
+ my ($r,$uname,$id,$udom,$csec)=@_;
+ my $chooseopt=&Apache::loncommon::select_dom_form($udom,'udom').' '.
+ &Apache::loncommon::selectstudent_link('parmform','uname','udom');
+ my $selscript=&Apache::loncommon::studentbrowser_javascript();
+ my %lt=&Apache::lonlocal::texthash(
+ 'sg' => "Section/Group",
+ 'fu' => "For User",
+ 'oi' => "or ID",
+ 'ad' => "at Domain"
+ );
+ my %sectionhash=();
+ my $sections='';
+ if (&Apache::loncommon::get_sections(
+ $env{'course.'.$env{'request.course.id'}.'.domain'},
+ $env{'course.'.$env{'request.course.id'}.'.num'},
+ \%sectionhash)) {
+ $sections=$lt{'sg'}.': ';
+ foreach ('',sort keys %sectionhash) {
+ $sections.=''.$_.' ';
+ }
+ $sections.=' ';
+ }
+ $r->print(<
+$sections
+
+$lt{'fu'}
+
+$lt{'oi'}
+
+$lt{'ad'}
+$chooseopt
+
+ENDMENU
+}
+
+sub displaymenu {
+ my ($r,$allparms,$allparts,$pscat,$psprt,$keyorder)=@_;
+ $r->print(''.&mt('Select Parameters to View').' '.
+ &mt('Select Parts to View').' ');
+ &parmmenu($r,$allparms,$pscat,$keyorder);
+ $r->print(' ');
+ &partmenu($r,$allparts,$psprt);
+ $r->print('
');
+}
+
+sub mapmenu {
+ my ($r,$allmaps,$pschp,$maptitles)=@_;
+ $r->print(''.&mt('Select Enclosing Map or Folder').' ');
+ $r->print('');
+ $r->print(''.&mt('All Maps or Folders').' ');
+ foreach (sort {$$allmaps{$a} cmp $$allmaps{$b}} keys %{$allmaps}) {
$r->print('print(' selected'); }
- $r->print('>'.$$allkeys{$_}.' ');
+ if (($pschp eq $_)) { $r->print(' selected'); }
+ $r->print('>'.$$maptitles{$_}.($$allmaps{$_}!~/^uploaded/?' ['.$$allmaps{$_}.']':'').'');
+ }
+ $r->print(" ");
+}
+
+sub levelmenu {
+ my ($r,$alllevs,$parmlev)=@_;
+ $r->print(''.&mt('Select Parameter Level').
+ &Apache::loncommon::help_open_topic('Course_Parameter_Levels').' ');
+ $r->print('');
+ foreach (reverse sort keys %{$alllevs}) {
+ $r->print('print(' selected');
+ }
+ $r->print('>'.$_.' ');
+ }
+ $r->print(" ");
+}
+
+
+sub sectionmenu {
+ my ($r,$selectedsections)=@_;
+ my %sectionhash=();
+
+ if (&Apache::loncommon::get_sections(
+ $env{'course.'.$env{'request.course.id'}.'.domain'},
+ $env{'course.'.$env{'request.course.id'}.'.num'},
+ \%sectionhash)) {
+ $r->print('');
+ foreach my $s ('all',sort keys %sectionhash) {
+ $r->print(' print(' selected');
+ last;
+ }
+ }
+ $r->print('>'.$s." \n");
+ }
+ $r->print(" \n");
}
- $r->print(' ');
-
- $r->print('