[LON-CAPA-cvs] cvs: loncom / loncapa_apache.conf /auth lonroles.pm /homework/templates examupload.problem examupload.problem.meta /html/adm notinit.html /html/res/adm/pages menu.html /interface londocs.pm londropadd.pm lonevaluate.pm lonfeedback.pm lonmenu.pm lonmsg.pm lonpreferences.pm /lonnet/perl lonnet.pm /publisher lonpubdir.pm lonpublisher.pm lonupload.pm doc/loncapafiles loncapafiles.lpml
www
lon-capa-cvs@mail.lon-capa.org
Sat, 05 Jul 2003 10:07:12 -0000
This is a MIME encoded message
--www1057399632
Content-Type: text/plain
www Sat Jul 5 06:07:12 2003 EDT
Added files:
/loncom/homework/templates examupload.problem
examupload.problem.meta
/loncom/html/adm notinit.html
Modified files:
/doc/loncapafiles loncapafiles.lpml
/loncom loncapa_apache.conf
/loncom/auth lonroles.pm
/loncom/html/res/adm/pages menu.html
/loncom/interface londocs.pm londropadd.pm lonevaluate.pm
lonfeedback.pm lonmenu.pm lonmsg.pm
lonpreferences.pm
/loncom/lonnet/perl lonnet.pm
/loncom/publisher lonpubdir.pm lonpublisher.pm lonupload.pm
Log:
Have very limited connectivity, need to do big commit while online.
Will call this JULYone in Bugzilla. Fixes several small bugs.
--www1057399632
Content-Type: text/plain
Content-Disposition: attachment; filename="www-20030705060712.txt"
Index: doc/loncapafiles/loncapafiles.lpml
diff -u doc/loncapafiles/loncapafiles.lpml:1.259 doc/loncapafiles/loncapafiles.lpml:1.260
--- doc/loncapafiles/loncapafiles.lpml:1.259 Tue Jul 1 15:24:42 2003
+++ doc/loncapafiles/loncapafiles.lpml Sat Jul 5 06:07:11 2003
@@ -2,7 +2,7 @@
"http://lpml.sourceforge.net/DTD/lpml.dtd">
<!-- loncapafiles.lpml -->
-<!-- $Id: loncapafiles.lpml,v 1.259 2003/07/01 19:24:42 albertel Exp $ -->
+<!-- $Id: loncapafiles.lpml,v 1.260 2003/07/05 10:07:11 www Exp $ -->
<!--
@@ -557,6 +557,13 @@
</directory>
<directory dist='default'>
<protectionlevel>modest_delete</protectionlevel>
+ <targetdir dist='default'>home/httpd/html/res/lib/templates</targetdir>
+ <categoryname>server readonly</categoryname>
+ <description>Resource library
+ </description>
+</directory>
+<directory dist='default'>
+ <protectionlevel>modest_delete</protectionlevel>
<targetdir dist='default'>home/httpd/html/res/adm/includes</targetdir>
<categoryname>server readonly</categoryname>
<description>files useful for including within customized scripting
@@ -947,6 +954,22 @@
To be used by very simple harvesting engines.
</description>
</file>
+<file>
+<source>loncom/homework/templates/examupload.problem</source>
+<target dist='default'>home/httpd/html/res/lib/templates/examupload.problem</target>
+<categoryname>interface file</categoryname>
+<description>
+Generic resource for score upload
+</description>
+</file>
+<file>
+<source>loncom/homework/templates/examupload.problem.meta</source>
+<target dist='default'>home/httpd/html/res/lib/templates/examupload.problem.meta</target>
+<categoryname>interface file</categoryname>
+<description>
+Meta file for generic resource for score upload
+</description>
+</file>
<fileglob>
<glob>*.*</glob>
<sourcedir>loncom/homework/templates/</sourcedir>
@@ -965,6 +988,8 @@
ClickImageExample.problem.meta;
Essay.problem;
Essay.problem.meta;
+examupload.problem;
+examupload.problem.meta;
man1.jpg;
numerical.problem;
numerical.problem.meta;
@@ -1427,6 +1452,15 @@
<categoryname>interface file</categoryname>
<description>
Interface file for responding to improper page flipping.
+</description>
+</file>
+<file>
+<source>loncom/html/adm/notinit.html</source>
+<target dist='default'>home/httpd/html/adm/notinit.html</target>
+<categoryname>interface file</categoryname>
+<description>
+Interface file for responding to accessing uploaded resources without
+re-initializing course.
</description>
</file>
<file>
Index: loncom/loncapa_apache.conf
diff -u loncom/loncapa_apache.conf:1.53 loncom/loncapa_apache.conf:1.54
--- loncom/loncapa_apache.conf:1.53 Fri Jun 13 17:00:01 2003
+++ loncom/loncapa_apache.conf Sat Jul 5 06:07:11 2003
@@ -1,7 +1,7 @@
##
## loncapa_apache.conf -- Apache HTTP LON-CAPA configuration file
##
-## $Id: loncapa_apache.conf,v 1.53 2003/06/13 21:00:01 albertel Exp $
+## $Id: loncapa_apache.conf,v 1.54 2003/07/05 10:07:11 www Exp $
##
#
@@ -74,6 +74,7 @@
SetHandler perl-script
PerlHandler Apache::lonaboutme
ErrorDocument 404 /adm/notfound.html
+ErrorDocument 406 /adm/notinit.html
ErrorDocument 500 /adm/errorhandler
</LocationMatch>
@@ -82,6 +83,7 @@
SetHandler perl-script
PerlHandler Apache::lonsimplepage
ErrorDocument 404 /adm/notfound.html
+ErrorDocument 406 /adm/notinit.html
ErrorDocument 500 /adm/errorhandler
</LocationMatch>
@@ -90,6 +92,7 @@
SetHandler perl-script
PerlHandler Apache::lonbulletin
ErrorDocument 404 /adm/notfound.html
+ErrorDocument 406 /adm/notinit.html
ErrorDocument 500 /adm/errorhandler
</LocationMatch>
Index: loncom/auth/lonroles.pm
diff -u loncom/auth/lonroles.pm:1.62 loncom/auth/lonroles.pm:1.63
--- loncom/auth/lonroles.pm:1.62 Tue Jun 24 11:52:32 2003
+++ loncom/auth/lonroles.pm Sat Jul 5 06:07:11 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# User Roles Screen
#
-# $Id: lonroles.pm,v 1.62 2003/06/24 15:52:32 matthew Exp $
+# $Id: lonroles.pm,v 1.63 2003/07/05 10:07:11 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -306,11 +306,14 @@
$r->print('<input type=hidden name=orgurl value="'.$fn.'">');
$r->print('<input type=hidden name=selectrole value=1>');
}
- $r->print('<br>Show all roles: <input type=checkbox name=showall');
- if ($ENV{'form.showall'}) { $r->print(' checked'); }
- $r->print('><input type=submit value="Display"><br>');
+ if ($ENV{'user.adv'}) {
+ $r->print(
+ '<br />Show all roles: <input type="checkbox" name="showall"');
+ if ($ENV{'form.showall'}) { $r->print(' checked'); }
+ $r->print('><input type=submit value="Display">');
+ }
# ----------------------------------------------------------------------- Table
- $r->print('<table><tr>');
+ $r->print('<br /><table><tr>');
unless ($nochoose) { $r->print('<th> </th>'); }
$r->print('<th>User Role</th><th colspan=2>Extent</th>'.
'<th>Start</th><th>End</th><th>Remark</th></tr>'."\n");
Index: loncom/html/res/adm/pages/menu.html
diff -u loncom/html/res/adm/pages/menu.html:1.104 loncom/html/res/adm/pages/menu.html:1.105
--- loncom/html/res/adm/pages/menu.html:1.104 Wed Jun 18 21:22:44 2003
+++ loncom/html/res/adm/pages/menu.html Sat Jul 5 06:07:11 2003
@@ -4,7 +4,7 @@
Remote Control
//
-// $Id: menu.html,v 1.104 2003/06/19 01:22:44 www Exp $
+// $Id: menu.html,v 1.105 2003/07/05 10:07:11 www Exp $
//
// Copyright Michigan State University Board of Trustees
//
@@ -285,17 +285,21 @@
}
}
-function gopost(url,postdata) {
+function gopost(url,postdata,makenewwin) {
windowcheck();
statuslocked=0;
this.document['led'].src="http://"+clienthost+imgpath+"ledsend.gif";
if (url!='') {
+ if (makenewwin) {
+ this.document.server.target='LONcom';
+ }
this.document.server.action="http://"+clienthost+url;
this.document.server.postdata.value=postdata;
this.document.server.command.value='';
this.document.server.url.value='';
this.document.server.postsymb.value='';
this.document.server.submit();
+ this.document.server.target='loncapaclient';
}
}
Index: loncom/interface/londocs.pm
diff -u loncom/interface/londocs.pm:1.61 loncom/interface/londocs.pm:1.62
--- loncom/interface/londocs.pm:1.61 Mon Jun 16 09:51:46 2003
+++ loncom/interface/londocs.pm Sat Jul 5 06:07:11 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Documents
#
-# $Id: londocs.pm,v 1.61 2003/06/16 13:51:46 www Exp $
+# $Id: londocs.pm,v 1.62 2003/07/05 10:07:11 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -571,6 +571,15 @@
window.open('/adm/rat/extpickframe.html');
}
+function makeexamupload() {
+ var title=prompt('Listed Title for the Uploaded Score');
+ if (title) {
+ this.document.forms.newexamupload.importdetail.value=
+ title+'=/res/lib/templates/examupload.problem';
+ this.document.forms.newexamupload.submit();
+ }
+}
+
function makesmppage() {
var title=prompt('Listed Title for the Page');
if (title) {
@@ -775,6 +784,15 @@
<nobr>
<input name="newsmpproblem" type="button" value="Simple Problem"
onClick="javascript:makesmpproblem();" />$help{'Creating_From_Template'}
+</nobr>
+</form>
+<form action="/adm/coursedocs" method="post" name="newexamupload">
+<input type="hidden" name="folder" value="$folder">
+<input type="hidden" name="foldername" value="$ENV{'form.foldername'}">
+<input type=hidden name="importdetail" value="">
+<nobr>
+<input name="newexamupload" type="button" value="Score Upload Form"
+onClick="javascript:makeexamupload();" />
</nobr>
</form>
<form action="/adm/coursedocs" method="post" name="newbul">
Index: loncom/interface/londropadd.pm
diff -u loncom/interface/londropadd.pm:1.72 loncom/interface/londropadd.pm:1.73
--- loncom/interface/londropadd.pm:1.72 Thu Jul 3 15:26:20 2003
+++ loncom/interface/londropadd.pm Sat Jul 5 06:07:11 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Handler to drop and add students in courses
#
-# $Id: londropadd.pm,v 1.72 2003/07/03 19:26:20 matthew Exp $
+# $Id: londropadd.pm,v 1.73 2003/07/05 10:07:11 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -218,7 +218,7 @@
my $authheader = &Apache::loncommon::authform_header(%param);
my $pjump_def = &Apache::lonhtmlcommon::pjump_javascript_definition();
return (<<ENDPICK);
-function verify_message (vf,founduname,foundpwd,foundname,foundid,foundsec) {
+function verify_message (vf,founduname,foundpwd,foundname,foundid,foundsec,foundemail) {
var foundatype=0;
var message='';
if (founduname==0) {
@@ -254,11 +254,12 @@
}
}
- if (foundname==0) { message='No name fields specified. '; }
- if (foundid==0) { message+='No ID or student number field specified. '; }
- if (foundsec==0) { message+='No section or group field specified. '; }
+ if (foundname==0) { message='name fields'; }
+ if (foundid==0) { if (message!='') { message+=', '; } message+='student number field'; }
+ if (foundsec==0) { if (message!='') { message+=', '; } message+='section or group field'; }
+ if (foundemail==0) { if (message!='') { message+=', '; } message+='email address field'; }
if (message!='') {
- message+='Continue enrollment?';
+ message='Not specified (optional): '+message+'. Continue enrollment?';
if (confirm(message)) {
vf.state.value='enrolling';
vf.submit();
@@ -284,6 +285,7 @@
var foundname=0;
var foundid=0;
var foundsec=0;
+ var foundemail=0;
var tw;
for (i=0;i<=vf.nfields.value;i++) {
tw=eval('vf.f'+i+'.selectedIndex');
@@ -292,8 +294,9 @@
if (tw==7) { foundid=1; }
if (tw==8) { foundsec=1; }
if (tw==9) { foundpwd=1; }
+ if (tw==10) { foundemail=1; }
}
- verify_message(vf,founduname,foundpwd,foundname,foundid,foundsec);
+ verify_message(vf,founduname,foundpwd,foundname,foundid,foundsec,foundemail);
}
//
@@ -312,7 +315,8 @@
// 7 = id
// 8 = section
// 9 = ipwd (password)
-//
+// 10 = email address
+
function flip(vf,tf) {
var nw=eval('vf.f'+tf+'.selectedIndex');
var i;
@@ -499,7 +503,8 @@
['gen','Generation'],
['id','ID/Student Number'],
['sec','Group/Section'],
- ['ipwd','Initial Password']);
+ ['ipwd','Initial Password'],
+ ['email','EMail Address']);
if ($ENV{'form.upfile_associate'} eq 'reverse') {
&Apache::loncommon::csv_print_samples($r,\@records);
$i=&Apache::loncommon::csv_print_select_table($r,\@records,\@d);
@@ -1515,6 +1520,14 @@
}
$id=~tr/A-Z/a-z/;
}
+ # determine email address
+ my $email='';
+ if (defined($fields{'email'})) {
+ if (defined($entries{$fields{'email'}})) {
+ $email=$entries{$fields{'email'}};
+ unless ($email=~/^[^\@]+\@[^\@]+$/) { $email=''; }
+ }
+ }
# determine student password
my $password='';
if ($genpwd) {
@@ -1537,7 +1550,8 @@
my $reply=&Apache::lonnet::modifystudent
($domain,$username,$id,$amode,$password,
$fname,$mname,$lname,$gen,$sec,$enddate,
- $startdate,$ENV{'form.forceid'},$desiredhost);
+ $startdate,$ENV{'form.forceid'},$desiredhost,
+ $email);
if ($reply ne 'ok') {
$reply =~ s/^error://;
$r->print('<br /><b>'.$username.'</b>:'.
Index: loncom/interface/lonevaluate.pm
diff -u loncom/interface/lonevaluate.pm:1.11 loncom/interface/lonevaluate.pm:1.12
--- loncom/interface/lonevaluate.pm:1.11 Tue Apr 15 15:01:14 2003
+++ loncom/interface/lonevaluate.pm Sat Jul 5 06:07:11 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Evaluate
#
-# $Id: lonevaluate.pm,v 1.11 2003/04/15 19:01:14 www Exp $
+# $Id: lonevaluate.pm,v 1.12 2003/07/05 10:07:11 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -95,8 +95,10 @@
<title>Evaluation submitted</title>
<script>
function go() {
- if (window.name!='LONcatInfo') {
+ if ((window.name=='loncapaclient')) {
window.location='/res/$feedurl';
+ } else {
+ self.close();
}
}
</script>
Index: loncom/interface/lonfeedback.pm
diff -u loncom/interface/lonfeedback.pm:1.48 loncom/interface/lonfeedback.pm:1.49
--- loncom/interface/lonfeedback.pm:1.48 Tue Jul 1 15:27:31 2003
+++ loncom/interface/lonfeedback.pm Sat Jul 5 06:07:11 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Feedback
#
-# $Id: lonfeedback.pm,v 1.48 2003/07/01 19:27:31 albertel Exp $
+# $Id: lonfeedback.pm,v 1.49 2003/07/05 10:07:11 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -151,11 +151,13 @@
<meta HTTP-EQUIV="Refresh" CONTENT="2; url=$feedurl">
</head>
<html>
-<body bgcolor="#FFFFFF">
+<body bgcolor="#FFFFFF" onLoad='if (window.name!="loncapaclient") { this.document.reldt.submit(); self.close(); }'>
<img align=right src=/adm/lonIcons/lonlogos.gif>
$typestyle
<b>Sent $sendsomething message(s), and $sendposts post(s).</b>
<font color=red>$status</font>
+<form name="reldt" action="$feedurl" target="loncapaclient">
+</form>
</body>
</html>
ENDREDIR
@@ -175,7 +177,7 @@
$r->print (<<ENDNOREDIRTWO);
</head>
<html>
-<body bgcolor="#FFFFFF">
+<body bgcolor="#FFFFFF" onLoad='if (window.name!="loncapaclient") { self.close(); }'>
<img align=right src=/adm/lonIcons/lonlogos.gif>
<b>Sorry, no feedback possible on this resource ...</b>
</body>
@@ -185,22 +187,23 @@
sub screen_header {
my ($feedurl) = @_;
- my $options='';
+ my $msgoptions='';
+ my $discussoptions='';
if (($feedurl=~/^\/res\//) && ($feedurl!~/^\/res\/adm/)) {
- $options=
+ $msgoptions=
'<p><input type=checkbox name=author> Feedback to resource author';
}
if (&feedback_available(1)) {
- $options.=
+ $msgoptions.=
'<br><input type=checkbox name=question> Question about resource content';
}
if (&feedback_available(0,1)) {
- $options.=
+ $msgoptions.=
'<br><input type=checkbox name=course> '.
'Question/Comment/Feedback about course content';
}
if (&feedback_available(0,0,1)) {
- $options.=
+ $msgoptions.=
'<br><input type=checkbox name=policy> '.
'Question/Comment/Feedback about course policy';
}
@@ -209,14 +212,17 @@
if (&Apache::lonnet::allowed('pch',
$ENV{'request.course.id'}.
($ENV{'request.course.sec'}?'/'.$ENV{'request.course.sec'}:''))) {
- $options.='<br><input type=checkbox name=discuss> '.
- '<b>Contribution to course discussion of resource</b>';
- $options.='<br><input type=checkbox name=anondiscuss> '.
- '<b>Anonymous contribution to course discussion of resource</b>'.
- ' (name only visible to course faculty)';
+ $discussoptions='<input type="checkbox" name="discuss" onClick="this.form.anondiscuss.checked=false;"> '.
+ 'Contribution to course discussion of resource';
+ $discussoptions.='<br><input type="checkbox" name="anondiscuss" onClick="this.form.discuss.checked=false;"> '.
+ 'Anonymous contribution to course discussion of resource'.
+ ' <i>(name only visible to course faculty)</i>';
}
}
- return $options;
+ if ($msgoptions) { $msgoptions='<h2>Sending Messages</h2>'.$msgoptions; }
+ if ($discussoptions) {
+ $discussoptions='<h2>Discussion Contributions</h2>'.$discussoptions; }
+ return $msgoptions.$discussoptions;
}
sub resource_output {
Index: loncom/interface/lonmenu.pm
diff -u loncom/interface/lonmenu.pm:1.79 loncom/interface/lonmenu.pm:1.80
--- loncom/interface/lonmenu.pm:1.79 Mon Jun 23 15:08:03 2003
+++ loncom/interface/lonmenu.pm Sat Jul 5 06:07:11 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Routines to control the menu
#
-# $Id: lonmenu.pm,v 1.79 2003/06/23 19:08:03 www Exp $
+# $Id: lonmenu.pm,v 1.80 2003/07/05 10:07:11 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -229,7 +229,7 @@
}
if (&Apache::lonmsg::newmail()) {
$newmail=($textual?
- '<b><a href="/adm/communicate">You have new messages</a></b><br />':
+ '<b><a href="/adm/communicate" target="_top">You have new messages</a></b><br />':
'swmenu.setstatus("you have","messages");');
}
if ($noremote) {
@@ -340,8 +340,8 @@
unless ($ENV{'REQUEST_URI'}=~/\/(bulletinboard|smppg|navmaps|syllabus|aboutme)(\?|$)/) {
$menuitems.=(<<ENDREALRES);
s&6&3&catalog.gif&catalog&info&catalog_info()&Show catalog information
-s&8&1&eval.gif&evaluate&this&gopost('/adm/evaluate',currentURL)&Provide my evaluation of this resource
-s&8&2&fdbk.gif&feedback&discuss&gopost('/adm/feedback',currentURL)&Provide feedback messages or contribute to the course discussion about this resource
+s&8&1&eval.gif&evaluate&this&gopost('/adm/evaluate',currentURL,1)&Provide my evaluation of this resource
+s&8&2&fdbk.gif&feedback&discuss&gopost('/adm/feedback',currentURL,1)&Provide feedback messages or contribute to the course discussion about this resource
ENDREALRES
}
my $buttons='';
Index: loncom/interface/lonmsg.pm
diff -u loncom/interface/lonmsg.pm:1.56 loncom/interface/lonmsg.pm:1.57
--- loncom/interface/lonmsg.pm:1.56 Mon Jun 23 18:25:14 2003
+++ loncom/interface/lonmsg.pm Sat Jul 5 06:07:11 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Routines for messaging
#
-# $Id: lonmsg.pm,v 1.56 2003/06/23 22:25:14 albertel Exp $
+# $Id: lonmsg.pm,v 1.57 2003/07/05 10:07:11 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -486,6 +486,10 @@
$quotemsg=~s/\r/\n/g;
$quotemsg=~s/\f/\n/g;
$quotemsg=~s/\n+/\n\> /g;
+ my $torepl=&Apache::loncommon::aboutmewrapper(
+ &Apache::loncommon::plainname($content{'sendername'},$content{'senderdomain'}),$content{'sendername'},$content{'senderdomain'}).' ('.
+$content{'sendername'}.'@'.
+ $content{'senderdomain'}.')';
my $subject='Re: '.$content{'subject'};
my $dispcrit='';
if (&Apache::lonnet::allowed('srm',$ENV{'request.course.id'})) {
@@ -499,6 +503,7 @@
$r->print(<<"ENDREPLY");
<form action="/adm/email" method=post>
<input type=hidden name=sendreply value="$msgid">
+To: $torepl<br />
Subject: <input type=text size=50 name=subject value="$subject"><p>
<textarea name=message cols=84 rows=10 wrap=hard>
$quotemsg
Index: loncom/interface/lonpreferences.pm
diff -u loncom/interface/lonpreferences.pm:1.25 loncom/interface/lonpreferences.pm:1.26
--- loncom/interface/lonpreferences.pm:1.25 Fri Jun 20 15:22:14 2003
+++ loncom/interface/lonpreferences.pm Sat Jul 5 06:07:11 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Preferences
#
-# $Id: lonpreferences.pm,v 1.25 2003/06/20 19:22:14 bowersj2 Exp $
+# $Id: lonpreferences.pm,v 1.26 2003/07/05 10:07:11 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -180,7 +180,7 @@
my $r = shift;
my $user = $ENV{'user.name'};
my $domain = $ENV{'user.domain'};
- my %userenv = &Apache::lonnet::get('environment',['msgforward']);
+ my %userenv = &Apache::lonnet::get('environment',['msgforward','notification','critnotification']);
my $msgforward=$userenv{'msgforward'};
my $notification=$userenv{'notification'};
my $critnotification=$userenv{'critnotification'};
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.386 loncom/lonnet/perl/lonnet.pm:1.387
--- loncom/lonnet/perl/lonnet.pm:1.386 Thu Jul 3 15:26:21 2003
+++ loncom/lonnet/perl/lonnet.pm Sat Jul 5 06:07:11 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network
# TCP networking package
#
-# $Id: lonnet.pm,v 1.386 2003/07/03 19:26:21 matthew Exp $
+# $Id: lonnet.pm,v 1.387 2003/07/05 10:07:11 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -2732,7 +2732,7 @@
my ($udom, $uname, $uid,
$umode, $upass, $first,
$middle, $last, $gene,
- $forceid, $desiredhome)=@_;
+ $forceid, $desiredhome, $email)=@_;
$udom=~s/\W//g;
$uname=~s/\W//g;
&logthis('Call to modify user '.$udom.', '.$uname.', '.$uid.', '.
@@ -2801,10 +2801,14 @@
} else {
%names = @tmp;
}
+
if (defined($first)) { $names{'firstname'} = $first; }
if (defined($middle)) { $names{'middlename'} = $middle; }
if (defined($last)) { $names{'lastname'} = $last; }
if (defined($gene)) { $names{'generation'} = $gene; }
+ if (defined($email)) { $names{'notification'} = $email;
+ $names{'critnotification'} = $email; }
+
my $reply = &put('environment', \%names, $udom,$uname);
if ($reply ne 'ok') { return 'error: '.$reply; }
&logthis('Success modifying user '.$udom.', '.$uname.', '.$uid.', '.
@@ -2818,7 +2822,7 @@
sub modifystudent {
my ($udom,$uname,$uid,$umode,$upass,$first,$middle,$last,$gene,$usec,
- $end,$start,$forceid,$desiredhome)=@_;
+ $end,$start,$forceid,$desiredhome,$email)=@_;
my $cid='';
unless ($cid=$ENV{'request.course.id'}) {
return 'not_in_class';
@@ -2826,7 +2830,7 @@
# --------------------------------------------------------------- Make the user
my $reply=&modifyuser
($udom,$uname,$uid,$umode,$upass,$first,$middle,$last,$gene,$forceid,
- $desiredhome);
+ $desiredhome,$email);
unless ($reply eq 'ok') { return $reply; }
# This will cause &modify_student_enrollment to get the uid from the
# students environment
Index: loncom/publisher/lonpubdir.pm
diff -u loncom/publisher/lonpubdir.pm:1.34 loncom/publisher/lonpubdir.pm:1.35
--- loncom/publisher/lonpubdir.pm:1.34 Wed Jun 18 10:58:39 2003
+++ loncom/publisher/lonpubdir.pm Sat Jul 5 06:07:12 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Construction Space Directory Lister
#
-# $Id: lonpubdir.pm,v 1.34 2003/06/18 14:58:39 www Exp $
+# $Id: lonpubdir.pm,v 1.35 2003/07/05 10:07:12 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -209,13 +209,13 @@
$thisdisfn.'/ - LON-CAPA Construction Space\';</script>'.
$pubdirscript.
'<form method="post" action="/adm/publish" target="_parent">'.
- '<input type="hidden" name="filename" value="/~'.
+ '<table><tr><td><input type="hidden" name="filename" value="/~'.
$uname.$thisdisfn.'/" />'.
'<input type="button" onClick="pubdir(this.form);" value="Publish Directory" />'.
'<input type="hidden" name="pubrec" value="" />'.
- '<input type="button" onClick="pubrecdir(this.form);" value="Publish Directory and Sub Directories" />'.
+ '<input type="button" onClick="pubrecdir(this.form);" value="Publish Directory and Sub Directories" /></td><td>'.
'<input type="button" onClick="window.location='."'/~".
- $uname.$thisdisfn."/default.meta'".'" value="Directory Catalog Information" /></form>');
+ $uname.$thisdisfn."/default.meta'".'" value="Edit Directory Catalog Information" /></td></tr><tr><td><input type="checkbox" name="forcerepub" /> Force publication of unmodified files.</td><td> </td></tr></table></form>');
if (($uname ne $ENV{'user.name'}) || ($udom ne $ENV{'user.domain'})) {
$r->print('<h3>Co-Author: '.$uname.' at '.$udom.
Index: loncom/publisher/lonpublisher.pm
diff -u loncom/publisher/lonpublisher.pm:1.123 loncom/publisher/lonpublisher.pm:1.124
--- loncom/publisher/lonpublisher.pm:1.123 Mon Jun 30 13:13:08 2003
+++ loncom/publisher/lonpublisher.pm Sat Jul 5 06:07:12 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Publication Handler
#
-# $Id: lonpublisher.pm,v 1.123 2003/06/30 17:13:08 albertel Exp $
+# $Id: lonpublisher.pm,v 1.124 2003/07/05 10:07:12 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1543,7 +1543,7 @@
$ruid,$rgid,$rrdev,$rsize,
$ratime,$rmtime,$rctime,
$rblksize,$rblocks)=stat($resdir.'/'.$filename);
- if ($rmtime<$cmtime) {
+ if (($rmtime<$cmtime) || ($ENV{'form.forcerepub'})) {
# previously published, modified now
$publishthis=1;
}
Index: loncom/publisher/lonupload.pm
diff -u loncom/publisher/lonupload.pm:1.16 loncom/publisher/lonupload.pm:1.17
--- loncom/publisher/lonupload.pm:1.16 Mon Jun 23 17:56:31 2003
+++ loncom/publisher/lonupload.pm Sat Jul 5 06:07:12 2003
@@ -2,7 +2,7 @@
# The LearningOnline Network with CAPA
# Handler to upload files into construction space
#
-# $Id: lonupload.pm,v 1.16 2003/06/23 21:56:31 albertel Exp $
+# $Id: lonupload.pm,v 1.17 2003/07/05 10:07:12 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -251,11 +251,7 @@
$r->print('<html><head><title>LON-CAPA Construction Space</title></head>');
- $r->print(
- '<body bgcolor="#FFFFFF"><img align=right src=/adm/lonIcons/lonlogos.gif>');
-
-
- $r->print('<h1>Upload file to Construction Space</h1>');
+ $r->print(&Apache::loncommon::bodytag('Upload file to Construction Space'));
if (($uname ne $ENV{'user.name'}) || ($udom ne $ENV{'user.domain'})) {
$r->print('<h3><font color=red>Co-Author: '.$uname.' at '.$udom.
Index: loncom/homework/templates/examupload.problem
+++ loncom/homework/templates/examupload.problem
<problem>
<displaytitle />
<script type="loncapa/perl">
$weight=&EXT('resource.0.weight');
if ((!defined($weight)) || ($weight eq '')) { $weight=0; }
$awarded=&EXT('user.resource.resource.0.awarded');
if (!defined($awarded)) { $awarded=0; }
</script>
<startouttext />
You have <display>$awarded*$weight</display> points out of $weight.
<endouttext />
<notsolved><numericalresponse id='score' /></notsolved>
</problem>
Index: loncom/homework/templates/examupload.problem.meta
+++ loncom/homework/templates/examupload.problem.meta
<abstract>Form to upload scores of exams, etc, into LON-CAPA</abstract>
<author>LON-CAPA</author>
<copyright>default</copyright>
<creationdate>1057299743</creationdate>
<customdistributionfile></customdistributionfile>
<dependencies></dependencies>
<keywords>points</keywords>
<language>notset</language>
<lastrevisiondate>1057299743</lastrevisiondate>
<mime>problem</mime>
<notes></notes>
<owner>templates@lib</owner>
<parameter part="0" id="score" package="numericalresponse"></parameter>
<parameter part="0" package="part"></parameter>
<stores part="0" name="awarded" type="float" display="Partial Credit Factor [Part: 0]"></stores>
<stores part="0" name="solved" type="string" display="Problem Status [Part: 0]"></stores>
<stores part="0" name="tries" type="int_zeropos" display="Number of Attempts [Part: 0]"></stores>
<subject>Exam Scores</subject>
<title>Exam Upload Resource</title>
Index: loncom/html/adm/notinit.html
+++ loncom/html/adm/notinit.html
<html>
<body bgcolor="#FFFFFF">
<img src="/adm/lonKaputt/lonlogo_broken.gif" align=left>
<h1>Sorry!</h1>
<h2>You do need to re-initialize this course before being able to access
this resource.</h2>
</body>
</html>
--www1057399632--