[LON-CAPA-cvs] cvs: loncom(version_2_11_X) /interface loncommon.pm
raeburn
raeburn at source.lon-capa.org
Sun Sep 18 16:56:05 EDT 2016
raeburn Sun Sep 18 20:56:05 2016 EDT
Modified files: (Branch: version_2_11_X)
/loncom/interface loncommon.pm
Log:
- For 2.11
- Backport 1.1253
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.1075.2.113 loncom/interface/loncommon.pm:1.1075.2.114
--- loncom/interface/loncommon.pm:1.1075.2.113 Fri Sep 16 18:27:07 2016
+++ loncom/interface/loncommon.pm Sun Sep 18 20:56:04 2016
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# a pile of common routines
#
-# $Id: loncommon.pm,v 1.1075.2.113 2016/09/16 18:27:07 raeburn Exp $
+# $Id: loncommon.pm,v 1.1075.2.114 2016/09/18 20:56:04 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -9506,6 +9506,22 @@
sub user_picker {
my ($dom,$srch,$forcenewuser,$caller,$cancreate,$usertype,$context) = @_;
my $currdom = $dom;
+ my @alldoms = &Apache::lonnet::all_domains();
+ if (@alldoms == 1) {
+ my %domsrch = &Apache::lonnet::get_dom('configuration',
+ ['directorysrch'],$alldoms[0]);
+ my $domdesc = &Apache::lonnet::domain($alldoms[0],'description');
+ my $showdom = $domdesc;
+ if ($showdom eq '') {
+ $showdom = $dom;
+ }
+ if (ref($domsrch{'directorysrch'}) eq 'HASH') {
+ if ((!$domsrch{'directorysrch'}{'available'}) &&
+ ($domsrch{'directorysrch'}{'lcavailable'} eq '0')) {
+ return (&mt('LON-CAPA directory search is not available in domain: [_1]',$showdom),0);
+ }
+ }
+ }
my %curr_selected = (
srchin => 'dom',
srchby => 'lastname',
@@ -9746,7 +9762,7 @@
&Apache::lonhtmlcommon::row_closure(1).
&Apache::lonhtmlcommon::end_pick_box().
'<br />';
- return $output;
+ return ($output,1);
}
sub user_rule_check {
More information about the LON-CAPA-cvs
mailing list