--- loncom/lonnet/perl/lonnet.pm 2015/04/15 04:11:17 1.1282 +++ loncom/lonnet/perl/lonnet.pm 2015/04/19 20:34:25 1.1284 @@ -1,7 +1,7 @@ # The LearningOnline Network # TCP networking package # -# $Id: lonnet.pm,v 1.1282 2015/04/15 04:11:17 raeburn Exp $ +# $Id: lonnet.pm,v 1.1284 2015/04/19 20:34:25 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -7332,7 +7332,7 @@ sub get_commblock_resources { if ($timesup > $now) { my $activeblock; foreach my $res (@to_test) { - if ($res->completable()) { + if ($res->answerable()) { $activeblock = 1; last; } @@ -13052,13 +13052,29 @@ escaped strings of the action recorded i =item * -allowed($priv,$uri,$symb,$role) : check for a user privilege; returns codes for allowed actions +allowed($priv,$uri,$symb,$role,$clientip,$noblockcheck) : check for a user privilege; +returns codes for allowed actions. + +The first argument is required, all others are optional. + +$priv is the privilege being checked. +$uri contains additional information about what is being checked for access (e.g., +URL, course ID etc.). +$symb is the unique resource instance identifier in a course; if needed, +but not provided, it will be retrieved via a call to &symbread(). +$role is the role for which a priv is being checked (only used if priv is evb). +$clientip is the user's IP address (only used when checking for access to portfolio +files). +$noblockcheck, if true, skips calls to &has_comm_blocking() for the bre priv. This +prevents recursive calls to &allowed. + F: full access U,I,K: authentication modes (cxx only) '': forbidden 1: user needs to choose course 2: browse allowed A: passphrase authentication needed + B: access temporarily blocked because of a blocking event in a course. =item *