[LON-CAPA-admin] Invalid Map?

Raeburn, Stuart raeburn at msu.edu
Wed Jan 13 11:05:20 EST 2021


Paul,

If the file /home/httpd/lonUsers/bsu/2/s/1/2s16783d6c9fc5f67bsul1/userfiles/default.sequence does not exist then you can create one (as user www).

To create an empty course shell create a file:

/home/httpd/lonUsers/bsu/2/s/1/2s16783d6c9fc5f67bsul1/userfiles/default.sequence
containing:

<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>

Permissions/ownership for the default.sequence file should be:
-rw-r--r--  and www:www

If the faculty member who originally created the course cloned it from another course, then my recommendation would be to try course creation again.

If you create a default.sequence file for 2s16783d6c9fc5f67bsul1, as described above, than a Course Coordinator can load this existing course and use:

Settings > Course Settings > Display (General course settings checked)

to change the value for the Course Description to include the text: Obsolete or Not in use, or similar. 

For information about deleting courses in LON-CAPA see:
https://lon-capa.bsu.edu/adm/help/Course_Deleting.hlp

Besides expiring roles assigned in the course, other advice would be to disable Automated Enrollment, using: People > Users > Automated Enrollment

but that likely is not a consideration, since in your original email you stated that you were trying to set up automated enrollment for the course when you encountered /adm/notfound.html

Stuart Raeburn
LON-CAPA Academic Consortium
________________________________________
From: Neubauer, Paul <pneubauer at bsu.edu>
Sent: Wednesday, January 13, 2021 9:54 AM
To: Raeburn, Stuart; list about administration and system updating
Subject: RE: Invalid Map?

Thank you, Stuart,

I copied your perl to a file fixmap.pl in /home/www and, as www, ran:

./fixmap.pl bsu 2s16783d6c9fc5f67bsul1

Then, as bsudc (the Domain Coordinator) I reentered the course as course coordinator and, again, got:

=============================
The following problems occurred:

Map not loaded: The file /home/httpd/lonUsers/bsu/2/s/1/2s16783d6c9fc5f67bsul1/userfiles/default.sequence does not exist.

Continue

=============================

Any further advice? Should I ask the faculty member who created the course to delete it and try again? Something else?

I'm well out of my depth here.

Thanks,
Paul




-----Original Message-----
From: LON-CAPA-admin [mailto:lon-capa-admin-bounces at mail.lon-capa.org] On Behalf Of Raeburn, Stuart via LON-CAPA-admin
Sent: Wednesday, January 13, 2021 9:40 AM
To: 'lon-capa-admin at mail.lon-capa.org' <lon-capa-admin at mail.lon-capa.org>
Subject: Re: [LON-CAPA-admin] Invalid Map?

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
https://urldefense.com/v3/__https://nam12.safelinks.protection.outlook.com/?url=http*3A*2F*2Fmail.lon-capa.org*2Fmailman*2Flistinfo*2Flon-capa-admin&data=04*7C01*7Cpneubauer*40bsu.edu*7C928f14e621134601f9b308d8b7d114c6*7C6fff909f07dc40da9e30fd7549c0f494*7C0*7C0*7C637461455943741384*7CUnknown*7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0*3D*7C3000&sdata=5O*2BiLFR9mK7zdkE1DZ0RCY7Qj96PzyIWy71b00fuLeY*3D&reserved=0__;JSUlJSUlJSUlJSUlJSUlJSUlJSU!!HXCxUKc!iQ_qoXROr3vVwXvrcfnodAMHqLgihOiX_SteWx2SZnWxVroRg6OmeZkgXAW0Iw$
_______________________________________________
LON-CAPA-admin mailing list
LON-CAPA-admin at mail.lon-capa.org
https://urldefense.com/v3/__https://nam12.safelinks.protection.outlook.com/?url=http*3A*2F*2Fmail.lon-capa.org*2Fmailman*2Flistinfo*2Flon-capa-admin&data=04*7C01*7Cpneubauer*40bsu.edu*7C928f14e621134601f9b308d8b7d114c6*7C6fff909f07dc40da9e30fd7549c0f494*7C0*7C0*7C637461455943746371*7CUnknown*7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0*3D*7C3000&sdata=joaBs6lBn1XhX*2B*2FxHAJw4cWzHTtFoCJE0PYO9C1ufy8*3D&reserved=0__;JSUlJSUlJSUlJSUlJSUlJSUlJSUl!!HXCxUKc!iQ_qoXROr3vVwXvrcfnodAMHqLgihOiX_SteWx2SZnWxVroRg6OmeZkOJCeaOQ$


More information about the LON-CAPA-admin mailing list