version 1.136, 2003/11/18 22:18:42
|
version 1.142, 2003/12/05 16:18:45
|
Line 131 sub parmval {
|
Line 131 sub parmval {
|
|
|
# -------------------------------------------------------- first, check default |
# -------------------------------------------------------- first, check default |
|
|
if ($def) { $outpar[11]=$def; $result=11; } |
if (defined($def)) { $outpar[11]=$def; $result=11; } |
|
|
# ----------------------------------------------------- second, check map parms |
# ----------------------------------------------------- second, check map parms |
|
|
my $thisparm=$parmhash{$symbparm}; |
my $thisparm=$parmhash{$symbparm}; |
if ($thisparm) { $outpar[10]=$thisparm; $result=10; } |
if (defined($thisparm)) { $outpar[10]=$thisparm; $result=10; } |
|
|
# --------------------------------------------------------- third, check course |
# --------------------------------------------------------- third, check course |
|
|
Line 285 sub plink {
|
Line 285 sub plink {
|
|
|
|
|
sub startpage { |
sub startpage { |
my ($r,$id,$udom,$csec,$uname,$have_assesments)=@_; |
my ($r,$id,$udom,$csec,$uname,$have_assesments,$trimheader)=@_; |
|
|
my $bodytag=&Apache::loncommon::bodytag('Set/Modify Course Parameters','', |
my $bodytag=&Apache::loncommon::bodytag('Set/Modify Course Parameters','', |
'onUnload="pclose()"'); |
'onUnload="pclose()"'); |
Line 354 sub startpage {
|
Line 354 sub startpage {
|
$selscript |
$selscript |
</head> |
</head> |
$bodytag |
$bodytag |
|
ENDHEAD |
|
|
|
unless ($trimheader) {$r->print(<<ENDHEAD2); |
<form method="post" action="/adm/parmset" name="envform"> |
<form method="post" action="/adm/parmset" name="envform"> |
<h4>$lt{'cep'}</h4> |
<h4>$lt{'cep'}</h4> |
<input type="submit" name="crsenv" value="$lt{'scep'}" /> |
<input type="submit" name="crsenv" value="$lt{'scep'}" /> |
Line 370 $bodytag
|
Line 372 $bodytag
|
<input type="submit" name="overview" value="$lt{'mcap'}" /> |
<input type="submit" name="overview" value="$lt{'mcap'}" /> |
</form> |
</form> |
<hr /> |
<hr /> |
|
ENDHEAD2 |
|
} |
|
$r->print(<<ENDHEAD3); |
<form method="post" action="/adm/parmset" name="parmform"> |
<form method="post" action="/adm/parmset" name="parmform"> |
<h4>$lt{'captm'}</h4> |
<h4>$lt{'captm'}</h4> |
ENDHEAD |
ENDHEAD3 |
|
|
if (!$have_assesments) { |
if (!$have_assesments) { |
$r->print('<font color="red">'.&mt('There are no assesment parameters in this course to set.').'</font><br />'); |
$r->print('<font color="red">'.&mt('There are no assesment parameters in this course to set.').'</font><br />'); |
Line 689 sub assessparms {
|
Line 694 sub assessparms {
|
|
|
my $pssymb=''; |
my $pssymb=''; |
my $parmlev=''; |
my $parmlev=''; |
|
my $trimheader=''; |
my $prevvisit=$ENV{'form.prevvisit'}; |
my $prevvisit=$ENV{'form.prevvisit'}; |
|
|
# unless ($parmlev==$ENV{'form.parmlev'}) { |
# unless ($parmlev==$ENV{'form.parmlev'}) { |
Line 711 sub assessparms {
|
Line 717 sub assessparms {
|
if (!@pscat) { @pscat=('all'); } |
if (!@pscat) { @pscat=('all'); } |
$pschp=''; |
$pschp=''; |
$parmlev = 'full'; |
$parmlev = 'full'; |
|
$trimheader='yes'; |
} elsif ($ENV{'form.symb'}) { |
} elsif ($ENV{'form.symb'}) { |
$pssymb=$ENV{'form.symb'}; |
$pssymb=$ENV{'form.symb'}; |
if (!@pscat) { @pscat=('all'); } |
if (!@pscat) { @pscat=('all'); } |
$pschp=''; |
$pschp=''; |
$parmlev = 'full'; |
$parmlev = 'full'; |
|
$trimheader='yes'; |
} else { |
} else { |
$ENV{'form.url'}=''; |
$ENV{'form.url'}=''; |
} |
} |
Line 905 sub assessparms {
|
Line 913 sub assessparms {
|
my $have_assesments=1; |
my $have_assesments=1; |
if (scalar(keys(%allkeys)) eq 0) { $have_assesments=0; } |
if (scalar(keys(%allkeys)) eq 0) { $have_assesments=0; } |
|
|
&startpage($r,$id,$udom,$csec,$uname,$have_assesments); |
&startpage($r,$id,$udom,$csec,$uname,$have_assesments,$trimheader); |
|
|
if (!$have_assesments) { |
if (!$have_assesments) { |
untie(%bighash); |
untie(%bighash); |
Line 1091 sub assessparms {
|
Line 1099 sub assessparms {
|
'rl' => "Resource Level", |
'rl' => "Resource Level", |
'ic' => 'in Course', |
'ic' => 'in Course', |
'aut' => "Assessment URL and Title", |
'aut' => "Assessment URL and Title", |
'type' => 'Type', |
'type' => &mt('Type'), |
'emof' => "Enclosing Map or Folder", |
'emof' => "Enclosing Map or Folder", |
'part' => 'Part', |
'part' => &mt('Part'), |
'pn' => 'Parameter Name', |
'pn' => 'Parameter Name', |
'def' => 'default', |
'def' => 'default', |
'femof' => 'from Enclosing Map or Folder', |
'femof' => 'from Enclosing Map or Folder', |
Line 1499 sub crsenv {
|
Line 1507 sub crsenv {
|
# -------------------------------------------------------- Get parameters again |
# -------------------------------------------------------- Get parameters again |
|
|
my %values=&Apache::lonnet::dump('environment',$dom,$crs); |
my %values=&Apache::lonnet::dump('environment',$dom,$crs); |
|
my $SelectStyleFile=&mt('Select Style File'); |
|
my $SelectSpreadsheetFile=&mt('Select Spreadsheet File'); |
my $output=''; |
my $output=''; |
if (! exists($values{'con_lost'})) { |
if (! exists($values{'con_lost'})) { |
my %descriptions= |
my %descriptions= |
('url' => '<b>Top Level Map</b> '. |
('url' => '<b>'.&mt('Top Level Map').'</b> '. |
'<a href="javascript:openbrowser'. |
'<a href="javascript:openbrowser'. |
"('envform','url','sequence')\">". |
"('envform','url','sequence')\">". |
'Select Map</a><br /><font color=red> '. |
&mt('Select Map').'</a><br /><font color=red> '. |
'Modification may make assessment data '. |
&mt('Modification may make assessment data inaccessible'). |
'inaccessible</font>', |
'</font>', |
'description' => '<b>Course Description</b>', |
'description' => '<b>'.&mt('Course Description').'</b>', |
'courseid' => '<b>Course ID or number</b><br />'. |
'courseid' => '<b>'.&mt('Course ID').' '.&mt('or').' '.&mt('number'). |
'(internal, optional)', |
'</b><br />'. |
'grading' => '<b>Grading</b>'. |
'('.&mt('internal').', '.&mt('optional').')', |
'"standard" or any other value. '. |
'grading' => '<b>'.&mt('Grading').'</b>'. |
'Default for new courses is "standard".', |
' "'.&mt('standard').'", "'.&mt('external').'", '. |
|
&mt('or any other value').'.'. |
'default_xml_style' => '<b>Default XML Style File</b> '. |
' '.&mt('Default for new courses is').' "'. |
|
&mt('standard').'".', |
|
'default_xml_style' => '<b>'.&mt('Default XML Style File').'</b> '. |
'<a href="javascript:openbrowser'. |
'<a href="javascript:openbrowser'. |
"('envform','default_xml_style'". |
"('envform','default_xml_style'". |
",'sty')\">Select Style File</a><br>", |
",'sty')\">$SelectStyleFile</a><br>", |
'question.email' => '<b>Feedback Addresses for Resource Content '. |
'question.email' => '<b>'.&mt('Feedback Addresses for Resource Content Question'). |
'Questions</b><br />(<tt>user:domain,'. |
'</b><br />(<tt>user:domain,'. |
'user:domain(section;section;...;*;...),...</tt>)', |
'user:domain(section;section;...;*;...),...</tt>)', |
'comment.email' => '<b>Feedback Addresses for Course Content Comments</b><br />'. |
'comment.email' => '<b>'.&mt('Feedback Addresses for Course Content Comments').'</b><br />'. |
'(<tt>user:domain,user:domain(section;section;...;*;...),...</tt>)', |
'(<tt>user:domain,user:domain(section;section;...;*;...),...</tt>)', |
'policy.email' => '<b>Feedback Addresses for Course Policy</b>'. |
'policy.email' => '<b>'.&mt('Feedback Addresses for Course Policy').'</b>'. |
'<br />(<tt>user:domain,user:domain(section;section;...;*;...),...</tt>)', |
'<br />(<tt>user:domain,user:domain(section;section;...;*;...),...</tt>)', |
'hideemptyrows' => '<b>Hide Empty Rows in Spreadsheets</b><br />'. |
'hideemptyrows' => '<b>'.&mt('Hide Empty Rows in Spreadsheets').'</b><br />'. |
'("<tt>yes</tt>" for default hiding)', |
'("<tt>yes</tt>" for default hiding)', |
'pageseparators' => '<b>Visibly Separate Items on Pages</b><br />'. |
'pageseparators' => '<b>'.&mt('Visibly Separate Items on Pages').'</b><br />'. |
'("<tt>yes</tt>" for visible separation, '. |
'("<tt>'.&mt('yes').'</tt>" '.&mt('for visible separation').', '. |
'changes will not show until next login)', |
&mt('changes will not show until next login').')', |
|
|
'plc.roles.denied'=> '<b>Disallow live chatroom use for '. |
'plc.roles.denied'=> '<b>'.&mt('Disallow live chatroom use for Roles'). |
'Roles</b><br />"<tt>st</tt>": '. |
'</b><br />"<tt>st</tt>": '. |
'student, "<tt>ta</tt>": '. |
'student, "<tt>ta</tt>": '. |
'TA, "<tt>in</tt>": '. |
'TA, "<tt>in</tt>": '. |
'instructor;<br /><tt>role,role,...</tt>) '. |
'instructor;<br /><tt>role,role,...</tt>) '. |
Apache::loncommon::help_open_topic("Course_Disable_Discussion"), |
Apache::loncommon::help_open_topic("Course_Disable_Discussion"), |
'plc.users.denied' => |
'plc.users.denied' => |
'<b>Disallow live chatroom use for Users</b><br />'. |
'<b>'.&mt('Disallow live chatroom use for Users').'</b><br />'. |
'(<tt>user:domain,user:domain,...</tt>)', |
'(<tt>user:domain,user:domain,...</tt>)', |
|
|
'pch.roles.denied'=> '<b>Disallow Resource Discussion for '. |
'pch.roles.denied'=> '<b>'.&mt('Disallow Resource Discussion for Roles'). |
'Roles</b><br />"<tt>st</tt>": '. |
'</b><br />"<tt>st</tt>": '. |
'student, "<tt>ta</tt>": '. |
'student, "<tt>ta</tt>": '. |
'TA, "<tt>in</tt>": '. |
'TA, "<tt>in</tt>": '. |
'instructor;<br /><tt>role,role,...</tt>) '. |
'instructor;<br /><tt>role,role,...</tt>) '. |
Apache::loncommon::help_open_topic("Course_Disable_Discussion"), |
Apache::loncommon::help_open_topic("Course_Disable_Discussion"), |
'pch.users.denied' => |
'pch.users.denied' => |
'<b>Disallow Resource Discussion for Users</b><br />'. |
'<b>'.&mt('Disallow Resource Discussion for Users').'</b><br />'. |
'(<tt>user:domain,user:domain,...</tt>)', |
'(<tt>user:domain,user:domain,...</tt>)', |
'spreadsheet_default_classcalc' |
'spreadsheet_default_classcalc' |
=> '<b>Default Course Spreadsheet</b> '. |
=> '<b>'.&mt('Default Course Spreadsheet').'</b> '. |
'<a href="javascript:openbrowser'. |
'<a href="javascript:openbrowser'. |
"('envform','spreadsheet_default_classcalc'". |
"('envform','spreadsheet_default_classcalc'". |
",'spreadsheet')\">Select Spreadsheet File</a><br />", |
",'spreadsheet')\">$SelectSpreadsheetFile</a><br />", |
'spreadsheet_default_studentcalc' |
'spreadsheet_default_studentcalc' |
=> '<b>Default Student Spreadsheet</b> '. |
=> '<b>'.&mt('Default Student Spreadsheet').'</b> '. |
'<a href="javascript:openbrowser'. |
'<a href="javascript:openbrowser'. |
"('envform','spreadsheet_default_calc'". |
"('envform','spreadsheet_default_calc'". |
",'spreadsheet')\">Select Spreadsheet File</a><br />", |
",'spreadsheet')\">$SelectSpreadsheetFile</a><br />", |
'spreadsheet_default_assesscalc' |
'spreadsheet_default_assesscalc' |
=> '<b>Default Assessment Spreadsheet</b> '. |
=> '<b>'.&mt('Default Assessment Spreadsheet').'</b> '. |
'<a href="javascript:openbrowser'. |
'<a href="javascript:openbrowser'. |
"('envform','spreadsheet_default_assesscalc'". |
"('envform','spreadsheet_default_assesscalc'". |
",'spreadsheet')\">Select Spreadsheet File</a><br />", |
",'spreadsheet')\">$SelectSpreadsheetFile</a><br />", |
'allow_limited_html_in_feedback' |
'allow_limited_html_in_feedback' |
=> '<b>Allow limited HTML in discussion posts</b><br />'. |
=> '<b>'.&mt('Allow limited HTML in discussion posts').'</b><br />'. |
'(Set value to "<tt>yes</tt>" to allow)', |
'('.&mt('Set value to').' "<tt>'.&mt('yes').'</tt>" '.&mt('to allow').')', |
'rndseed' |
'rndseed' |
=> '<b>Randomization algorithm used</b> <br />'. |
=> '<b>'.&mt('Randomization algorithm used').'</b> <br />'. |
'<font color="red">Modifying this will make problems '. |
'<font color="red">'.&mt('Modifying this will make problems').' '. |
'have different numbers and answers</font>', |
&mt('have different numbers and answers').'</font>', |
'problem_stream_switch' |
'problem_stream_switch' |
=> '<b>Allow problems to be split over pages</b><br />'. |
=> '<b>'.&mt('Allow problems to be split over pages').'</b><br />'. |
' ("<tt>yes</tt>" if allowed, anything else if not)', |
' ("<tt>'.&mt('yes').'</tt>" '.&mt('if allowed, anything else if not').')', |
'anonymous_quiz' |
'anonymous_quiz' |
=> '<b>Anonimous quiz/exam</b><br />'. |
=> '<b>'.&mt('Anonimous quiz/exam').'</b><br />'. |
' (<tt><b>yes</b> to avoid print students names </tt>)', |
' (<tt><b>'.&mt('yes').'</b> '.&mt('to avoid print students names').' </tt>)', |
'default_enrollment_start_date' => '<b>Default beginning date '. |
'default_enrollment_start_date' => '<b>'.&mt('Default beginning date when enrolling students').'</b>', |
'when enrolling students</b>', |
'default_enrollment_end_date' => '<b>'.&mt('Default ending date when enrolling students').'</b>', |
'default_enrollment_end_date' => '<b>Default ending date '. |
'languages' => '<b>'.&mt('Languages used').'</b>', |
'when enrolling students</b>', |
|
'languages' => '<b>Languages used</b>', |
|
'disable_receipt_display' |
'disable_receipt_display' |
=> '<b>Disable display of problem receipts</b><br />'. |
=> '<b>'.&mt('Disable display of problem receipts').'</b><br />'. |
' ("<tt>yes</tt>" to disable, anything else if not)' |
' ("<tt>'.&mt('yes').'</tt>" '.&mt('to disable, anything else if not').')' |
); |
); |
my @Display_Order = ('url','description','courseid','grading', |
my @Display_Order = ('url','description','courseid','grading', |
'default_xml_style','pageseparators', |
'default_xml_style','pageseparators', |
Line 1606 sub crsenv {
|
Line 1616 sub crsenv {
|
'default_enrollment_end_date', |
'default_enrollment_end_date', |
); |
); |
foreach my $parameter (sort(keys(%values))) { |
foreach my $parameter (sort(keys(%values))) { |
if (! $descriptions{$parameter}) { |
unless ($parameter =~ m/^internal\./) { |
$descriptions{$parameter}=$parameter; |
if (! $descriptions{$parameter}) { |
push(@Display_Order,$parameter); |
$descriptions{$parameter}=$parameter; |
} |
push(@Display_Order,$parameter); |
|
} |
|
} |
} |
} |
foreach my $parameter (@Display_Order) { |
foreach my $parameter (@Display_Order) { |
my $description = $descriptions{$parameter}; |
my $description = $descriptions{$parameter}; |
Line 1646 sub crsenv {
|
Line 1658 sub crsenv {
|
$onchange.' /></td><td>'. |
$onchange.' /></td><td>'. |
'<input type="checkbox" name="newp_setparmval" /></td></tr>'; |
'<input type="checkbox" name="newp_setparmval" /></td></tr>'; |
} |
} |
|
my $Parameter=&mt('Parameter'); |
|
my $Value=&mt('Value'); |
|
my $Set=&mt('Set'); |
$r->print(<<ENDENV); |
$r->print(<<ENDENV); |
<html> |
<html> |
<script type="text/javascript" language="Javascript" > |
<script type="text/javascript" language="Javascript" > |
Line 1680 $bodytag
|
Line 1695 $bodytag
|
$setoutput |
$setoutput |
<p> |
<p> |
<table border=2> |
<table border=2> |
<tr><th>Parameter</th><th>Value</th><th>Set?</th></tr> |
<tr><th>$Parameter</th><th>$Value</th><th>$Set?</th></tr> |
$output |
$output |
</table> |
</table> |
<input type="submit" name="crsenv" value="Set Course Environment"> |
<input type="submit" name="crsenv" value="Set Course Environment"> |