Diff for /loncom/interface/lonhelper.pm between versions 1.67 and 1.68

version 1.67, 2004/03/31 05:23:59 version 1.68, 2004/04/19 15:40:08
Line 583  sub display { Line 583  sub display {
     }      }
   
     # Phase 4: Display.      # Phase 4: Display.
     my $stateTitle = &mt($state->title());      my $stateTitle=&mt($state->title());
     my $helperTitle = &mt($self->{TITLE});      my $helperTitle = &mt($self->{TITLE});
     my $bodytag = &Apache::loncommon::bodytag($helperTitle,'','');      my $bodytag = &Apache::loncommon::bodytag($helperTitle,'','');
     my $previous = HTML::Entities::encode(&mt("<- Previous"), '<>&"');      my $previous = HTML::Entities::encode(&mt("<- Previous"), '<>&"');
Line 593  sub display { Line 593  sub display {
   
     $result .= <<HEADER;      $result .= <<HEADER;
 <html>  <html>
   <script type="text/javascript" language="Javascript" >
       var editbrowser;
       function openbrowser(formname,elementname,only,omit) {
           var url = '/res/?';
           if (editbrowser == null) {
               url += 'launch=1&';
           }
           url += 'catalogmode=interactive&';
           url += 'mode=parmset&';
           url += 'form=' + formname + '&';
           if (only != null) {
               url += 'only=' + only + '&';
           } 
           if (omit != null) {
               url += 'omit=' + omit + '&';
           }
           url += 'element=' + elementname + '';
           var title = 'Browser';
           var options = 'scrollbars=1,resizable=1,menubar=0';
           options += ',width=700,height=600';
           editbrowser = open(url,title,options,'1');
           editbrowser.focus();
       }
   </script>
     <head>      <head>
         <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />          <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
         <title>$loncapaHelper: $helperTitle</title>          <title>$loncapaHelper: $helperTitle</title>
Line 1206  SCRIPT Line 1230  SCRIPT
     # Only print "select all" and "unselect all" if there are five or      # Only print "select all" and "unselect all" if there are five or
     # more choices; fewer then that and it looks silly.      # more choices; fewer then that and it looks silly.
     if ($self->{'multichoice'} && scalar(@{$self->{CHOICES}}) > 4) {      if ($self->{'multichoice'} && scalar(@{$self->{CHOICES}}) > 4) {
           my %lt=&Apache::lonlocal::texthash(
    'sa'  => "Select All",
           'ua'  => "Unselect All");
         $buttons = <<BUTTONS;          $buttons = <<BUTTONS;
 <br />  <br />
 <input type="button" onclick="checkall(true, '$var')" value="Select All" />  <input type="button" onclick="checkall(true, '$var')" value="$lt{'sa'}" />
 <input type="button" onclick="checkall(false, '$var')" value="Unselect All" />  <input type="button" onclick="checkall(false, '$var')" value="$lt{'ua'}" />
 <br />&nbsp;  <br />&nbsp;
 BUTTONS  BUTTONS
     }      }
Line 1276  BUTTONS Line 1303  BUTTONS
             $choiceLabel = eval($choiceLabel);              $choiceLabel = eval($choiceLabel);
             $choiceLabel = &$choiceLabel($helper, $self);              $choiceLabel = &$choiceLabel($helper, $self);
         }          }
    &Apache::lonnet::logthis("TITLE TRANSLATION >$choiceLabel<");
         $result .= "/></td><td> " . &mtn($choiceLabel) . "</td></tr>\n";          $result .= "/></td><td> " . &mtn($choiceLabel) . "</td></tr>\n";
     }      }
     $result .= "</table>\n\n\n";      $result .= "</table>\n\n\n";
Line 1893  sub render { Line 1921  sub render {
     }      }
 </script>  </script>
 SCRIPT  SCRIPT
           my %lt=&Apache::lonlocal::texthash(
    'sar'  => "Select All Resources",
           'uar'  => "Unselect All Resources");
   
         $buttons = <<BUTTONS;          $buttons = <<BUTTONS;
 <br /> &nbsp;  <br /> &nbsp;
 <input type="button" onclick="checkall(true, '$var')" value="Select All Resources" />  <input type="button" onclick="checkall(true, '$var')" value="$lt{'sar'}" />
 <input type="button" onclick="checkall(false, '$var')" value="Unselect All Resources" />  <input type="button" onclick="checkall(false, '$var')" value="$lt{'uar'}" />
 <br /> &nbsp;  <br /> &nbsp;
 BUTTONS  BUTTONS
     }      }
