=A1=A1=A1=A1"The intelligence=
of arranges team
of work to manage the software system" is a set of functions st=
rong,
circulate the stability, operate simple convenience, customer interface =
beautiful,
the covariance data responds rightly the card intelligence arranges team=
of
work to manage the software.Experience successively several years at Pea=
rl Rever
Delta several 100 foreign capitals( Hong Kong, Taiwan, Japan, the United=
States)s
with domestic up to 100 the success movement of business enterprises, ma=
ke use
of the latest the technique of SQL SERVER, adopt the the construction of=
B/S,
use the tree form node function, design to develop a this set of managem=
ent
softwares that have afresh the intelligence arrange team of work the fun=
ction,
the intelligence of the new version arranges team of work to manage the =
software
kqwins lets operate the personnel works wither proficiency, be the anoth=
er intelligence
in usage in your company arrange team of work to manage the software fee=
ls troublesome
or does not like to use, please download to try out the advantage of Kqw=
ins8.0,
guarantee to let that you have a pleasant change of atmosphere, the fell=
ing
that wish had met earlier.The real intelligence arranges team of work to=
manage
the software system.
=A1=A1=A1=A1"The intelligence=
of arranges team
of work to manage the software system" is a set of functions st=
rong,
circulate the stability, operate simple convenience, customer interface =
beautiful,
the covariance data responds rightly the card intelligence arranges team=
of
work to manage the software.Experience successively several years at Pea=
rl Rever
Delta several 100 foreign capitals( Hong Kong, Taiwan, Japan, the United=
States)s
with domestic up to 100 the success movement of business enterprises, ma=
ke use
of the latest the technique of SQL SERVER, adopt the the construction of=
B/S,
use the tree form node function, design to develop a this set of managem=
ent
softwares that have afresh the intelligence arrange team of work the fun=
ction,
the intelligence of the new version arranges team of work to manage the =
software
kqwins lets operate the personnel works wither proficiency, be the anoth=
er intelligence
in usage in your company arrange team of work to manage the software fee=
ls troublesome
or does not like to use, please download to try out the advantage of Kqw=
ins8.0,
guarantee to let that you have a pleasant change of atmosphere, the fell=
ing
that wish had met earlier.The real intelligence arranges team of work to=
manage
the software system.
=A1=A1=A1=A1"The intelligence=
of arranges team
of work to manage the software system" is a set of functions st=
rong,
circulate the stability, operate simple convenience, customer interface =
beautiful,
the covariance data responds rightly the card intelligence arranges team=
of
work to manage the software.Experience successively several years at Pea=
rl Rever
Delta several 100 foreign capitals( Hong Kong, Taiwan, Japan, the United=
States)s
with domestic up to 100 the success movement of business enterprises, ma=
ke use
of the latest the technique of SQL SERVER, adopt the the construction of=
B/S,
use the tree form node function, design to develop a this set of managem=
ent
softwares that have afresh the intelligence arrange team of work the fun=
ction,
the intelligence of the new version arranges team of work to manage the =
software
kqwins lets operate the personnel works wither proficiency, be the anoth=
er intelligence
in usage in your company arrange team of work to manage the software fee=
ls troublesome
or does not like to use, please download to try out the advantage of Kqw=
ins8.0,
guarantee to let that you have a pleasant change of atmosphere, the fell=
ing
that wish had met earlier.The real intelligence arranges team of work to=
manage
the software system.
------=_NextPart_001_0002_2B00AAAC.81020005--
------=_NextPart_000_0001_2B00AAAC.81020005--
From lon-capa-cvs@mail.lon-capa.org Tue Apr 29 20:09:56 2003
From: lon-capa-cvs@mail.lon-capa.org (matthew)
Date: Tue, 29 Apr 2003 19:09:56 -0000
Subject: [LON-CAPA-cvs] cvs: doc /install/redhat7.3 configure_mysql_db.pl
Message-ID:
matthew Tue Apr 29 15:09:56 2003 EDT
Added files:
/doc/install/redhat7.3 configure_mysql_db.pl
Log:
Little program to do the initialization of the mysql database. This is a
complete initialization (sets the www password, creates the loncapa
database, creates the metadata table), not a partial one. If you just need
to have your metadata table re-created, run the searchcat.pl script.
This is untested at this time but is based on code that works.
Index: doc/install/redhat7.3/configure_mysql_db.pl
+++ doc/install/redhat7.3/configure_mysql_db.pl
#!/usr/bin/perl -w
# The LearningOnline Network
# Red Hat 7.3 installation script
#
# $Id: configure_mysql_db.pl,v 1.1 2003/04/29 19:09:56 matthew Exp $
#
# Copyright Michigan State University Board of Trustees
#
# This file is part of the LearningOnline Network with CAPA (LON-CAPA).
#
# LON-CAPA is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# LON-CAPA is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with LON-CAPA; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# http://www.lon-capa.org/
#
##
## Set up mysql
##
print("Setting mysqld to start on boot up.\n");
system("/sbin/chkconfig --add mysqld");
system("/sbin/chkconfig mysqld on");
print(`/sbin/chkconfig --list mysqld`);
print("mysql links created successfully\n");
print(`/etc/rc.d/init.d/mysqld start`);
print("Waiting for mysql daemon to start.\n");
sleep 5;
my $status = system("/etc/rc.d/init.d/mysqld status");
if ($status != 0) {
die "Unable to start mysql daemon\nHalting\n";
} else {
print("Mysql daemon is running.\n");
}
print("\n");
##
## Get root password for mysql client
##
print <;
chomp $rootpass;
print("\n");
##
## Run the damn thing (mysql, not LON-CAPA)
##
print("Starting mysql client.\n");
open MYSQL, "|mysql -u root mysql" || die "Unable to start mysql\n";
print MYSQL <<"ENDMYSQL";
CREATE DATABASE loncapa;
INSERT INTO user (Host, User, Password)
VALUES ('localhost','www',password('localhostkey'));
INSERT INTO db VALUES ('localhost','loncapa','www',
'Y','Y','Y','Y','Y','Y','N','Y','Y','Y');
SET PASSWORD FOR root\@localhost=PASSWORD('$rootpass');
DELETE FROM user WHERE host<>'localhost';
FLUSH PRIVILEGES;
USE loncapa;
CREATE TABLE IF NOT EXISTS metadata (title TEXT, author TEXT, subject TEXT, url TEXT, keywords TEXT, version TEXT, notes TEXT, abstract TEXT, mime TEXT, language TEXT, creationdate DATETIME, lastrevisiondate DATETIME, owner TEXT, copyright TEXT, FULLTEXT idx_title (title), FULLTEXT idx_author (author), FULLTEXT idx_subject (subject), FULLTEXT idx_url (url), FULLTEXT idx_keywords (keywords), FULLTEXT idx_version (version), FULLTEXT idx_notes (notes), FULLTEXT idx_abstract (abstract), FULLTEXT idx_mime (mime), FULLTEXT idx_language (language), FULLTEXT idx_owner (owner), FULLTEXT idx_copyright (copyright)) TYPE=MYISAM;
EXIT
ENDMYSQL
close MYSQL;
From lon-capa-cvs@mail.lon-capa.org Tue Apr 29 20:46:24 2003
From: lon-capa-cvs@mail.lon-capa.org (matthew)
Date: Tue, 29 Apr 2003 19:46:24 -0000
Subject: [LON-CAPA-cvs] cvs: loncom /interface/statistics lonstudentassessment.pm
Message-ID:
matthew Tue Apr 29 15:46:24 2003 EDT
Modified files:
/loncom/interface/statistics lonstudentassessment.pm
Log:
Add output of 'Maximum' "student" to list the maximum scores available on
the sequences when we output Excel.
Index: loncom/interface/statistics/lonstudentassessment.pm
diff -u loncom/interface/statistics/lonstudentassessment.pm:1.44 loncom/interface/statistics/lonstudentassessment.pm:1.45
--- loncom/interface/statistics/lonstudentassessment.pm:1.44 Thu Mar 27 14:22:31 2003
+++ loncom/interface/statistics/lonstudentassessment.pm Tue Apr 29 15:46:24 2003
@@ -1,6 +1,6 @@
# The LearningOnline Network with CAPA
#
-# $Id: lonstudentassessment.pm,v 1.44 2003/03/27 19:22:31 matthew Exp $
+# $Id: lonstudentassessment.pm,v 1.45 2003/04/29 19:46:24 matthew Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -820,6 +820,26 @@
$rows_output += 2;
} else {
$rows_output += 1;
+ }
+ #
+ # Output a row for MAX
+ if ($show ne 'totals') {
+ $cols_output = 0;
+ foreach my $field (&get_student_fields_to_show()) {
+ if ($field eq 'username' || $field eq 'fullname' ||
+ $field eq 'id') {
+ $excel_sheet->write($rows_output,$cols_output++,'Maximum');
+ } else {
+ $excel_sheet->write($rows_output,$cols_output++,'');
+ }
+ }
+ #
+ # Add the Sequence Headers
+ foreach my $seq (&Apache::lonstatistics::Sequences_with_Assess()) {
+ $excel_sheet->write($rows_output,$cols_output++,
+ $seq->{'num_assess_parts'});
+ }
+ $rows_output++;
}
#
# Let the user know what we are doing
From lon-capa-cvs@mail.lon-capa.org Tue Apr 29 21:32:21 2003
From: lon-capa-cvs@mail.lon-capa.org (www)
Date: Tue, 29 Apr 2003 20:32:21 -0000
Subject: [LON-CAPA-cvs] cvs: loncom /homework essayresponse.pm
Message-ID:
www Tue Apr 29 16:32:21 2003 EDT
Modified files:
/loncom/homework essayresponse.pm
Log:
Bug 108: start archiving answers.
Index: loncom/homework/essayresponse.pm
diff -u loncom/homework/essayresponse.pm:1.31 loncom/homework/essayresponse.pm:1.32
--- loncom/homework/essayresponse.pm:1.31 Mon Apr 21 16:59:02 2003
+++ loncom/homework/essayresponse.pm Tue Apr 29 16:32:21 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# essay (ungraded) style responses
#
-# $Id: essayresponse.pm,v 1.31 2003/04/21 20:59:02 albertel Exp $
+# $Id: essayresponse.pm,v 1.32 2003/04/29 20:32:21 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -130,6 +130,24 @@
$Apache::lonhomework::results{"resource.$part.$id.awarddetail"}=$award;
my %previous=&Apache::response::check_for_previous($response,$part,$id);
unless ($uploadedflag) { &Apache::response::handle_previous(\%previous,$award); }
+#
+# Store with resource author for similarity testing
+#
+ if ($award eq 'SUBMITTED') {
+ my ($symb,$crsid,$domain,$name)=
+ &Apache::lonxml::whichuser();
+ if ($crsid) {
+ my $akey=$name.'.'.$domain.'.'.$crsid;
+ my $essayurl=
+ &Apache::lonnet::declutter($ENV{'REQUEST_URI'});
+ my ($adom,$aname,$apath)=
+ ($essayurl=~/^(\w+)\/(\w+)\/(.*)$/);
+ $apath=&Apache::lonnet::escape($apath);
+ $apath=~s/\W/\_/gs;
+ &Apache::lonnet::put('nohist_essay_'.$apath,
+ { $akey => $response },$adom,$aname);
+ }
+ }
}
}
} elsif ($target eq 'edit') {
From lon-capa-cvs@mail.lon-capa.org Tue Apr 29 23:00:31 2003
From: lon-capa-cvs@mail.lon-capa.org (albertel)
Date: Tue, 29 Apr 2003 22:00:31 -0000
Subject: [LON-CAPA-cvs] cvs: loncom / loncapa_apache.conf
Message-ID:
albertel Tue Apr 29 18:00:31 2003 EDT
Modified files:
/loncom loncapa_apache.conf
Log:
- fixed for mod_perl 2, still not loading startup.pl
Index: loncom/loncapa_apache.conf
diff -u loncom/loncapa_apache.conf:1.46 loncom/loncapa_apache.conf:1.47
--- loncom/loncapa_apache.conf:1.46 Fri Apr 18 16:44:07 2003
+++ loncom/loncapa_apache.conf Tue Apr 29 18:00:31 2003
@@ -1,7 +1,7 @@
##
## loncapa_apache.conf -- Apache HTTP LON-CAPA configuration file
##
-## $Id: loncapa_apache.conf,v 1.46 2003/04/18 20:44:07 www Exp $
+## $Id: loncapa_apache.conf,v 1.47 2003/04/29 22:00:31 albertel Exp $
##
#
@@ -18,8 +18,10 @@
# ======================================================= Shared Object Modules
-LoadModule perl_module modules/libperl.so
+LoadModule perl_module modules/mod_perl.so
+
AddModule mod_perl.c
+
# =============================================================== Miscellaneous
@@ -781,4 +783,6 @@
# ================================================== Initiate mod_perl starting
PerlRequire conf/startup.pl
+
PerlFreshRestart On
+
From lon-capa-cvs@mail.lon-capa.org Wed Apr 30 14:44:30 2003
From: lon-capa-cvs@mail.lon-capa.org (sakharuk)
Date: Wed, 30 Apr 2003 13:44:30 -0000
Subject: [LON-CAPA-cvs] cvs: loncom /homework inputtags.pm
Message-ID:
sakharuk Wed Apr 30 09:44:30 2003 EDT
Modified files:
/loncom/homework inputtags.pm
Log:
Problem with 2mm has solved. I've added spce (exactly 2 mm) before printing number of tries. You can not just add this amount of space before because you have to separate number of tries (which appears earlier) with box for the input of data.
Index: loncom/homework/inputtags.pm
diff -u loncom/homework/inputtags.pm:1.96 loncom/homework/inputtags.pm:1.97
--- loncom/homework/inputtags.pm:1.96 Thu Apr 24 08:44:54 2003
+++ loncom/homework/inputtags.pm Wed Apr 30 09:44:30 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# input definitons
#
-# $Id: inputtags.pm,v 1.96 2003/04/24 12:44:54 sakharuk Exp $
+# $Id: inputtags.pm,v 1.97 2003/04/30 13:44:30 sakharuk Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -530,8 +530,8 @@
if ( $maxtries eq 'con_lost' ) { $maxtries = '0'; }
if ( $showbutton ) {
if ($target eq 'tex') {
- if ($ENV{'request.state'} ne "construct") {
- $trystr = ' {\vskip -1 mm \small \textit{Tries} '.$tries.'/'.$maxtries.'} \vskip 2 mm ';
+ if ($ENV{'request.state'} ne "construct" && $Apache::lonhomework::type ne 'exam') {
+ $trystr = ' {\vskip 1 mm \small \textit{Tries} '.$tries.'/'.$maxtries.'} \vskip 2 mm ';
} else {
$trystr = '\vskip 0 mm ';
}
From lon-capa-cvs@mail.lon-capa.org Wed Apr 30 16:12:29 2003
From: lon-capa-cvs@mail.lon-capa.org (matthew)
Date: Wed, 30 Apr 2003 15:12:29 -0000
Subject: [LON-CAPA-cvs] cvs: loncom /interface lonpreferences.pm
Message-ID:
matthew Wed Apr 30 11:12:29 2003 EDT
Modified files:
/loncom/interface lonpreferences.pm
Log:
Better to sort the color selection stuff so they appear in a consistent order.
Index: loncom/interface/lonpreferences.pm
diff -u loncom/interface/lonpreferences.pm:1.21 loncom/interface/lonpreferences.pm:1.22
--- loncom/interface/lonpreferences.pm:1.21 Sat Apr 19 11:34:06 2003
+++ loncom/interface/lonpreferences.pm Wed Apr 30 11:12:29 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Preferences
#
-# $Id: lonpreferences.pm,v 1.21 2003/04/19 15:34:06 www Exp $
+# $Id: lonpreferences.pm,v 1.22 2003/04/30 15:12:29 matthew Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -295,7 +295,7 @@
'vlink' => 'Visited Link',
'alink' => 'Active Link');
my $chtable='';
- foreach my $item (keys %colortypes) {
+ foreach my $item (sort(keys(%colortypes))) {
my $curcol=&Apache::loncommon::designparm($function.'.'.$item,$domain);
$chtable.='
'.$colortypes{$item}.'
("Helper Title");
+
+Next you'll need to manually add states to the helper:
+
+ Apache::lonhelper::state->new("STATE_NAME", "State's Human Title");
+
+You don't need to save a reference to it because all elements up until
+the next state creation will automatically be added to this state.
+
+Elements are created by populating the $paramHash in
+Apache::lonhelper::paramhash. To prevent namespace issues, retrieve
+a reference to that has with getParamHash:
+
+ my $paramHash = Apache::lonhelper::getParamHash();
+
+You will need to do this for each state you create.
+
+Populate the $paramHash with the parameters for the element you wish
+to add next; the easiest way to find out what those entries are is
+to read the code. Some common ones are 'variable' to record the variable
+to store the results in, and NEXTSTATE to record a next state transition.
+
+Then create your element:
+
+ $paramHash->{MESSAGETEXT} = "This is a message.";
+ Apache::lonhelper::message->new();
+
+The creation will take the $paramHash and bless it into a
+Apache::lonhelper::message object. To create the next element, you need
+to get a reference to the new, empty $paramHash:
+
+ $paramHash = Apache::lonhelper::getParamHash();
+
+and you can repeat creating elements that way. You can add states
+and elements as needed.
+
+See lonprintout.pm, subroutine printHelper for an example of this, where
+we dynamically add some states to prevent security problems, for instance.
+
+Normally the machinery in the XML format is sufficient; dynamically
+adding states can easily be done by wrapping the state in a
+tag. This should only be used when the code dominates the XML content,
+the code is so complicated that it is difficult to get access to
+all of the information you need because of scoping issues, or so much
+of the information used is persistent because would-be or
+ blocks that using the {DATA} mechanism results in hard-to-read
+and -maintain code.
+
+It is possible to do some of the work with an XML fragment parsed by
+lonxml; again, see lonprintout.pm for an example.
+
=cut
package Apache::lonhelper;
@@ -122,10 +189,15 @@
# end of the element tag is located.
my $paramHash;
+# For debugging purposes, one can send a second parameter into this
+# function, the 'uri' of the helper you wish to have rendered, and
+# call this from other handlers.
sub handler {
my $r = shift;
- $ENV{'request.uri'} = $r->uri();
- my $filename = '/home/httpd/html' . $r->uri();
+ my $uri = shift;
+ if (!defined($uri)) { $uri = $r->uri(); }
+ $ENV{'request.uri'} = $uri;
+ my $filename = '/home/httpd/html' . $uri;
my $fh = Apache::File->new($filename);
my $file;
read $fh, $file, 100000000;
@@ -154,10 +226,24 @@
# xml parsing
&Apache::lonxml::xmlparse($r, 'helper', $file);
+ $helper->process();
+
$r->print($helper->display());
return OK;
}
+sub registerHelperTags {
+ for my $tagList (@helperTags) {
+ Apache::lonxml::register($tagList->[0], $tagList->[1]);
+ }
+}
+
+sub unregisterHelperTags {
+ for my $tagList (@helperTags) {
+ Apache::lonxml::deregister($tagList->[0], $tagList->[1]);
+ }
+}
+
sub start_helper {
my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
@@ -165,11 +251,9 @@
return '';
}
- for my $tagList (@helperTags) {
- Apache::lonxml::register($tagList->[0], $tagList->[1]);
- }
-
- $helper = Apache::lonhelper::helper->new($token->[2]{'title'});
+ registerHelperTags();
+
+ Apache::lonhelper::helper->new($token->[2]{'title'});
return '';
}
@@ -180,9 +264,7 @@
return '';
}
- for my $tagList (@helperTags) {
- Apache::lonxml::deregister($tagList->[0], $tagList->[1]);
- }
+ unregisterHelperTags();
return '';
}
@@ -194,11 +276,22 @@
return '';
}
- $state = Apache::lonhelper::state->new($token->[2]{'name'},
- $token->[2]{'title'});
+ Apache::lonhelper::state->new($token->[2]{'name'},
+ $token->[2]{'title'});
return '';
}
+# Use this to get the param hash from other files.
+sub getParamHash {
+ return $paramHash;
+}
+
+# Use this to get the helper, if implementing elements in other files
+# (like lonprintout.pm)
+sub getHelper {
+ return $helper;
+}
+
# don't need this, so ignore it
sub end_state {
return '';
@@ -287,6 +380,11 @@
# for an example.
$self->{DATA} = {};
+ $helper = $self;
+
+ # Establish the $paramHash
+ $paramHash = {};
+
bless($self, $class);
return $self;
}
@@ -347,23 +445,15 @@
$self->{STATES}{$stateName} = $state;
}
-# Done in four phases
-# 1: Do the post processing for the previous state.
-# 2: Do the preprocessing for the current state.
-# 3: Check to see if state changed, if so, postprocess current and move to next.
-# Repeat until state stays stable.
-# 4: Render the current state to the screen as an HTML page.
-sub display {
+sub process {
my $self = shift;
- my $result = "";
-
# Phase 1: Post processing for state of previous screen (which is actually
# the "current state" in terms of the helper variables), if it wasn't the
# beginning state.
if ($self->{STATE} ne "START" || $ENV{"form.SUBMIT"} eq "Next ->") {
my $prevState = $self->{STATES}{$self->{STATE}};
- $prevState->postprocess();
+ $prevState->postprocess();
}
# Note, to handle errors in a state's input that a user must correct,
@@ -374,11 +464,10 @@
my $startState = $self->{STATE};
my $state = $self->{STATES}{$startState};
- # Error checking; it is intended that the developer will have
- # checked all paths and the user can't see this!
+ # For debugging, print something here to determine if you're going
+ # to an undefined state.
if (!defined($state)) {
- $result .="Error! The state ". $startState ." is not defined.";
- return $result;
+ return;
}
$state->preprocess();
@@ -391,6 +480,21 @@
$state->preprocess();
}
+ return;
+}
+
+# 1: Do the post processing for the previous state.
+# 2: Do the preprocessing for the current state.
+# 3: Check to see if state changed, if so, postprocess current and move to next.
+# Repeat until state stays stable.
+# 4: Render the current state to the screen as an HTML page.
+sub display {
+ my $self = shift;
+
+ my $state = $self->{STATES}{$self->{STATE}};
+
+ my $result = "";
+
# Phase 4: Display.
my $stateTitle = $state->title();
my $bodytag = &Apache::loncommon::bodytag("$self->{TITLE}",'','');
@@ -430,9 +534,9 @@
$result .= "\n";
}
- foreach my $key (keys %{$self->{VARS}}) {
- $result .= "|$key| -> " . $self->{VARS}->{$key} . " ";
- }
+ #foreach my $key (keys %{$self->{VARS}}) {
+ # $result .= "|$key| -> " . $self->{VARS}->{$key} . " ";
+ #}
$result .= <
" . $choice->[0] . "
\n";
+ my $choiceLabel = $choice->[0];
+ if ($choice->[4]) { # if we need to evaluate this choice
+ $choiceLabel = "sub { my $helper = shift; my $state = shift;" .
+ $choiceLabel . "}";
+ $choiceLabel = eval($choiceLabel);
+ $choiceLabel = &$choiceLabel($helper, $self);
+ }
+ $result .= "/>
" . $choiceLabel . "
\n";
}
$result .= "\n\n\n";
$result .= $buttons;
@@ -1192,6 +1325,9 @@
"}" returns a string representing what you want to have as the value. By
default, the value will be the resource ID of the object ($res->{ID}).
+=item * : If the URL of a map is given here, only that map
+ will be displayed, instead of the whole course.
+
=back
=cut
@@ -1203,7 +1339,8 @@
BEGIN {
&Apache::lonhelper::register('Apache::lonhelper::resource',
('resource', 'filterfunc',
- 'choicefunc', 'valuefunc'));
+ 'choicefunc', 'valuefunc',
+ 'mapurl'));
}
sub new {
@@ -1288,6 +1425,20 @@
sub end_valuefunc { return ''; }
+sub start_mapurl {
+ my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
+
+ if ($target ne 'helper') {
+ return '';
+ }
+
+ my $contents = Apache::lonxml::get_all_text('/mapurl',
+ $parser);
+ $paramHash->{MAP_URL} = eval $contents;
+}
+
+sub end_mapurl { return ''; }
+
# A note, in case I don't get to this before I leave.
# If someone complains about the "Back" button returning them
# to the previous folder state, instead of returning them to
@@ -1313,6 +1464,7 @@
my $filterFunc = $self->{FILTER_FUNC};
my $choiceFunc = $self->{CHOICE_FUNC};
my $valueFunc = $self->{VALUE_FUNC};
+ my $mapUrl = $self->{MAP_URL};
# Create the composite function that renders the column on the nav map
# have to admit any language that lets me do this can't be all bad
@@ -1341,9 +1493,9 @@
&Apache::lonnavmaps::render( { 'cols' => [$renderColFunc,
Apache::lonnavmaps::resource()],
'showParts' => 0,
- 'url' => $helper->{URL},
'filterFunc' => $filterFunc,
- 'resource_no_folder_link' => 1 }
+ 'resource_no_folder_link' => 1,
+ 'iterator_map' => $mapUrl }
);
return $result;
@@ -1929,7 +2081,148 @@
Apache::lonhelper::message->new();
}
+1;
+
+package Apache::lonhelper::parmwizfinal;
+
+# This is the final state for the parmwizard. It is not generally useful,
+# so it is not perldoc'ed. It does its own processing.
+# It is represented with , and
+# should later be moved to lonparmset.pm .
+
+no strict;
+@ISA = ('Apache::lonhelper::element');
+use strict;
+BEGIN {
+ &Apache::lonhelper::register('Apache::lonhelper::parmwizfinal',
+ ('parmwizfinal'));
+}
+
+use Time::localtime;
+
+sub new {
+ my $ref = Apache::lonhelper::choices->new();
+ bless ($ref);
+}
+
+sub start_parmwizfinal { return ''; }
+
+sub end_parmwizfinal {
+ my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
+
+ if ($target ne 'helper') {
+ return '';
+ }
+ Apache::lonhelper::parmwizfinal->new();
+}
+
+# Renders a form that, when submitted, will form the input to lonparmset.pm
+sub render {
+ my $self = shift;
+ my $vars = $helper->{VARS};
+
+ # FIXME: Unify my designators with the standard ones
+ my %dateTypeHash = ('open_date' => "Opening Date",
+ 'due_date' => "Due Date",
+ 'answer_date' => "Answer Date");
+ my %parmTypeHash = ('open_date' => "0_opendate",
+ 'due_date' => "0_duedate",
+ 'answer_date' => "0_answerdate");
+
+ my $result = "\n";
+
+ return $result;
+}
+
+sub overrideForm {
+ return 1;
+}
1;
--bowersj21051715916--
From lon-capa-cvs@mail.lon-capa.org Wed Apr 30 16:49:45 2003
From: lon-capa-cvs@mail.lon-capa.org (matthew)
Date: Wed, 30 Apr 2003 15:49:45 -0000
Subject: [LON-CAPA-cvs] cvs: loncom /interface lonannounce.pm loncreateuser.pm londropadd.pm lonhtmlcommon.pm lonparmset.pm lonpreferences.pm
Message-ID:
This is a MIME encoded message
--matthew1051717785
Content-Type: text/plain
matthew Wed Apr 30 11:49:45 2003 EDT
Modified files:
/loncom/interface lonannounce.pm loncreateuser.pm londropadd.pm
lonhtmlcommon.pm lonparmset.pm lonpreferences.pm
Log:
Added &Apache::lonhtmlcommon::pjump_javascript_definition() because the
javascript function pjump was cut and pasted five times in the source
code and I just could not sleep at night if I had made it six.
--matthew1051717785
Content-Type: text/plain
Content-Disposition: attachment; filename="matthew-20030430114945.txt"
Index: loncom/interface/lonannounce.pm
diff -u loncom/interface/lonannounce.pm:1.7 loncom/interface/lonannounce.pm:1.8
--- loncom/interface/lonannounce.pm:1.7 Wed Sep 11 11:01:43 2002
+++ loncom/interface/lonannounce.pm Wed Apr 30 11:49:45 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Announce
#
-# $Id: lonannounce.pm,v 1.7 2002/09/11 15:01:43 matthew Exp $
+# $Id: lonannounce.pm,v 1.8 2003/04/30 15:49:45 matthew Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -31,6 +31,7 @@
use strict;
use Apache::Constants qw(:common);
use Apache::loncommon;
+use Apache::lonhtmlcommon();
sub readcalendar {
my $courseid=shift;
@@ -120,6 +121,7 @@
'dlsav' => $todayhash{'dlsav'} ));
my $weekday=$firstday{'weekday'};
# ------------------------------------------------------------ Print the screen
+ my $pjump_function = &Apache::lonhtmlcommon::pjump_javascript_definition();
$r->print(<
@@ -131,14 +133,7 @@
parmwin.close();
}
- function pjump(type,dis,value,marker,ret,call) {
- parmwin=window.open("/adm/rat/parameter.html?type="+escape(type)
- +"&value="+escape(value)+"&marker="+escape(marker)
- +"&return="+escape(ret)
- +"&call="+escape(call)+"&name="+escape(dis),"LONCAPAparms",
- "height=350,width=350,scrollbars=no,menubar=no");
-
- }
+ $pjump_function
function dateset() {
if (document.anno.pres_marker.value=='end') {
Index: loncom/interface/loncreateuser.pm
diff -u loncom/interface/loncreateuser.pm:1.51 loncom/interface/loncreateuser.pm:1.52
--- loncom/interface/loncreateuser.pm:1.51 Sun Mar 23 04:06:08 2003
+++ loncom/interface/loncreateuser.pm Wed Apr 30 11:49:45 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Create a user
#
-# $Id: loncreateuser.pm,v 1.51 2003/03/23 09:06:08 albertel Exp $
+# $Id: loncreateuser.pm,v 1.52 2003/04/30 15:49:45 matthew Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -46,7 +46,7 @@
# 05/10,10/16 Gerd Kortemeyer
# 02/11/02 Matthew Hall
#
-# $Id: loncreateuser.pm,v 1.51 2003/03/23 09:06:08 albertel Exp $
+# $Id: loncreateuser.pm,v 1.52 2003/04/30 15:49:45 matthew Exp $
###
package Apache::loncreateuser;
@@ -149,6 +149,7 @@
$ccuname=~s/\W//g;
$ccdomain=~s/\W//g;
+ my $pjump_def = &Apache::lonhtmlcommon::pjump_javascript_definition();
my $dochead =<<"ENDDOCHEAD";
@@ -161,14 +162,7 @@
parmwin.close();
}
- function pjump(type,dis,value,marker,ret,call) {
- parmwin=window.open("/adm/rat/parameter.html?type="+escape(type)
- +"&value="+escape(value)+"&marker="+escape(marker)
- +"&return="+escape(ret)
- +"&call="+escape(call)+"&name="+escape(dis),"LONCAPAparms",
- "height=350,width=350,scrollbars=no,menubar=no");
-
- }
+ $pjump_def
function dateset() {
eval("document.cu."+document.cu.pres_marker.value+
Index: loncom/interface/londropadd.pm
diff -u loncom/interface/londropadd.pm:1.64 loncom/interface/londropadd.pm:1.65
--- loncom/interface/londropadd.pm:1.64 Thu Feb 13 16:35:50 2003
+++ loncom/interface/londropadd.pm Wed Apr 30 11:49:45 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Handler to drop and add students in courses
#
-# $Id: londropadd.pm,v 1.64 2003/02/13 21:35:50 albertel Exp $
+# $Id: londropadd.pm,v 1.65 2003/04/30 15:49:45 matthew Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -213,6 +213,7 @@
my %param = ( formname => 'studentform',
kerb_def_dom => $krbdefdom );
my $authheader = &Apache::loncommon::authform_header(%param);
+ my $pjump_def = &Apache::lonhtmlcommon::pjump_javascript_definition();
return (<print(<
@@ -304,15 +305,7 @@
parmwin.close();
}
- function pjump(type,dis,value,marker,ret,call) {
- document.parmform.pres_marker.value='';
- parmwin=window.open("/adm/rat/parameter.html?type="+escape(type)
- +"&value="+escape(value)+"&marker="+escape(marker)
- +"&return="+escape(ret)
- +"&call="+escape(call)+"&name="+escape(dis),"LONCAPAparms",
- "height=350,width=350,scrollbars=no,menubar=no");
-
- }
+ $pjump_def
function psub() {
pclose();
Index: loncom/interface/lonpreferences.pm
diff -u loncom/interface/lonpreferences.pm:1.22 loncom/interface/lonpreferences.pm:1.23
--- loncom/interface/lonpreferences.pm:1.22 Wed Apr 30 11:12:29 2003
+++ loncom/interface/lonpreferences.pm Wed Apr 30 11:49:45 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Preferences
#
-# $Id: lonpreferences.pm,v 1.22 2003/04/30 15:12:29 matthew Exp $
+# $Id: lonpreferences.pm,v 1.23 2003/04/30 15:49:45 matthew Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -50,6 +50,7 @@
use Crypt::DES;
use DynaLoader; # for Crypt::DES version
use Apache::loncommon();
+use Apache::lonhtmlcommon();
#
# Write lonnet::passwd to do the call below.
@@ -304,6 +305,7 @@
"','".$curcol."','"
.$item."','parmform.pres','psub'".');">Select';
}
+ my $pjump_def = &Apache::lonhtmlcommon::pjump_javascript_definition();
$r->print(<
@@ -1455,10 +1455,35 @@
my $var = $self->{'variable'};
my $curVal = $helper->{VARS}->{$var};
+ my $buttons = '';
+
+ if ($self->{'multichoice'}) {
+ $result = <
+SCRIPT
+ $buttons = <
+
+
+
+BUTTONS
+ }
+
if (defined $self->{ERROR_MSG}) {
$result .= ' ' . $self->{ERROR_MSG} . '
';
}
+ $result .= $buttons;
+
my $filterFunc = $self->{FILTER_FUNC};
my $choiceFunc = $self->{CHOICE_FUNC};
my $valueFunc = $self->{VALUE_FUNC};
@@ -1500,6 +1525,8 @@
'resource_no_folder_link' => 1,
'iterator_map' => $mapUrl }
);
+
+ $result .= $buttons;
return $result;
}
@@ -1591,8 +1618,8 @@
$result = <
@@ -1792,16 +1819,16 @@
$result = <
SCRIPT
- my $buttons = <
From lon-capa-cvs@mail.lon-capa.org Wed Apr 30 20:18:37 2003
From: lon-capa-cvs@mail.lon-capa.org (bowersj2)
Date: Wed, 30 Apr 2003 19:18:37 -0000
Subject: [LON-CAPA-cvs] cvs: loncom /interface lonprintout.pm
Message-ID:
bowersj2 Wed Apr 30 15:18:37 2003 EDT
Modified files:
/loncom/interface lonprintout.pm
Log:
More fixing the page layout thingy.
Index: loncom/interface/lonprintout.pm
diff -u loncom/interface/lonprintout.pm:1.134 loncom/interface/lonprintout.pm:1.135
--- loncom/interface/lonprintout.pm:1.134 Wed Apr 30 15:07:29 2003
+++ loncom/interface/lonprintout.pm Wed Apr 30 15:18:37 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Printout
#
-# $Id: lonprintout.pm,v 1.134 2003/04/30 19:07:29 bowersj2 Exp $
+# $Id: lonprintout.pm,v 1.135 2003/04/30 19:18:37 bowersj2 Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1524,10 +1524,11 @@
sub new {
my $self = Apache::lonhelper::element->new();
+ shift;
+
$self->{'variable'} = shift;
my $helper = Apache::lonhelper::getHelper();
- my $paramHash = Apache::lonhelper::getParamHash();
- $helper->declareVar($paramHash->{'variable'});
+ $helper->declareVar($self->{'variable'});
bless($self);
return $self;
}
@@ -1583,6 +1584,16 @@
$result .= "";
return $result;
+}
+
+sub postprocess {
+ my $self = shift;
+
+ my $var = $self->{'variable'};
+ $helper->{VARS}->{$var} =
+ $ENV{'form.$var.layout'} . '|' . $ENV{'form.$var.cols'} . '|' .
+ $ENV{'form.$var.paper'};
+ return 1;
}
1;
From lon-capa-cvs@mail.lon-capa.org Wed Apr 30 20:23:48 2003
From: lon-capa-cvs@mail.lon-capa.org (bowersj2)
Date: Wed, 30 Apr 2003 19:23:48 -0000
Subject: [LON-CAPA-cvs] cvs: loncom /interface lonhelper.pm
Message-ID:
bowersj2 Wed Apr 30 15:23:48 2003 EDT
Modified files:
/loncom/interface lonhelper.pm
Log:
Makes the paper state work on my machine.
Index: loncom/interface/lonhelper.pm
diff -u loncom/interface/lonhelper.pm:1.15 loncom/interface/lonhelper.pm:1.16
--- loncom/interface/lonhelper.pm:1.15 Wed Apr 30 15:08:15 2003
+++ loncom/interface/lonhelper.pm Wed Apr 30 15:23:48 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# .helper XML handler to implement the LON-CAPA helper
#
-# $Id: lonhelper.pm,v 1.15 2003/04/30 19:08:15 bowersj2 Exp $
+# $Id: lonhelper.pm,v 1.16 2003/04/30 19:23:48 bowersj2 Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1002,7 +1002,7 @@
BUTTONS
}
- if (defined $self->{ERRO_MSG}) {
+ if (defined $self->{ERROR_MSG}) {
$result .= ' ' . $self->{ERROR_MSG} . ' ';
}
From lon-capa-cvs@mail.lon-capa.org Wed Apr 30 20:25:47 2003
From: lon-capa-cvs@mail.lon-capa.org (bowersj2)
Date: Wed, 30 Apr 2003 19:25:47 -0000
Subject: [LON-CAPA-cvs] cvs: loncom /interface lonprintout.pm
Message-ID:
bowersj2 Wed Apr 30 15:25:47 2003 EDT
Modified files:
/loncom/interface lonprintout.pm
Log:
Makes the paper selection state work.
Index: loncom/interface/lonprintout.pm
diff -u loncom/interface/lonprintout.pm:1.135 loncom/interface/lonprintout.pm:1.136
--- loncom/interface/lonprintout.pm:1.135 Wed Apr 30 15:18:37 2003
+++ loncom/interface/lonprintout.pm Wed Apr 30 15:25:47 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Printout
#
-# $Id: lonprintout.pm,v 1.135 2003/04/30 19:18:37 bowersj2 Exp $
+# $Id: lonprintout.pm,v 1.136 2003/04/30 19:25:47 bowersj2 Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1590,9 +1590,10 @@
my $self = shift;
my $var = $self->{'variable'};
+ my $helper = Apache::lonhelper->getHelper();
$helper->{VARS}->{$var} =
- $ENV{'form.$var.layout'} . '|' . $ENV{'form.$var.cols'} . '|' .
- $ENV{'form.$var.paper'};
+ $ENV{"form.$var.layout"} . '|' . $ENV{"form.$var.cols"} . '|' .
+ $ENV{"form.$var.paper"};
return 1;
}
From lon-capa-cvs@mail.lon-capa.org Wed Apr 30 20:40:47 2003
From: lon-capa-cvs@mail.lon-capa.org (matthew)
Date: Wed, 30 Apr 2003 19:40:47 -0000
Subject: [LON-CAPA-cvs] cvs: loncom /homework edit.pm
Message-ID:
matthew Wed Apr 30 15:40:47 2003 EDT
Modified files:
/loncom/homework edit.pm
Log:
Added &html_element_name() to return a name for new elements. This makes
it easier for those of us who are forced to write javascript to reference
elements on the edit page.
Index: loncom/homework/edit.pm
diff -u loncom/homework/edit.pm:1.46 loncom/homework/edit.pm:1.47
--- loncom/homework/edit.pm:1.46 Thu Feb 13 18:53:33 2003
+++ loncom/homework/edit.pm Wed Apr 30 15:40:47 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# edit mode helpers
#
-# $Id: edit.pm,v 1.46 2003/02/13 23:53:33 albertel Exp $
+# $Id: edit.pm,v 1.47 2003/04/30 19:40:47 matthew Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -481,12 +481,17 @@
return $result;
}
+sub html_element_name {
+ my ($name) = @_;
+ return $Apache::lonxml::curdepth.'.'.$name;
+}
+
sub text_arg {
my ($description,$name,$token,$size) = @_;
my $result;
if (!defined $size) { $size=20; }
my $arg=$token->[2]{$name};
- $result=$description.' ';
return $result;
}
@@ -510,8 +515,8 @@
$optionlist.="\n";
}
}
- $result.=$description.'