[LON-CAPA-admin] Invalid Map?
Raeburn, Stuart
raeburn at msu.edu
Wed Jan 13 09:39:41 EST 2021
Paul,
When you see: "Invalid map: /home/httpd/html/adm/notfound.html" that means that when the course was created, LON-CAPA was unable to make a successful "internal" web request to create the top level map in the course, for which the URL would typically be:
uploaded/bsu/courseNum/default.sequence
where courseNum is a unique string of letters and numbers (e.g., 1a2458de5749811cabf3bsul1), ending bsul1, if the course was created on the bsu home server.
If the course was created by a Domain Coordinator using
Main Menu > Course and community creation > Create a single course,
and the First Resource was set to "Course Contents" then the default.sequence file should contain:
<map>
<resource id="1" type="start"></resource>
<resource id="2" src="/adm/navmaps"></resource>
<resource id="3" type="finish"></resource>
<link index="1" from="1" to="2"></link>
<link index="2" from="2" to="3"></link>
</map>
On your LON-CAPA library server, the default.sequence file will be found in:
/home/httpd/lonUsers/$l1/$l2/$l3/$courseNum/userfiles
where $l1, $l2, and $l3 are the first three characters in $courseNum
Permissions/ownership for default.sequence should be:
-rw-r--r-- 1 www www
If the course was cloned, then the default.sequence file (and all other default_*.sequence files) will have been copied from the course being cloned to the appropriate location for the new course, and references to the courseNum of the old course will have been replaced in the new file(s) with references to the courseNum of the new course.
In addition to creating the default.sequence file, the course creation process will have added a pointer to the URL for that file to the environment.db GDBM file for the course. If a problem occurs when copying the default.sequence file, the URL recorded will be /adm/notfound.html, which then prevents the course from being loaded.
Although, you can fix that, as described below, the larger question is: (a) why did the "internal" web request fail when creating the default.sequence file. The usual culprit is an incorrect SSL certificate chain, but that does not look to be the case for: lon-capa.bsu.edu
In addition, you should verify the contents of the default.sequence file for the course:
/home/httpd/lonUsers/$l1/$l2/$l3/$courseNum/userfiles
Anyway, you can replace the /adm/notfound.html in the environment.db file with the correct URL, by running the following perl script (save it as fixmap.pl), as user www, and passing it two arguments: bsu courseNum when running it, i.e.,
perl fixmap.pl bsu courseNum
(replacing courseNum with the appropriate string, e.g., 1a2458de5749811cabf3bsul1).
#!/usr/bin/perl
use strict;
print "Usage: fixmap.pl domain courseNum\n" unless @ARGV;
my $domain=shift @ARGV;
my $name=shift @ARGV;
my ($l1,$l2,$l3)=split(//,substr($name,0,3));
my $now = time;
use GDBM_File;
my %hash;
tie(%hash,'GDBM_File',
"/home/httpd/lonUsers/$domain/$l1/$l2/$l3/$name/environment.db",
&GDBM_WRCREAT,0640);
my $url = "uploaded/$domain/$name/default.sequence";
$url =~ s/(\W)/"%".unpack('H2',$1)/eg;
$hash{'url'}=$url;
untie %hash;
if (open(my $fh, '>>',"/home/httpd/lonUsers/$domain/$l1/$l2/$l3/$name/environment.hist")) {
print $fh "P:$now:url=$url\n";
close($fh);
}
Stuart Raeburn
LON-CAPA Academic Consortium
________________________________________
From: LON-CAPA-admin <lon-capa-admin-bounces at mail.lon-capa.org> on behalf of Neubauer, Paul via LON-CAPA-admin <lon-capa-admin at mail.lon-capa.org>
Sent: Tuesday, January 12, 2021 12:05 PM
To: 'lon-capa-admin at mail.lon-capa.org'
Subject: [LON-CAPA-admin] Invalid Map?
Hello all,
In preparation for the upcoming Spring semester, I was trying to set up a course for automatic enrollment. In my role as Domain Coordinator, I selected the course and tried to enter it as a course coordinator. I got the following message:
--------------------------------------------------------------------
The following problems occurred:
Invalid map: /home/httpd/html/adm/notfound.html
Continue
--------------------------------------------------------------------
This occurs only for this one course. I am aware that I am clueless, and I'd appreciate any clues you might have to offer me.
Thanks,
Paul
_______________________________________________
LON-CAPA-admin mailing list
LON-CAPA-admin at mail.lon-capa.org
http://mail.lon-capa.org/mailman/listinfo/lon-capa-admin
More information about the LON-CAPA-admin
mailing list