version 1.75, 2016/02/20 00:12:39
|
version 1.77, 2016/03/23 02:19:09
|
Line 419 sub handler {
|
Line 419 sub handler {
|
{ text => 'Discussion and Chat', |
{ text => 'Discussion and Chat', |
help => 'Course_Prefs_Discussions', |
help => 'Course_Prefs_Discussions', |
ordered => ['pch.roles.denied','pch.users.denied', |
ordered => ['pch.roles.denied','pch.users.denied', |
|
'pac.roles.denied','pac.users.denied', |
'plc.roles.denied','plc.users.denied', |
'plc.roles.denied','plc.users.denied', |
'allow_limited_html_in_feedback', |
'allow_limited_html_in_feedback', |
'allow_discussion_post_editing', |
'allow_discussion_post_editing', |
Line 428 sub handler {
|
Line 429 sub handler {
|
'pch.users.denied' => 'No Resource Discussion', |
'pch.users.denied' => 'No Resource Discussion', |
'plc.roles.denied' => 'No Chat room use', |
'plc.roles.denied' => 'No Chat room use', |
'plc.users.denied' => 'No Chat room use', |
'plc.users.denied' => 'No Chat room use', |
|
'pac.roles.denied' => 'No Anonymous Resource Discussion', |
|
'pac.users.denied' => 'No Anonymous Resource Discussion', |
allow_limited_html_in_feedback => 'Allow limited HTML in discussion', |
allow_limited_html_in_feedback => 'Allow limited HTML in discussion', |
allow_discussion_post_editing => 'Users can edit/delete own discussion posts', |
allow_discussion_post_editing => 'Users can edit/delete own discussion posts', |
discussion_post_fonts => 'Discussion post fonts based on likes/unlikes', |
discussion_post_fonts => 'Discussion post fonts based on likes/unlikes', |
}, |
}, |
}, |
}, |
'classlists' => |
'classlists' => |
Line 1021 sub process_changes {
|
Line 1024 sub process_changes {
|
} |
} |
} |
} |
} |
} |
} elsif (($entry eq 'plc.roles.denied') || ($entry eq 'pch.roles.denied')) { |
} elsif (($entry eq 'plc.roles.denied') || ($entry eq 'pch.roles.denied') || |
|
($entry eq 'pac.roles.denied')) { |
my @denied = &Apache::loncommon::get_env_multiple('form.'.$entry); |
my @denied = &Apache::loncommon::get_env_multiple('form.'.$entry); |
@denied = sort(@denied); |
@denied = sort(@denied); |
my $deniedstr = ''; |
my $deniedstr = ''; |
Line 1029 sub process_changes {
|
Line 1033 sub process_changes {
|
$deniedstr = join(',',@denied); |
$deniedstr = join(',',@denied); |
} |
} |
$newvalues{$entry} = $deniedstr; |
$newvalues{$entry} = $deniedstr; |
} elsif (($entry eq 'plc.users.denied') || ($entry eq 'pch.users.denied')) { |
} elsif (($entry eq 'plc.users.denied') || ($entry eq 'pch.users.denied') || |
|
($entry eq 'pac.users.denied')) { |
my $total = $env{'form.'.$entry.'_total'}; |
my $total = $env{'form.'.$entry.'_total'}; |
my $userstr = ''; |
my $userstr = ''; |
my @denied; |
my @denied; |
Line 2557 sub display_loncaparev_constraints {
|
Line 2562 sub display_loncaparev_constraints {
|
if (grep(/^\Q$value\E$/,@{$Apache::lonrelrequtils::checkparms{$item}})) { |
if (grep(/^\Q$value\E$/,@{$Apache::lonrelrequtils::checkparms{$item}})) { |
my $stdtype = &Apache::lonparmset::standard_parameter_types($item); |
my $stdtype = &Apache::lonparmset::standard_parameter_types($item); |
$found{$item}{'valname'} = &get_param_description($stdtype,$value); |
$found{$item}{'valname'} = &get_param_description($stdtype,$value); |
$found{$item}{'rev'} = $Apache::lonnet::needsrelease{'parameter:'.$item.':'.$value.':'}; |
$found{$item}{'rev'} = $Apache::lonnet::needsrelease{'parameter:'.$item.':'.$value.'::'}; |
} |
} |
} |
} |
} |
} |
Line 2570 sub display_loncaparev_constraints {
|
Line 2575 sub display_loncaparev_constraints {
|
my $stdtype = &Apache::lonparmset::standard_parameter_types($item); |
my $stdtype = &Apache::lonparmset::standard_parameter_types($item); |
$found{$item}{'valname'} = &get_param_description($stdtype,$value,1); |
$found{$item}{'valname'} = &get_param_description($stdtype,$value,1); |
$found{$item}{'rev'} = |
$found{$item}{'rev'} = |
$Apache::lonnet::needsrelease{'parameter:'.$item.'::'.$valuematch}; |
$Apache::lonnet::needsrelease{'parameter:'.$item.'::'.$valuematch.':'}; |
last; |
last; |
} |
} |
} |
} |
} |
} |
} |
} |
|
foreach my $item (keys(%Apache::lonrelrequtils::checkparmnamesmatch)) { |
|
my $regexp; |
|
if ($item eq 'maplevelrecurse') { |
|
$regexp = '\.(?:sequence|page)___\(rec\)\.'; |
|
} |
|
if ($regexp ne '') { |
|
if ($key =~ /$regexp.*\.(\w+)$/) { |
|
my $name = $1; |
|
my $value = $resourcedata->{$key}; |
|
if ($name eq 'type') { |
|
last unless (($value eq 'problem') || ($value eq 'practice') || ($value eq 'exam') || |
|
($value eq 'survey') || ($value eq 'surveycred') || ($value eq 'anonsurvey') || |
|
($value eq 'anonsurveycred') || ($value eq 'randomizetry') || ($value eq 'library')); |
|
} |
|
my $stdtype = &Apache::lonparmset::standard_parameter_types($name); |
|
$found{$name}{'valname'} = &get_param_description($stdtype,$value); |
|
$found{$name}{'extra'} = &mt('Recursive into sub-folders'); |
|
$found{$name}{'rev'} = |
|
$Apache::lonnet::needsrelease{'parameter::::'.$item}; |
|
} |
|
} |
|
} |
foreach my $item (keys(%found)) { |
foreach my $item (keys(%found)) { |
my $stdname = &Apache::lonparmset::standard_parameter_names($item); |
my $stdname = &Apache::lonparmset::standard_parameter_names($item); |
my $rev = $found{$item}{'rev'}; |
my $rev = $found{$item}{'rev'}; |
my $valname = $found{$item}{'valname'}; |
my $valname = $found{$item}{'valname'}; |
|
my $extra = $found{$item}{'extra'}; |
my ($middle,$scope,$which,$level,$map,$resource); |
my ($middle,$scope,$which,$level,$map,$resource); |
my $start = $cid.'.'; |
my $start = $cid.'.'; |
if ($key =~ /^\Q$start\E(\[useropt\:($match_username\:$match_domain)\]\.)/) { |
if ($key =~ /^\Q$start\E(\[useropt\:($match_username\:$match_domain)\]\.)/) { |
Line 2594 sub display_loncaparev_constraints {
|
Line 2622 sub display_loncaparev_constraints {
|
$scope = 'all'; |
$scope = 'all'; |
} |
} |
my $what="$stdname=$valname"; |
my $what="$stdname=$valname"; |
|
if ($extra) { |
|
$what .= "<br/>$extra<br />"; |
|
} |
if ($key =~ /^\Q$start$middle\E\w+\.\Q$item\E$/) { |
if ($key =~ /^\Q$start$middle\E\w+\.\Q$item\E$/) { |
$level = 'general'; |
$level = 'general'; |
if ($scope eq 'all') { |
if ($scope eq 'all') { |
Line 2614 sub display_loncaparev_constraints {
|
Line 2645 sub display_loncaparev_constraints {
|
} |
} |
} |
} |
$rowspan{$rev} ++; |
$rowspan{$rev} ++; |
} elsif ($key =~ /^\Q$start$middle\E(.+)___\(all\).\w+\.\Q$item\E$/) { |
} elsif ($key =~ /^\Q$start$middle\E(.+)___\((all|rec)\).\w+\.\Q$item\E$/) { |
$level = 'folder'; |
$level = 'folder'; |
$map = $1; |
$map = $1; |
if ($scope eq 'all') { |
if ($scope eq 'all') { |
Line 2769 sub display_loncaparev_constraints {
|
Line 2800 sub display_loncaparev_constraints {
|
|
|
if (defined($navmap)) { |
if (defined($navmap)) { |
my %anonsubms=&Apache::lonnet::dump('nohist_anonsurveys',$cdom,$cnum); |
my %anonsubms=&Apache::lonnet::dump('nohist_anonsurveys',$cdom,$cnum); |
my $rev_anonsurv=$Apache::lonnet::needsrelease{'parameter:type:anonsurvey:'}; |
my $rev_anonsurv=$Apache::lonnet::needsrelease{'parameter:type:anonsurvey::'}; |
my %randtrysubms=&Apache::lonnet::dump('nohist_randomizetry',$cdom,$cnum); |
my %randtrysubms=&Apache::lonnet::dump('nohist_randomizetry',$cdom,$cnum); |
my $rev_randtry=$Apache::lonnet::needsrelease{'parameter:type:randomizetry:'}; |
my $rev_randtry=$Apache::lonnet::needsrelease{'parameter:type:randomizetry::'}; |
my $stdtype=&Apache::lonparmset::standard_parameter_types('type'); |
my $stdtype=&Apache::lonparmset::standard_parameter_types('type'); |
my $stdname=&Apache::lonparmset::standard_parameter_names('type'); |
my $stdname=&Apache::lonparmset::standard_parameter_names('type'); |
my $valanon=&get_param_description($stdtype,'anonsurvey'); |
my $valanon=&get_param_description($stdtype,'anonsurvey'); |
Line 3106 sub get_param_description {
|
Line 3137 sub get_param_description {
|
if (ref($paramstrings) eq 'ARRAY') { |
if (ref($paramstrings) eq 'ARRAY') { |
@possibles = @{$paramstrings}; |
@possibles = @{$paramstrings}; |
} else { |
} else { |
|
if (($stdtype eq 'date_start') || ($stdtype eq 'date_end')) { |
|
if ($name == 0) { |
|
$name = &mt('Never'); |
|
} elsif (($name ne '') && ($name !~ /\D/)) { |
|
$name = &Apache::lonlocal::locallocaltime($name); |
|
} |
|
} |
return $name; |
return $name; |
} |
} |
} |
} |
Line 3584 sub print_discussion {
|
Line 3622 sub print_discussion {
|
&mt('(specific user(s))'), |
&mt('(specific user(s))'), |
input => 'checkbox', |
input => 'checkbox', |
}, |
}, |
|
|
|
'pac.roles.denied' => { |
|
text => '<span class="LC_nobreak"><b>'.&mt($itemtext->{'pac.roles.denied'}).'</b>'. |
|
&Apache::loncommon::help_open_topic("Course_Disable_Anonymous_Discussion").'</span><br />'. |
|
&mt('(role-based)'), |
|
input => 'checkbox', |
|
}, |
|
|
|
'pac.users.denied' => { |
|
text => '<span class="LC_nobreak"><b>'.&mt($itemtext->{'pac.users.denied'}).'</b><br />'. |
|
&mt('(specific user(s))'), |
|
input => 'checkbox', |
|
}, |
|
|
'allow_limited_html_in_feedback' => { |
'allow_limited_html_in_feedback' => { |
text => '<b>'.&mt($itemtext->{'allow_limited_html_in_feedback'}).'</b>', |
text => '<b>'.&mt($itemtext->{'allow_limited_html_in_feedback'}).'</b>', |
input => 'radio', |
input => 'radio', |
Line 3634 sub print_discussion {
|
Line 3686 sub print_discussion {
|
$datatable .= '</td><td align="right">'. |
$datatable .= '</td><td align="right">'. |
&user_table($cdom,$item,undef, |
&user_table($cdom,$item,undef, |
$settings->{$item},\%lt); |
$settings->{$item},\%lt); |
|
} elsif ($item eq 'pac.roles.denied') { |
|
$datatable .= '</td><td align="right">'. |
|
'<table>'.&role_checkboxes($cdom,$cnum,$item,$settings). |
|
'</table>'; |
|
} elsif ($item eq 'pac.users.denied') { |
|
$datatable .= '</td><td align="right">'. |
|
&user_table($cdom,$item,undef, |
|
$settings->{$item},\%lt); |
} elsif ($item eq 'allow_limited_html_in_feedback') { |
} elsif ($item eq 'allow_limited_html_in_feedback') { |
$datatable .= &yesno_radio($item,$settings); |
$datatable .= &yesno_radio($item,$settings); |
} elsif ($item eq 'allow_discussion_post_editing') { |
} elsif ($item eq 'allow_discussion_post_editing') { |