--- loncom/automation/Autocreate.pl 2020/07/18 00:16:00 1.20.2.1 +++ loncom/automation/Autocreate.pl 2020/07/01 20:09:03 1.22 @@ -2,7 +2,7 @@ # # Automated Course Creation script # -# $Id: Autocreate.pl,v 1.20.2.1 2020/07/18 00:16:00 raeburn Exp $ +# $Id: Autocreate.pl,v 1.22 2020/07/01 20:09:03 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -184,6 +184,9 @@ sub process_xml { if ($logmsg ne '') { $outcome .= $logmsg."\n"; } + if ($keysmsg ne '') { + $outcome .= $keysmsg."\n"; + } if ($clonemsg ne '') { $outcome .= $clonemsg."\n"; } @@ -214,6 +217,22 @@ sub process_xml { } $output =~ s/:$//; &unset_dc_env(); + if (ref($instcodesref) eq 'HASH') { + if (keys(%{$instcodesref}) > 0) { + &Apache::lonnet::devalidate_cache_new('instcats',$dom); + if (&Apache::lonnet::shared_institution($dom)) { + my %servers = &Apache::lonnet::internet_dom_servers($dom); + my %thismachine; + map { $thismachine{$_} = 1; } &Apache::lonnet::current_machine_ids(); + if (keys(%servers)) { + foreach my $server (keys(%servers)) { + next if ($thismachine{$server}); + &Apache::lonnet::remote_devalidate_cache($server,['instcats:'.$dom]); + } + } + } + } + } return $output; }