From raeburn at source.lon-capa.org Mon Apr 2 13:27:52 2018 From: raeburn at source.lon-capa.org (raeburn) Date: Mon, 02 Apr 2018 17:27:52 -0000 Subject: [LON-CAPA-cvs] cvs: loncom /lonnet/perl lonnet.pm Message-ID: raeburn Mon Apr 2 17:27:52 2018 EDT Modified files: /loncom/lonnet/perl lonnet.pm Log: responseorder metadata-field for problem with imported library/problem - prepending import id to response id to create responseorder item for each import tag now occurs sooner in &metadata(). Index: loncom/lonnet/perl/lonnet.pm diff -u loncom/lonnet/perl/lonnet.pm:1.1372 loncom/lonnet/perl/lonnet.pm:1.1373 --- loncom/lonnet/perl/lonnet.pm:1.1372 Fri Mar 30 23:50:29 2018 +++ loncom/lonnet/perl/lonnet.pm Mon Apr 2 17:27:52 2018 @@ -1,7 +1,7 @@ # The LearningOnline Network # TCP networking package # -# $Id: lonnet.pm,v 1.1372 2018/03/30 23:50:29 raeburn Exp $ +# $Id: lonnet.pm,v 1.1373 2018/04/02 17:27:52 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -11940,8 +11940,11 @@ undef(%importedrespids); undef(%importedpartids); } - @{$importedrespids{$importid}} = split(/\s*,\s*/,$libresponseorder); - if (@{$importedrespids{$importid}} > 0) { + my @respids = split(/\s*,\s*/,$libresponseorder); + if (@respids) { + $importedrespids{$importid} = join(',',map { $importid.'_'.$_ } @respids); + } + if ($importedrespids{$importid} ne '') { $importedresponses = 1; # We need to get the original file and the imported file to get the response order correct # Load and inspect original file @@ -12120,12 +12123,14 @@ } elsif ($origfiletagids[$index] eq 'import') { if ($importedparts) { # We have imported parts at this position - $metaentry{':partorder'}.=','.$importedpartids{$origid}; + if ($importedpartids{$origid} ne '') { + $metaentry{':partorder'}.=','.$importedpartids{$origid}; + } } if ($importedresponses) { # We have imported responses at this position - if (ref($importedrespids{$origid}) eq 'ARRAY') { - $metaentry{':responseorder'}.=','.join(',',map { $origid.'_'.$_ } @{$importedrespids{$origid}}); + if ($importedrespids{$origid} ne '') { + $metaentry{':responseorder'}.=','.$importedrespids{$origid}; } } } else { From raeburn at source.lon-capa.org Mon Apr 2 14:23:58 2018 From: raeburn at source.lon-capa.org (raeburn) Date: Mon, 02 Apr 2018 18:23:58 -0000 Subject: [LON-CAPA-cvs] cvs: loncom /lonnet/perl lonnet.pm Message-ID: raeburn Mon Apr 2 18:23:58 2018 EDT Modified files: /loncom/lonnet/perl lonnet.pm Log: - reconstructing partorder when importing a library file or problem which contains parts, for importmodes besides "part". Index: loncom/lonnet/perl/lonnet.pm diff -u loncom/lonnet/perl/lonnet.pm:1.1373 loncom/lonnet/perl/lonnet.pm:1.1374 --- loncom/lonnet/perl/lonnet.pm:1.1373 Mon Apr 2 17:27:52 2018 +++ loncom/lonnet/perl/lonnet.pm Mon Apr 2 18:23:57 2018 @@ -1,7 +1,7 @@ # The LearningOnline Network # TCP networking package # -# $Id: lonnet.pm,v 1.1373 2018/04/02 17:27:52 raeburn Exp $ +# $Id: lonnet.pm,v 1.1374 2018/04/02 18:23:57 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -11960,10 +11960,7 @@ # hash populated for imported library file %metaentry = %currmetaentry; undef(%currmetaentry); - if ($importmode eq 'problem') { -# Import as problem/response - $unikey=&add_prefix_and_part($prefix,$token->[2]->{'part'}); - } elsif ($importmode eq 'part') { + if ($importmode eq 'part') { # Import as part(s) $importedparts=1; # We need to get the original file and the imported file to get the part order correct @@ -12005,13 +12002,28 @@ $importedpartids{$token->[2]->{'id'}}=$token->[2]->{'id'}; } } else { +# Import as problem or as normal import + $unikey=&add_prefix_and_part($prefix,$token->[2]->{'part'}); + unless ($importmode eq 'problem') { # Normal import - $unikey=&add_prefix_and_part($prefix,$token->[2]->{'part'}); - if (defined($token->[2]->{'id'})) { - $unikey.='_'.$token->[2]->{'id'}; - } + if (defined($token->[2]->{'id'})) { + $unikey.='_'.$token->[2]->{'id'}; + } + } +# Check metadata for imported file to +# see if it contained parts + if (grep(/^partorder$/, at libfilekeys)) { + %currmetaentry = %metaentry; + my $libpartorder = &metadata($location,'partorder',undef,undef,undef, + $depthcount+1); + %metaentry = %currmetaentry; + undef(%currmetaentry); + if ($libpartorder ne '') { + $importedparts = 1; + $importedpartids{$token->[2]->{'id'}}=$libpartorder; + } + } } - if ($depthcount<20) { my $metadata = &metadata($uri,'keys',$toolsymb,$location,$unikey, From raeburn at source.lon-capa.org Tue Apr 3 21:27:39 2018 From: raeburn at source.lon-capa.org (raeburn) Date: Wed, 04 Apr 2018 01:27:39 -0000 Subject: [LON-CAPA-cvs] cvs: loncom / production_dns_domain.tab production_dns_hosts.tab Message-ID: raeburn Wed Apr 4 01:27:39 2018 EDT Modified files: /loncom production_dns_hosts.tab production_dns_domain.tab Log: - Add Augustana College (Rock Island, IL), hosted at educog.com. Index: loncom/production_dns_hosts.tab diff -u loncom/production_dns_hosts.tab:1.264 loncom/production_dns_hosts.tab:1.265 --- loncom/production_dns_hosts.tab:1.264 Fri Feb 9 15:59:26 2018 +++ loncom/production_dns_hosts.tab Wed Apr 4 01:27:38 2018 @@ -213,6 +213,7 @@ ohiouk12l1:ohiouk12:library:capa4.phy.ohio.edu:https:ohio.edu #Hosted - educogs library server +augustanal1:augustana:library:educog.com:https:educog.com berryl1:berry:library:educog.com:https:educog.com lowelll1:lowell:library:educog.com:https:educog.com msoel1:msoe:library:educog.com:https:educog.com Index: loncom/production_dns_domain.tab diff -u loncom/production_dns_domain.tab:1.190 loncom/production_dns_domain.tab:1.191 --- loncom/production_dns_domain.tab:1.190 Tue Jan 16 09:06:14 2018 +++ loncom/production_dns_domain.tab Wed Apr 4 01:27:38 2018 @@ -193,6 +193,7 @@ lhsa:Lutheran High School Association of Greater Detroit:::en-US::::lhsalc #Hosted +augustana:Augustana College:::en-US:Rock Island, IL:-90.551:41.505:augustanal1 berry:Berry College:::en-US:Mount Berry, GA:-85.189:34.290:berryl1 lowell:Lowell Public Schools:::en-US:Lowell,Lowell, MA:-71.312:42.647:lowelll1 msoe:Milwaukee School of Engineering:::en-US:Milwaukee, WI:-87.908:43.044:msoel1 From raeburn at source.lon-capa.org Fri Apr 6 15:59:28 2018 From: raeburn at source.lon-capa.org (raeburn) Date: Fri, 06 Apr 2018 19:59:28 -0000 Subject: [LON-CAPA-cvs] cvs: loncom / production_dns_domain.tab production_dns_hosts.tab Message-ID: raeburn Fri Apr 6 19:59:28 2018 EDT Modified files: /loncom production_dns_hosts.tab production_dns_domain.tab Log: - Add msuoutreach domain for LON-CAPA outreach activities by MSU departments Index: loncom/production_dns_hosts.tab diff -u loncom/production_dns_hosts.tab:1.265 loncom/production_dns_hosts.tab:1.266 --- loncom/production_dns_hosts.tab:1.265 Wed Apr 4 01:27:38 2018 +++ loncom/production_dns_hosts.tab Fri Apr 6 19:59:27 2018 @@ -384,3 +384,4 @@ #Gateways msudemol1:msudemo:library:s12.lite.msu.edu:https:msu.edu +msuoutreachl1:msuoutreach:library:outreach.lite.msu.edu:https:msu.edu Index: loncom/production_dns_domain.tab diff -u loncom/production_dns_domain.tab:1.191 loncom/production_dns_domain.tab:1.192 --- loncom/production_dns_domain.tab:1.191 Wed Apr 4 01:27:38 2018 +++ loncom/production_dns_domain.tab Fri Apr 6 19:59:27 2018 @@ -310,3 +310,4 @@ #Gateway msudemo:Demo Machine:krb4:MSU.EDU:en-US:East Lansing, MI:-84.483:42.737:msudemol1 +msuoutreach:Michigan State University Outreach:::en-US:East Lansing, MI:-84.483:42.737:msuoutreachl1