Diff for /loncom/interface/loncommon.pm between versions 1.593 and 1.594

version 1.593, 2007/10/18 21:57:59 version 1.594, 2007/10/22 22:16:38
Line 407  sub coursebrowser_javascript { Line 407  sub coursebrowser_javascript {
                             '&cdomelement='+udom+                              '&cdomelement='+udom+
                                     '&cnameelement='+desc;                                      '&cnameelement='+desc;
         if (extra_element !=null && extra_element != '') {          if (extra_element !=null && extra_element != '') {
             if (formname == 'rolechoice') {              if (formname == 'rolechoice' || formname == 'studentform') {
                 url += '&roleelement='+extra_element;                  url += '&roleelement='+extra_element;
                 if (domainfilter == null || domainfilter == '') {                  if (domainfilter == null || domainfilter == '') {
                     url += '&domainfilter='+extra_element;                      url += '&domainfilter='+extra_element;
Line 1593  input: 4 arguments (two required, two op Line 1593  input: 4 arguments (two required, two op
                             option, and selected by default.                               option, and selected by default. 
     $hide - Value of 'hide' causes hiding of the name of the server,       $hide - Value of 'hide' causes hiding of the name of the server, 
                             if 1 server found, or default, if 0 found.                              if 1 server found, or default, if 0 found.
 output: returns 1 items:   output: returns 2 items: 
 (a) form element which contains either:  (a) form element which contains either:
    (i) <select name="$name">     (i) <select name="$name">
         <option value="$hostid1">$hostid $servers{$hostid}</option>          <option value="$hostid1">$hostid $servers{$hostid}</option>
Line 4979  table.LC_double_column tr td.LC_right_co Line 4979  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 6674  sub csv_print_samples { Line 6678  sub csv_print_samples {
     my ($r,$records) = @_;      my ($r,$records) = @_;
     my $samples = &get_samples($records,3);      my $samples = &get_samples($records,3);
   
     $r->print(&mt('Samples').'<br /><table border="2"><tr>');      $r->print(&mt('Samples').'<br />'.&start_data_table().
                 &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&nbsp;[_1]',($sample+1)).'</th>'); }
     $r->print('</tr>');      $r->print(&end_data_table_header_row());
     foreach my $hash (@$samples) {      foreach my $hash (@$samples) {
  $r->print('<tr>');   $r->print(&start_data_table_row());
  foreach my $sample (sort({$a <=> $b} keys(%{ $samples->[0] }))) {   foreach my $sample (sort({$a <=> $b} keys(%{ $samples->[0] }))) {
     $r->print('<td>');      $r->print('<td>');
     if (defined($$hash{$sample})) { $r->print($$hash{$sample}); }      if (defined($$hash{$sample})) { $r->print($$hash{$sample}); }
     $r->print('</td>');      $r->print('</td>');
  }   }
  $r->print('</tr>');   $r->print(&end_data_table_row());
     }      }
     $r->print('</tr></table><br />'."\n");      $r->print(&end_data_table().'<br />'."\n");
 }  }
   
 ######################################################  ######################################################
Line 6712  sub csv_print_select_table { Line 6717  sub csv_print_select_table {
     my $i=0;      my $i=0;
     my $samples = &get_samples($records,1);      my $samples = &get_samples($records,1);
     $r->print(&mt('Associate columns with student attributes.')."\n".      $r->print(&mt('Associate columns with student attributes.')."\n".
      '<table border="2"><tr>'.        &start_data_table().&start_data_table_header_row().
               '<th>'.&mt('Attribute').'</th>'.                '<th>'.&mt('Attribute').'</th>'.
               '<th>'.&mt('Column').'</th></tr>'."\n");                '<th>'.&mt('Column').'</th>'.
                 &end_data_table_header_row()."\n");
     foreach my $array_ref (@$d) {      foreach my $array_ref (@$d) {
  my ($value,$display,$defaultcol)=@{ $array_ref };   my ($value,$display,$defaultcol)=@{ $array_ref };
  $r->print('<tr><td>'.$display.'</td>');   $r->print(&start_data_table_row().'<tr><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.');">');
Line 6727  sub csv_print_select_table { Line 6733  sub csv_print_select_table {
                       ($sample eq $defaultcol ? ' selected="selected" ' : '').                        ($sample eq $defaultcol ? ' selected="selected" ' : '').
                       '>Column '.($sample+1).'</option>');                        '>Column '.($sample+1).'</option>');
  }   }
  $r->print('</select></td></tr>'."\n");   $r->print('</select></td>'.&end_data_table_row()."\n");
  $i++;   $i++;
     }      }
       $r->print(&end_data_table());
     $i--;      $i--;
     return $i;      return $i;
 }  }
Line 6756  sub csv_samples_select_table { Line 6763  sub csv_samples_select_table {
     my $i=0;      my $i=0;
     #      #
     my $samples = &get_samples($records,3);      my $samples = &get_samples($records,3);
     $r->print('<table border=2><tr><th>'.      $r->print(&start_data_table().
               &mt('Field').'</th><th>'.&mt('Samples').'</th></tr>');                &start_data_table_header_row().'<th>'.
                 &mt('Field').'</th><th>'.&mt('Samples').'</th>'.
                 &end_data_table_header_row());
   
     foreach my $key (sort(keys(%{ $samples->[0] }))) {      foreach my $key (sort(keys(%{ $samples->[0] }))) {
  $r->print('<tr><td><select name="f'.$i.'"'.   $r->print(&start_data_table_row().'<td><select name="f'.$i.'"'.
   ' onchange="javascript:flip(this.form,'.$i.');">');    ' onchange="javascript:flip(this.form,'.$i.');">');
  foreach my $option (@$d) {   foreach my $option (@$d) {
     my ($value,$display,$defaultcol)=@{ $option };      my ($value,$display,$defaultcol)=@{ $option };
Line 6774  sub csv_samples_select_table { Line 6783  sub csv_samples_select_table {
  $r->print($samples->[$line]{$key}."<br />\n");    $r->print($samples->[$line]{$key}."<br />\n"); 
     }      }
  }   }
  $r->print('</td></tr>');   $r->print('</td>'.&end_data_table_row());
  $i++;   $i++;
     }      }
       $r->print(&end_data_table());
     $i--;      $i--;
     return($i);      return($i);
 }  }

Removed from v.1.593  
changed lines
  Added in v.1.594


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