Diff for /loncom/interface/loncommon.pm between versions 1.804 and 1.846

version 1.804, 2009/05/06 16:19:34 version 1.846, 2009/06/30 10:18:52
Line 407  sub studentbrowser_javascript { Line 407  sub studentbrowser_javascript {
           ) { return ''; }              ) { return ''; }  
    return (<<'ENDSTDBRW');     return (<<'ENDSTDBRW');
 <script type="text/javascript" language="Javascript">  <script type="text/javascript" language="Javascript">
   // <![CDATA[
     var stdeditbrowser;      var stdeditbrowser;
     function openstdbrowser(formname,uname,udom,roleflag,ignorefilter,courseadvonly) {      function openstdbrowser(formname,uname,udom,roleflag,ignorefilter,courseadvonly) {
         var url = '/adm/pickstudent?';          var url = '/adm/pickstudent?';
Line 429  sub studentbrowser_javascript { Line 430  sub studentbrowser_javascript {
         stdeditbrowser = open(url,title,options,'1');          stdeditbrowser = open(url,title,options,'1');
         stdeditbrowser.focus();          stdeditbrowser.focus();
     }      }
   // ]]>
 </script>  </script>
 ENDSTDBRW  ENDSTDBRW
 }  }
Line 461  sub selectstudent_link { Line 463  sub selectstudent_link {
 sub authorbrowser_javascript {  sub authorbrowser_javascript {
     return <<"ENDAUTHORBRW";      return <<"ENDAUTHORBRW";
 <script type="text/javascript" language="JavaScript">  <script type="text/javascript" language="JavaScript">
   // <![CDATA[
 var stdeditbrowser;  var stdeditbrowser;
   
 function openauthorbrowser(formname,udom) {  function openauthorbrowser(formname,udom) {
Line 473  function openauthorbrowser(formname,udom Line 476  function openauthorbrowser(formname,udom
     stdeditbrowser.focus();      stdeditbrowser.focus();
 }  }
   
   // ]]>
 </script>  </script>
 ENDAUTHORBRW  ENDAUTHORBRW
 }  }
Line 482  sub coursebrowser_javascript { Line 486  sub coursebrowser_javascript {
     my $crs_or_grp_alert = &mt('Please select the type of LON-CAPA entity - Course or Group - for which you wish to add/modify a user role');      my $crs_or_grp_alert = &mt('Please select the type of LON-CAPA entity - Course or Group - for which you wish to add/modify a user role');
    my $output = '     my $output = '
 <script type="text/javascript" language="JavaScript">  <script type="text/javascript" language="JavaScript">
   // <![CDATA[
     var stdeditbrowser;'."\n";      var stdeditbrowser;'."\n";
    $output .= <<"ENDSTDBRW";     $output .= <<"ENDSTDBRW";
     function opencrsbrowser(formname,uname,udom,desc,extra_element,multflag,crstype) {      function opencrsbrowser(formname,uname,udom,desc,extra_element,multflag,crstype) {
Line 568  ENDSTDBRW Line 573  ENDSTDBRW
         $output .= &setsec_javascript($sec_element,$formname);          $output .= &setsec_javascript($sec_element,$formname);
     }      }
     $output .= '      $output .= '
   // ]]>
 </script>';  </script>';
     return $output;      return $output;
 }  }
Line 829  sub linked_select_forms { Line 835  sub linked_select_forms {
     # output the javascript to do the changing      # output the javascript to do the changing
     my $result = '';      my $result = '';
     $result.='<script type="text/javascript" language="JavaScript">'."\n";      $result.='<script type="text/javascript" language="JavaScript">'."\n";
       $result.="// <![CDATA[\n";
     $result.="var select2data = new Object();\n";      $result.="var select2data = new Object();\n";
     $" = '","';      $" = '","';
     my $debug = '';      my $debug = '';
Line 874  function select1_changed() { Line 881  function select1_changed() {
         }          }
     }      }
 }  }
   // ]]>
 </script>  </script>
 END  END
     # output the initial values for the selection lists      # output the initial values for the selection lists
Line 1027  sub update_help_link { Line 1035  sub update_help_link {
     my $banner_link = "/adm/helpmenu?page=banner&amp;topic=$topic&amp;component_help=$component_help&amp;faq=$faq&amp;bug=$bug&amp;origurl=$origurl&amp;stamp=$timestamp&amp;stayonpage=$stayOnPage";      my $banner_link = "/adm/helpmenu?page=banner&amp;topic=$topic&amp;component_help=$component_help&amp;faq=$faq&amp;bug=$bug&amp;origurl=$origurl&amp;stamp=$timestamp&amp;stayonpage=$stayOnPage";
     my $output .= <<"ENDOUTPUT";      my $output .= <<"ENDOUTPUT";
 <script type="text/javascript">  <script type="text/javascript">
   // <![CDATA[
 banner_link = '$banner_link';  banner_link = '$banner_link';
   // ]]>
 </script>  </script>
 ENDOUTPUT  ENDOUTPUT
     return $output;      return $output;
Line 1394  sub resize_textarea_js { Line 1404  sub resize_textarea_js {
     my $geometry = &viewport_geometry_js();      my $geometry = &viewport_geometry_js();
     return <<"RESIZE";      return <<"RESIZE";
     <script type="text/javascript">      <script type="text/javascript">
   // <![CDATA[
 $geometry  $geometry
   
 function getX(element) {  function getX(element) {
Line 1432  function resize_textarea(textarea_id,bot Line 1443  function resize_textarea(textarea_id,bot
     }      }
     textarea.style.height=new_height+'px';      textarea.style.height=new_height+'px';
 }  }
   // ]]>
 </script>  </script>
 RESIZE  RESIZE
   
Line 2299  sub authform_internal{ Line 2311  sub authform_internal{
     $result = &mt      $result = &mt
         ('[_1] Internally authenticated (with initial password [_2])',          ('[_1] Internally authenticated (with initial password [_2])',
          '<label>'.$authtype,'</label>'.$autharg);           '<label>'.$authtype,'</label>'.$autharg);
     $result.="<label><input type=\"checkbox\" name=\"visible\" onClick='if (this.checked) { this.form.intarg.type=\"text\" } else { this.form.intarg.type=\"password\" }' />".&mt('Visible input').'</label>';      $result.="<label><input type=\"checkbox\" name=\"visible\" onclick='if (this.checked) { this.form.intarg.type=\"text\" } else { this.form.intarg.type=\"password\" }' />".&mt('Visible input').'</label>';
     return $result;      return $result;
 }  }
   
Line 4144  Returns: value of designparamter $which Line 4156  Returns: value of designparamter $which
 ##############################################  ##############################################
 sub designparm {  sub designparm {
     my ($which,$domain)=@_;      my ($which,$domain)=@_;
     if ($env{'browser.blackwhite'} eq 'on') {  
  if ($which=~/\.(font|alink|vlink|link|textcol)$/) {  
     return '#000000';  
  }  
  if ($which=~/\.(pgbg|sidebg|bgcol)$/) {  
     return '#FFFFFF';  
  }  
  if ($which=~/\.tabbg$/) {  
     return '#CCCCCC';  
  }  
     }  
     if (exists($env{'environment.color.'.$which})) {      if (exists($env{'environment.color.'.$which})) {
  return $env{'environment.color.'.$which};          return $env{'environment.color.'.$which};
     }      }
     $domain=&determinedomain($domain);      $domain=&determinedomain($domain);
     my %domdesign = &get_domainconf($domain);      my %domdesign = &get_domainconf($domain);
     my $output;      my $output;
     if ($domdesign{$domain.'.'.$which} ne '') {      if ($domdesign{$domain.'.'.$which} ne '') {
  $output = $domdesign{$domain.'.'.$which};          $output = $domdesign{$domain.'.'.$which};
     } else {      } else {
         $output = $defaultdesign{$which};          $output = $defaultdesign{$which};
     }      }
     if (($which =~ /^(student|coordinator|author|admin)\.img$/) ||      if (($which =~ /^(student|coordinator|author|admin)\.img$/) ||
         ($which =~ /login\.(img|logo|domlogo|login)/)) {          ($which =~ /login\.(img|logo|domlogo|login)/)) {
         if ($output =~ m{^/(adm|res)/}) {          if ($output =~ m{^/(adm|res)/}) {
     if ($output =~ m{^/res/}) {              if ($output =~ m{^/res/}) {
  my $local_name = &Apache::lonnet::filelocation('',$output);                  my $local_name = &Apache::lonnet::filelocation('',$output);
  &Apache::lonnet::repcopy($local_name);                  &Apache::lonnet::repcopy($local_name);
     }              }
             $output = &lonhttpdurl($output);              $output = &lonhttpdurl($output);
         }          }
     }      }
     return $output;      return $output;
 }  }
   
   ##############################################
   =pod
   
   =item * &authorspace()
   
   Inputs: ./.
   
   Returns: Path to the Construction Space of the current user's
            accessed author space
            The author space will be that of the current user
            when accessing the own author space
            and that of the co-author/assistent co-author
            when accessing the co-author's/assistent co-author's
            space
   
   =cut
   
   sub authorspace {
       my $caname = '';
       if ($env{'request.role'} =~ /^ca|^aa/) {
           (undef,$caname) =
               ($env{'request.role'}=~/($match_domain)\/($match_username)$/);
       } else {
           $caname = $env{'user.name'};
       }
       return '/priv/'.$caname.'/';
   }
   
   ##############################################
   =pod
   
   =item * &head_subbox()
   
   Inputs: $content (contains HTML code with page functions, etc.)
   
   Returns: HTML div with $content
            To be included in page header
   
   =cut
   
   sub head_subbox {
       my ($content)=@_;
       my $output =
           '<div id="LC_head_subbox">'
          .$content
          .'</div>'
   }
   
   ##############################################
   =pod
   
   =item * &CSTR_pageheader()
   
   Inputs: ./.
   
   Returns: HTML div with CSTR path and recent box
            To be included on Construction Space pages
   
   =cut
   
   sub CSTR_pageheader {
       # this is for resources; directories have customtitle, and crumbs
               # and select recent are created in lonpubdir.pm  
       my ($uname,$thisdisfn)=
           ($env{'request.filename'} =~ m|^/home/([^/]+)/public_html/(.*)|);
       my $formaction='/priv/'.$uname.'/'.$thisdisfn;
       $formaction=~s/\/+/\//g;
   
       my $parentpath = '';
       my $lastitem = '';
       if ($thisdisfn =~ m-(.+/)([^/]*)$-) {
           $parentpath = $1;
           $lastitem = $2;
       } else {
           $lastitem = $thisdisfn;
       }
       return
            '<div>'
           .&Apache::loncommon::help_open_menu('','',3,'Authoring') #FIXME: Broken? Where is it?
           .'<b>'.&mt('Construction Space:').'</b> '
           .'<form name="dirs" method="post" action="'.$formaction
           .'" target="_top"><tt><b>' #FIXME lonpubdir: target="_parent"
           .&Apache::lonhtmlcommon::crumbs($uname.'/'.$parentpath,'_top','/priv','','+1',1)."$lastitem</b></tt><br />"
           #FIXME lonpubdir: &Apache::lonhtmlcommon::crumbs($uname.$thisdisfn.'/','_top','/priv','','+1',1)."</b></tt><br />"
           .&Apache::lonhtmlcommon::select_recent('construct','recent','this.form.action=this.form.recent.value;this.form.submit()')
           .'</form>'
           .&Apache::lonmenu::constspaceform()
           .'</div>';
   }
   
 ###############################################  ###############################################
 ###############################################  ###############################################
   
Line 4211  Inputs: Line 4302  Inputs:
 =item * $forcereg, if page should register as content page (relevant for   =item * $forcereg, if page should register as content page (relevant for 
             text interface only)              text interface only)
   
 =item * $customtitle, alternate text to use instead of $title  =item * $no_nav_bar, if true, keep the 'what is this' info but remove the
                       in the title box that appears, this text                       navigational links
                       is not auto translated like the $title is  
   
 =item * $notopbar, if true, keep the 'what is this' info but remove the  
                    navigational links  
   
 =item * $bgcolor, used to override the bgcolor on a webpage to a specific value  =item * $bgcolor, used to override the bgcolor on a webpage to a specific value
   
 =item * $notitle, if true keep the nav controls, but remove the title bar  
   
 =item * $no_inline_link, if true and in remote mode, don't show the   =item * $no_inline_link, if true and in remote mode, don't show the 
          'Switch To Inline Menu' link           'Switch To Inline Menu' link
   
Line 4241  other decorations will be returned. Line 4326  other decorations will be returned.
 =cut  =cut
   
 sub bodytag {  sub bodytag {
     my ($title,$function,$addentries,$bodyonly,$domain,$forcereg,$customtitle,      my ($title,$function,$addentries,$bodyonly,$domain,$forcereg,
  $notopbar,$bgcolor,$notitle,$no_inline_link,$args)=@_;          $no_nav_bar,$bgcolor,$no_inline_link,$args)=@_;
   
     if (!$args->{'no_auto_mt_title'}) { $title = &mt($title); }      if (!$args->{'no_auto_mt_title'}) { $title = &mt($title); }
   
Line 4296  sub bodytag { Line 4381  sub bodytag {
  $name = &aboutmewrapper($name,$env{'user.name'},$env{'user.domain'});   $name = &aboutmewrapper($name,$env{'user.name'},$env{'user.domain'});
     }      }
           
     my $roleinfo=(<<ENDROLE);  
 <td class="LC_title_bar_who">  
 <div class="LC_title_bar_name">  
     $name  
     &nbsp;  
 </div>  
 <div class="LC_title_bar_role">  
 $role&nbsp;  
 </div>  
 <div class="LC_title_bar_realm">  
 $realm&nbsp;  
 </div>  
 </td>  
 ENDROLE  
   
     my $titleinfo = '<h1>'.$title.'</h1>';      my $titleinfo = '<h1>'.$title.'</h1>';
     if ($customtitle) {  
         $titleinfo = $customtitle;  
     }  
     #      #
     # Extra info if you are the DC      # Extra info if you are the DC
     my $dc_info = '';      my $dc_info = '';
Line 4327  ENDROLE Line 4394  ENDROLE
         $dc_info = '('.$dc_info.')';          $dc_info = '('.$dc_info.')';
     }      }
   
     if (($env{'environment.remote'} eq 'off') || ($args->{'suppress_header_logos'})) {      if ($env{'environment.remote'} eq 'off') {
         # No Remote          # No Remote
  if ($env{'request.state'} eq 'construct') {   if ($env{'request.state'} eq 'construct') {
     $forcereg=1;      $forcereg=1;
  }   }
   
  if (!$customtitle && $env{'request.state'} eq 'construct') {  #    if ($env{'request.state'} eq 'construct') {
     # this is for resources; directories have customtitle, and crumbs  #        $titleinfo = &CSTR_pageheader(); #FIXME: Will be removed once all scripts have their own calls
             # and select recent are created in lonpubdir.pm    #    }
     my ($uname,$thisdisfn)=  
  ($env{'request.filename'} =~ m|^/home/([^/]+)/public_html/(.*)|);          my $titletable = '<table id="LC_title_bar">'
     my $formaction='/priv/'.$uname.'/'.$thisdisfn;                          ."<tr><td> $titleinfo $dc_info</td>"
     $formaction=~s/\/+/\//g;                          .'</tr></table>';
   
     my $parentpath = '';   if ($no_nav_bar) {
     my $lastitem = '';  
     if ($thisdisfn =~ m-(.+/)([^/]*)$-) {  
  $parentpath = $1;  
  $lastitem = $2;  
     } else {  
  $lastitem = $thisdisfn;  
     }  
     $titleinfo =   
  &Apache::loncommon::help_open_menu('','',3,'Authoring')  
  .'<b>'.&mt('Construction Space').'</b>:&nbsp;'  
  .'<form name="dirs" method="post" action="'.$formaction  
  .'" target="_top"><tt><b>'  
  .&Apache::lonhtmlcommon::crumbs($uname.'/'.$parentpath,'_top','/priv','','+1',1)."<span class=\"LC_fontsize_big\">$lastitem</span></b></tt><br />"  
  .&Apache::lonhtmlcommon::select_recent('construct','recent','this.form.action=this.form.recent.value;this.form.submit()')  
  .'</form>'  
  .&Apache::lonmenu::constspaceform();  
         }  
   
         my $titletable;  
  if (!$notitle) {  
     $titletable =  
  '<table id="LC_title_bar">'.  
                          "<tr><td> $titleinfo $dc_info</td>".$roleinfo.  
  '</tr></table>';  
  }  
  if ($notopbar) {  
     $bodytag .= $titletable;      $bodytag .= $titletable;
  } else {   } else {
           $bodytag .= qq|<div id="LC_nav_bar">$name ($role)<br />
               <em>$realm</em> $dc_info</div>|;
     if ($env{'request.state'} eq 'construct') {      if ($env{'request.state'} eq 'construct') {
                 $bodytag .= &Apache::lonmenu::menubuttons($forcereg,$forcereg,                  $bodytag .= &Apache::lonmenu::menubuttons($forcereg,$forcereg,
   $titletable);    $titletable);
Line 4395  ENDROLE Line 4438  ENDROLE
     my $menu= ($no_inline_link?''      my $menu= ($no_inline_link?''
        :'<br /><a href="/adm/remote?action=collapse">'.&mt('Switch to Inline Menu Mode').'</a>');         :'<br /><a href="/adm/remote?action=collapse">'.&mt('Switch to Inline Menu Mode').'</a>');
     #      #
     if ($notitle) {  
  return $bodytag;  
     }  
     return(<<ENDBODY);      return(<<ENDBODY);
 $bodytag  $bodytag
 <table id="LC_title_bar" class="LC_with_remote">  <table id="LC_title_bar" class="LC_with_remote">
Line 4405  $bodytag Line 4445  $bodytag
     <td>$messages&nbsp;</td>      <td>$messages&nbsp;</td>
 </tr>  </tr>
 <tr><td>$titleinfo $dc_info $menu</td>  <tr><td>$titleinfo $dc_info $menu</td>
 $roleinfo  
 </tr>  </tr>
 </table>  </table>
 ENDBODY  ENDBODY
Line 4450  sub make_attr_string { Line 4489  sub make_attr_string {
  $attr_ref->{'style'}=$style.'; font-size: x-large;';   $attr_ref->{'style'}=$style.'; font-size: x-large;';
     }      }
   
     if ($env{'browser.blackwhite'} eq 'on') {  
  delete($attr_ref->{'font'});  
  delete($attr_ref->{'link'});  
  delete($attr_ref->{'alink'});  
  delete($attr_ref->{'vlink'});  
  delete($attr_ref->{'bgcolor'});  
  delete($attr_ref->{'background'});  
     }  
   
     my $attr_string;      my $attr_string;
     foreach my $attr (keys(%$attr_ref)) {      foreach my $attr (keys(%$attr_ref)) {
  $attr_string .= " $attr=\"".$attr_ref->{$attr}.'" ';   $attr_string .= " $attr=\"".$attr_ref->{$attr}.'" ';
Line 4575  a:focus { Line 4605  a:focus {
   background: yellow     background: yellow 
 }  }
   
 table.thinborder,  hr {
 table.thinborder tr th {    clear: both;
   border-style: solid;    color: $tabbg;
   border-width: 1px;    background-color: $tabbg;
   border-color: $lg_border_color;    height: 3px;
   background: $tabbg;    border: none;
 }  
   
 table.thinborder tr td {  
   border-style: solid;  
   border-width: 1px;  
   border-color: $lg_border_color;  
 }  }
   
 form, .inline {   form, .inline { 
Line 4646  div.LC_confirm_box .LC_success img { Line 4670  div.LC_confirm_box .LC_success img {
   vertical-align: middle;    vertical-align: middle;
 }  }
   
 .LC_unknown {  
   color: yellow;  
 }  
   
 .LC_icon {  .LC_icon {
   border: none;    border: none;
   vertical-align: middle;    vertical-align: middle;
 }  }
   
 .LC_indexer_icon {  
   border: none;  
   height: 22px;  
 }  
   
 .LC_docs_spacer {  .LC_docs_spacer {
   width: 25px;    width: 25px;
   height: 1px;    height: 1px;
Line 4678  div.LC_confirm_box .LC_success img { Line 4693  div.LC_confirm_box .LC_success img {
   
 .LC_disc_action_links_bar {  .LC_disc_action_links_bar {
    background: $tabbg;     background: $tabbg;
    font-family: $sans;  
    border: none;     border: none;
    margin: 4px;     margin: 4px;
 }  }
Line 4722  table#LC_title_bar a { Line 4736  table#LC_title_bar a {
   color: $fontmenu;    color: $fontmenu;
 }  }
   
   table#LC_title_bar {
     clear: both;
     display: none;
   }
   
 table#LC_title_bar,  table#LC_title_bar,
 table.LC_breadcrumbs,  table.LC_breadcrumbs,
 table#LC_title_bar.LC_with_remote {  table#LC_title_bar.LC_with_remote {
Line 4731  table#LC_title_bar.LC_with_remote { Line 4750  table#LC_title_bar.LC_with_remote {
   border-width: $border;    border-width: $border;
   background: $pgbg;    background: $pgbg;
   color: $fontmenu;    color: $fontmenu;
   font-family: $sans;  
   border-collapse: collapse;  
   padding: 0;  
 }  
   
 table.LC_docs_path {  
   width: 100%;  
   border: 0;  
   background: $pgbg;  
   font-family: $sans;  
   border-collapse: collapse;    border-collapse: collapse;
   padding: 0;    padding: 0;
     margin: 0;
 }  }
   
 table#LC_title_bar td {  table#LC_title_bar td {
   background: $tabbg;    background: $tabbg;
 }  }
   
 table#LC_title_bar .LC_title_bar_who {  
   background: $tabbg;  
   color: $fontmenu;  
   font: small $sans;  
   text-align: right;  
   margin: 0;  
 }  
   
 table#LC_title_bar .LC_title_bar_name {  
   margin: 0;  
 }  
   
 table#LC_title_bar .LC_title_bar_role {  
   margin: 0;  
 }  
   
 table#LC_title_bar .LC_title_bar_realm {  
   margin: 0;  
 }  
   
 span.LC_metadata {  
   font-family: $sans;  
 }  
   
 table#LC_menubuttons img{  table#LC_menubuttons img{
   border: none;    border: none;
 }  }
Line 4788  table#LC_top_nav td { Line 4774  table#LC_top_nav td {
 table#LC_top_nav td a,  table#LC_top_nav td a,
 div#LC_top_nav a {  div#LC_top_nav a {
   color: $font;    color: $font;
   font-family: $sans;  
 }  }
   
 table#LC_top_nav td.LC_top_nav_logo {  table#LC_top_nav td.LC_top_nav_logo {
Line 4813  table#LC_top_nav td.LC_top_nav_login { Line 4798  table#LC_top_nav td.LC_top_nav_login {
   text-align: center;    text-align: center;
 }  }
   
 table.LC_breadcrumbs td,  .LC_breadcrumbs_component {
 table.LC_docs_path td  {      float: right;
   background: $tabbg;      margin: 0 1em;
   color: $fontmenu;  
   font-family: $sans;  
   font-size: smaller;  
 }  }
   .LC_breadcrumbs_component img {
 table.LC_breadcrumbs td.LC_breadcrumbs_component,      vertical-align: middle;
 table.LC_docs_path td.LC_docs_path_component {  
   background: $tabbg;  
   color: $fontmenu;  
   font-family: $sans;  
   font-size: larger;  
   text-align: right;  
 }  }
   
 td.LC_table_cell_checkbox {  td.LC_table_cell_checkbox {
Line 4842  table#LC_mainmenu td.LC_mainmenu_column Line 4818  table#LC_mainmenu td.LC_mainmenu_column
  font-size: 70%;   font-size: 70%;
 }  }
   
   #LC_breadcrumbs {
    clear:both;
    background: $sidebg;
    border-bottom: 1px solid $lg_border_color;
    line-height: 32px; 
    margin: 0;
    padding: 0;
   }
   /* Preliminary fix to hide breadcrumbs inside remote control window */
   #LC_remote #LC_breadcrumbs {
       display:none;
   }
   
   #LC_head_subbox {
    clear:both;
    background: #F8F8F8; /* $sidebg; */
    border-bottom: 1px solid $lg_border_color;
    margin: 0 0 10px 0;
    padding: 5px;
   }
   
 .LC_fontsize_medium {  .LC_fontsize_medium {
  font-size: 85%;   font-size: 85%;
 }  }
