Diff for /loncom/interface/lonsimplepage.pm between versions 1.6 and 1.10

version 1.6, 2003/02/11 15:20:06 version 1.10, 2003/06/20 13:31:46
Line 46  sub handler { Line 46  sub handler {
 <html>  <html>
 <head>  <head>
 <title>The LearningOnline Network with CAPA</title>  <title>The LearningOnline Network with CAPA</title>
 </head>  
 ENDDOCUMENT  ENDDOCUMENT
     my (undef,undef,undef,undef,$marker)=split(/\//,$r->uri);      my (undef,undef,undef,undef,$marker)=split(/\//,$r->uri);
 # Is this even in a course?  # Is this even in a course?
     unless ($ENV{'request.course.id'}) {      unless ($ENV{'request.course.id'}) {
  $r->print('<body>Not in a course</body>');   $r->print('</head><body>Not in a course</body></html>');
         return OK;          return OK;
     }      }
   
Line 71  ENDDOCUMENT Line 70  ENDDOCUMENT
        'bbb_content'       => 'Content',         'bbb_content'       => 'Content',
        'ccc_webreferences' => 'Web References');         'ccc_webreferences' => 'Web References');
   
 # --------------------------------------------------------------- Force Student  
   # ------------------------------------------------------------ Get query string
     &Apache::loncommon::get_unprocessed_cgi      &Apache::loncommon::get_unprocessed_cgi
                                        ($ENV{'QUERY_STRING'},['forcestudent']);                          ($ENV{'QUERY_STRING'},['forcestudent','register']);
   # ----------------------------------------------------- Force menu registration
       my $addentries='';
       if ($ENV{'form.register'}) {
          $addentries=' onLoad="'.&Apache::lonmenu::loadevents().
      '" onUnload="'.&Apache::lonmenu::unloadevents().'"';
          $r->print(&Apache::lonmenu::registerurl(1));
       }
   # --------------------------------------------------------------- Force Student
     my $forcestudent='';      my $forcestudent='';
     if ($ENV{'form.forcestudent'}) { $forcestudent='student'; };      if ($ENV{'form.forcestudent'}) { $forcestudent='student'; };
   
   
     my %syllabus=&Apache::lonnet::dump('smppage_'.$marker,$dom,$crs);      my %syllabus=&Apache::lonnet::dump('smppage_'.$marker,$dom,$crs);
                 
 # --------------------------------------- There is such a user, get environment  # --------------------------------------- There is such a user, get environment
   
     $r->print(&Apache::loncommon::bodytag      $r->print('</head>'.&Apache::loncommon::bodytag
             ("Course Page",$forcestudent,'','',$dom));        ("Course Page",$forcestudent,$addentries,'',$dom,$ENV{'form.register'}));
   
     my $allowed=&Apache::lonnet::allowed('srm',$ENV{'request.course.id'});      my $allowed=&Apache::lonnet::allowed('srm',$ENV{'request.course.id'});
   
Line 95  ENDDOCUMENT Line 104  ENDDOCUMENT
       }        }
       if (($ENV{'form.uploaddoc.filename'}) &&        if (($ENV{'form.uploaddoc.filename'}) &&
           ($ENV{'form.storeupl'}) && ($allowed)) {            ($ENV{'form.storeupl'}) && ($allowed)) {
    if ($ENV{'form.uploaddoc.filename'}=~/\.(gif|jpg|png|jpeg)$/) {     if ($ENV{'form.uploaddoc.filename'}=~/\.(gif|jpg|png|jpeg)$/i) {
              $syllabus{'uploaded.photourl'}=               $syllabus{'uploaded.photourl'}=
                  &Apache::lonnet::userfileupload('uploaddoc',1);                   &Apache::lonnet::userfileupload('uploaddoc',1);
    }     }
Line 133  ENDDOCUMENT Line 142  ENDDOCUMENT
               my $message=$syllabus{$_};                my $message=$syllabus{$_};
               $message=~s/\n/\<br \/\>/g;                $message=~s/\n/\<br \/\>/g;
               $message                $message
              =~s/(http\:\/\/[^\s]+)/\<a href=\"$1\"\>\<tt\>$1\<\/tt\>\<\/a\>/g;          =~s/(https*\:\/\/[^\s]+)/\<a href=\"$1\"\>\<tt\>$1\<\/tt\>\<\/a\>/g;
       $message=&Apache::lontexconvert::msgtexconverted($message);        $message=&Apache::lontexconvert::msgtexconverted($message);
             unless ($_ eq 'aaa_title') {              unless ($_ eq 'aaa_title') {
  if (($_ ne 'bbb_content') || ($allowed)) {   if (($_ ne 'bbb_content') || ($allowed)) {

Removed from v.1.6  
changed lines
  Added in v.1.10


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