--- loncom/interface/lonmenu.pm 2004/12/03 23:31:28 1.136 +++ loncom/interface/lonmenu.pm 2004/12/04 02:01:04 1.137 @@ -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&1&list.gif&list[_1]&dir[_1]&golist(' 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 @@ function gocstr(url,filename) { 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 +
+ + + +
+ ENDCONSTSPACEFORM }