) {
+ $newnums{(split(/:/))[1]} = 1;
+ }
+ close(PIPE);
+ }
+ foreach my $key (sort {$b <=> $a } (keys(%newnums))) {
+ unless (exists($oldnums{$key})) {
+ $hadchanges = 1;
+ last;
+ }
+ }
+ unless ($hadchanges) {
+ foreach my $key (sort {$b <=> $a } (keys(%oldnums))) {
+ unless (exists($newnums{$key})) {
+ $hadchanges = 1;
+ last;
+ }
+ }
+ }
+ }
+ }
+ } else {
+ unlink($tmpcrl);
+ }
+ } else {
+ unlink($tmpcrl);
+ }
+ } else {
+ unlink($tmpcrl);
+ }
+ }
+ }
+ return ($msg,$hadchanges);
+}
+
+sub parse_getdns_url {
+ my ($command,$url) = @_;
+ my $dir = $perlvar{'lonTabDir'};
+ my $file;
+ if ($command eq 'hosts') {
+ $file = 'dns_hosts.tab';
+ } elsif ($command eq 'domain') {
+ $file = 'dns_domain.tab';
+ } elsif ($command eq 'checksums') {
+ my $version = (split('/',$url))[4];
+ $file = "dns_checksums/$version.tab",
+ } elsif ($command eq 'loncapaCRL') {
+ $dir = $perlvar{'lonCertificateDirectory'};
+ $file = $perlvar{'lonnetCertRevocationList'};
+ }
+ return ($dir,$file);
+}
+
# ------------------------------------------------------------ Read domain file
{
my $loaded;
@@ -13885,7 +15785,7 @@ sub fetch_dns_checksums {
return %iphost;
}
my ($ip_info,$cached)=
- &Apache::lonnet::is_cached_new('iphost','iphost');
+ &is_cached_new('iphost','iphost');
if ($cached) {
%iphost = %{$ip_info->[0]};
%name_to_ip = %{$ip_info->[1]};
@@ -13897,7 +15797,7 @@ sub fetch_dns_checksums {
# get yesterday's info for fallback
my %old_name_to_ip;
my ($ip_info,$cached)=
- &Apache::lonnet::is_cached_new('iphost','iphost');
+ &is_cached_new('iphost','iphost');
if ($cached) {
%old_name_to_ip = %{$ip_info->[1]};
}
@@ -13964,7 +15864,7 @@ sub fetch_dns_checksums {
my ($lonid) = @_;
return if ($lonid eq '');
my ($idnref,$cached)=
- &Apache::lonnet::is_cached_new('internetnames',$lonid);
+ &is_cached_new('internetnames',$lonid);
if ($cached) {
return $idnref;
}
@@ -14162,6 +16062,16 @@ BEGIN {
}
+# ------------- set default texengine (domain default overrides this)
+{
+ $deftex = LONCAPA::texengine();
+}
+
+# ------------- set default minimum length for passwords for internal auth users
+{
+ $passwdmin = LONCAPA::passwd_min();
+}
+
$memcache=new Cache::Memcached({'servers' => ['127.0.0.1:11211'],
'compress_threshold'=> 20_000,
});
@@ -14501,6 +16411,7 @@ prevents recursive calls to &allowed.
2: browse allowed
A: passphrase authentication needed
B: access temporarily blocked because of a blocking event in a course.
+ D: access blocked because access is required via session initiated via deep-link
=item *
@@ -14793,10 +16704,6 @@ data base, returning a hash that is keye
values that are the resource value. I believe that the timestamps and
versions are also returned.
-get_numsuppfiles($cnum,$cdom) : retrieve number of files in a course's
-supplemental content area. This routine caches the number of files for
-10 minutes.
-
=back
=head2 Course Modification
@@ -14831,6 +16738,88 @@ Returns:
=back
+=head2 Bubblesheet Configuration
+
+=over 4
+
+=item *
+
+get_scantron_config($which)
+
+$which - the name of the configuration to parse from the file.
+
+Parses and returns the bubblesheet configuration line selected as a
+hash of configuration file fields.
+
+
+Returns:
+ If the named configuration is not in the file, an empty
+ hash is returned.
+
+ a hash with the fields
+ name - internal name for the this configuration setup
+ description - text to display to operator that describes this config
+ CODElocation - if 0 or the string 'none'
+ - no CODE exists for this config
+ if -1 || the string 'letter'
+ - a CODE exists for this config and is
+ a string of letters
+ Unsupported value (but planned for future support)
+ if a positive integer
+ - The CODE exists as the first n items from
+ the question section of the form
+ if the string 'number'
+ - The CODE exists for this config and is
+ a string of numbers
+ CODEstart - (only matter if a CODE exists) column in the line where
+ the CODE starts
+ CODElength - length of the CODE
+ IDstart - column where the student/employee ID starts
+ IDlength - length of the student/employee ID info
+ Qstart - column where the information from the bubbled
+ 'questions' start
+ Qlength - number of columns comprising a single bubble line from
+ the sheet. (usually either 1 or 10)
+ Qon - either a single character representing the character used
+ to signal a bubble was chosen in the positional setup, or
+ the string 'letter' if the letter of the chosen bubble is
+ in the final, or 'number' if a number representing the
+ chosen bubble is in the file (1->A 0->J)
+ Qoff - the character used to represent that a bubble was
+ left blank
+ PaperID - if the scanning process generates a unique number for each
+ sheet scanned the column that this ID number starts in
+ PaperIDlength - number of columns that comprise the unique ID number
+ for the sheet of paper
+ FirstName - column that the first name starts in
+ FirstNameLength - number of columns that the first name spans
+ LastName - column that the last name starts in
+ LastNameLength - number of columns that the last name spans
+ BubblesPerRow - number of bubbles available in each row used to
+ bubble an answer. (If not specified, 10 assumed).
+
+
+=item *
+
+get_scantronformat_file($cdom)
+
+$cdom - the course's domain (optional); if not supplied, uses
+domain for current $env{'request.course.id'}.
+
+Returns an array containing lines from the scantron format file for
+the domain of the course.
+
+If a url for a custom.tab file is listed in domain's configuration.db,
+lines are from this file.
+
+Otherwise, if a default.tab has been published in RES space by the
+domainconfig user, lines are from this file.
+
+Otherwise, fall back to getting lines from the legacy file on the
+local server: /home/httpd/lonTabs/default_scantronformat.tab
+
+=back
+
=head2 Resource Subroutines
=over 4
@@ -15528,6 +17517,7 @@ userspace, probably shouldn't be called
formname: same as for userfileupload()
fname: filename (including subdirectories) for the file
parser: if 'parse', will parse (html) file to extract references to objects, links etc.
+ if hashref, and context is scantron, will convert csv format to standard format
allfiles: reference to hash used to store objects found by parser
codebase: reference to hash used for codebases of java objects found by parser
thumbwidth: width (pixels) of thumbnail to be created for uploaded image
500 Internal Server Error
Internal Server Error
The server encountered an internal error or
misconfiguration and was unable to complete
your request.
Please contact the server administrator at
root@localhost to inform them of the time this error occurred,
and the actions you performed just before this error.
More information about this error may be available
in the server error log.