Diff for /loncom/interface/lonpickcourse.pm between versions 1.5 and 1.9

version 1.5, 2003/03/27 02:05:43 version 1.9, 2003/10/13 22:24:51
Line 33  use Apache::Constants qw(:common); Line 33  use Apache::Constants qw(:common);
 use Apache::loncommon;  use Apache::loncommon;
 use Apache::loncoursedata;  use Apache::loncoursedata;
 use Apache::lonnet;  use Apache::lonnet;
   use Apache::lonlocal;
   
 sub handler {  sub handler {
     my $r = shift;      my $r = shift;
     $r->content_type('text/html');      &Apache::loncommon::content_type($r,'text/html');
     $r->send_http_header;      $r->send_http_header;
     return OK if $r->header_only;      return OK if $r->header_only;
   
Line 73  ENDDOCUMENT Line 74  ENDDOCUMENT
                       '2592000' => 'last month',                        '2592000' => 'last month',
                       '7776000' => 'last three months',                        '7776000' => 'last three months',
                       '15552000' => 'last six months',                        '15552000' => 'last six months',
                       '31104000' => 'last year'));                        '31104000' => 'last year',
                         'select_form_order' =>
                         ['-1','86400','604800','2592000','7776000',
         '15552000','31104000']));
                 
     $r->print(&Apache::loncommon::bodytag("Selecting a Course"));      $r->print(&Apache::loncommon::bodytag("Selecting a Course"));
       my %lt=&Apache::lonlocal::texthash(
          'cac' => 'Course Activity',
          'cde' => 'Course Description',
          'cdo' => 'Course Domain');
     $r->print(<<ENDSCRIPT);      $r->print(<<ENDSCRIPT);
 <script>  <script>
 function gochoose(cname,cdom) {  function gochoose(cname,cdom) {
Line 83  function gochoose(cname,cdom) { Line 91  function gochoose(cname,cdom) {
     var slct=opener.document.$ENV{'form.form'}.$ENV{'form.cdomelement'};      var slct=opener.document.$ENV{'form.form'}.$ENV{'form.cdomelement'};
     var i;      var i;
     for (i=0;i<slct.length;i++) {      for (i=0;i<slct.length;i++) {
         if (slct[i]==cdom) { slct.selectedIndex=i; }          if (slct.options[i].value==cdom) { slct.selectedIndex=i; }
     }      }
     self.close();      self.close();
 }  }
Line 93  function gochoose(cname,cdom) { Line 101  function gochoose(cname,cdom) {
 <input type="hidden" name="cdomelement" value="$ENV{'form.cdomelement'}" />  <input type="hidden" name="cdomelement" value="$ENV{'form.cdomelement'}" />
 <input type="hidden" name="form" value="$ENV{'form.form'}" />  <input type="hidden" name="form" value="$ENV{'form.form'}" />
   
 Course Activity: $sincefilterform  $lt{'cac'}: $sincefilterform
 <br />  <br />
 Course Domain: $domainselectform  $lt{'cdo'}: $domainselectform
 <br />  <br />
 Course Description:  $lt{'cde'}:
 <input type="text" name="descriptfilter" size="40" value="$descriptfilter" />  <input type="text" name="descriptfilter" size="40" value="$descriptfilter" />
 <p><input type="submit" name="gosearch" value="Search" /></p>  <p><input type="submit" name="gosearch" value="Search" /></p>
 </form>  </form>
 <hr />  <hr />
 ENDSCRIPT  ENDSCRIPT
     $r->rflush();  
 # ---------------------------------------------------------------- Get the data  # ---------------------------------------------------------------- Get the data
     if ($ENV{'form.gosearch'}) {      if ($ENV{'form.gosearch'}) {
           $r->print(&mt('Searching').' ...<br />&nbsp;<br />');
           $r->rflush();
  unless ($descriptfilter) { $descriptfilter='.'; }   unless ($descriptfilter) { $descriptfilter='.'; }
         my $timefilter=($sincefilter==-1?1:time-$sincefilter);          my $timefilter=($sincefilter==-1?1:time-$sincefilter);
  my %courses=   my %courses=

Removed from v.1.5  
changed lines
  Added in v.1.9


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