--- loncom/interface/lonparmset.pm 2003/06/20 16:13:06 1.107 +++ loncom/interface/lonparmset.pm 2003/09/03 15:44:57 1.120 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Handler to set parameters for assessments # -# $Id: lonparmset.pm,v 1.107 2003/06/20 16:13:06 matthew Exp $ +# $Id: lonparmset.pm,v 1.120 2003/09/03 15:44:57 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -287,7 +287,7 @@ sub plink { sub startpage { my ($r,$id,$udom,$csec,$uname,$have_assesments)=@_; - my $bodytag=&Apache::loncommon::bodytag('Set Course Parameters','', + my $bodytag=&Apache::loncommon::bodytag('Set/Modify Course Parameters','', 'onUnload="pclose()"'); my $chooseopt=&Apache::loncommon::select_dom_form($udom,'udom').' '. &Apache::loncommon::selectstudent_link('parmform','uname','udom'); @@ -343,16 +343,22 @@ $selscript $bodytag
-

Course Environment

- +

Course Environment Parameters

+ +
+
+
+

Course Assessment Parameter - Helper Mode

+ +
+
+
+

Course Assessment Parameters - Overview Mode

+

-

Course Assessments

- -Use Assignment Parameter Helper, a -simpler interface to set open, due, or answer open dates for problems or -sequences.
 
+

Course Assessments Parameters - Table Mode

ENDHEAD if (!$have_assesments) { @@ -488,9 +494,15 @@ sub print_row { sub print_td { my ($r,$which,$defbg,$result,$outpar,$mprefix,$value,$typeoutpar,$display)=@_; $r->print(''. - &plink($$typeoutpar[$which],$$display{$value},$$outpar[$which], - $mprefix."$which",'parmform.pres','psub').''."\n"); + ' align="center">'); + if ($which<10) { + $r->print(&plink($$typeoutpar[$which], + $$display{$value},$$outpar[$which], + $mprefix."$which",'parmform.pres','psub')); + } else { + $r->print(&valout($$outpar[$which],$$typeoutpar[$which])); + } + $r->print(''."\n"); } sub get_env_multiple { @@ -852,12 +864,13 @@ sub assessparms { $message.="Write Error: $1"; } # ---------------------------------------------------------------- Done storing - $message.='

Changes can take up to 10 minutes before being active for all students

'; + $message.='

Changes can take up to 10 minutes before being active for all students.'.&Apache::loncommon::help_open_topic('Caching').'

'; } # --------------------------------------------- Devalidate cache for this child - &Apache::lonnet::devalidatecourseresdata( + &Apache::lonnet::devalidatecourseresdata( $ENV{'course.'.$ENV{'request.course.id'}.'.num'}, $ENV{'course.'.$ENV{'request.course.id'}.'.domain'}); + &Apache::lonnet::clear_EXT_cache_status(); # -------------------------------------------------------------- Get coursedata %courseopt = &Apache::lonnet::dump ('resourcedata', @@ -891,7 +904,11 @@ sub assessparms { &startpage($r,$id,$udom,$csec,$uname,$have_assesments); - if (!$have_assesments) { return ''; } + if (!$have_assesments) { + untie(%bighash); + untie(%parmhash); + return ''; + } # if ($ENV{'form.url'}) { # $r->print(''); @@ -906,7 +923,7 @@ sub assessparms { $r->print('

'.$message.'

'); - my $submitmessage; + my $submitmessage = 'Update Section or Specific User'; if (!$pssymb) { $r->print('
Select Parameter Level'); $r->print(''); @@ -1450,6 +1467,9 @@ sub crsenv { } } } +# ------------------------- Re-init course environment entries for this session + + &Apache::lonnet::coursedescription($ENV{'request.course.id'}); # -------------------------------------------------------- Get parameters again @@ -1466,6 +1486,10 @@ sub crsenv { 'description' => 'Course Description', 'courseid' => 'Course ID or number
'. '(internal, optional)', + 'grading' => 'Grading'. + '"standard" or any other value. '. + 'Default for new courses is "standard".', + 'default_xml_style' => 'Default XML Style File '. ' 'Visibly Separate Items on Pages
'. '("yes" for visible separation, '. 'changes will not show until next login)', + + 'plc.roles.denied'=> 'Disallow live chatroom use for '. + 'Roles
"st": '. + 'student, "ta": '. + 'TA, "in": '. + 'instructor;
role,role,...) '. + Apache::loncommon::help_open_topic("Course_Disable_Discussion"), + 'plc.users.denied' => + 'Disallow live chatroom use for Users
'. + '(user:domain,user:domain,...)', + 'pch.roles.denied'=> 'Disallow Resource Discussion for '. 'Roles
"st": '. 'student, "ta": '. @@ -1508,26 +1543,36 @@ sub crsenv { ",'spreadsheet')\">Select Spreadsheet File

", '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 split over pages
'. - ' (yes if allow anything else if not)', - 'default_enrollment_start_date' => 'The default beginning date '. - 'for enrolled students.', - 'default_enrollment_end_date' => 'The default ending date '. - 'for enrolled students.', + ' ("yes" if allowed, anything else if not)', + 'anonymous_quiz' + => 'Anonimous quiz/exam
'. + ' (yes to avoid print students names )', + 'default_enrollment_start_date' => 'Default beginning date '. + 'when enrolling students', + 'default_enrollment_end_date' => 'Default ending date '. + 'when enrolling students', + 'languages' => 'Languages used', + 'disable_receipt_display' + => 'Disable display of problem receipts
'. + ' ("yes" to disable, anything else if not)' ); - my @Display_Order = ('url','description','courseid', + my @Display_Order = ('url','description','courseid','grading', 'default_xml_style','pageseparators', 'question.email','comment.email','policy.email', + 'plc.roles.denied','plc.users.denied', 'pch.roles.denied','pch.users.denied', 'allow_limited_html_in_feedback', + 'languages', 'rndseed', 'problem_stream_switch', + 'disable_receipt_display', 'spreadsheet_default_classcalc', 'spreadsheet_default_studentcalc', 'spreadsheet_default_assesscalc', @@ -1619,7 +1664,28 @@ $output ENDENV } +################################################## +sub overview { + my $r=shift; + my $bodytag=&Apache::loncommon::bodytag( + 'Set/Modify Course Assessment Parameters'); + my $dom = $ENV{'course.'.$ENV{'request.course.id'}.'.domain'}; + my $crs = $ENV{'course.'.$ENV{'request.course.id'}.'.num'}; + $r->print(< + +LON-CAPA Course Environment + +$bodytag + +Not yet implemented. + + + + +ENDOVER +} ################################################## ################################################## @@ -1658,6 +1724,7 @@ sub handler { # --------------------------------------------------------- Bring up assessment &assessparms($r); # ---------------------------------------------- This is for course environment + } elsif ($ENV{'form.overview'}) { } else { &crsenv($r); }