Line 4852  table#LC_mainmenu td.LC_mainmenu_column Line 4849  table#LC_mainmenu td.LC_mainmenu_column
   
 .LC_menubuttons_inline_text {  .LC_menubuttons_inline_text {
   color: $font;    color: $font;
   font-family: $sans;  
   font-size: 90%;    font-size: 90%;
   padding-left:3px;    padding-left:3px;
 }  }
Line 4864  table#LC_mainmenu td.LC_mainmenu_column Line 4860  table#LC_mainmenu td.LC_mainmenu_column
 .LC_menubuttons_category {  .LC_menubuttons_category {
   color: $font;    color: $font;
   background: $pgbg;    background: $pgbg;
   font-family: $sans;  
   font-size: larger;    font-size: larger;
   font-weight: bold;    font-weight: bold;
 }  }
Line 4874  td.LC_menubuttons_text { Line 4869  td.LC_menubuttons_text {
 }  }
   
 .LC_current_location {  .LC_current_location {
   font-family: $sans;  
   background: $tabbg;    background: $tabbg;
 }  }
   
 .LC_new_mail {  .LC_new_mail {
   font-family: $sans;  
   background: $tabbg;    background: $tabbg;
   font-weight: bold;    font-weight: bold;
 }  }
   
 .LC_dropadd_labeltext {  
   font-family: $sans;  
   text-align: right;  
 }  
   
 .LC_preferences_labeltext {  
   font-family: $sans;  
   text-align: right;  
 }  
   
 .LC_roleslog_note {  .LC_roleslog_note {
   font-size: small;    font-size: small;
 }  }
   
 .LC_mail_functions {  
     font-weight: bold;  
 }  
   
 table.LC_aboutme_port {  
   border: none;  
   border-collapse: collapse;  
   border-spacing: 0;  
 }  
   
 table.LC_data_table,  table.LC_data_table,
 table.LC_mail_list {  table.LC_mail_list {
   border: 1px solid #000000;    border: 1px solid #000000;
Line 4951  table.LC_data_table tr.LC_info_row > td Line 4924  table.LC_data_table tr.LC_info_row > td
 }  }
   
 table.LC_data_table tr.LC_odd_row > td,  table.LC_data_table tr.LC_odd_row > td,
 table.LC_pick_box tr > td.LC_odd_row,  table.LC_pick_box tr > td.LC_odd_row {
 table.LC_aboutme_port tr td {  
   background-color: $data_table_light;    background-color: $data_table_light;
   padding: 2px;    padding: 2px;
 }  }
   
 table.LC_data_table tr.LC_even_row > td,  table.LC_data_table tr.LC_even_row > td,
 table.LC_pick_box tr > td.LC_even_row,  table.LC_pick_box tr > td.LC_even_row {
 table.LC_aboutme_port tr.LC_even_row td {  
   background-color: $data_table_dark;    background-color: $data_table_dark;
   padding: 2px;    padding: 2px;
 }  }
