Diff for /rat/lonsequence.pm between versions 1.32 and 1.39

version 1.32, 2007/12/01 01:59:54 version 1.39, 2009/05/16 23:21:12
Line 27 Line 27
 # http://www.lon-capa.org/  # http://www.lon-capa.org/
 #  #
   
   
   
 package Apache::lonsequence;  package Apache::lonsequence;
   
 use strict;  use strict;
Line 100  ENDSCRIPT Line 102  ENDSCRIPT
       '<h1>'.$url.'</h1>');        '<h1>'.$url.'</h1>');
 # ------------------ This is trying to select. Provide buttons and tie %selhash  # ------------------ This is trying to select. Provide buttons and tie %selhash
     if ($env{'form.forceselect'}) { $r->print(<<ENDSELECT);      if ($env{'form.forceselect'}) { $r->print(<<ENDSELECT);
 <form name=fileattr><input type=hidden name=acts value=''>  <form name="fileattr"><input type="hidden" name="acts" value="" />
 <input type="button" name="close" value='CLOSE' onClick="self.close()">  <input type="button" name="close" value="CLOSE" onClick="self.close()" />
 <input type="button" name="groupimport" value='GROUP IMPORT'  <input type="button" name="groupimport" value="GROUP IMPORT"
 onClick="javascript:select_group()">  onClick="javascript:select_group()" />
 </form>     </form>   
 ENDSELECT  ENDSELECT
     my $diropendb =       my $diropendb = 
Line 124  ENDSELECT Line 126  ENDSELECT
 # ----------------------------- successtied is now '1' if in working selectmode  # ----------------------------- successtied is now '1' if in working selectmode
     my ($errtext,$fatal)=&mapread(&Apache::lonnet::filelocation('',$url),'');      my ($errtext,$fatal)=&mapread(&Apache::lonnet::filelocation('',$url),'');
     if ($fatal==1) {      if ($fatal==1) {
        $r->print('<p><b><font color="red">'.&mt('Map contents are not shown in order.').'</font></b></p><br />');         $r->print('<p class="LC_warning">'
                   .&mt('Map contents are not shown in order.')
                   .'</p><br />');
     }      }
     my $idx=0;      my $idx=0;
     foreach (&attemptread(&Apache::lonnet::filelocation('',$url))) {      foreach (&attemptread(&Apache::lonnet::filelocation('',$url))) {
Line 147  ENDSELECT Line 151  ENDSELECT
  if ($successtied) {   if ($successtied) {
     my $checked='';      my $checked='';
            if ($selhash{'store_'.$url}) {             if ($selhash{'store_'.$url}) {
             $checked=" checked";              $checked=' checked="checked"';
            }             }
            $selhash{"pre_${idx}_link"}=$url;             $selhash{"pre_${idx}_link"}=$url;
            $selhash{"pre_${idx}_title"}=$title;             $selhash{"pre_${idx}_title"}=$title;
Line 166  ENDCHECKBOX Line 170  ENDCHECKBOX
             if ($successtied) {              if ($successtied) {
  $r->print('</form>');   $r->print('</form>');
             } else {              } else {
  $r->print('<br>');   $r->print('<br />');
             }              }
         }          }
     }      }
Line 278  sub handler { Line 282  sub handler {
       &Apache::lonnet::symblist($requrl,$disurl => [$disurl,$dismapid],        &Apache::lonnet::symblist($requrl,$disurl => [$disurl,$dismapid],
  'last_known' => [$disurl,$dismapid]);    'last_known' => [$disurl,$dismapid]); 
       &Apache::loncommon::content_type($r,'text/html');        &Apache::loncommon::content_type($r,'text/html');
       $r->header_out(Location => 'http://'.$ENV{'HTTP_HOST'}.$disurl);        $r->header_out(Location => &Apache::lonnet::absolute_url($ENV{'SERVER_NAME'}).
                                    $disurl);
       return REDIRECT;        return REDIRECT;
    } else {     } else {
        &Apache::loncommon::content_type($r,'text/html');         &Apache::loncommon::content_type($r,'text/html');
Line 322  ENDNONE Line 327  ENDNONE
 1;  1;
 __END__  __END__
   
   =head1 NAME
   
   Apache::lonsequence
   
   =head1 SYNOPSIS
   
   Handler for showing sequence objects of
   educational resources.
   
   This is part of the LearningOnline Network with CAPA project
   described at http://www.lon-capa.org.
   
   =head1 SUBROUTINES
   
   =over
   
   =item handler()
   
   =item viewmap()
   
   =item attemptread()
   
   =item mapread()
   
   =item start_fresh_session()
   
   =back
   
   =cut
   
   
   

Removed from v.1.32  
changed lines
  Added in v.1.39


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