[LON-CAPA-cvs] cvs: loncom /interface loncommon.pm
raeburn
raeburn at source.lon-capa.org
Mon Sep 2 23:36:29 EDT 2024
raeburn Tue Sep 3 03:36:29 2024 EDT
Modified files:
/loncom/interface loncommon.pm
Log:
- Use "Rules for shared secrets" defined in Domain Configuration for
External Tools when Course Coordinator sets secret in tool definition.
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.1433 loncom/interface/loncommon.pm:1.1434
--- loncom/interface/loncommon.pm:1.1433 Thu Aug 22 15:16:05 2024
+++ loncom/interface/loncommon.pm Tue Sep 3 03:36:29 2024
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# a pile of common routines
#
-# $Id: loncommon.pm,v 1.1433 2024/08/22 15:16:05 raeburn Exp $
+# $Id: loncommon.pm,v 1.1434 2024/09/03 03:36:29 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -3950,6 +3950,21 @@
} else {
$alertmsg = &mt('A secret did not satisfy requirement(s):').'\n\n';
}
+ } elsif ($context eq 'ltitools') {
+ my %domconfig = &Apache::lonnet::get_dom('configuration',['toolsec'],$domain);
+ if (ref($domconfig{'toolsec'}) eq 'HASH') {
+ if (ref($domconfig{'toolsec'}{'rules'}) eq 'HASH') {
+ %passwdconf = %{$domconfig{'toolsec'}{'rules'}};
+ }
+ }
+ if ($id eq 'add') {
+ $alertmsg = &mt('Secret for added external tool did not satisfy requirement(s):').'\n\n';
+ } elsif ($id =~ /^\d+$/) {
+ my $pos = $id+1;
+ $alertmsg = &mt('Secret for external tool [_1] did not satisfy requirement(s):','#'.$pos).'\n\n';
+ } else {
+ $alertmsg = &mt('A secret did not satisfy requirement(s):').'\n\n';
+ }
} else {
%passwdconf = &Apache::lonnet::get_passwdconf($domain);
$alertmsg = &mt('Initial password did not satisfy requirement(s):').'\n\n';
More information about the LON-CAPA-cvs
mailing list