';
}
@@ -1780,7 +2032,7 @@ show a snapshot of what student was look
sub get_student_view {
my ($symb,$username,$domain,$courseid,$target) = @_;
- my ($map,$id,$feedurl) = split(/___/,$symb);
+ my ($map,$id,$feedurl) = &Apache::lonnet::decode_symb($symb);
my (%old,%moreenv);
my @elements=('symb','courseid','domain','username');
foreach my $element (@elements) {
@@ -1816,7 +2068,7 @@ show a snapshot of how student was answe
sub get_student_answers {
my ($symb,$username,$domain,$courseid,%form) = @_;
- my ($map,$id,$feedurl) = split(/___/,$symb);
+ my ($map,$id,$feedurl) = &Apache::lonnet::decode_symb($symb);
my (%old,%moreenv);
my @elements=('symb','courseid','domain','username');
foreach my $element (@elements) {
@@ -1835,6 +2087,30 @@ sub get_student_answers {
=pod
+=item * &submlink()
+
+Inputs: $text $uname $udom $symb
+
+Returns: A link to grades.pm such as to see the SUBM view of a student
+
+=cut
+
+###############################################
+sub submlink {
+ my ($text,$uname,$udom,$symb)=@_;
+ if (!($uname && $udom)) {
+ (my $cursymb, my $courseid,$udom,$uname)=
+ &Apache::lonxml::whichuser($symb);
+ if (!$symb) { $symb=$cursymb; }
+ }
+ if (!$symb) { $symb=&symbread(); }
+ return ''.$text.'';
+}
+##############################################
+
+=pod
+
=back
=cut
@@ -1862,21 +2138,6 @@ sub maketime {
$th{'day'},$th{'month'}-1,$th{'year'}-1900,0,0,$th{'dlsav'}));
}
-
-#########################################
-#
-# Retro-fixing of un-backward-compatible time format
-
-sub unsqltime {
- my $timestamp=shift;
- if ($timestamp=~/^(\d+)\-(\d+)\-(\d+)\s+(\d+)\:(\d+)\:(\d+)$/) {
- $timestamp=&maketime(
- 'year'=>$1,'month'=>$2,'day'=>$3,
- 'hours'=>$4,'minutes'=>$5,'seconds'=>$6);
- }
- return $timestamp;
-}
-
#########################################
sub findallcourses {
@@ -1948,7 +2209,7 @@ sub domainlogo {
my $lonhttpdPort=$Apache::lonnet::perlvar{'lonhttpdPort'};
if (!defined($lonhttpdPort)) { $lonhttpdPort='8080'; }
return '';
+ '/adm/lonDomLogos/'.$domain.'.gif" alt="'.$domain.'" />';
} elsif(exists($Apache::lonnet::domaindescription{$domain})) {
return $Apache::lonnet::domaindescription{$domain};
} else {
@@ -2035,6 +2296,7 @@ other decorations will be returned.
sub bodytag {
my ($title,$function,$addentries,$bodyonly,$domain,$forcereg)=@_;
+ $title=&mt($title);
unless ($function) {
$function='student';
if ($ENV{'request.role'}=~/^(cc|in|ta|ep)/) {
@@ -2058,8 +2320,9 @@ sub bodytag {
my $sidebg=&designparm($function.'.sidebg',$domain);
# Accessibility font enhance
unless ($addentries) { $addentries=''; }
+ my $addstyle='';
if ($ENV{'browser.fontenhance'} eq 'on') {
- $addentries.=' style="font-size: x-large"';
+ $addstyle=' font-size: x-large;';
}
# role and realm
my ($role,$realm)
@@ -2077,11 +2340,15 @@ sub bodytag {
if (!defined($lonhttpdPort)) { $lonhttpdPort='8080'; }
# construct main body tag
my $bodytag = <
+h1, h2, h3, th { font-family: Arial, Helvetica, sans-serif }
+a:focus { color: red; background: yellow }
+
+style="margin-top: 0px;$addstyle" $addentries>
END
my $upperleft='';
+ $lonhttpdPort.$img.'" alt="'.$function.'" />';
if ($bodyonly) {
return $bodytag;
} elsif ($ENV{'browser.interface'} eq 'textual') {
@@ -2093,7 +2360,7 @@ END
# No Remote
return $bodytag.&Apache::lonmenu::menubuttons($forcereg,'web',
$forcereg).
- '
');
foreach my $hash (\%sone,\%stwo,\%sthree) {
$r->print('
');
@@ -2467,32 +2788,42 @@ sub csv_print_samples {
$r->print('
'."\n");
}
+######################################################
+######################################################
+
=pod
=item * csv_print_select_table($r,$records,$d)
Prints a table to create associations between values and table columns.
+
$r is an Apache Request ref,
$records is an arrayref from &Apache::loncommon::upfile_record_sep,
-$d is an array of 2 element arrays (internal name, displayed name)
+$d is an array of 2 element arrays (internal name, displayed name,defaultcol)
=cut
+######################################################
+######################################################
sub csv_print_select_table {
my ($r,$records,$d) = @_;
my $i=0;my %sone;
%sone=&record_sep($$records[0]);
- $r->print('Associate columns with student attributes.'."\n".
- '
Attribute
Column
'."\n");
+ $r->print(&mt('Associate columns with student attributes.')."\n".
+ '
'.
+ '
'.&mt('Attribute').'
'.
+ '
'.&mt('Column').'
'."\n");
foreach (@$d) {
- my ($value,$display)=@{ $_ };
+ my ($value,$display,$defaultcol)=@{ $_ };
$r->print('
'.$display.'
');
$r->print('
'."\n");
$i++;
@@ -2501,6 +2832,9 @@ sub csv_print_select_table {
return $i;
}
+######################################################
+######################################################
+
=pod
=item * csv_samples_select_table($r,$records,$d)
@@ -2513,22 +2847,27 @@ $d is an array of 2 element arrays (inte
=cut
+######################################################
+######################################################
sub csv_samples_select_table {
my ($r,$records,$d) = @_;
my %sone; my %stwo; my %sthree;
my $i=0;
-
- $r->print('
Field
Samples
');
+ #
+ $r->print('
'.
+ &mt('Field').'
'.&mt('Samples').'
');
%sone=&record_sep($$records[0]);
if (defined($$records[1])) {%stwo=&record_sep($$records[1]);}
if (defined($$records[2])) {%sthree=&record_sep($$records[2]);}
-
+ #
foreach (sort keys %sone) {
- $r->print('