Line 2104  sub render { Line 2136  sub render {
 </script>  </script>
 SCRIPT  SCRIPT
   
         my $selectAllStudents = &mt('Select All Students');           my %lt=&Apache::lonlocal::texthash(
  my $unselectAllStudents = &mt('Unselect All Students');                      'ocs'  => "Select Only Current Students",
                       'sas'  => "Select All Students",
                       'uas'  => "Unselect All Students",
                       'sfsg' => "Select for Section/Group",
       'ufsg' => "Unselect for Section/Group");
    
         $buttons = <<BUTTONS;          $buttons = <<BUTTONS;
 <br />  <br />
 <input type="button" onclick="checkactive()" value="Select Only Current Students" />  <input type="button" onclick="checkactive()" value="$lt{'ocs'}" />
 <input type="button" onclick="checkall(true, '$var')" value="$selectAllStudents" />  <input type="button" onclick="checkall(true, '$var')" value="$lt{'sas'}" />
 <input type="button" onclick="checkall(false, '$var')" value="$unselectAllStudents" />  <input type="button" onclick="checkall(false, '$var')" value="$lt{'uas'}" />
 <input type="button" onclick="checksec(true)" value="Select for Section/Group">  <input type="button" onclick="checksec(true)" value="$lt{'sfsg'}">
 <input type="text" size="5" name="chksec">&nbsp;  <input type="text" size="5" name="chksec">&nbsp;
 <input type="button" onclick="checksec(false)" value="Unselect for Section/Group">  <input type="button" onclick="checksec(false)" value="$lt{'ufsg'}">
 <br />  <br />
 BUTTONS  BUTTONS
     }      }
Line 2172  BUTTONS Line 2209  BUTTONS
  }   }
     }      }
   
     my $name = &mt($self->{'coursepersonnel'} ? 'Name' : 'Student Name');      my $name = $self->{'coursepersonnel'} ? &mt('Name') : &mt('Student Name');
       &Apache::lonnet::logthis("THE NAME IS >$name<");
     my $type = 'radio';      my $type = 'radio';
     if ($self->{'multichoice'}) { $type = 'checkbox'; }      if ($self->{'multichoice'}) { $type = 'checkbox'; }
     $result .= "<table cellspacing='2' cellpadding='2' border='0'>\n";      $result .= "<table cellspacing='2' cellpadding='2' border='0'>\n";
     $result .= "<tr><td></td><td align='center'><b>$name</b></td>".      $result .= "<tr><td></td><td align='center'><b>$name</b></td>".
         "<td align='center'><b>" . &mt('Section') . "</b></td>" .           "<td align='center'><b>" . &mt('Section') . "</b></td>" . 
  "<td align='center'><b>Status</b></td>" .    "<td align='center'><b>".&mt('Status')."</b></td>" . 
  "<td align='center'><b>" . &mt("Role") . "</b></td></tr>" .   "<td align='center'><b>" . &mt("Role") . "</b></td>" .
  "<td align='center'><b>Username:Domain</b></td></tr>";   "<td align='center'><b>".&mt('Username').":".&mt('Domain')."</b></td></tr>";
   
     my $checked = 0;      my $checked = 0;
     for my $choice (@$choices) {      for my $choice (@$choices) {
Line 2403  sub render { Line 2441  sub render {
     }      }
 </script>  </script>
 SCRIPT  SCRIPT
         my $selectAllFiles = &mt("Select All Files");         my %lt=&Apache::lonlocal::texthash(
  my $unselectAllFiles = &mt("Unselect All Files");   'saf'  => "Select All Files",
         $buttons = <<BUTTONS;          'uaf'  => "Unselect All Files");
          $buttons = <<BUTTONS;
 <br /> &nbsp;  <br /> &nbsp;
 <input type="button" onclick="checkall(true, '$var')" value="$selectAllFiles" />  <input type="button" onclick="checkall(true, '$var')" value="$lt{'saf'}" />
 <input type="button" onclick="checkall(false, '$var')" value="$unselectAllFiles" />  <input type="button" onclick="checkall(false, '$var')" value="$lt{'uaf'}" />
 BUTTONS  BUTTONS
   
         my $selectAllPublished = &mt("Select All Published");         my %lt=&Apache::lonlocal::texthash(
  my $unselectAllPublished= &mt("UnselectAllPublished");   'sap'  => "Select All Published",
           'uap'  => "Unselect All Published");
         if ($helper->{VARS}->{'construction'}) {          if ($helper->{VARS}->{'construction'}) {
             $buttons .= <<BUTTONS;         $buttons .= <<BUTTONS;
 <input type="button" onclick="checkallclass(true, 'Published')" value="$selectAllPublished" />  <input type="button" onclick="checkallclass(true, 'Published')" value="$lt{'sap'}" />
 <input type="button" onclick="checkallclass(false, 'Published')" value="$unselectAllPublished" />  <input type="button" onclick="checkallclass(false, 'Published')" value="$lt{'uap'}" />
 <br /> &nbsp;  <br /> &nbsp;
 BUTTONS  BUTTONS
        }         }

Removed from v.1.67  
changed lines
  Added in v.1.68


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