--- loncom/interface/lonparmset.pm 2009/02/13 20:20:30 1.430
+++ loncom/interface/lonparmset.pm 2009/02/24 18:20:49 1.435
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Handler to set parameters for assessments
#
-# $Id: lonparmset.pm,v 1.430 2009/02/13 20:20:30 schafran Exp $
+# $Id: lonparmset.pm,v 1.435 2009/02/24 18:20:49 hauer Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -973,9 +973,8 @@ sub print_row {
if ($parmlev eq 'full') {
$r->print('
'
.$$part{$which}.' | ');
- } else {
+ } else {
$parm=~s|\[.*\]\s||g;
- $parm=&mt($parm);
}
my $automatic=&rulescache(($which=~/\_([^\_]+)$/)[0].'_triggers');
if ($automatic) {
@@ -1183,9 +1182,15 @@ sub extractResourceInformation {
#
my $name=&Apache::lonnet::metadata($srcf,$key.'.name');
if (!exists($$allparms{$name}) || $$allparms{$name} =~ m/^\s*$/ ) {
- my $display= &Apache::lonnet::metadata($srcf,$key.'.display');
- my $parmdis = $display;
- $parmdis =~ s/\s*\[Part.*$//g;
+ my ($display,$parmdis);
+ $display = &standard_parameter_names($name);
+ if ($display eq '') {
+ $display= &Apache::lonnet::metadata($srcf,$key.'.display');
+ $parmdis = $display;
+ $parmdis =~ s/\s*\[Part.*$//g;
+ } else {
+ $parmdis = $display;
+ }
$$allparms{$name}=$parmdis;
if (ref($defkeytype)) {
$$defkeytype{$name}=
@@ -1317,14 +1322,9 @@ ENDSCRIPT
if ($$pscat[0] eq "all" || grep $_ eq $tempkey, @{$pscat}) {
$r->print(' checked="checked"');
}
- my $displaykey;
- if ($$allparms{$tempkey}=~/\S/) {
- $displaykey = $$allparms{$tempkey};
- } else {
- $displaykey = $tempkey;
- }
- $displaykey =~ s/(\[|\])/~$1/g;
- $r->print(' />'.&mt($displaykey).'');
+ $r->print(' />'.($$allparms{$tempkey}=~/\S/ ? $$allparms{$tempkey}
+ : $tempkey)
+ .'');
$cnt++;
if ($cnt==3) {
$r->print("\n");
@@ -1976,7 +1976,16 @@ ENDTABLEHEADFOUR
if (grep $_ eq $tempkeyp, @catmarker) {
$part{$_}=&Apache::lonnet::metadata($uri,$_.'.part');
$name{$_}=&Apache::lonnet::metadata($uri,$_.'.name');
- $display{$_}=&Apache::lonnet::metadata($uri,$_.'.display');
+ my $parmdis=&Apache::lonnet::metadata($uri,$_.'.display');
+ if ($allparms{$name{$_}} ne '') {
+ my $identifier;
+ if ($parmdis =~ /(\s*\[Part.*)$/) {
+ $identifier = $1;
+ }
+ $display{$_} = $allparms{$name{$_}}.$identifier;
+ } else {
+ $display{$_} = $parmdis;
+ }
unless ($display{$_}) { $display{$_}=''; }
$display{$_}.=' ('.$name{$_}.')';
$default{$_}=&Apache::lonnet::metadata($uri,$_);
@@ -2083,7 +2092,16 @@ ENDTABLEHEADFOUR
if ((grep $_ eq $fullkeyp, @catmarker) &&(!$name{$tempkeyp})) {
$part{$tempkeyp}="0";
$name{$tempkeyp}=&Apache::lonnet::metadata($uri,$fullkeyp.'.name');
- $display{$tempkeyp}=&Apache::lonnet::metadata($uri,$fullkeyp.'.display');
+ my $parmdis=&Apache::lonnet::metadata($uri,$fullkeyp.'.display');
+ if ($allparms{$name{$tempkeyp}} ne '') {
+ my $identifier;
+ if ($parmdis =~ /(\s*\[Part.*)$/) {
+ $identifier = $1;
+ }
+ $display{$tempkeyp} = $allparms{$name{$tempkeyp}}.$identifier;
+ } else {
+ $display{$tempkeyp} = $parmdis;
+ }
unless ($display{$tempkeyp}) { $display{$tempkeyp}=''; }
$display{$tempkeyp}.=' ('.$name{$tempkeyp}.')';
$display{$tempkeyp} =~ s/_\w+_/_0_/;
@@ -2176,7 +2194,16 @@ ENDTABLEHEADFOUR
if ((grep $_ eq $fullkeyp, @catmarker) &&(!$name{$tempkeyp})) {
$part{$tempkeyp}="0";
$name{$tempkeyp}=&Apache::lonnet::metadata($uri,$fullkeyp.'.name');
- $display{$tempkeyp}=&Apache::lonnet::metadata($uri,$fullkeyp.'.display');
+ my $parmdis=&Apache::lonnet::metadata($uri,$fullkeyp.'.display');
+ if ($allparms{$name{$tempkeyp}} ne '') {
+ my $identifier;
+ if ($parmdis =~ /(\s*\[Part.*)$/) {
+ $identifier = $1;
+ }
+ $display{$tempkeyp} = $allparms{$name{$tempkeyp}}.$identifier;
+ } else {
+ $display{$tempkeyp} = $parmdis;
+ }
unless ($display{$tempkeyp}) { $display{$tempkeyp}=''; }
$display{$tempkeyp}.=' ('.$name{$tempkeyp}.')';
$display{$tempkeyp} =~ s/_\w+_/_0_/;
@@ -2473,12 +2500,12 @@ sub crsenv {
.'('.&mt("[_1] for link to each a listing of each student's files.",'"yes"').')',
'student_classlist_opt_in' => ''.&mt("Student's agreement needed for listing in student-viewable roster").'
'
.'('.&mt('[_1] to require students to opt-in to listing in the roster (on the roster page).','"yes"').')',
- 'plc.roles.denied'=> ''.&mt('Disallow live chatroom use for Roles').'
'
+ 'plc.roles.denied'=> ''.&mt('Disallow chat room use for Roles').'
'
.'('.&mt('[_1]: student, [_2]: TA, [_3]: instructor','"st"','"ta"','"in"').')
'
.'("'.&mt('role,role,...').'") '
.Apache::loncommon::help_open_topic("Course_Disable_Discussion"),
'plc.users.denied' =>
- ''.&mt('Disallow live chatroom use for Users').'
'.
+ ''.&mt('Disallow chat room use for Users').'
'.
'("'.&mt('user:domain,user:domain,...').'")',
'pch.roles.denied'=> ''.&mt('Disallow Resource Discussion for Roles').'
'
@@ -2553,7 +2580,7 @@ sub crsenv {
'externalsyllabus'
=> ''.&mt('URL of Syllabus (not using internal handler)').'',
'tthoptions'
- => ''.&mt('Default set of options to pass to tth/m when converting tex').'',
+ => ''.&mt('Default set of options to pass to tth/m when converting TeX').'',
'texengine'
=> ''.&mt('Force all students in the course to use a specific math rendering engine.').'
'