--- loncom/interface/lonparmset.pm 2003/05/27 21:22:13 1.95 +++ loncom/interface/lonparmset.pm 2003/06/20 14:21:03 1.104 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Handler to set parameters for assessments # -# $Id: lonparmset.pm,v 1.95 2003/05/27 21:22:13 www Exp $ +# $Id: lonparmset.pm,v 1.104 2003/06/20 14:21:03 matthew Exp $ # # Copyright Michigan State University Board of Trustees # @@ -58,7 +58,6 @@ 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; @@ -286,14 +285,10 @@ sub plink { sub startpage { - my ($r,$id,$udom,$csec,$uname)=@_; - - my $bodytag=&Apache::lonmenu::registerurl(). - &Apache::loncommon::bodytag('Set Course Parameters','', - 'onUnload="'. - &Apache::lonmenu::unloadevents().';pclose();" onLoad="'. - &Apache::lonmenu::loadevents().'"'). - &Apache::lonmenu::regflush(); + my ($r,$id,$udom,$csec,$uname,$have_assesments)=@_; + + 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(); @@ -347,15 +342,23 @@ $selscript $bodytag -Use Assignment Parameter Helper, a -simpler interface to set open, due, or answer open dates for problems or sequences. -

Course Environment

+

Course Assessments

+ +Use Assignment Parameter Helper, a +simpler interface to set open, due, or answer open dates for problems or +sequences.
 
+ENDHEAD + + if (!$have_assesments) { + $r->print('There are no assesment parameters in this course to set.
'); + } else { + $r->print(< Section/Group: @@ -371,7 +374,7 @@ $chooseopt ENDHEAD - + } } sub print_row { @@ -725,8 +728,8 @@ sub assessparms { "Unknown user '$uname' at domain '$udom'"; $uname=''; } else { - $csec=&Apache::lonnet::usection($udom,$uname, - $ENV{'request.course.id'}); + $csec=&Apache::lonnet::getsection($udom,$uname, + $ENV{'request.course.id'}); if ($csec eq '-1') { $message="". "User '$uname' at domain '$udom' not ". @@ -766,6 +769,7 @@ sub assessparms { $mapp{'0.0'} = ''; $symbp{'0.0'} = ''; + # ---------------------------------------------------------- Anything to store? if ($ENV{'form.pres_marker'}) { my ($sresid,$spnam,$snum)=split(/\&/,$ENV{'form.pres_marker'}); @@ -882,7 +886,12 @@ sub assessparms { if ($psprt[0] eq "all" || !@psprt) {@psprt = (keys %allparts);} # ------------------------------------------------------------------ Start page - &startpage($r,$id,$udom,$csec,$uname); + my $have_assesments=1; + if (scalar(keys(%allkeys)) eq 0) { $have_assesments=0; } + + &startpage($r,$id,$udom,$csec,$uname,$have_assesments); + + if (!$have_assesments) { return ''; } # if ($ENV{'form.url'}) { # $r->print(''); @@ -897,16 +906,9 @@ sub assessparms { $r->print('

'.$message.'

'); - $r->print(''); - my $submitmessage; - if (($prevvisit) || ($pschp) || ($pssymb)) { - $submitmessage = "Update Display"; - } else { - $submitmessage = "Display"; - } if (!$pssymb) { - $r->print('\n"); - - $r->print(''); - $r->print(''); + $r->print(''); $r->print(''); $r->print(''); + $r->print(' name="showoptions" value="show">Show More Options
'); # $r->print(""); # $r->print(""); # $r->print(""); @@ -1025,7 +1025,13 @@ sub assessparms { } } - $r->print('

Select Parameter Level'); + $r->print('
Select Parameter Level'); $r->print('

Select Enclosing Map or Folder

print(" checked ");} - $r->print(' name="showoptions" value="show" onclick="form.submit();">Show More Options
Show: $showoptions
pscat: @pscat
psprt: @psprt
'); + $r->print('
'); + if (($prevvisit) || ($pschp) || ($pssymb)) { + $submitmessage = "Update Course Assessment Parameter Display"; + } else { + $submitmessage = "Set Course Assessment Parameters"; + } + $r->print(''); # my @temp_psprt; # foreach my $t (@psprt) { @@ -1048,9 +1054,7 @@ sub assessparms { my $csuname=$ENV{'user.name'}; my $csudom=$ENV{'user.domain'}; - if ($parmlev eq 'full' || $parmlev eq 'brief') { - my $coursespan=$csec?8:5; $r->print('

'); $r->print(''); @@ -1070,7 +1074,7 @@ ENDTABLETWO } $r->print(< - + ENDTABLEHEADFOUR @@ -1438,7 +1442,7 @@ sub crsenv { ('url' => 'Top Level Map '. '". - 'Browse
'. + 'Select Map
'. 'Modification may make assessment data '. 'inaccessible', 'description' => 'Course Description', @@ -1447,7 +1451,7 @@ sub crsenv { 'default_xml_style' => 'Default XML Style File '. 'Browse
", + ",'sty')\">Select Style File
", 'question.email' => 'Feedback Addresses for Resource Content '. 'Questions
(user:domain,'. 'user:domain(section;section;...;*;...),...)', @@ -1473,17 +1477,17 @@ sub crsenv { => 'Default Course Spreadsheet '. 'Browse
", + ",'spreadsheet')\">Select Spreadsheet File
", 'spreadsheet_default_studentcalc' => 'Default Student Spreadsheet '. 'Browse
", + ",'spreadsheet')\">Select Spreadsheet File
", 'spreadsheet_default_assesscalc' => 'Default Assessment Spreadsheet '. 'Browse
", + ",'spreadsheet')\">Select Spreadsheet File
", 'allow_limited_html_in_feedback' => 'Allow limited HTML in discussion posts
'. '(Set value to yes to allow)', @@ -1492,7 +1496,7 @@ sub crsenv { 'Modifying this will make problems '. 'have different numbers and answers', 'problem_stream_switch' - => 'Allow problems to be splitted over pages
'. + => 'Allow problems to be split over pages
'. ' (yes if allow anything else if not)' ); foreach (keys(%values)) { @@ -1591,7 +1595,6 @@ sub handler { $r->content_type('text/html'); $r->send_http_header; - # ----------------------------------------------------- Needs to be in a course if (($ENV{'request.course.id'}) &&
Assessment URL and TitleTypeEnclosing Map or FolderPart No.Parameter NameEnclosing Map or FolderPartParameter Name defaultfrom Enclosing Map or Folder generalfor Enclosing Map or Folderfor Resource