Diff for /loncom/interface/loncommon.pm between versions 1.755 and 1.770

version 1.755, 2009/02/25 13:25:52 version 1.770, 2009/03/17 21:05:06
Line 924  sub help_open_topic { Line 924  sub help_open_topic {
   
     # Add the text      # Add the text
     if ($text ne "") {      if ($text ne "") {
  $template.="<a style=\"background-color:#3333AA;\" target=\"_top\" href=\"$link\"><span style=\"color:#FFFFFF;\">$text</span></a>";   $template.='<span class="LC_help_open_topic">'
                     .'<a target="_top" href="'.$link.'">'
                     .$text.'</a>';
     }      }
   
     # Add the graphic      # (Always) Add the graphic
     my $title = &mt('Online Help');      my $title = &mt('Online Help');
     my $helpicon=&lonhttpdurl("/adm/help/help.png");      my $helpicon=&lonhttpdurl("/adm/help/help.png");
     $template .= <<"ENDTEMPLATE";      $template.=' <a target="_top" href="'.$link.'" title="'.$title.'">'
  <a target="_top" href="$link" title="$title"><img src="$helpicon" border="0" alt="(Help: $topic)" /></a>                .'<img src="'.$helpicon.'" border="0"'
 ENDTEMPLATE                .' alt="'.&mt('Help: [_1]',$topic).'"'
                     .' title="'.$title.'"'
                 .' /></a>';
       if ($text ne "") {
           $template.='</span>';
       }
     return $template;      return $template;
   
 }  }
Line 945  sub helpLatexCheatsheet { Line 951  sub helpLatexCheatsheet {
     my $out;      my $out;
     my $addOther = '';      my $addOther = '';
     if ($topic) {      if ($topic) {
  $addOther = &Apache::loncommon::help_open_topic($topic,$text,   $addOther = '<span>'.&Apache::loncommon::help_open_topic($topic,&mt($text),
        undef, undef, 600).         undef, undef, 600).
    '</td><td>';     '</span> ';
     }      }
     $out = '<table><tr><td>'.      $out = '<span>' # Start cheatsheet
    $addOther .    .$addOther
    &Apache::loncommon::help_open_topic("Greek_Symbols",&mt('Greek Symbols'),            .'<span>'
        undef,undef,600).    .&Apache::loncommon::help_open_topic('Greek_Symbols',&mt('Greek Symbols'),
    '</td><td>'.         undef,undef,600)
    &Apache::loncommon::help_open_topic("Other_Symbols",&mt('Other Symbols'),    .'</span> <span>'
        undef,undef,600).    .&Apache::loncommon::help_open_topic('Other_Symbols',&mt('Other Symbols'),
    '</td>';         undef,undef,600)
     .'</span>';
     unless ($not_author) {      unless ($not_author) {
         $out .= '<td>'.          $out .= ' <span>'
         &Apache::loncommon::help_open_topic("Authoring_Output_Tags",&mt('Output Tags'),         .&Apache::loncommon::help_open_topic('Authoring_Output_Tags',&mt('Output Tags'),
                                             undef,undef,600).                                              undef,undef,600)
         '</td>';         .'</span>';
     }      }
     $out .= '</tr></table>';      $out .= '</span>'; # End cheatsheet
     return $out;      return $out;
 }  }
   
Line 2808  sub aboutmewrapper { Line 2815  sub aboutmewrapper {
         return;          return;
     }      }
     return '<a href="/adm/'.$domain.'/'.$username.'/aboutme"'.      return '<a href="/adm/'.$domain.'/'.$username.'/aboutme"'.
  ($target?' target="$target"':'').' title="'.&mt("View this user's personal    ($target?' target="$target"':'').' title="'.&mt("View this user's personal information page").'">'.$link.'</a>';
 homepage").'">'.$link.'</a>';  
 }  }
   
 # ------------------------------------------------------------ Syllabus Wrapper  # ------------------------------------------------------------ Syllabus Wrapper
