--- loncom/interface/lonparmset.pm 2005/09/02 22:40:07 1.239.2.1
+++ loncom/interface/lonparmset.pm 2005/10/17 21:33:52 1.261
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Handler to set parameters for assessments
#
-# $Id: lonparmset.pm,v 1.239.2.1 2005/09/02 22:40:07 albertel Exp $
+# $Id: lonparmset.pm,v 1.261 2005/10/17 21:33:52 banghart Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1921,6 +1921,9 @@ sub crsenv {
'disablesigfigs'
=> ''.&mt('Disable checking of Significant Figures').'
'.
' ('.&mt('"[_1]" to disable, anything else if not','yes').')',
+ 'disableexampointprint'
+ => ''.&mt('Disable automatically printing point values onto exams.').'
'.
+ ' ('.&mt('"[_1]" to disable, anything else if not','yes').')',
'tthoptions'
=> ''.&mt('Default set of options to pass to tth/m when converting tex').''
);
@@ -1947,10 +1950,11 @@ sub crsenv {
'default_enrollment_start_date',
'default_enrollment_end_date',
'tthoptions',
- 'disablesigfigs'
+ 'disablesigfigs',
+ 'disableexampointprint'
);
foreach my $parameter (sort(keys(%values))) {
- unless ($parameter =~ m/^internal\./) {
+ unless (($parameter =~ m/^internal\./)||($parameter =~ m/^metadata\./)) {
if (! $descriptions{$parameter}) {
$descriptions{$parameter}=$parameter;
push(@Display_Order,$parameter);
@@ -2698,6 +2702,10 @@ ENDMAINFORMHEAD
action => 'crsenv',
permission => $parm_permission,
},
+ { text => 'Set Portfolio Metadata',
+ action => 'setrestrictmeta',
+ permission => $parm_permission,
+ },
{ text => 'Set/Modify Resource Parameters - Helper Mode',
url => '/adm/helper/parameter.helper',
permission => $parm_permission,
@@ -2741,8 +2749,102 @@ ENDMAINFORMHEAD
$r->print($menu_html);
return;
}
-
-
+### Set portfolio metadata
+sub output_row {
+ my ($r, $field_name, $field_text) = @_;
+ my $output;
+ my $options=$env{'course.'.$env{'request.course.id'}.'.'.$field_name.'.options'};
+ my $values=$env{'course.'.$env{'request.course.id'}.'.'.$field_name.'.values'};
+ my $checked;
+ unless (defined($options)) {
+ $options = 'active,stuadd';
+ $values = '';
+ }
+ $output.=''.$field_text.':';
+ $output.='
';
+ if ($options =~ m/active/) {
+ $checked = ' checked="checked" ';
+ } else {
+ $checked = ' ';
+ }
+ $output.=' ';
+ $output.='Show to student
';
+ if ($options =~ m/onlyone/) {
+ $checked = ' checked="checked" ';
+ } else {
+ $checked = ' ';
+ }
+ $output.=' ';
+ $output.='Student may select only one choice
';
+ if ($options =~ m/stuadd/) {
+ $checked = ' checked="checked" ';
+ } else {
+ $checked = ' ';
+ }
+ $output.=' ';
+ $output.='Student may type choices
';
+ return ($output);
+}
+
+sub setrestrictmeta {
+ my ($r)=@_;
+ my $next_meta;
+ my $output;
+ my $item_num;
+ my $put_result;
+ $r->print(&Apache::lonxml::xmlbegin());
+ $r->print('
+ $output + + +ENDenv + $r->print('