--- loncom/interface/lonparmset.pm 2003/03/14 21:15:39 1.80.2.1 +++ loncom/interface/lonparmset.pm 2003/06/04 18:22:52 1.96 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Handler to set parameters for assessments # -# $Id: lonparmset.pm,v 1.80.2.1 2003/03/14 21:15:39 albertel Exp $ +# $Id: lonparmset.pm,v 1.96 2003/06/04 18:22:52 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -56,7 +56,9 @@ package Apache::lonparmset; use strict; use Apache::lonnet; use Apache::Constants qw(:common :http REDIRECT); +use Apache::lonhtmlcommon(); use Apache::loncommon; +use Apache::lonmenu; use GDBM_File; use Apache::lonhomework; use Apache::lonxml; @@ -285,11 +287,17 @@ 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 $bodytag=&Apache::lonmenu::registerurl(). + &Apache::loncommon::bodytag('Set Course Parameters','', + 'onUnload="'. + &Apache::lonmenu::unloadevents().';pclose();" onLoad="'. + &Apache::lonmenu::loadevents().'"'). + &Apache::lonmenu::regflush(); + 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(< @@ -302,15 +310,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(); @@ -343,8 +343,13 @@ sub startpage { newWin.focus(); } +$selscript $bodytag + + +

Course Environment

@@ -360,7 +365,7 @@ For User or ID at Domain - +$chooseopt @@ -687,12 +692,12 @@ sub assessparms { my $url=$ENV{'form.url'}; $url=~s-^http://($ENV{'SERVER_NAME'}|$ENV{'HTTP_HOST'})--; $pssymb=&Apache::lonnet::symbread($url); - @pscat='all'; + if (!@pscat) { @pscat=('all'); } $pschp=''; $parmlev = 'full'; } elsif ($ENV{'form.symb'}) { $pssymb=$ENV{'form.symb'}; - @pscat='all'; + if (!@pscat) { @pscat=('all'); } $pschp=''; $parmlev = 'full'; } else { @@ -1453,7 +1458,8 @@ sub crsenv { 'hideemptyrows' => 'Hide Empty Rows in Spreadsheets
'. '("yes" for default hiding)', 'pageseparators' => 'Visibly Separate Items on Pages
'. - '("yes" for visible separation)', + '("yes" for visible separation, '. + 'changes will not show until next login)', 'pch.roles.denied'=> 'Disallow Resource Discussion for '. 'Roles
"st": '. 'student, "ta": '. @@ -1480,7 +1486,14 @@ 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' + => 'Randomization algorithm used
'. + 'Modifying this will make problems '. + 'have different numbers and answers', + 'problem_stream_switch' + => 'Allow problems to be splitted over pages
'. + ' (yes if allow anything else if not)' ); foreach (keys(%values)) { unless ($descriptions{$_}) { @@ -1557,7 +1570,7 @@ ENDENV =pod -=item handler +=item * handler Main handler. Calls &assessparms and &crsenv subroutines. @@ -1565,6 +1578,7 @@ Main handler. Calls &assessparms and &c ################################################## ################################################## + use Data::Dumper; sub handler { my $r=shift; @@ -1574,6 +1588,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'}) &&