Line 3816  sub blocking_status { Line 3822  sub blocking_status {
                              &Apache::lonnet::coursedescription($course);                               &Apache::lonnet::coursedescription($course);
                         $coursedesc = $courseinfo{'description'};                          $coursedesc = $courseinfo{'description'};
                     }                      }
                     $category = "Group files in the course '$coursedesc'";                      $category = "Group portfolio in the course '$coursedesc'";
                 } else {                  } else {
                     $category = 'Portfolio files belonging to ';                      $category = 'Portfolio files belonging to ';
                     if ($env{'user.name'} eq 'public' &&                       if ($env{'user.name'} eq 'public' && 
Line 4245  $realm&nbsp; Line 4251  $realm&nbsp;
 </td>  </td>
 ENDROLE  ENDROLE
   
     my $titleinfo = '<span class="LC_title_bar_title">'.$title.'</span>';      my $titleinfo = '<h1>'.$title.'</h1>';
     if ($customtitle) {      if ($customtitle) {
         $titleinfo = $customtitle;          $titleinfo = $customtitle;
     }      }
Line 4612  table#LC_title_bar td.LC_title_bar_who { Line 4618  table#LC_title_bar td.LC_title_bar_who {
 span.LC_metadata {  span.LC_metadata {
     font-family: $sans;      font-family: $sans;
 }  }
 span.LC_title_bar_title {  
   font: bold x-large $sans;  
 }  
 table#LC_title_bar td.LC_title_bar_domain_logo {  table#LC_title_bar td.LC_title_bar_domain_logo {
   background: $sidebg;    background: $sidebg;
   text-align: right;    text-align: right;
Line 5273  table.LC_prior_match tr td { Line 5276  table.LC_prior_match tr td {
   border: 1px solid #000000;    border: 1px solid #000000;
 }  }
   
   td.LC_nobreak,
 span.LC_nobreak {  span.LC_nobreak {
   white-space: nowrap;    white-space: nowrap;
 }  }
Line 5582  h2,h3,h4,h5,h6 Line 5586  h2,h3,h4,h5,h6
         overflow:hidden;          overflow:hidden;
 }  }
   
   .LC_Right {
           float: right;
           margin: 0px;
           padding: 0px;
   }
   
 p, .LC_ContentBox {  p, .LC_ContentBox {
  padding: 10px;   padding: 10px;
   
Line 5593  p, .LC_ContentBox { Line 5603  p, .LC_ContentBox {
         text-decoration:underline;          text-decoration:underline;
 }  }
   
   .LC_help_open_topic {
           color: #FFFFFF;
           background-color: #EEEEFF;
           margin: 1px;
           padding: 4px;
           border: 1px solid #000033;
           white-space: nowrap;
   }
   
 dl,ul,div,fieldset {  dl,ul,div,fieldset {
  margin: 10px 10px 10px 0px;   margin: 10px 10px 10px 0px;
Line 5617  ol.LC_smallMenu a { Line 5635  ol.LC_smallMenu a {
  color: RGB(80, 80, 80);   color: RGB(80, 80, 80);
  text-decoration: none;   text-decoration: none;
 }  }
 ol#LC_TabMainMenueContent, ul.LC_TabContent ,  ol#LC_TabMainMenuContent, ul.LC_TabContent ,
 ul.LC_TabContentBigger {  ul.LC_TabContentBigger {
  display:block;   display:block;
  list-style:none;   list-style:none;
Line 5661  ul.LC_TabContent li a, ul.LC_TabContent Line 5679  ul.LC_TabContent li a, ul.LC_TabContent
  text-decoration:none;   text-decoration:none;
  font-size:95%;   font-size:95%;
  font-weight:bold;   font-weight:bold;
    padding-right: 16px;
 }  }
 ul.LC_TabContent li:hover, ul.LC_TabContent li.active{  ul.LC_TabContent li:hover, ul.LC_TabContent li.active{
  background-color:#FFFFFF;          background:#FFFFFF url(/adm/lonIcons/open.gif) no-repeat scroll right center;
  border-bottom:solid 1px #FFFFFF;   border-bottom:solid 1px #FFFFFF;
    padding-right: 16px;
 }  }
 ul.LC_TabContentBigger li{  ul.LC_TabContentBigger li{
  vertical-align:bottom;   vertical-align:bottom;
Line 5891  table em{ Line 5911  table em{
  font-style: normal;   font-style: normal;
 }  }
   
 table#LC_tableOfContent{  table.LC_tableOfContent{
  border-collapse: collapse;          border:none;
  border-spacing: 0;   border-spacing: 1;
  padding: 3px;   padding: 3px;
  border: 0;  
  background-color: #FFFFFF;   background-color: #FFFFFF;
  font-size: 90%;   font-size: 90%;
 }  }
 table#LC_tableOfContent a {  table.LC_tableOfContent a {
           background-color:transparent;
  text-decoration: none;   text-decoration: none;
 }  }
   
 table#LC_tableOfContent tr.LC_trOdd{  table.LC_tableOfContent tr.LC_trOdd{
  background-color: #EEEEEE;   background-color: #EEEEEE;
 }  }
   
 table#LC_tableOfContent img{  table.LC_tableOfContent img{
  border: none;   border: none;
  height: 1.3em;   height: 1.3em;
  vertical-align: text-bottom;   vertical-align: text-bottom;
  margin-right: 0.3em;   margin-right: 0.3em;
 }  }
   
   a#LC_content_toolbar_firsthomework{
    background-image:url(/res/adm/pages/open-first-problem.gif);
   }
   
   a#LC_content_toolbar_launchnav{
    background-image:url(/res/adm/pages/start-navigation.gif);
   }
   
   a#LC_content_toolbar_closenav{
    background-image:url(/res/adm/pages/close-navigation.gif);
   }
   
   a#LC_content_toolbar_everything{
    background-image:url(/res/adm/pages/show-all.gif);
   }
   
   a#LC_content_toolbar_uncompleted{
    background-image:url(/res/adm/pages/show-incomplete-problems.gif);
   }
   
   #LC_content_toolbar_clearbubbles{
    background-image:url(/res/adm/pages/mark-discussionentries-read.gif);
   }
   
   a#LC_content_toolbar_changefolder{
    background : url(/res/adm/pages/close-all-folders.gif) top center ;
   }
   
   a#LC_content_toolbar_changefolder_toggled{
    background-image:url(/res/adm/pages/open-all-folders.gif);
   }
   
   ul#LC_toolbar li a:hover{
    background-position: bottom center;
   }
   
   ul#LC_toolbar{
    padding:0; 
    margin: 2px;
    list-style:none;
    position:relative;
    background-color:white;
   }
   
   ul#LC_toolbar li{
    border:1px solid white;
    padding:0;
    margin: 0;
       float: left;
    display:inline;
    vertical-align:middle;
   }
   
   a.LC_toolbarItem{
    display:block;
    padding:0;
    margin:0;
    height: 32px;
    width: 32px;
    color:white; 
    border:0 none;
    background-repeat:no-repeat;
    background-color:transparent;
   }
   
   
 END  END
 }  }
   
