--- loncom/interface/lonparmset.pm 2003/01/19 11:55:14 1.82 +++ loncom/interface/lonparmset.pm 2003/05/03 21:30:21 1.89 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Handler to set parameters for assessments # -# $Id: lonparmset.pm,v 1.82 2003/01/19 11:55:14 www Exp $ +# $Id: lonparmset.pm,v 1.89 2003/05/03 21:30:21 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -56,6 +56,7 @@ package Apache::lonparmset; use strict; use Apache::lonnet; use Apache::Constants qw(:common :http REDIRECT); +use Apache::lonhtmlcommon(); use Apache::loncommon; use GDBM_File; use Apache::lonhomework; @@ -285,15 +286,13 @@ sub plink { sub startpage { my ($r,$id,$udom,$csec,$uname)=@_; - $r->content_type('text/html'); - $r->send_http_header; my $bodytag=&Apache::loncommon::bodytag('Set Course Parameters','', 'onUnload="pclose()"'); my $chooseopt=&Apache::loncommon::select_dom_form($udom,'udom').' '. &Apache::loncommon::selectstudent_link('parmform','uname','udom'); my $selscript=&Apache::loncommon::studentbrowser_javascript(); - + my $pjump_def = &Apache::lonhtmlcommon::pjump_javascript_definition(); $r->print(< @@ -306,15 +305,7 @@ sub startpage { 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(); @@ -1485,7 +1476,11 @@ sub crsenv { ",'spreadsheet')\">Browse
", 'allow_limited_html_in_feedback' => 'Allow limited HTML in discussion posts
'. - '(Set value to yes to allow)' + '(Set value to yes to allow)', + 'rndseed' + => 'Random seed algorithm used
'. + 'Modifying this will make problems '. + 'display different numbers or correct answer' ); foreach (keys(%values)) { unless ($descriptions{$_}) { @@ -1562,7 +1557,7 @@ ENDENV =pod -=item handler +=item * handler Main handler. Calls &assessparms and &crsenv subroutines. @@ -1570,6 +1565,7 @@ Main handler. Calls &assessparms and &c ################################################## ################################################## + use Data::Dumper; sub handler { my $r=shift; @@ -1579,6 +1575,10 @@ sub handler { return OK; } &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'}); + + $r->content_type('text/html'); + $r->send_http_header; + # ----------------------------------------------------- Needs to be in a course if (($ENV{'request.course.id'}) &&