Line 5157  span.LC_current_location { Line 5128  span.LC_current_location {
   
 span.LC_parm_menu_item {  span.LC_parm_menu_item {
   font-size: larger;    font-size: larger;
   font-family: $sans;  
 }  }
   
 span.LC_parm_scope_all {  span.LC_parm_scope_all {
Line 5212  table#LC_helpmenu { Line 5182  table#LC_helpmenu {
   
 table#LC_helpmenu fieldset legend {  table#LC_helpmenu fieldset legend {
   font-size: larger;    font-size: larger;
   font-weight: bold;  
 }  }
   
 table#LC_helpmenu_links {  table#LC_helpmenu_links {
Line 5400  table.LC_notify_front_page td { Line 5369  table.LC_notify_front_page td {
 }  }
   
 .LC_topic_bar {  .LC_topic_bar {
   font-family: $sans;  
   font-weight: bold;    font-weight: bold;
   width: 100%;    width: 100%;
   background: $tabbg;    background: $tabbg;
   vertical-align: middle;    vertical-align: middle;
   margin: 2ex 0ex 2ex 0ex;    margin: 2ex 0ex 2ex 0ex;
     padding: 3px;
 }  }
   
 .LC_topic_bar span {  .LC_topic_bar span {
Line 5426  table.LC_status_selector td { Line 5395  table.LC_status_selector td {
   padding: 4px;    padding: 4px;
 }  }
   
 table.LC_descriptive_input td.LC_description {  
   vertical-align: top;  
   text-align: right;  
   font-weight: bold;  
 }  
   
 div.LC_feedback_link {  div.LC_feedback_link {
   clear: both;    clear: both;
   background: white;    background: $sidebg;
   width: 100%;    width: 100%;
     padding-bottom: 10px;
     border: 1px $tabbg solid;
     height: 22px;
     line-height: 22px;
     padding-top: 5px;
   }
   
   div.LC_feedback_link img {
     height: 22px;
   }
   
   div.LC_feedback_link a{
     text-decoration: none;
 }  }
   
 span.LC_feedback_link {  span.LC_feedback_link {
   background: $feedback_link_bg;    //background: $feedback_link_bg;
   font-size: larger;    font-size: larger;
 }  }
   
 span.LC_message_link {  span.LC_message_link {
   background: $feedback_link_bg;    //background: $feedback_link_bg;
   font-size: larger;    font-size: larger;
   position: absolute;    position: absolute;
   right: 1em;    right: 1em;
Line 5462  table.LC_prior_tries td { Line 5438  table.LC_prior_tries td {
   
 .LC_answer_correct {  .LC_answer_correct {
   background: lightgreen;    background: lightgreen;
   font-family: $sans;  
   color: darkgreen;    color: darkgreen;
   padding: 6px;    padding: 6px;
 }  }
   
 .LC_answer_charged_try {  .LC_answer_charged_try {
   background: #FFAAAA;    background: #FFAAAA;
   font-family: $sans;  
   color: darkred;    color: darkred;
   padding: 6px;    padding: 6px;
 }  }
Line 5478  table.LC_prior_tries td { Line 5452  table.LC_prior_tries td {
 .LC_answer_no_grade,  .LC_answer_no_grade,
 .LC_answer_late {  .LC_answer_late {
   background: lightyellow;    background: lightyellow;
   font-family: $sans;  
   color: black;    color: black;
   padding: 6px;    padding: 6px;
 }  }
   
 .LC_answer_previous {  .LC_answer_previous {
   background: lightblue;    background: lightblue;
   font-family: $sans;  
   color: darkblue;    color: darkblue;
   padding: 6px;    padding: 6px;
 }  }
   
 .LC_answer_no_message {  .LC_answer_no_message {
   background: #FFFFFF;    background: #FFFFFF;
   font-family: $sans;  
   color: black;    color: black;
   padding: 6px;    padding: 6px;
 }  }
   
 .LC_answer_unknown {  .LC_answer_unknown {
   background: orange;    background: orange;
   font-family: $sans;  
   color: black;    color: black;
   padding: 6px;    padding: 6px;
 }  }
Line 5737  div.LC_edit_problem_editxml_header div { Line 5707  div.LC_edit_problem_editxml_header div {
   margin-top: 5px;    margin-top: 5px;
 }  }
   
 div.LC_edit_problem_header_edit_row {  
   background: $tabbg;  
   padding: 3px;  
   margin-bottom: 5px;  
 }  
   
 div.LC_edit_problem_header_title {  div.LC_edit_problem_header_title {
   font-weight: bold;    font-weight: bold;
   font-size: larger;    font-size: larger;
Line 5772  div.LC_edit_problem_saves { Line 5736  div.LC_edit_problem_saves {
   padding-bottom: 5px;    padding-bottom: 5px;
 }  }
   
 hr.LC_edit_problem_divide {  
   clear: both;  
   color: $tabbg;  
   background-color: $tabbg;  
   height: 3px;  
   border: none;  
 }  
   
 img.stift{  img.stift{
   border-width: 0;    border-width: 0;
   vertical-align: middle;    vertical-align: middle;
Line 5798  table#LC_mainmenu td.LC_mainmenu_col_fie Line 5754  table#LC_mainmenu td.LC_mainmenu_col_fie
 .LC_mainmenu_fieldset_category {  .LC_mainmenu_fieldset_category {
   color: $font;    color: $font;
   background: $pgbg;    background: $pgbg;
   font-family: $sans;  
   font-size: small;    font-size: small;
   font-weight: bold;    font-weight: bold;
 }  }
Line 5826  ul.LC_TabContent   li:hover a { Line 5781  ul.LC_TabContent   li:hover a {
 }  }
   
 h1 {  h1 {
  padding:5px 10px 5px 20px;   padding: 0;
  line-height:130%;   line-height:130%;
 }  }
   
Line 5844  h2,h3,h4,h5,h6 { Line 5799  h2,h3,h4,h5,h6 {
  border-bottom:solid 1px $lg_border_color;   border-bottom:solid 1px $lg_border_color;
 }  }
   
   .LC_Box > .LC_hcell {
       margin: 0 -10px;
   }
   
 .LC_noBorder {  .LC_noBorder {
         border: 0;          border: 0;
 }  }
   
   
 /* Main Header with discription of Person, Course, etc. */  
   
 .LC_Right {  .LC_Right {
         float: right;          float: right;
         margin: 0;          margin: 0;
Line 5876  h2,h3,h4,h5,h6 { Line 5832  h2,h3,h4,h5,h6 {
   
 dl,ul,div,fieldset {  dl,ul,div,fieldset {
  margin: 10px 10px 10px 0;   margin: 10px 10px 10px 0;
  overflow:hidden;  /* overflow: hidden; */
   }
   
   fieldset > legend {
       font-weight: bold;
       padding: 0 5px 0 5px;
   }
   
   #LC_nav_bar {
       float: left;
       margin: 0;
   }
   
   #LC_nav_bar em{
       font-weight: bold;
       font-style: normal;
   }
   
   ol.LC_smallMenu {
       float: right;
 }  }
   
 ol.LC_smallMenu, ol#LC_PathBreadcrumbs {  ol.LC_smallMenu, ol#LC_PathBreadcrumbs {
Line 5899  ol.LC_smallMenu a { Line 5874  ol.LC_smallMenu a {
  text-decoration: none;   text-decoration: none;
 }  }
   
 ol#LC_TabMainMenuContent,   ul#LC_TabMainMenuContent {
       clear: both;
       color: $fontmenu;
       background: $tabbg;
       list-style: none;
       padding: 0;
       margin: 0;
       float:left;
       width: 100%;
   }
   
   ul#LC_TabMainMenuContent li {
       float: left;
       font-weight: bold;
       line-height: 1.8em;
       padding: 0 0.8em; 
       border-right: 1px solid black;
       display: inline;
       vertical-align: middle;
   }
   
 ul.LC_TabContent ,  ul.LC_TabContent ,
 ul.LC_TabContentBigger {  ul.LC_TabContentBigger {
  display:block;   display:block;
Line 5908  ul.LC_TabContentBigger { Line 5903  ul.LC_TabContentBigger {
  padding: 0;   padding: 0;
 }  }
   
 ol#LC_TabMainMenuContent li,  
 ul.LC_TabContent li,  ul.LC_TabContent li,
 ul.LC_TabContentBigger li {  ul.LC_TabContentBigger li {
  display: inline;   display: inline;
Line 5918  ul.LC_TabContentBigger li { Line 5912  ul.LC_TabContentBigger li {
  white-space:nowrap;   white-space:nowrap;
 }  }
   
 ol#LC_TabMainMenuContent li {  ul#LC_TabMainMenuContent li a {
  vertical-align: bottom;      color: $fontmenu;
  border-bottom: solid 1px RGB(175, 175, 175);  
  padding: 5px 10px 5px 10px;  
  margin-right:5px;  
  margin-bottom:3px;  
  font-weight: bold;  
  background: url(/adm/lonIcons/lightGreyBG.png) repeat-x left top;  
 }  
   
 ol#LC_TabMainMenuContent li a {  
  color: RGB(47, 47, 47);  
  text-decoration: none;   text-decoration: none;
 }  }
   
Line 5954  ul.LC_TabContent li a, ul.LC_TabContent Line 5938  ul.LC_TabContent li a, ul.LC_TabContent
   
 ul.LC_TabContent li:hover, ul.LC_TabContent li.active {  ul.LC_TabContent li:hover, ul.LC_TabContent li.active {
         background:#FFFFFF url(/adm/lonIcons/open.gif) no-repeat scroll right center;          background:#FFFFFF url(/adm/lonIcons/open.gif) no-repeat scroll right center;
  border-bottom:solid 1px #FFFFFF;   border-bottom:solid 2px #FFFFFF;
  padding-right: 16px;   padding-right: 16px;
 }  }
   
Line 5964  ul.LC_TabContentBigger li { Line 5948  ul.LC_TabContentBigger li {
  border-left:solid 1px $lg_border_color;   border-left:solid 1px $lg_border_color;
  padding:5px 10px 5px 10px;   padding:5px 10px 5px 10px;
  margin-left:2px;   margin-left:2px;
  background:url(/adm/lonIcons/lightGreyBG.png) repeat-x left top;   background: #d9d9d9;
   }
   
   #maincoursedoc {
    clear:both;
 }  }
   
 ul.LC_TabContentBigger li:hover,   ul.LC_TabContentBigger li:hover, 
Line 5980  ul.LC_TabContentBigger li a { Line 5968  ul.LC_TabContentBigger li a {
   
 ol#LC_MenuBreadcrumbs,   ol#LC_MenuBreadcrumbs, 
 ol#LC_PathBreadcrumbs,   ol#LC_PathBreadcrumbs, 
 ul.LC_CourseBreadcrumbs {  ul#LC_CourseBreadcrumbs {
  border-top: solid 1px RGB(255, 255, 255);  
  height: 20px;  
  line-height: 20px;  
  vertical-align: bottom;  
  margin: 0 0 30px 0;  
  padding-left: 10px;   padding-left: 10px;
    margin: 0;
  list-style-position: inside;   list-style-position: inside;
  background: url(/adm/lonIcons/lightGreyBG.png) repeat-x left top;  
 }  }
   
 ol#LC_MenuBreadcrumbs li,   ol#LC_MenuBreadcrumbs li, 
 ol#LC_PathBreadcrumbs li,   ol#LC_PathBreadcrumbs li, 
 ul.LC_CourseBreadcrumbs li {  ul#LC_CourseBreadcrumbs li {
 /*      display: inline;
  background: url(/adm/lonIcons/arrow_white.png) no-repeat left center;      white-space: nowrap;
 */  
  display: inline;  
  padding: 0 0 0 10px;  
 /* vertical-align: bottom; */  
  overflow:hidden;  
 }  }
   
 ol#LC_MenuBreadcrumbs li a, ul.LC_CourseBreadcrumbs li a {  ol#LC_MenuBreadcrumbs li a,
   ul#LC_CourseBreadcrumbs li a {
  text-decoration: none;   text-decoration: none;
  font-size:90%;   font-size:90%;
 }  }
Line 6014  ol#LC_PathBreadcrumbs li a { Line 5993  ol#LC_PathBreadcrumbs li a {
  font-weight:bold;   font-weight:bold;
 }  }
   
 .LC_BoxPadding {  .LC_Box {
  padding: 10px;      border: solid 1px $lg_border_color;
 }      padding: 0 10px 10px 10px;
   
 .LC_ContentBoxSpecial {  
  border: solid 1px $lg_border_color;  
 }  
   
 .LC_ContentBoxSpecialContactInfo {  
  border: solid 1px $lg_border_color;  
  max-width:25%;  
  min-width:25%;  
 }  }
   
 .LC_AboutMe_Image {  .LC_AboutMe_Image {
Line 6114  div.LC_columnSection>* { Line 6084  div.LC_columnSection>* {
  overflow:hidden;   overflow:hidden;
 }  }
   
 .ContentBoxSpecialTemplate {  
         border: solid 1px $lg_border_color;  
 }  
   
 .ContentBoxTemplate {  
         padding:10px;  
 }  
   
 div.LC_columnSection > .ContentBoxTemplate,  
 div.LC_columnSection > .ContentBoxSpecialTemplate {  
         width: 600px;  
 }  
   
 .clear {  .clear {
  clear: both;   clear: both;
  line-height: 0;   line-height: 0;
Line 6282  a.LC_toolbarItem { Line 6239  a.LC_toolbarItem {
  background-color:transparent;   background-color:transparent;
 }  }
   
 ul.LC_functionslist li {  ul.LC_funclist li {
   float: left;    float: left;
   white-space: nowrap;    white-space: nowrap;
   height: 35px; /* at least as high as heighest list item */    height: 35px; /* at least as high as heighest list item */
Line 6479  $args - additional optional args support Line 6436  $args - additional optional args support
   
              only_body      -> is true will set &bodytag() onlybodytag               only_body      -> is true will set &bodytag() onlybodytag
                                     arg on                                      arg on
              no_nav_bar     -> is true will set &bodytag() notopbar arg on               no_nav_bar     -> is true will set &bodytag() no_nav_bar arg on
              add_entries    -> additional attributes to add to the  <body>               add_entries    -> additional attributes to add to the  <body>
              domain         -> force to color decorate a page for a                domain         -> force to color decorate a page for a 
                                     specific domain                                      specific domain
Line 6493  $args - additional optional args support Line 6450  $args - additional optional args support
                                     a html attribute                                      a html attribute
              force_register -> if is true will turn on the &bodytag()               force_register -> if is true will turn on the &bodytag()
                                     $forcereg arg                                      $forcereg arg
              body_title     -> alternate text to use instead of $title  
                                     in the title box that appears, this text  
                                     is not auto translated like the $title is  
              frameset       -> if true will start with a <frameset>               frameset       -> if true will start with a <frameset>
                                     rather than <body>                                      rather than <body>
              no_title       -> if true the title bar won't be shown  
              skip_phases    -> hash ref of                skip_phases    -> hash ref of 
                                     head -> skip the <html><head> generation                                      head -> skip the <html><head> generation
                                     body -> skip all <body> generation                                      body -> skip all <body> generation
Line 6540  sub start_page { Line 6493  sub start_page {
     my $attr_string = &make_attr_string($args->{'force_register'},      my $attr_string = &make_attr_string($args->{'force_register'},
  $args->{'add_entries'});   $args->{'add_entries'});
     $result .= "\n<frameset $attr_string>\n";      $result .= "\n<frameset $attr_string>\n";
  } else {          } else {
     $result .=              $result .=
  &bodytag($title,                   &bodytag($title, 
  $args->{'function'},       $args->{'add_entries'},                           $args->{'function'},       $args->{'add_entries'},
  $args->{'only_body'},      $args->{'domain'},                           $args->{'only_body'},      $args->{'domain'},
  $args->{'force_register'}, $args->{'body_title'},                           $args->{'force_register'}, $args->{'no_nav_bar'},
  $args->{'no_nav_bar'},     $args->{'bgcolor'},                           $args->{'bgcolor'},        $args->{'no_inline_link'},
  $args->{'no_title'},       $args->{'no_inline_link'},                           $args);
  $args);          }
  }  
     }      }
   
     if ($args->{'js_ready'}) {      if ($args->{'js_ready'}) {
Line 6559  sub start_page { Line 6511  sub start_page {
  $result = &html_encode($result);   $result = &html_encode($result);
     }      }
   
  #Breadcrumbs      # Preparation for new and consistent functionlist at top of screen
       # if ($args->{'functionlist'}) {
       #            $result .= &build_functionlist();
       #}
   
       # Don't add anything more if only_body wanted
       return $result if $args->{'only_body'};
   
       #Breadcrumbs
     if (exists($args->{'bread_crumbs'}) or exists($args->{'bread_crumbs_component'})) {      if (exists($args->{'bread_crumbs'}) or exists($args->{'bread_crumbs_component'})) {
  &Apache::lonhtmlcommon::clear_breadcrumbs();   &Apache::lonhtmlcommon::clear_breadcrumbs();
  #if any br links exists, add them to the breadcrumbs   #if any br links exists, add them to the breadcrumbs
Line 6803  Returns either 'student','coordinator',' Line 6763  Returns either 'student','coordinator','
   
 ###############################################  ###############################################
 sub get_users_function {  sub get_users_function {
     my $function = 'student';      my $function = 'norole';
       if ($env{'request.role'}=~/^(st)/) {
           $function='student';
       }
     if ($env{'request.role'}=~/^(cc|in|ta|ep)/) {      if ($env{'request.role'}=~/^(cc|in|ta|ep)/) {
         $function='coordinator';          $function='coordinator';
     }      }
     if ($env{'request.role'}=~/^(su|dc|ad|li)/) {      if ($env{'request.role'}=~/^(su|dc|ad|li)/) {
         $function='admin';          $function='admin';
     }      }
     if (($env{'request.role'}=~/^(au|ca)/) ||      if (($env{'request.role'}=~/^(au|ca|aa)/) ||
         ($ENV{'REQUEST_URI'}=~/^(\/priv|\~)/)) {          ($ENV{'REQUEST_URI'}=~/^(\/priv|\~)/)) {
         $function='author';          $function='author';
     }      }
Line 6821  sub get_users_function { Line 6784  sub get_users_function {
   
 =pod  =pod
   
   =item * &show_course()
   
   Used by lonmenu.pm and lonroles.pm to determine whether to use the word
   'Courses' or 'Roles' in inline navigation and on screen displaying user's roles.
   
   Inputs:
   None
   
   Outputs:
   Scalar: 1 if 'Course' to be used, 0 otherwise.
   
   =cut
   
   ###############################################
   sub show_course {
       my $course = !$env{'user.adv'};
       if (!$env{'user.adv'}) {
           foreach my $env (keys(%env)) {
               next if ($env !~ m/^user\.priv\./);
               if ($env !~ m/^user\.priv\.(?:st|cm)/) {
                   $course = 0;
                   last;
               }
           }
       }
       return $course;
   }
   
   ###############################################
   
   =pod
   
 =item * &check_user_status()  =item * &check_user_status()
   
 Determines current status of supplied role for a  Determines current status of supplied role for a
Line 7564  ENDSCRIPT Line 7559  ENDSCRIPT
   
     my $output = <<"END_BLOCK";      my $output = <<"END_BLOCK";
 <script type="text/javascript">  <script type="text/javascript">
   // <![CDATA[
 function validateEntry(callingForm) {  function validateEntry(callingForm) {
   
     var checkok = 1;      var checkok = 1;
Line 7632  function validateEntry(callingForm) { Line 7628  function validateEntry(callingForm) {
   
 $newuserscript  $newuserscript
   
   // ]]>
 </script>  </script>
   
 $new_user_create  $new_user_create
Line 8526  sub csv_print_samples { Line 8523  sub csv_print_samples {
     $r->print(&mt('Samples').'<br />'.&start_data_table().      $r->print(&mt('Samples').'<br />'.&start_data_table().
               &start_data_table_header_row());                &start_data_table_header_row());
     foreach my $sample (sort({$a <=> $b} keys(%{ $samples->[0] }))) {       foreach my $sample (sort({$a <=> $b} keys(%{ $samples->[0] }))) { 
         $r->print('<th>'.&mt('Column&nbsp;[_1]',($sample+1)).'</th>'); }          $r->print('<th>'.&mt('Column [_1]',($sample+1)).'</th>'); }
     $r->print(&end_data_table_header_row());      $r->print(&end_data_table_header_row());
     foreach my $hash (@$samples) {      foreach my $hash (@$samples) {
  $r->print(&start_data_table_row());   $r->print(&start_data_table_row());
Line 10239  sub escape_url { Line 10236  sub escape_url {
     return join('/',@urlslices).'/'.$lastitem;      return join('/',@urlslices).'/'.$lastitem;
 }  }
   
 # -------------------------------------------------------- Initliaze user login  sub compare_arrays {
       my ($arrayref1,$arrayref2) = @_;
       my (@difference,%count);
       @difference = ();
       %count = ();
       if ((ref($arrayref1) eq 'ARRAY') && (ref($arrayref2) eq 'ARRAY')) {
           foreach my $element (@{$arrayref1}, @{$arrayref2}) { $count{$element}++; }
           foreach my $element (keys(%count)) {
               if ($count{$element} == 1) {
                   push(@difference,$element);
               }
           }
       }
       return @difference;
   }
   
   # -------------------------------------------------------- Initialize user login
 sub init_user_environment {  sub init_user_environment {
     my ($r, $username, $domain, $authhost, $form, $args) = @_;      my ($r, $username, $domain, $authhost, $form, $args) = @_;
     my $lonids=$Apache::lonnet::perlvar{'lonIDsDir'};      my $lonids=$Apache::lonnet::perlvar{'lonIDsDir'};
Line 10293  sub init_user_environment { Line 10306  sub init_user_environment {
     my ($httpbrowser,$clientbrowser,$clientversion,$clientmathml,      my ($httpbrowser,$clientbrowser,$clientversion,$clientmathml,
         $clientunicode,$clientos) = &decode_user_agent($r);          $clientunicode,$clientos) = &decode_user_agent($r);
   
 # -------------------------------------- Any accessibility options to remember?  
     if (($form->{'interface'}) && ($form->{'remember'} eq 'true')) {  
  foreach my $option ('imagesuppress','appletsuppress',  
     'embedsuppress','fontenhance','blackwhite') {  
     if ($form->{$option} eq 'true') {  
  &Apache::lonnet::put('environment',{$option => 'on'},  
      $domain,$username);  
     } else {  
  &Apache::lonnet::del('environment',[$option],  
      $domain,$username);  
     }  
  }  
     }  
 # ------------------------------------------------------------- Get environment  # ------------------------------------------------------------- Get environment
   
     my %userenv = &Apache::lonnet::dump('environment',$domain,$username);      my %userenv = &Apache::lonnet::dump('environment',$domain,$username);
Line 10323  sub init_user_environment { Line 10323  sub init_user_environment {
     if ($userenv{'texengine'} eq 'ttm') { $clientmathml=1; }      if ($userenv{'texengine'} eq 'ttm') { $clientmathml=1; }
   
 # --------------- Do not trust query string to be put directly into environment  # --------------- Do not trust query string to be put directly into environment
     foreach my $option ('imagesuppress','appletsuppress',      foreach my $option ('interface','localpath','localres') {
  'embedsuppress','fontenhance','blackwhite',          $form->{$option}=~s/[\n\r\=]//gs;
  'interface','localpath','localres') {  
  $form->{$option}=~s/[\n\r\=]//gs;  
     }      }
 # --------------------------------------------------------- Write first profile  # --------------------------------------------------------- Write first profile
   
Line 10360  sub init_user_environment { Line 10358  sub init_user_environment {
     $form->{'interface'}=~s/\W//gs;      $form->{'interface'}=~s/\W//gs;
     $initial_env{"browser.interface"} = $form->{'interface'};      $initial_env{"browser.interface"} = $form->{'interface'};
     $env{'browser.interface'}=$form->{'interface'};      $env{'browser.interface'}=$form->{'interface'};
     foreach my $option ('imagesuppress','appletsuppress',  
  'embedsuppress','fontenhance','blackwhite') {  
  if (($form->{$option} eq 'true') ||  
     ($userenv{$option} eq 'on')) {  
     $initial_env{"browser.$option"} = "on";  
  }  
     }  
  }   }
   
         foreach my $tool ('aboutme','blog','portfolio') {          foreach my $tool ('aboutme','blog','portfolio') {

Removed from v.1.804  
changed lines
  Added in v.1.846


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