[LON-CAPA-cvs] cvs: rat / lonuserstate.pm loncom/interface lonaboutme.pm lonbulletin.pm lonnavmaps.pm lonsimplepage.pm lonsyllabus.pm
www
lon-capa-cvs@mail.lon-capa.org
Fri, 28 Feb 2003 16:17:00 -0000
This is a MIME encoded message
--www1046449020
Content-Type: text/plain
www Fri Feb 28 11:17:00 2003 EDT
Modified files:
/loncom/interface lonaboutme.pm lonbulletin.pm lonnavmaps.pm
lonsimplepage.pm lonsyllabus.pm
/rat lonuserstate.pm
Log:
Taking Bulletin Board, Simple Page, Navigate, Syllabus, and About Me out of
lonwrapper, and starting to deal with the consequences.
--www1046449020
Content-Type: text/plain
Content-Disposition: attachment; filename="www-20030228111700.txt"
Index: loncom/interface/lonaboutme.pm
diff -u loncom/interface/lonaboutme.pm:1.12 loncom/interface/lonaboutme.pm:1.13
--- loncom/interface/lonaboutme.pm:1.12 Mon Feb 10 15:03:13 2003
+++ loncom/interface/lonaboutme.pm Fri Feb 28 11:16:59 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network
# "About Me" Personal Information
#
-# $Id: lonaboutme.pm,v 1.12 2003/02/10 20:03:13 www Exp $
+# $Id: lonaboutme.pm,v 1.13 2003/02/28 16:16:59 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -46,7 +46,6 @@
<html>
<head>
<title>The LearningOnline Network with CAPA</title>
-</head>
ENDDOCUMENT
my (undef,undef,$cdom,$cnum)=split(/\//,$r->uri);
# Is this even a user?
@@ -60,16 +59,24 @@
'bbb_aboutme' => 'About Me',
'ccc_webreferences' => 'Web References');
-# --------------------------------------------------------------- Force Student
+# ------------------------------------------------------------ Get Query String
&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='';
if ($ENV{'form.forcestudent'}) { $forcestudent='student'; };
# --------------------------------------- There is such a user, get environment
my %courseenv=&Apache::lonnet::dump('environment',$cdom,$cnum);
- $r->print(&Apache::loncommon::bodytag
- ("Personal Information",$forcestudent,'','',$cdom));
+ $r->print('</head>'.&Apache::loncommon::bodytag
+ ("Personal Information",$forcestudent,$addentries,'',$cdom));
$r->print('<h1>'.&Apache::loncommon::plainname($cnum,$cdom).'</h1>');
if ($courseenv{'nickname'}) {
$r->print(
Index: loncom/interface/lonbulletin.pm
diff -u loncom/interface/lonbulletin.pm:1.6 loncom/interface/lonbulletin.pm:1.7
--- loncom/interface/lonbulletin.pm:1.6 Mon Feb 10 15:03:13 2003
+++ loncom/interface/lonbulletin.pm Fri Feb 28 11:16:59 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Bulletin Board Handler
#
-# $Id: lonbulletin.pm,v 1.6 2003/02/10 20:03:13 www Exp $
+# $Id: lonbulletin.pm,v 1.7 2003/02/28 16:16:59 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -47,7 +47,6 @@
<html>
<head>
<title>The LearningOnline Network with CAPA</title>
-</head>
ENDDOCUMENT
my (undef,undef,undef,undef,$marker)=split(/\//,$r->uri);
# Is this even in a course?
@@ -72,9 +71,17 @@
'bbb_content' => 'Task',
'ccc_webreferences' => 'Web References');
-# --------------------------------------------------------------- Force Student
+# ------------------------------------------------------------ Get Query String
&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='';
if ($ENV{'form.forcestudent'}) { $forcestudent='student'; };
@@ -82,8 +89,8 @@
# --------------------------------------- There is such a user, get environment
- $r->print(&Apache::loncommon::bodytag
- ("Bulletin Board/Discussion",$forcestudent,'','',$dom));
+ $r->print('</head>'.&Apache::loncommon::bodytag
+ ("Bulletin Board/Discussion",$forcestudent,$addentries,'',$dom));
my $allowed=&Apache::lonnet::allowed('srm',$ENV{'request.course.id'});
Index: loncom/interface/lonnavmaps.pm
diff -u loncom/interface/lonnavmaps.pm:1.149 loncom/interface/lonnavmaps.pm:1.150
--- loncom/interface/lonnavmaps.pm:1.149 Fri Feb 28 10:06:45 2003
+++ loncom/interface/lonnavmaps.pm Fri Feb 28 11:16:59 2003
@@ -2,7 +2,7 @@
# The LearningOnline Network with CAPA
# Navigate Maps Handler
#
-# $Id: lonnavmaps.pm,v 1.149 2003/02/28 15:06:45 matthew Exp $
+# $Id: lonnavmaps.pm,v 1.150 2003/02/28 16:16:59 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -44,6 +44,7 @@
use strict;
use Apache::Constants qw(:common :http);
use Apache::loncommon();
+use Apache::lonmenu();
use POSIX qw (floor strftime);
my %navmaphash;
@@ -152,11 +153,21 @@
}
$r->print("<html><head>\n");
- $r->print("<title>Navigate Course Contents</title></head>");
+ $r->print("<title>Navigate Course Contents</title>");
+# ------------------------------------------------------------ Get query string
+ &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},['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));
+ }
# Header
- $r->print(&Apache::loncommon::bodytag('Navigate Course Contents','',
- ''));
+ $r->print('</head>'.
+ &Apache::loncommon::bodytag('Navigate Course Contents','',
+ $addentries));
$r->print('<script>window.focus();</script>');
$r->rflush();
Index: loncom/interface/lonsimplepage.pm
diff -u loncom/interface/lonsimplepage.pm:1.6 loncom/interface/lonsimplepage.pm:1.7
--- loncom/interface/lonsimplepage.pm:1.6 Tue Feb 11 10:20:06 2003
+++ loncom/interface/lonsimplepage.pm Fri Feb 28 11:16:59 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Simple Page Editor
#
-# $Id: lonsimplepage.pm,v 1.6 2003/02/11 15:20:06 matthew Exp $
+# $Id: lonsimplepage.pm,v 1.7 2003/02/28 16:16:59 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -46,7 +46,6 @@
<html>
<head>
<title>The LearningOnline Network with CAPA</title>
-</head>
ENDDOCUMENT
my (undef,undef,undef,undef,$marker)=split(/\//,$r->uri);
# Is this even in a course?
@@ -71,18 +70,28 @@
'bbb_content' => 'Content',
'ccc_webreferences' => 'Web References');
-# --------------------------------------------------------------- Force Student
+
+# ------------------------------------------------------------ Get query string
&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='';
if ($ENV{'form.forcestudent'}) { $forcestudent='student'; };
+
my %syllabus=&Apache::lonnet::dump('smppage_'.$marker,$dom,$crs);
# --------------------------------------- There is such a user, get environment
- $r->print(&Apache::loncommon::bodytag
- ("Course Page",$forcestudent,'','',$dom));
+ $r->print('</head>'.&Apache::loncommon::bodytag
+ ("Course Page",$forcestudent,$addentries,'',$dom));
my $allowed=&Apache::lonnet::allowed('srm',$ENV{'request.course.id'});
Index: loncom/interface/lonsyllabus.pm
diff -u loncom/interface/lonsyllabus.pm:1.13 loncom/interface/lonsyllabus.pm:1.14
--- loncom/interface/lonsyllabus.pm:1.13 Thu Feb 20 14:41:26 2003
+++ loncom/interface/lonsyllabus.pm Fri Feb 28 11:16:59 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Syllabus
#
-# $Id: lonsyllabus.pm,v 1.13 2003/02/20 19:41:26 www Exp $
+# $Id: lonsyllabus.pm,v 1.14 2003/02/28 16:16:59 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -46,7 +46,6 @@
<html>
<head>
<title>The LearningOnline Network with CAPA</title>
-</head>
ENDDOCUMENT
my (undef,undef,$cdom,$cnum)=split(/\//,$r->uri);
# Is this even a course?
@@ -73,16 +72,24 @@
'kkk_textbook' => 'Textbook',
'lll_includeurl' => 'URLs To Include in Syllabus');
-# --------------------------------------------------------------- Force Student
+# ------------------------------------------------------------ Get query string
&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='';
if ($ENV{'form.forcestudent'}) { $forcestudent='student'; };
# ------------------------------------- There is such a course, get environment
my %courseenv=&Apache::lonnet::dump('environment',$cdom,$cnum);
- $r->print(&Apache::loncommon::bodytag
- ("Syllabus",$forcestudent,'','',$cdom));
+ $r->print('</head>'.&Apache::loncommon::bodytag
+ ("Syllabus",$forcestudent,$addentries,'',$cdom));
$r->print('<h1>'.$courseenv{'description'}.'</h1><h3>'.
$Apache::lonnet::domaindescription{$cdom}.'</h3>');
my %syllabus=&Apache::lonnet::dump('syllabus',$cdom,$cnum);
Index: rat/lonuserstate.pm
diff -u rat/lonuserstate.pm:1.51 rat/lonuserstate.pm:1.52
--- rat/lonuserstate.pm:1.51 Tue Feb 25 10:58:51 2003
+++ rat/lonuserstate.pm Fri Feb 28 11:17:00 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Construct and maintain state and binary representation of course for user
#
-# $Id: lonuserstate.pm,v 1.51 2003/02/25 15:58:51 www Exp $
+# $Id: lonuserstate.pm,v 1.52 2003/02/28 16:17:00 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -141,7 +141,7 @@
} else { # normal internal resource
if (($embstyle eq 'img') || ($embstyle eq 'emb')
|| ($turi=~/\/(syllabus|aboutme|navmaps|smppg|bulletinboard)$/)) {
- $turi='/adm/wrapper'.$turi;
+ $turi=$turi.'?register=1';
}
}
}
--www1046449020--