--- loncom/interface/lonparmset.pm 2005/09/23 20:19:18 1.239.2.2
+++ loncom/interface/lonparmset.pm 2005/08/26 18:57:42 1.240
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Handler to set parameters for assessments
#
-# $Id: lonparmset.pm,v 1.239.2.2 2005/09/23 20:19:18 albertel Exp $
+# $Id: lonparmset.pm,v 1.240 2005/08/26 18:57:42 banghart Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1921,9 +1921,6 @@ 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').''
);
@@ -1950,8 +1947,7 @@ sub crsenv {
'default_enrollment_start_date',
'default_enrollment_end_date',
'tthoptions',
- 'disablesigfigs',
- 'disableexampointprint'
+ 'disablesigfigs'
);
foreach my $parameter (sort(keys(%values))) {
unless ($parameter =~ m/^internal\./) {
@@ -2193,41 +2189,20 @@ sub listdata {
my $pointer=0;
$tableopen=0;
my $foundkeys=0;
- my %keyorder=&standardkeyorder();
foreach my $thiskey (sort {
if ($sortorder eq 'realmstudent') {
- my ($astudent,$arealm)=($a=~/^\Q$env{'request.course.id'}\E\.\[([^\.]+)\]\.(.+)\.[^\.]+$/);
- my ($bstudent,$brealm)=($b=~/^\Q$env{'request.course.id'}\E\.\[([^\.]+)\]\.(.+)\.[^\.]+$/);
- if (!defined($astudent)) {
- ($arealm)=($a=~/^\Q$env{'request.course.id'}\E\.(.+)$/);
- }
- if (!defined($bstudent)) {
- ($brealm)=($b=~/^\Q$env{'request.course.id'}\E\.(.+)$/);
- }
- $arealm=~s/\.type//;
- my ($ares, $aparm) = ($arealm=~/^(.*)\.(.*)$/);
- $aparm=$keyorder{'parameter_0_'.$aparm};
- $brealm=~s/\.type//;
- my ($bres, $bparm) = ($brealm=~/^(.*)\.(.*)$/);
- $bparm=$keyorder{'parameter_0_'.$bparm};
- if ($ares eq $bres) {
- if (defined($aparm) && defined($bparm)) {
- ($aparm <=> $bparm);
- } elsif (defined($aparm)) {
- -1;
- } elsif (defined($bparm)) {
- 1;
- } else {
- ($arealm cmp $brealm) || ($astudent cmp $bstudent);
- }
- } else {
- ($arealm cmp $brealm) || ($astudent cmp $bstudent);
+ my ($astudent,$arealm)=($a=~/^$env{'request.course.id'}\.([^\.]+)\.(.+)\.[^\.]+$/);
+ my ($bstudent,$brealm)=($b=~/^$env{'request.course.id'}\.([^\.]+)\.(.+)\.[^\.]+$/);
+ if (!defined($astudent) && !defined($bstudent) &&
+ !defined($arealm) && !defined($brealm)) {
+ ($arealm)=($a=~/^$env{'request.course.id'}\.(.+)\.[^\.]+$/);
+ ($brealm)=($b=~/^$env{'request.course.id'}\.(.+)\.[^\.]+$/);
}
+ ($arealm cmp $brealm) || ($astudent cmp $bstudent);
} else {
$a cmp $b;
}
} keys %{$listdata}) {
-
if ($$listdata{$thiskey.'.type'}) {
my $thistype=$$listdata{$thiskey.'.type'};
if ($$resourcedata{$thiskey.'.type'}) {
@@ -2702,6 +2677,10 @@ ENDMAINFORMHEAD
action => 'crsenv',
permission => $parm_permission,
},
+ { text => 'Set Instructor Defined Metadata',
+ action => 'setinstmeta',
+ permission => $parm_permission,
+ },
{ text => 'Set/Modify Resource Parameters - Helper Mode',
url => '/adm/helper/parameter.helper',
permission => $parm_permission,
@@ -2745,8 +2724,23 @@ ENDMAINFORMHEAD
$r->print($menu_html);
return;
}
-
-
+### Set instructor defined metadata
+sub setinstmeta {
+ my ($r)=@_;
+ my $setoutput='';
+ $r->print(&Apache::lonxml::xmlbegin());
+ $r->print('