[LON-CAPA-cvs] cvs: loncom /interface lonmenu.pm
raeburn
lon-capa-cvs@mail.lon-capa.org
Sat, 04 Dec 2004 02:01:04 -0000
raeburn Fri Dec 3 21:01:04 2004 EDT
Modified files:
/loncom/interface lonmenu.pm
Log:
Fix bug #3678.
Index: loncom/interface/lonmenu.pm
diff -u loncom/interface/lonmenu.pm:1.136 loncom/interface/lonmenu.pm:1.137
--- loncom/interface/lonmenu.pm:1.136 Fri Dec 3 18:31:28 2004
+++ loncom/interface/lonmenu.pm Fri Dec 3 21:01:04 2004
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Routines to control the menu
#
-# $Id: lonmenu.pm,v 1.136 2004/12/03 23:31:28 albertel Exp $
+# $Id: lonmenu.pm,v 1.137 2004/12/04 02:01:04 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -393,7 +393,7 @@
s&6&2&rtrv.gif&retrieve[_1]&version[_1]&gocstr('/adm/retrieve','/~$uname/$thisdisfn')&Retrieve old version
s&6&3&pub.gif&publish[_1]&resource[_1]&gocstr('/adm/publish','/~$uname/$thisdisfn')&Publish this resource
s&7&1&del.gif&delete[_1]&resource[_2]&gocstr('/adm/cfile?action=delete','/~$uname/$thisdisfn')&Delete this resource
-s&7&2&prt.gif&prepare[_1]&printout[_1]&gopost('/adm/printout','/~$uname/$thisdisfn')&Prepare a printable document
+s&7&2&prt.gif&prepare[_1]&printout[_1]&gocstr('/adm/printout','/~$uname/$thisdisfn')&Prepare a printable document
ENDMENUITEMS
}
} elsif (defined($ENV{'request.course.id'})) {
@@ -1020,6 +1020,23 @@
this.document.cstrdelete.submit();
return;
}
+ if (url == '/adm/printout') {
+ this.document.cstrprint.postdata.value = filename
+ this.document.cstrprint.curseed.value = 0;
+ if ((this.document.lonhomework.rndseed.value != null) && (this.document.lonhomework.rndseed.value != '')) {
+ this.document.cstrprint.curseed.value = this.document.lonhomework.rndseed.value
+ }
+ this.document.cstrprint.problemtype.value = 0;
+ for (var i=0; i<this.document.lonhomework.problemtype.options.length; i++) {
+ if (this.document.lonhomework.problemtype.options[i].selected) {
+ if (this.document.lonhomework.problemtype.options[i].value != null && this.document.lonhomework.problemtype.options[i].value != '') {
+ this.document.cstrprint.problemtype.value = this.document.lonhomework.problemtype.options[i].value
+ }
+ }
+ }
+ this.document.cstrprint.submit();
+ return;
+ }
if (url !='') {
this.document.constspace.filename.value = filename;
this.document.constspace.action = url;
@@ -1068,6 +1085,12 @@
<input type="hidden" name="action" value="delete" />
<input type="hidden" name="filename" value="" />
</form>
+<form name="cstrprint" action="/adm/printout" target="_parent" method="post">
+<input type="hidden" name="postdata" value="" />
+<input type="hidden" name="curseed" value="" />
+<input type="hidden" name="problemtype" value="" />
+</form>
+
ENDCONSTSPACEFORM
}