Line 6182  sub start_page { Line 6269  sub start_page {
  $result = &html_encode($result);   $result = &html_encode($result);
     }      }
   
     if (exists($args->{'bread_crumbs'})) {   #Breadcrumbs
         &Apache::lonhtmlcommon::clear_breadcrumbs();      if (exists($args->{'bread_crumbs'}) or exists($args->{'bread_crumbs_component'})) {
         if (ref($args->{'bread_crumbs'}) eq 'ARRAY') {            &Apache::lonhtmlcommon::clear_breadcrumbs();
             foreach my $crumb (@{$args->{'bread_crumbs'}}){   #if any br links exists, add them to the breadcrumbs
                 &Apache::lonhtmlcommon::add_breadcrumb($crumb);   if (exists($args->{'bread_crumbs'}) and ref($args->{'bread_crumbs'}) eq 'ARRAY') {         
             }   foreach my $crumb (@{$args->{'bread_crumbs'}}){
         }   &Apache::lonhtmlcommon::add_breadcrumb($crumb);
         $result .= &Apache::lonhtmlcommon::breadcrumbs();   }
     }   }
   
    #if bread_crumbs_component exists show it as headline else show only the breadcrumbs
    if(exists($args->{'bread_crumbs_component'})){
    $result .= &Apache::lonhtmlcommon::breadcrumbs($args->{'bread_crumbs_component'});
    }else{
    $result .= &Apache::lonhtmlcommon::breadcrumbs();
    }
       }
     return $result;      return $result;
 }  }
   
