Diff for /loncom/interface/loncommon.pm between versions 1.114 and 1.117

version 1.114, 2003/09/09 18:46:28 version 1.117, 2003/09/16 19:23:47
Line 68  use POSIX qw(strftime mktime); Line 68  use POSIX qw(strftime mktime);
 use Apache::Constants qw(:common :http :methods);  use Apache::Constants qw(:common :http :methods);
 use Apache::lonmsg();  use Apache::lonmsg();
 use Apache::lonmenu();  use Apache::lonmenu();
   use Apache::lonlocal;
   
 my $readit;  my $readit;
   
 =pod   =pod 
Line 1631  sub display_languages { Line 1633  sub display_languages {
     return %languages;      return %languages;
 }  }
   
   sub preferred_languages {
       my @languages=();
       if ($ENV{'environment.languages'}) {
    @languages=split(/\s*(\,|\;|\:)\s*/,$ENV{'environment.languages'});
       }
       if ($ENV{'course.'.$ENV{'request.course.id'}.'.languages'}) {
    @languages=(@languages,split(/\s*(\,|\;|\:)\s*/,
            $ENV{'course.'.$ENV{'request.course.id'}.'.languages'}));
       }
       return (@languages,'en-US');
   }
   
 ###############################################################  ###############################################################
 ##               Student Answer Attempts                     ##  ##               Student Answer Attempts                     ##
 ###############################################################  ###############################################################
Line 1835  sub get_student_answers { Line 1849  sub get_student_answers {
   
 =pod  =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 '<a href="/adm/grades?symb='.$symb.'&student='.$uname.
    '&userdom='.$udom.'&command=submission">'.$text.'</a>';
   }
   ##############################################
   
   =pod
   
 =back  =back
   
 =cut  =cut
Line 2035  other decorations will be returned. Line 2073  other decorations will be returned.
   
 sub bodytag {  sub bodytag {
     my ($title,$function,$addentries,$bodyonly,$domain,$forcereg)=@_;      my ($title,$function,$addentries,$bodyonly,$domain,$forcereg)=@_;
       $title=&mt($title);
     unless ($function) {      unless ($function) {
  $function='student';   $function='student';
         if ($ENV{'request.role'}=~/^(cc|in|ta|ep)/) {          if ($ENV{'request.role'}=~/^(cc|in|ta|ep)/) {
Line 2542  sub csv_samples_select_table { Line 2581  sub csv_samples_select_table {
 }  }
   
 =pod  =pod
   
   =item clean_excel_name($name)
   
   Returns a replacement for $name which does not contain any illegal characters.
   
   =cut
   
   sub clean_excel_name {
       my ($name) = @_;
       $name =~ s/[:\*\?\/\\]//g;
       if (length($name) > 31) {
           $name = substr($name,0,31);
       }
       return $name;
   }
   
   =pod
   
 =item * check_if_partid_hidden($id,$symb,$udom,$uname)  =item * check_if_partid_hidden($id,$symb,$udom,$uname)
   

Removed from v.1.114  
changed lines
  Added in v.1.117


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>