-Set Defaults for All Resources in $foldermap
-$showtitle
-Specifically for
-ENDMAPONE
+ my $tmp="";
if ($uname) {
my $person=&Apache::loncommon::plainname($uname,$udom);
- $r->print(&mt("User")." $uname \($person\) ".
- &mt('in')." \n");
+ $tmp.=&mt("User")." $uname \($person\) ".
+ &mt('in')." \n";
} else {
- $r->print("".&mt('all').' '.&mt('users in')." \n");
+ $tmp.="".&mt('all').' '.&mt('users in')." \n";
}
if ($cgroup) {
- $r->print(&mt("Group")." $cgroup".
- " ".&mt('of')." \n");
+ $tmp.=&mt("Group")." $cgroup".
+ " ".&mt('of')." \n";
$csec = '';
} elsif ($csec) {
- $r->print(&mt("Section")." $csec".
- " ".&mt('of')." \n");
+ $tmp.=&mt("Section")." $csec".
+ " ".&mt('of')." \n";
}
- $r->print("$coursename
");
- $r->print("
\n");
+ $r->print(''
+ .&mt('Set Defaults for All Resources in [_1]Specifically for [_2][_3]'
+ ,$foldermap.'
$showtitle
'
+ ,$tmp
+ ,''.$coursename.''
+ )
+ ."
\n"
+ );
#---------------------------------------------------------------- print table
$r->print('
');
$r->print(''.&mt('Parameter Name').' | ');
@@ -1916,7 +1917,7 @@ ENDMAPONE
\%type,\%display,$defbgone,$defbgtwo,$defbgthree,
$parmlev,$uname,$udom,$csec,$cgroup);
}
- $r->print("
---|
");
+ $r->print("
");
} # end each map
} # end of $parmlev eq map
#--------------------------------- Entry for parm level general (Course level)
@@ -2133,7 +2134,8 @@ sub crsenv {
&change_clone($value,\@oldcloner);
}
# Update environment and nohist_courseids.db
- if ($name eq 'description' || $name eq 'cloners') {
+ if (($name eq 'description') || ($name eq 'cloners') ||
+ ($name eq 'hidefromcat')) {
if ($chome eq '') {
%crsinfo =
&Apache::lonnet::courseiddump($dom,'.',1,'.','.',
@@ -2158,6 +2160,14 @@ sub crsenv {
$chome,'notime');
}
}
+ if ($name eq 'hidefromcat') {
+ if (ref($crsinfo{$env{'request.course.id'}}) eq 'HASH') {
+ $crsinfo{$env{'request.course.id'}}{'hidefromcat'} = $value;
+ my $putresult =
+ &Apache::lonnet::courseidput($dom,\%crsinfo,
+ $chome,'notime');
+ }
+ }
} else {
$setoutput.=&mt('Unable to set').' '.$name.' '.&mt('to').
' '.$value.' '.&mt('due to').' '.$put_result.'.
';
@@ -2339,12 +2349,25 @@ sub crsenv {
'texengine'
=> ''.&mt('Force all students in the course to use a specific math rendering engine.').'
'
.'('.&mt('[_1], [_2] (Convert to Images), [_3] (TeX to HTML), or blank for student\'s preference','"jsMath"','"mimetex"','"tth"').')',
+ 'timezone'
+ => ''.&mt('Timezone in which the course takes place').'',
- );
- my @Display_Order = ('url','description','courseid','cloners','grading',
+ 'suppress_embed_prompt'
+ => ''.&mt('Suppress prompt to upload items referenced in a web page being uploaded to portfolio, when current role is student.').'
'.
+ ' ('.&mt('[_1] to suppress, anything else to not suppress','"yes"').')',
+ 'hidefromcat'
+ => ''.&mt('Exclude from course catalog').'
'.
+ ' ('.&mt('[_1] to exclude, anything else to include - included if assigned an institutional code, or manually catagorized','"yes"').')',
+ );
+ my @Display_Order = ('url','description','courseid','cloners');
+ if (&can_toggle_cat($dom)) {
+ push(@Display_Order,'hidefromcat');
+ }
+ push (@Display_Order,('grading',
'externalsyllabus',
'default_xml_style','pageseparators',
- 'question.email','question.email.text','comment.email','comment.email.text','policy.email','policy.email.text',
+ 'question.email','question.email.text','comment.email',
+ 'comment.email.text','policy.email','policy.email.text',
'student_classlist_view',
'student_classlist_opt_in',
'student_classlist_portfiles',
@@ -2353,11 +2376,13 @@ sub crsenv {
'allow_limited_html_in_feedback',
'allow_discussion_post_editing',
'languages',
+ 'timezone',
'nothideprivileged',
'rndseed',
'receiptalg',
'problem_stream_switch',
'suppress_tries',
+ 'suppress_embed_prompt',
'default_paper_size',
'print_header_format',
'disable_receipt_display',
@@ -2371,8 +2396,7 @@ sub crsenv {
'texengine',
'disablesigfigs',
'disableexampointprint',
- 'task_messages','task_grading',
- );
+ 'task_messages','task_grading'));
foreach my $parameter (sort(keys(%values))) {
unless (($parameter =~ m/^internal\./)||($parameter =~ m/^metadata\./)) {
if (! $descriptions{$parameter}) {
@@ -2397,6 +2421,13 @@ sub crsenv {
$values{$parameter},
$onchange).
'';
+ } elsif ($parameter eq 'timezone') {
+ my $includeempty = 1;
+ my $timezone = &Apache::lonlocal::gettimezone();
+ $output .= ''.
+ &Apache::loncommon::select_timezone($parameter.'_value',
+ $timezone,
+ $onchange,$includeempty).' | ';
} else {
$output .= ''.
&Apache::lonhtmlcommon::textbox($parameter.'_value',
@@ -2458,6 +2489,19 @@ $end_table
$end_page
ENDENV
}
+
+sub can_toggle_cat {
+ my ($dom) = @_;
+ my %domconf = &Apache::lonnet::get_dom('configuration',['coursecategories'],$dom);
+ my $can_toggle_cat = '';
+ if (ref($domconf{'coursecategories'}) eq 'HASH') {
+ if ($domconf{'coursecategories'}{'togglecats'} eq 'crs') {
+ $can_toggle_cat = 1;
+ }
+ }
+ return $can_toggle_cat;
+}
+
##################################################
# Overview mode
##################################################
|