Line 6952  sub default_quota { Line 7046  sub default_quota {
                                             ['quotas'],$udom);                                              ['quotas'],$udom);
     if (ref($quotahash{'quotas'}) eq 'HASH') {      if (ref($quotahash{'quotas'}) eq 'HASH') {
         if ($inststatus ne '') {          if ($inststatus ne '') {
             my @statuses = split(/:/,$inststatus);              my @statuses = map { &unescape($_); } split(/:/,$inststatus);
             foreach my $item (@statuses) {              foreach my $item (@statuses) {
                 if (ref($quotahash{'quotas'}{'defaultquota'}) eq 'HASH') {                  if (ref($quotahash{'quotas'}{'defaultquota'}) eq 'HASH') {
                     if ($quotahash{'quotas'}{'defaultquota'}{$item} ne '') {                      if ($quotahash{'quotas'}{'defaultquota'}{$item} ne '') {
Line 7418  sub personal_data_fieldtitles { Line 7512  sub personal_data_fieldtitles {
                         middlename => 'Middle Name',                          middlename => 'Middle Name',
                         generation => 'Generation',                          generation => 'Generation',
                         gen => 'Generation',                          gen => 'Generation',
                           inststatus => 'Affiliation',
                    );                     );
     return %fieldtitles;      return %fieldtitles;
 }  }
Line 8783  sub restore_settings { Line 8878  sub restore_settings {
   
 =item * &build_recipient_list()  =item * &build_recipient_list()
   
 Build recipient lists for three types of e-mail:  Build recipient lists for four types of e-mail:
 (a) Error Reports, (b) Package Updates, (c) Help requests, generated by  (a) Error Reports, (b) Package Updates, (c) lonstatus warnings/errors
 lonerrorhandler.pm, CHECKRPMS and lonsupportreq.pm respectively.  (d) Help requests, generated by
   lonerrorhandler.pm, CHECKRPMS, loncron, and lonsupportreq.pm respectively.
   
 Inputs:  Inputs:
 defmail (scalar - email address of default recipient),   defmail (scalar - email address of default recipient), 
Line 8809  sub build_recipient_list { Line 8905  sub build_recipient_list {
     my %domconfig =      my %domconfig =
          &Apache::lonnet::get_dom('configuration',['contacts'],$defdom);           &Apache::lonnet::get_dom('configuration',['contacts'],$defdom);
     if (ref($domconfig{'contacts'}) eq 'HASH') {      if (ref($domconfig{'contacts'}) eq 'HASH') {
         if (ref($domconfig{'contacts'}{$mailing}) eq 'HASH') {          if (exists($domconfig{'contacts'}{$mailing})) {
             my @contacts = ('adminemail','supportemail');              if (ref($domconfig{'contacts'}{$mailing}) eq 'HASH') {
             foreach my $item (@contacts) {                  my @contacts = ('adminemail','supportemail');
                 if ($domconfig{'contacts'}{$mailing}{$item}) {                  foreach my $item (@contacts) {
                     my $addr = $domconfig{'contacts'}{$item};                       if ($domconfig{'contacts'}{$mailing}{$item}) {
                     if (!grep(/^\Q$addr\E$/,@recipients)) {                          my $addr = $domconfig{'contacts'}{$item}; 
                         push(@recipients,$addr);                          if (!grep(/^\Q$addr\E$/,@recipients)) {
                               push(@recipients,$addr);
                           }
                     }                      }
                       $otheremails = $domconfig{'contacts'}{$mailing}{'others'};
                 }                  }
                 $otheremails = $domconfig{'contacts'}{$mailing}{'others'};  
             }              }
           } elsif ($origmail ne '') {
               push(@recipients,$origmail);
         }          }
     } elsif ($origmail ne '') {      } elsif ($origmail ne '') {
         push(@recipients,$origmail);          push(@recipients,$origmail);
Line 9928  sub init_user_environment { Line 10028  sub init_user_environment {
                 &Apache::lonnet::usertools_access($username,$domain,$tool,'reload');                  &Apache::lonnet::usertools_access($username,$domain,$tool,'reload');
         }          }
   
           foreach my $crstype ('official','unofficial') {
               $userenv{'canrequest.'.$crstype} =
                   &Apache::lonnet::usertools_access($username,$domain,$crstype,
                                                     'reload','requestcourses');
           }
   
  $env{'user.environment'} = "$lonids/$cookie.id";   $env{'user.environment'} = "$lonids/$cookie.id";
   
  if (tie(my %disk_env,'GDBM_File',"$lonids/$cookie.id",   if (tie(my %disk_env,'GDBM_File',"$lonids/$cookie.id",

Removed from v.1.755  
changed lines
  Added in v.1.770


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