Diff for /loncom/interface/loncommon.pm between versions 1.867 and 1.875

version 1.867, 2009/07/27 11:30:05 version 1.875, 2009/08/03 16:47:53
Line 529  sub coursebrowser_javascript { Line 529  sub coursebrowser_javascript {
                 }                  }
             }                   }     
         }          }
           if (formname == 'ccrs') {
               var ownername = document.forms[formid].ccuname.value;
               var ownerdom =  document.forms[formid].ccdomain.options[document.forms[formid].ccdomain.selectedIndex].value;
               url += '&cloner='+ownername+':'+ownerdom;
           }
         if (multflag !=null && multflag != '') {          if (multflag !=null && multflag != '') {
             url += '&multiple='+multflag;              url += '&multiple='+multflag;
         }          }
Line 620  function setSect(sectionlist) { Line 625  function setSect(sectionlist) {
   
 sub selectcourse_link {  sub selectcourse_link {
    my ($form,$unameele,$udomele,$desc,$extra_element,$multflag,$selecttype)=@_;     my ($form,$unameele,$udomele,$desc,$extra_element,$multflag,$selecttype)=@_;
      my $linktext = &mt('Select Course');
      if ($selecttype eq 'Community') {
          $linktext = &mt('Select Community'); 
      }
    return '<span class="LC_nobreak">'     return '<span class="LC_nobreak">'
          ."<a href='"           ."<a href='"
          .'javascript:opencrsbrowser("'.$form.'","'.$unameele           .'javascript:opencrsbrowser("'.$form.'","'.$unameele
          .'","'.$udomele.'","'.$desc.'","'.$extra_element           .'","'.$udomele.'","'.$desc.'","'.$extra_element
          .'","'.$multflag.'","'.$selecttype.'");'           .'","'.$multflag.'","'.$selecttype.'");'
          ."'>".&mt('Select Course').'</a>'           ."'>".$linktext.'</a>'
          .'</span>';           .'</span>';
 }  }
   
Line 1787  sub select_level_form { Line 1796  sub select_level_form {
   
 =pod  =pod
   
 =item * &select_dom_form($defdom,$name,$includeempty,$showdomdesc,$autosubmit)  =item * &select_dom_form($defdom,$name,$includeempty,$showdomdesc,$onchange)
   
 Returns a string containing a <select name='$name' size='1'> form to   Returns a string containing a <select name='$name' size='1'> form to 
 allow a user to select the domain to preform an operation in.    allow a user to select the domain to preform an operation in.  
Line 1798  selected"); Line 1807  selected");
   
 If the $showdomdesc flag is set, the domain name is followed by the domain description.  If the $showdomdesc flag is set, the domain name is followed by the domain description.
   
 If the $autosubmit flag is set, the form containing the domain selector will be auto-submitted by an onchange action.    The optional $onchange argumnet specifies what should occur if the domain selector is changed, e.g., 'this.form.submit()' if the form is to be automatically submitted.  
   
 =cut  =cut
   
 #-------------------------------------------  #-------------------------------------------
 sub select_dom_form {  sub select_dom_form {
     my ($defdom,$name,$includeempty,$showdomdesc,$autosubmit) = @_;      my ($defdom,$name,$includeempty,$showdomdesc,$onchange) = @_;
     my $onchange;      if ($onchange) {
     if ($autosubmit) {          $onchange = ' onchange="'.$onchange.'"';
         $onchange = ' onchange="this.form.submit()"';  
     }      }
     my @domains = sort {lc($a) cmp lc($b)} (&Apache::lonnet::all_domains());      my @domains = sort {lc($a) cmp lc($b)} (&Apache::lonnet::all_domains());
     if ($includeempty) { @domains=('',@domains); }      if ($includeempty) { @domains=('',@domains); }
Line 3831  sub parse_block_record { Line 3839  sub parse_block_record {
     return ($setuname,$setudom,$title,$blocks);      return ($setuname,$setudom,$title,$blocks);
 }  }
   
 sub build_block_table {  
     my ($startblock,$endblock,$setters) = @_;  
     my %lt = &Apache::lonlocal::texthash(  
         'cacb' => 'Currently active communication blocks',  
         'cour' => 'Course',  
         'dura' => 'Duration',  
         'blse' => 'Block set by'  
     );  
     my $output;  
     $output = '<br />'.$lt{'cacb'}.':<br />';  
     $output .= &start_data_table();  
     $output .= '  
 <tr>  
  <th>'.$lt{'cour'}.'</th>  
  <th>'.$lt{'dura'}.'</th>  
  <th>'.$lt{'blse'}.'</th>  
 </tr>  
 ';  
     foreach my $course (keys(%{$setters})) {  
         my %courseinfo=&Apache::lonnet::coursedescription($course);  
         for (my $i=0; $i<@{$$setters{$course}{staff}}; $i++) {  
             my ($uname,$udom) = @{$$setters{$course}{staff}[$i]};  
             my $fullname = &plainname($uname,$udom);  
             if (defined($env{'user.name'}) && defined($env{'user.domain'})  
                 && $env{'user.name'} ne 'public'   
                 && $env{'user.domain'} ne 'public') {  
                 $fullname = &aboutmewrapper($fullname,$uname,$udom);  
             }  
             my ($openblock,$closeblock) = @{$$setters{$course}{times}[$i]};  
             $openblock = &Apache::lonlocal::locallocaltime($openblock);  
             $closeblock= &Apache::lonlocal::locallocaltime($closeblock);  
             $output .= &Apache::loncommon::start_data_table_row().  
                        '<td>'.$courseinfo{'description'}.'</td>'.  
                        '<td>'.$openblock.' to '.$closeblock.'</td>'.  
                        '<td>'.$fullname.'</td>'.  
                         &Apache::loncommon::end_data_table_row();  
         }  
     }  
     $output .= &end_data_table();  
 }  
 sub blocking_status {  sub blocking_status {
   my $blocked;    my $blocked;
   my ($activity,$uname,$udom) = @_;    my ($activity,$uname,$udom) = @_;
Line 3903  END_MYBLOCK Line 3871  END_MYBLOCK
   my $popupUrl = "/adm/blockingstatus/$querystring";    my $popupUrl = "/adm/blockingstatus/$querystring";
   $output .= <<"END_BLOCK";    $output .= <<"END_BLOCK";
 <div class='LC_comblock'>  <div class='LC_comblock'>
   <a onclick='openWindow("$popupUrl","Blocking Table",600,300,"no","no");return false;' href='/adm/blockingstatus/$querystring'>    <a onclick='openWindow("$popupUrl","Blocking Table",600,300,"no","no");return false;' href='/adm/blockingstatus/$querystring'
   <img class='LC_noBorder LC_middle' src='/res/adm/pages/comblock.png' alt='Communication Blocking'/></a>    title='Communication Blocked'>
   <a onclick='openWindow("$popupUrl","Blocking Table",600,300,"no","no");return false;' href='/adm/blockingstatus/$querystring'>Communication Blocking</a>    <img class='LC_noBorder LC_middle' title='Communication Blocked' src='/res/adm/pages/comblock.png' alt='Communication Blocked'/></a>
     <a onclick='openWindow("$popupUrl","Blocking Table",600,300,"no","no");return false;' href='/adm/blockingstatus/$querystring' 
     title='Communication Blocked'>Communication Blocked</a>
 </div>  </div>
   
 END_BLOCK  END_BLOCK
Line 5601  table.LC_double_column tr td.LC_right_co Line 5571  table.LC_double_column tr td.LC_right_co
   vertical-align: top;    vertical-align: top;
 }  }
   
 span.LC_role_level {  
   font-weight: bold;  
 }  
   
 div.LC_left_float {  div.LC_left_float {
   float: left;    float: left;
   padding-right: 5%;    padding-right: 5%;
Line 5888  ul.LC_TabContent { Line 5854  ul.LC_TabContent {
  background: $sidebg;   background: $sidebg;
  border-bottom: solid 1px $lg_border_color;   border-bottom: solid 1px $lg_border_color;
  list-style:none;   list-style:none;
  margin: -10px -10px 0 -10px;   margin: 0 -10px;
  padding: 0;   padding: 0;
 }  }
   
 ul.LC_TabContentBigger {  
         display:block;  
         list-style:none;  
         padding: 0;  
 }  
   
   
 ul.LC_TabContent li,  ul.LC_TabContent li,
 ul.LC_TabContentBigger li {  ul.LC_TabContentBigger li {
  display: inline;  
  border-right: solid 1px $lg_border_color;  
  float:left;   float:left;
  line-height:140%;  
  white-space:nowrap;  
 }  }
   
 ul#LC_TabMainMenuContent li a {  ul#LC_TabMainMenuContent li a {
Line 5942  ul.LC_TabContent li:hover, ul.LC_TabCont Line 5897  ul.LC_TabContent li:hover, ul.LC_TabCont
  padding-right: 16px;   padding-right: 16px;
 }  }
   
   #maincoursedoc {
    clear:both;
   }
   
   ul.LC_TabContentBigger {
           display:block;
           list-style:none;
           padding: 0;
   }
   
 ul.LC_TabContentBigger li {  ul.LC_TabContentBigger li {
  vertical-align:bottom;          vertical-align:bottom;
  border-top:solid 1px $lg_border_color;          height: 30px;
  border-left:solid 1px $lg_border_color;          font-size:110%;
  padding:5px 10px 5px 10px;          font-weight:bold;
  margin-left:2px;          color: #737373;
  background: #d9d9d9;  
 }  }
   
 #maincoursedoc {  
  clear:both;  ul.LC_TabContentBigger li a {
           background:url('/adm/lonIcons/tabbgleft.gif') left bottom no-repeat;
    height: 30px;
    line-height: 30px;
    text-align: center;
    display: block;
    text-decoration: none;
 }  }
   
 ul.LC_TabContentBigger li:hover,   ul.LC_TabContentBigger li:hover a, 
 ul.LC_TabContentBigger li.active {  ul.LC_TabContentBigger li.active a {
  background: #ffffff;   background:url('/adm/lonIcons/tabbgleft.gif') left top no-repeat;
  color:$font;   color:$font;
    text-decoration: underline;
 }  }
   
 ul.LC_TabContentBigger li,   
 ul.LC_TabContentBigger li a {  ul.LC_TabContentBigger li b {
  font-size:110%;   background: url('/adm/lonIcons/tabbgright.gif') no-repeat right bottom;
  font-weight:bold;   display: block;
  color: #737373;   float: left;
    padding: 0 30px;
 }  }
   
   ul.LC_TabContentBigger li:hover b,
   ul.LC_TabContentBigger li.active b {
           background:url('/adm/lonIcons/tabbgright.gif') right top no-repeat;
           color:$font;
    border-bottom: 1px solid #FFFFFF;
   }
   
   
 ul.LC_CourseBreadcrumbs {  ul.LC_CourseBreadcrumbs {
   background: $sidebg;    background: $sidebg;
   line-height: 32px;    line-height: 32px;
Line 8573  sub csv_print_select_table { Line 8553  sub csv_print_select_table {
  my ($value,$display,$defaultcol)=@{ $array_ref };   my ($value,$display,$defaultcol)=@{ $array_ref };
  $r->print(&start_data_table_row().'<td>'.$display.'</td>');   $r->print(&start_data_table_row().'<td>'.$display.'</td>');
   
  $r->print('<td><select name=f'.$i.   $r->print('<td><select name="f'.$i.'"'.
   ' onchange="javascript:flip(this.form,'.$i.');">');    ' onchange="javascript:flip(this.form,'.$i.');">');
  $r->print('<option value="none"></option>');   $r->print('<option value="none"></option>');
  foreach my $sample (sort({$a <=> $b} keys(%{ $samples->[0] }))) {   foreach my $sample (sort({$a <=> $b} keys(%{ $samples->[0] }))) {

Removed from v.1.867  
changed lines
  Added in v.1.875


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