version 1.1172.2.146.2.26, 2025/01/15 18:43:08
|
version 1.1172.2.146.2.29, 2025/06/06 21:18:46
|
Line 6522 sub cstore {
|
Line 6522 sub cstore {
|
|
|
if ($stuname) { $home=&homeserver($stuname,$domain); } |
if ($stuname) { $home=&homeserver($stuname,$domain); } |
|
|
$symb=&symbclean($symb); |
unless (($symb eq '_feedback') || ($symb eq '_discussion')) { |
|
$symb=&symbclean($symb); |
|
} |
if (!$symb) { unless ($symb=&symbread()) { return ''; } } |
if (!$symb) { unless ($symb=&symbread()) { return ''; } } |
|
|
if (!$domain) { $domain=$env{'user.domain'}; } |
if (!$domain) { $domain=$env{'user.domain'}; } |
if (!$stuname) { $stuname=$env{'user.name'}; } |
if (!$stuname) { $stuname=$env{'user.name'}; } |
|
|
&devalidate($symb,$stuname,$domain); |
unless (($symb eq '_feedback') || ($symb eq '_discussion')) { |
|
&devalidate($symb,$stuname,$domain); |
|
} |
|
|
$symb=escape($symb); |
$symb=escape($symb); |
if (!$namespace) { |
if (!$namespace) { |
Line 6538 sub cstore {
|
Line 6542 sub cstore {
|
} |
} |
if (!$home) { $home=$env{'user.home'}; } |
if (!$home) { $home=$env{'user.home'}; } |
|
|
$$storehash{'ip'}=&get_requestor_ip(); |
$$storehash{'ip'} = &get_requestor_ip(); |
$$storehash{'host'}=$perlvar{'lonHostID'}; |
$$storehash{'host'}=$perlvar{'lonHostID'}; |
|
|
my $namevalue=''; |
my $namevalue=''; |
Line 7288 sub set_adhoc_privileges {
|
Line 7292 sub set_adhoc_privileges {
|
if (&allowed('adv') eq 'F') { $tadv=1; } |
if (&allowed('adv') eq 'F') { $tadv=1; } |
&appenv({'request.role.adv' => $tadv}); |
&appenv({'request.role.adv' => $tadv}); |
} |
} |
|
if ($role eq 'ca') { |
|
my @ca_settings = ('authoreditors','coauthorlist'); |
|
my %info = &userenvironment($dcdom,$pickedcourse,@ca_settings); |
|
foreach my $item (@ca_settings) { |
|
if (exists($info{$item})) { |
|
my $name = $item; |
|
if ($item eq 'authoreditors') { |
|
$name = 'editors'; |
|
unless ($info{'authoreditors'}) { |
|
my %domdefs = &get_domain_defaults($dcdom); |
|
if ($domdefs{$name} ne '') { |
|
$info{'authoreditors'} = $domdefs{$name}; |
|
} else { |
|
$info{'authoreditors'} = 'edit,xml'; |
|
} |
|
} |
|
} |
|
&appenv({"environment.internal.$name./$dcdom/$pickedcourse" => $info{$item}}); |
|
} |
|
} |
|
} |
} |
} |
|
|
# --------------------------------------------------------------- get interface |
# --------------------------------------------------------------- get interface |
Line 11324 sub is_course {
|
Line 11349 sub is_course {
|
} |
} |
|
|
sub store_userdata { |
sub store_userdata { |
my ($storehash,$datakey,$namespace,$udom,$uname) = @_; |
my ($storehash,$datakey,$namespace,$udom,$uname,$ip) = @_; |
my $result; |
my $result; |
if ($datakey ne '') { |
if ($datakey ne '') { |
if (ref($storehash) eq 'HASH') { |
if (ref($storehash) eq 'HASH') { |
Line 11336 sub store_userdata {
|
Line 11361 sub store_userdata {
|
if (($uhome eq '') || ($uhome eq 'no_host')) { |
if (($uhome eq '') || ($uhome eq 'no_host')) { |
$result = 'error: no_host'; |
$result = 'error: no_host'; |
} else { |
} else { |
$storehash->{'ip'} = &get_requestor_ip(); |
if ($ip ne '') { |
|
$storehash->{'ip'} = $ip; |
|
} else { |
|
$storehash->{'ip'} = &get_requestor_ip(); |
|
} |
$storehash->{'host'} = $perlvar{'lonHostID'}; |
$storehash->{'host'} = $perlvar{'lonHostID'}; |
|
|
my $namevalue=''; |
my $namevalue=''; |
Line 14272 sub receipt {
|
Line 14301 sub receipt {
|
} |
} |
|
|
sub whichuser { |
sub whichuser { |
my ($passedsymb)=@_; |
my ($passedsymb,$ignorecachednull)=@_; |
my ($symb,$courseid,$domain,$name,$publicuser); |
my ($symb,$courseid,$domain,$name,$publicuser); |
if (defined($env{'form.grade_symb'})) { |
if (defined($env{'form.grade_symb'})) { |
my ($tmp_courseid)=&get_env_multiple('form.grade_courseid'); |
my ($tmp_courseid)=&get_env_multiple('form.grade_courseid'); |
Line 14292 sub whichuser {
|
Line 14321 sub whichuser {
|
} |
} |
} |
} |
if (!$passedsymb) { |
if (!$passedsymb) { |
$symb=&symbread(); |
$symb=&symbread('','',$ignorecachednull); |
} else { |
} else { |
$symb=$passedsymb; |
$symb=$passedsymb; |
} |
} |