--- loncom/interface/lonparmset.pm 2008/12/03 21:20:57 1.418 +++ loncom/interface/lonparmset.pm 2009/01/20 18:37:30 1.424 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Handler to set parameters for assessments # -# $Id: lonparmset.pm,v 1.418 2008/12/03 21:20:57 schafran Exp $ +# $Id: lonparmset.pm,v 1.424 2009/01/20 18:37:30 bisitz Exp $ # # Copyright Michigan State University Board of Trustees # @@ -935,10 +935,10 @@ sub startpage { $start_page $breadcrumbs
- - - - + + + + ENDHEAD } @@ -970,7 +970,7 @@ sub print_row { my $parm=$$display{$which}; if ($parmlev eq 'full') { - $r->print('' + $r->print('' .$$part{$which}.''); } else { $parm=~s|\[.*\]\s||g; @@ -979,7 +979,7 @@ sub print_row { if ($automatic) { $parm.='
'.&mt('Automatically sets').' '.join(', ',split(/\:/,$automatic)).'
'; } - $r->print(''.$parm.''); + $r->print(''.$parm.''); my $thismarker=$which; $thismarker=~s/^parameter\_//; @@ -1056,14 +1056,14 @@ sub print_row { } } # end of $parmlev if/else - $r->print(''.$effective_parm.''); + $r->print(''.$effective_parm.''); if ($parmlev eq 'full') { my $sessionval=&Apache::lonnet::EXT('resource.'.$$part{$which}. '.'.$$name{$which},$$symbp{$rid}); my $sessionvaltype=$typeoutpar[$result]; if (!defined($sessionvaltype)) { $sessionvaltype=$$defaulttype{$which}; } - $r->print(''. + $r->print(''. &valout($sessionval,$sessionvaltype).' '. ''); } @@ -1073,8 +1073,8 @@ sub print_row { sub print_td { my ($r,$which,$defbg,$result,$outpar,$mprefix,$value,$typeoutpar,$display)=@_; - $r->print(''); + $r->print(''); if ($which<11 || $which > 12) { $r->print(&plink($$typeoutpar[$which], $$display{$value},$$outpar[$which], @@ -1100,11 +1100,11 @@ sub print_usergroups { my $grp_parm; if (($coursereply) && ($cgroup ne $resultgroup)) { if ($result > 3) { - $bgcolor = '"#AAFFAA"'; + $bgcolor = '#AAFFAA'; $grp_parm = &valout($coursereply,$resulttype); } $grp_parm = &valout($coursereply,$resulttype); - $output = ''; + $output = ''; if ($resultgroup && $resultlevel) { $output .= ''.$resultgroup.' ('.$resultlevel.'): '.$grp_parm; } else { @@ -1112,7 +1112,7 @@ sub print_usergroups { } $output .= ''; } else { - $output .= ' '; + $output .= ' '; } return ($coursereply,$output,$grp_parm,$resultgroup); } @@ -1307,15 +1307,15 @@ sub parmmenu { ENDSCRIPT $r->print(); - $r->print("\n"); + $r->print("\n".'
'); my $cnt=0; foreach $tempkey (&keysindisplayorder($allparms,$keyorder)) { - $r->print("\n'); $cnt++; @@ -1325,7 +1325,7 @@ ENDSCRIPT } } $r->print('' - .'' + .'' .'
' .'
'.&mt('Parameter Selection').'' .'' @@ -1368,7 +1368,7 @@ ENDSCRIPT sub partmenu { my ($r,$allparts,$psprt)=@_; - $r->print(''); $r->print(''); @@ -1532,7 +1532,7 @@ sub sectionmenu { my %sectionhash = &Apache::loncommon::get_sections(); return if (!%sectionhash); - $r->print(''); foreach my $s ('all',sort keys %sectionhash) { $r->print('
'); &displaymenu($r,\%allparms,\%allparts,\@pscat,\@psprt,\%keyorder); } else { my ($map,$id,$resource)=&Apache::lonnet::decode_symb($pssymb); @@ -1858,9 +1859,9 @@ sub assessparms { $coursespan += 3; } - $r->print('

'); - $r->print(''); - $r->print(''); + $r->print('

'.&mt('Any User').'
'); + $r->print(''); + $r->print(''); if ($uname) { if (@usersgroups > 1) { $userspan ++; @@ -1886,18 +1887,18 @@ sub assessparms { 'fr' => 'for Resource' ); $r->print(<$lt{'pie'} - - - + + + + ENDTABLETWO if ($csec) { - $r->print(""); } if ($cgroup) { - $r->print(""); } $r->print(<0) { my $firstrow=1; my $title=&Apache::lonnet::gettitle($symbp{$rid}); - $r->print(''); - $r->print(''); - $r->print(''); @@ -2022,9 +2023,9 @@ ENDTABLEHEADFOUR } # end of full #--------------------------------------------------- Entry for parm level map if ($parmlev eq 'map') { - my $defbgone = '"E0E099"'; - my $defbgtwo = '"FFFF99"'; - my $defbgthree = '"FFBB99"'; + my $defbgone = '#E0E099'; + my $defbgtwo = '#FFFF99'; + my $defbgthree = '#FFBB99'; my %maplist; @@ -2112,27 +2113,32 @@ ENDTABLEHEADFOUR ,''.$coursename.'' ) ."
\n" - ); + ); #---------------------------------------------------------------- print table - $r->print('

'.&mt('Any User').'$lt{'csv'}
($csuname $lt{'at'} $csudom)
$lt{'ic'}$lt{'rl'}$lt{'ic'}$lt{'pie'}$lt{'csv'}
($csuname $lt{'at'} $csudom)
$lt{'ic'}$lt{'rl'}$lt{'ic'}". + $r->print(''. &mt("in Section")." $csec". + $r->print(''. &mt("in Group")." $cgroup
'. + '>'. join(' / ',split(/\//,$uri)). '

'. "print(' ('.$thistitle.')'); } $r->print('

'.$typep{$rid}. ''.$maptitles{$mapp{$rid}}.'
'); - $r->print(''); - $r->print(''); - $r->print(''); + $r->print('

'.&Apache::loncommon::start_data_table() + .&Apache::loncommon::start_data_table_header_row() + .'

' + .'' + .'' + .&Apache::loncommon::end_data_table_header_row() + ); foreach (&keysinorder(\%name,\%keyorder)) { - $r->print(''); + $r->print(&Apache::loncommon::start_data_table_row()); &print_row($r,$_,\%part,\%name,\%symbp,$mapid,\%default, \%type,\%display,$defbgone,$defbgtwo,$defbgthree, $parmlev,$uname,$udom,$csec,$cgroup); } - $r->print("
'.&mt('Parameter Name').''.&mt('Default Value').''.&mt('Parameter in Effect').'
'.&mt('Parameter Name').''.&mt('Default Value').''.&mt('Parameter in Effect').'
"); + $r->print(&Apache::loncommon::end_data_table().'

' + .'' + ); } # end each map } # end of $parmlev eq map #--------------------------------- Entry for parm level general (Course level) if ($parmlev eq 'general') { - my $defbgone = '"E0E099"'; - my $defbgtwo = '"FFFF99"'; - my $defbgthree = '"FFBB99"'; + my $defbgone = '#E0E099'; + my $defbgtwo = '#FFFF99'; + my $defbgthree = '#FFBB99'; #-------------------------------------------- for each map, gather information my $mapid="0.0"; @@ -2176,7 +2182,8 @@ ENDTABLEHEADFOUR #---------------------------------------------------- print header information my $setdef=&mt("Set Defaults for All Resources in Course"); $r->print(<

$setdef +
+

$setdef $coursename
ENDMAPONE if ($uname) { @@ -2190,18 +2197,24 @@ ENDMAPONE if ($cgroup) {$r->print(&mt("Group")." $cgroup\n")}; $r->print("

\n"); #---------------------------------------------------------------- print table - $r->print('

'); - $r->print(''); - $r->print(''); - $r->print(''); + $r->print('

'.&Apache::loncommon::start_data_table() + .&Apache::loncommon::start_data_table_header_row() + .'

' + .'' + .'' + .&Apache::loncommon::end_data_table_header_row() + ); foreach (&keysinorder(\%name,\%keyorder)) { - $r->print(''); + $r->print(&Apache::loncommon::start_data_table_row()); &print_row($r,$_,\%part,\%name,\%symbp,$mapid,\%default, \%type,\%display,$defbgone,$defbgtwo,$defbgthree, $parmlev,$uname,$udom,$csec,$cgroup); } - $r->print("
'.&mt('Parameter Name').''.&mt('Default Value').''.&mt('Parameter in Effect').'
'.&mt('Parameter Name').''.&mt('Default Value').''.&mt('Parameter in Effect').'

"); + $r->print(&Apache::loncommon::end_data_table() + .'

' + .'' + ); } # end of $parmlev eq general } $r->print(''.&Apache::loncommon::end_page()); @@ -2450,7 +2463,7 @@ sub crsenv { 'student_classlist_view' => ''.&mt('Allow students to view classlist.').'
' .'('.&mt('[_1]: students can view all sections. [_2]: students can only view their own section. blank or [_3] prevents student view.','"all"','"section"','"disabled"').')', 'student_classlist_portfiles' => ''.&mt('Include link to accessible portfolio files').'
' - .'('.&mt('[_1] for link to each a listing of each student\'s files.','"yes"').')', + .'('.&mt("[_1] for link to each a listing of each student's files.",'"yes"').')', 'student_classlist_opt_in' => ''.&mt("Student's agreement needed for listing in student-viewable roster").'
' .'('.&mt('[_1] to require students to opt-in to listing in the roster (on the roster page).','"yes"').')', 'plc.roles.denied'=> ''.&mt('Disallow live chatroom use for Roles').'
' @@ -2537,7 +2550,7 @@ sub crsenv { 'texengine' => ''.&mt('Force all students in the course to use a specific math rendering engine.').'
' - .'('.&mt('[_1], [_2] (Convert to Images), [_3] (TeX to HTML), or blank for student\'s preference','"jsMath"','"mimetex"','"tth"').')', + .'('.&mt("[_1], [_2] (Convert to Images), [_3] (TeX to HTML), or blank for student's preference",'"jsMath"','"mimetex"','"tth"').')', 'timezone' => ''.&mt('Timezone in which the course takes place').'', @@ -2671,9 +2684,9 @@ sub crsenv { '.checked=true;"'; $output.=&Apache::loncommon::start_data_table_row(). ''.&mt('Create New Environment Variable').'
'. - ''. - ''. ''. &Apache::loncommon::end_data_table_row()."\n"; @@ -3093,7 +3106,7 @@ sub listdata { } if ($part ne $oldpart) { $r->print(&tableend(). - "\n".&mt('Part').": $part"); + "\n".''.&mt('Part').": $part"); $oldpart=$part; } # @@ -3128,7 +3141,7 @@ sub listdata { $r->print(&default_selector($thiskey,$$resourcedata{$thiskey})); } $r->print(''); + $thistype.'" />'); $r->print(''.&Apache::loncommon::end_data_table_row()); } } @@ -3872,20 +3885,20 @@ sub output_row { my $multiple_checked; my $single_checked; if ($options =~ m/onlyone/) { - $multiple_checked = ""; - $single_checked = " CHECKED "; + $multiple_checked = ''; + $single_checked = ' checked="checked"'; } else { - $multiple_checked = " CHECKED "; - $single_checked = ""; + $multiple_checked = ' checked="checked"'; + $single_checked = ''; } $output .= &Apache::loncommon::continue_data_table_row(); $output .= ''.(' ' x 10).''; $output .= &Apache::loncommon::end_data_table_row(); $output .= &Apache::loncommon::continue_data_table_row(); $output .= ''.(' ' x 10).''; $output .= &Apache::loncommon::end_data_table_row(); } @@ -4313,8 +4326,8 @@ ENDYESNO $r->print(''.&Apache::loncommon::end_data_table_row()); } $r->print(&Apache::loncommon::end_data_table(). - "\n\n". + "\n".''."\n". &Apache::loncommon::end_page()); return; }