--- loncom/interface/loncommon.pm 2007/10/09 17:33:57 1.591
+++ loncom/interface/loncommon.pm 2007/11/02 18:47:08 1.607
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# a pile of common routines
#
-# $Id: loncommon.pm,v 1.591 2007/10/09 17:33:57 raeburn Exp $
+# $Id: loncommon.pm,v 1.607 2007/11/02 18:47:08 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -367,7 +367,7 @@ sub selectstudent_link {
return '';
}
return "".&mt('Select User')." ";
+ '","'.$udomele.'");'."'>".&mt('Select User')."";
}
if ($env{'request.role'}=~/^(au|dc|su)/) {
return "
$hostid $servers{$hostid}
@@ -2049,7 +2049,7 @@ sub authform_internal{
$authtype = ' ';
}
- $autharg = ' ';
$result = &mt
('[_1] Internally authenticated (with initial password [_2])',
@@ -2151,7 +2151,7 @@ sub authform_filesystem{
('[_1] Filesystem Authenticated (with initial password [_2])',
' ',
- ' ');
return $result;
}
@@ -2948,14 +2948,14 @@ sub get_previous_attempt {
$lasthash{$key}=$returnhash{$version.':'.$key};
}
}
- $prevattempts='
';
- $prevattempts.='History ';
+ $prevattempts=&start_data_table().&start_data_table_header_row();
+ $prevattempts.=''.&mt('History').' ';
foreach my $key (sort(keys(%lasthash))) {
my ($ign,@parts) = split(/\./,$key);
if ($#parts > 0) {
my $data=$parts[-1];
pop(@parts);
- $prevattempts.='Part '.join('.',@parts).' '.$data.' ';
+ $prevattempts.=''.&mt('Part ').join('.',@parts).' '.$data.' ';
} else {
if ($#parts == 0) {
$prevattempts.=''.$parts[0].' ';
@@ -2964,28 +2964,37 @@ sub get_previous_attempt {
}
}
}
+ $prevattempts.=&end_data_table_header_row();
if ($getattempt eq '') {
for ($version=1;$version<=$returnhash{'version'};$version++) {
- $prevattempts.='Transaction '.$version.' ';
+ $prevattempts.=&start_data_table_row().
+ ''.&mt('Transaction [_1]',$version).' ';
foreach my $key (sort(keys(%lasthash))) {
my $value = &format_previous_attempt_value($key,
$returnhash{$version.':'.$key});
$prevattempts.=''.$value.' ';
}
+ $prevattempts.=&end_data_table_row();
}
}
- $prevattempts.='Current ';
+ $prevattempts.=&start_data_table_row().''.&mt('Current').' ';
foreach my $key (sort(keys(%lasthash))) {
my $value = &format_previous_attempt_value($key,$lasthash{$key});
if ($key =~/$regexp$/ && (defined &$gradesub)) {$value = &$gradesub($value)}
$prevattempts.=''.$value.' ';
}
- $prevattempts.='
';
+ $prevattempts.= &end_data_table_row().&end_data_table();
} else {
- $prevattempts='Nothing submitted - no attempts.';
+ $prevattempts=
+ &start_data_table().&start_data_table_row().
+ ''.&mt('Nothing submitted - no attempts.').' '.
+ &end_data_table_row().&end_data_table();
}
} else {
- $prevattempts='No data.';
+ $prevattempts=
+ &start_data_table().&start_data_table_row().
+ ''.&mt('No data.').' '.
+ &end_data_table_row().&end_data_table();
}
}
@@ -3160,9 +3169,9 @@ sub pprmlink {
if (!$symb) { $symb=&Apache::lonnet::symbread(); }
$symb=&escape($symb);
if ($target) { $target="target=\"$target\""; }
- return ''.$text.' ';
+ return ''.$text.' ';
}
##############################################
@@ -4090,7 +4099,7 @@ sub standard_css {
my $vlink = &designparm($function.'.vlink', $domain);
my $link = &designparm($function.'.link', $domain);
- my $sans = 'Arial,Helvetica,sans-serif';
+ my $sans = 'Verdana,Arial,Helvetica,sans-serif';
my $mono = 'monospace';
my $data_table_head = $tabbg;
my $data_table_light = '#EEEEEE';
@@ -4129,7 +4138,7 @@ table.thinborder tr td {
form, .inline { display: inline; }
.center { text-align: center; }
-.LC_filename {font-family: $mono;}
+.LC_filename {font-family: $mono; white-space:pre;}
.LC_error {
color: red;
font-size: larger;
@@ -4170,7 +4179,7 @@ table.LC_pastsubmission {
margin: 2px;
}
-table#LC_top_nav, table#LC_menubuttons {
+table#LC_top_nav, table#LC_menubuttons,table#LC_nav_location {
width: 100%;
background: $pgbg;
border: 2px;
@@ -4178,7 +4187,7 @@ table#LC_top_nav, table#LC_menubuttons {
padding: 0px;
}
-table#LC_title_bar, table.LC_breadcrumbs, table#LC_nav_location,
+table#LC_title_bar, table.LC_breadcrumbs,
table#LC_title_bar.LC_with_remote {
width: 100%;
border-color: $pgbg;
@@ -4803,12 +4812,19 @@ table.LC_descriptive_input td.LC_descrip
text-align: right;
font-weight: bold;
}
-table.LC_feedback_link {
- background: $feedback_link_bg;
+div.LC_feedback_link {
+ background: white;
+ width: 100%;
}
span.LC_feedback_link {
- background: $feedback_link_bg;
- font-size: larger;
+ background: $feedback_link_bg;
+ font-size: larger;
+}
+span.LC_message_link {
+ background: $feedback_link_bg;
+ font-size: larger;
+ position: absolute;
+ right: 1em;
}
table.LC_prior_tries {
@@ -4979,21 +4995,135 @@ table.LC_double_column tr td.LC_right_co
vertical-align: top;
}
+span.LC_role_level {
+ font-weight: bold;
+}
+
div.LC_left_float {
float: left;
padding-right: 5%;
- padding:bottom: 4px;
+ padding-bottom: 4px;
}
div.LC_clear_float_header {
- padding:bottom: 2px;
+ padding-bottom: 2px;
}
div.LC_clear_float_footer {
- padding:top: 10px;
+ padding-top: 10px;
clear: both;
}
+
+div.LC_grade_select_mode {
+ float: left;
+ font-family: $sans;
+}
+div.LC_grade_select_mode div div {
+ margin: 5px;
+}
+div.LC_grade_select_mode_selector {
+ margin: 5px;
+ float: left;
+}
+div.LC_grade_select_mode_selector_header {
+ font: bold medium $sans;
+}
+div.LC_grade_select_mode_type {
+ clear: left;
+}
+
+div.LC_grade_show_user {
+ margin-top: 20px;
+ border: 1px solid black;
+}
+div.LC_grade_user_name {
+ background: #DDDDEE;
+ border-bottom: 1px solid black;
+ font: bold large $sans;
+}
+div.LC_grade_show_user_odd_row div.LC_grade_user_name {
+ background: #DDEEDD;
+}
+
+div.LC_grade_show_problem,
+div.LC_grade_submissions,
+div.LC_grade_message_center,
+div.LC_grade_info_links,
+div.LC_grade_assign {
+ margin: 5px;
+ width: 99%;
+ background: #FFFFFF;
+}
+div.LC_grade_show_problem_header,
+div.LC_grade_submissions_header,
+div.LC_grade_message_center_header,
+div.LC_grade_assign_header {
+ font: bold large $sans;
+}
+div.LC_grade_show_problem_problem,
+div.LC_grade_submissions_body,
+div.LC_grade_message_center_body,
+div.LC_grade_assign_body {
+ border: 1px solid black;
+ width: 99%;
+ background: #FFFFFF;
+}
+span.LC_grade_check_note {
+ font: normal medium $sans;
+ display: inline;
+ position: absolute;
+ right: 1em;
+}
+
+
+div.LC_edit_problem_header {
+ font: normal medium $sans;
+ margin: 2px;
+}
+div.LC_edit_problem_header,
+div.LC_edit_problem_header div,
+div.LC_edit_problem_editxml_header,
+div.LC_edit_problem_editxml_header div {
+ margin-top: 5px;
+}
+div.LC_edit_problem_header_edit_row {
+ background: $tabbg;
+ padding: 3px;
+ margin-bottom: 5px;
+}
+div.LC_edit_problem_header_title {
+ font: larger bold $sans;
+ background: $tabbg;
+ padding: 3px;
+}
+table.LC_edit_problem_header_title {
+ font: larger bold $sans;
+ width: 100%;
+ border-color: $pgbg;
+ border-style: solid;
+ border-width: $border;
+
+ background: $tabbg;
+ border-collapse: collapse;
+ padding: 0px
+}
+
+div.LC_edit_problem_discards {
+ float: left;
+ padding-bottom: 5px;
+}
+div.LC_edit_problem_saves {
+ float: right;
+ padding-bottom: 5px;
+}
+hr.LC_edit_problem_divide {
+ clear: both;
+ color: $tabbg;
+ background-color: $tabbg;
+ height: 3px;
+ border: 0px;
+}
END
}
@@ -5110,7 +5240,9 @@ Inputs: none
sub xml_begin {
my $output='';
- &Apache::lonhtmlcommon::init_htmlareafields();
+ if ($env{'internal.start_page'}==1) {
+ &Apache::lonhtmlcommon::init_htmlareafields();
+ }
if ($env{'browser.mathml'}) {
$output=''
@@ -6672,20 +6804,21 @@ sub csv_print_samples {
my ($r,$records) = @_;
my $samples = &get_samples($records,3);
- $r->print(&mt('Samples').'');
+ $r->print(&mt('Samples').' '.&start_data_table().
+ &start_data_table_header_row());
foreach my $sample (sort({$a <=> $b} keys(%{ $samples->[0] }))) {
$r->print(''.&mt('Column [_1]',($sample+1)).' '); }
- $r->print(' ');
+ $r->print(&end_data_table_header_row());
foreach my $hash (@$samples) {
- $r->print('');
+ $r->print(&start_data_table_row());
foreach my $sample (sort({$a <=> $b} keys(%{ $samples->[0] }))) {
$r->print('');
if (defined($$hash{$sample})) { $r->print($$hash{$sample}); }
$r->print(' ');
}
- $r->print(' ');
+ $r->print(&end_data_table_row());
}
- $r->print('
'."\n");
+ $r->print(&end_data_table().' '."\n");
}
######################################################
@@ -6710,12 +6843,13 @@ sub csv_print_select_table {
my $i=0;
my $samples = &get_samples($records,1);
$r->print(&mt('Associate columns with student attributes.')."\n".
- ''.
+ &start_data_table().&start_data_table_header_row().
''.&mt('Attribute').' '.
- ''.&mt('Column').' '."\n");
+ ''.&mt('Column').' '.
+ &end_data_table_header_row()."\n");
foreach my $array_ref (@$d) {
my ($value,$display,$defaultcol)=@{ $array_ref };
- $r->print(''.$display.' ');
+ $r->print(&start_data_table_row().''.$display.' ');
$r->print('');
@@ -6725,9 +6859,10 @@ sub csv_print_select_table {
($sample eq $defaultcol ? ' selected="selected" ' : '').
'>Column '.($sample+1).'');
}
- $r->print(' '."\n");
+ $r->print(''.&end_data_table_row()."\n");
$i++;
}
+ $r->print(&end_data_table());
$i--;
return $i;
}
@@ -6754,11 +6889,13 @@ sub csv_samples_select_table {
my $i=0;
#
my $samples = &get_samples($records,3);
- $r->print(''.
- &mt('Field').' '.&mt('Samples').' ');
+ $r->print(&start_data_table().
+ &start_data_table_header_row().''.
+ &mt('Field').' '.&mt('Samples').' '.
+ &end_data_table_header_row());
foreach my $key (sort(keys(%{ $samples->[0] }))) {
- $r->print('print(&start_data_table_row().'');
foreach my $option (@$d) {
my ($value,$display,$defaultcol)=@{ $option };
@@ -6772,9 +6909,10 @@ sub csv_samples_select_table {
$r->print($samples->[$line]{$key}." \n");
}
}
- $r->print(' ');
+ $r->print(''.&end_data_table_row());
$i++;
}
+ $r->print(&end_data_table());
$i--;
return($i);
}