version 1.376.2.1, 2007/10/05 17:56:29
|
version 1.379, 2007/09/03 15:34:12
|
Line 577 sub valout {
|
Line 577 sub valout {
|
&date_sanity_info($value); |
&date_sanity_info($value); |
} else { |
} else { |
$result = $value; |
$result = $value; |
|
$result = &HTML::Entities::encode($result,'"<>&'); |
} |
} |
} |
} |
return $result; |
return $result; |
Line 613 sub plink {
|
Line 614 sub plink {
|
my ($parmname)=((split(/\&/,$marker))[1]=~/\_([^\_]+)$/); |
my ($parmname)=((split(/\&/,$marker))[1]=~/\_([^\_]+)$/); |
my ($hour,$min,$sec,$val)=&preset_defaults($parmname); |
my ($hour,$min,$sec,$val)=&preset_defaults($parmname); |
unless (defined($winvalue)) { $winvalue=$val; } |
unless (defined($winvalue)) { $winvalue=$val; } |
|
my $valout = &valout($value,$type,1); |
|
foreach my $item (\$type, \$dis, \$winvalue, \$marker, \$return, \$call, |
|
\$hour, \$min, \$sec) { |
|
$$item = &HTML::Entities::encode($$item,'"<>&'); |
|
$$item =~ s/\'/\\\'/g; |
|
} |
return '<table width="100%"><tr valign="top" align="right"><td><a name="'.$marker.'" /></td></tr><tr><td align="center">'. |
return '<table width="100%"><tr valign="top" align="right"><td><a name="'.$marker.'" /></td></tr><tr><td align="center">'. |
'<a href="javascript:pjump('."'".$type."','".$dis."','".$winvalue."','" |
'<a href="javascript:pjump('."'".$type."','".$dis."','".$winvalue."','" |
.$marker."','".$return."','".$call."','".$hour."','".$min."','".$sec."'".');">'. |
.$marker."','".$return."','".$call."','".$hour."','".$min."','".$sec."'".');">'. |
&valout($value,$type,1).'</a></td></tr></table>'; |
$valout.'</a></td></tr></table>'; |
} |
} |
|
|
sub page_js { |
sub page_js { |
Line 1594 sub assessparms {
|
Line 1601 sub assessparms {
|
foreach ('tolerance','date_default','date_start','date_end', |
foreach ('tolerance','date_default','date_start','date_end', |
'date_interval','int','float','string') { |
'date_interval','int','float','string') { |
$r->print('<input type="hidden" value="'. |
$r->print('<input type="hidden" value="'. |
$env{'form.recent_'.$_}.'" name="recent_'.$_.'" />'); |
&HTML::Entities::encode($env{'form.recent_'.$_},'"&<>'). |
|
'" name="recent_'.$_.'" />'); |
} |
} |
|
|
if (!$pssymb) { |
if (!$pssymb) { |
Line 2211 Use * to allow unrestricted cloning in a
|
Line 2219 Use * to allow unrestricted cloning in a
|
'pageseparators' => '<b>'.&mt('Visibly Separate Items on Pages').'</b><br />'. |
'pageseparators' => '<b>'.&mt('Visibly Separate Items on Pages').'</b><br />'. |
'('.&mt('"[_1]" for visible separation','<tt>yes</tt>').', '. |
'('.&mt('"[_1]" for visible separation','<tt>yes</tt>').', '. |
&mt('changes will not show until next login').')', |
&mt('changes will not show until next login').')', |
'student_classlist_view' => '<b>'.&mt('Allow students to view classlist.').'</b>'.&mt('("all":students can view all sections,"section":students can only view their own section.blank or "disabled" prevents student view.'), |
'student_classlist_view' => '<b>'.&mt('Allow students to view classlist.').'</b><br />'.&mt('("all":students can view all sections,"section":students can only view their own section.blank or "disabled" prevents student view.)'), |
'student_classlist_portfiles' => '<b>'.&mt('Include link to accessible portfolio files').'</b><br />'.&mt('"[_1]" for link to each a listing of each student\'s files.','<tt>yes</tt>'), |
'student_classlist_portfiles' => '<b>'.&mt('Include link to accessible portfolio files').'</b><br />'.&mt('"[_1]" for link to each a listing of each student\'s files.','<tt>yes</tt>'), |
'student_classlist_opt_in' => '<b>'.&mt("Student's agreement needed for listing in student-viewable roster").'</b><br />'.&mt('"[_1]" to require students to opt-in to listing in the roster (on the roster page).','<tt>yes</tt>'), |
'student_classlist_opt_in' => '<b>'.&mt("Student's agreement needed for listing in student-viewable roster").'</b><br />'.&mt('"[_1]" to require students to opt-in to listing in the roster (on the roster page).','<tt>yes</tt>'), |
'plc.roles.denied'=> '<b>'.&mt('Disallow live chatroom use for Roles'). |
'plc.roles.denied'=> '<b>'.&mt('Disallow live chatroom use for Roles'). |
'</b><br />"<tt>st</tt>": '. |
'</b><br />("<tt>st</tt>": '. |
&mt('student').', "<tt>ta</tt>": '. |
&mt('student').', "<tt>ta</tt>": '. |
'TA, "<tt>in</tt>": '. |
'TA, "<tt>in</tt>": '. |
&mt('instructor').';<br /><tt>'.&mt('role,role,...').'</tt>) '. |
&mt('instructor').';<br /><tt>'.&mt('role,role,...').'</tt>) '. |
Line 2225 Use * to allow unrestricted cloning in a
|
Line 2233 Use * to allow unrestricted cloning in a
|
'(<tt>user:domain,user:domain,...</tt>)', |
'(<tt>user:domain,user:domain,...</tt>)', |
|
|
'pch.roles.denied'=> '<b>'.&mt('Disallow Resource Discussion for Roles'). |
'pch.roles.denied'=> '<b>'.&mt('Disallow Resource Discussion for Roles'). |
'</b><br />"<tt>st</tt>": '. |
'</b><br />("<tt>st</tt>": '. |
'student, "<tt>ta</tt>": '. |
'student, "<tt>ta</tt>": '. |
'TA, "<tt>in</tt>": '. |
'TA, "<tt>in</tt>": '. |
'instructor;<br /><tt>role,role,...</tt>) '. |
'instructor;<br /><tt>role,role,...</tt>) '. |
Line 3074 where $action is add or drop, and $clone
|
Line 3082 where $action is add or drop, and $clone
|
user for whom cloning ability is to be changed in course. |
user for whom cloning ability is to be changed in course. |
|
|
=cut |
=cut |
|
|
################################################## |
################################################## |
################################################## |
################################################## |
|
|
sub extract_cloners { |
sub extract_cloners { |
my ($clonelist,$allowclone) = @_; |
my ($clonelist,$allowclone) = @_; |
if ($clonelist =~ /,/) { |
if ($clonelist =~ /,/) { |
@{$allowclone} = split(/,/,$clonelist); |
@{$allowclone} = split/,/,$clonelist; |
} else { |
} else { |
$$allowclone[0] = $clonelist; |
$$allowclone[0] = $clonelist; |
} |
} |
Line 3093 sub check_cloners {
|
Line 3101 sub check_cloners {
|
my @allowclone = (); |
my @allowclone = (); |
&extract_cloners($$clonelist,\@allowclone); |
&extract_cloners($$clonelist,\@allowclone); |
foreach my $currclone (@allowclone) { |
foreach my $currclone (@allowclone) { |
if (!grep(/^\Q$currclone\E$/,@$oldcloner)) { |
if (!grep/^\Q$currclone\E$/,@$oldcloner) { |
if ($currclone eq '*') { |
if ($currclone eq '*') { |
$clean_clonelist .= $currclone.','; |
$clean_clonelist .= $currclone.','; |
} else { |
} else { |
my ($uname,$udom) = split(/:/,$currclone); |
my ($uname,$udom) = split(/:/,$currclone); |
if ($uname eq '*') { |
if ($uname eq '*') { |
if ($udom =~ /^$match_domain$/) { |
if ($udom =~ /^$match_domain$/) { |
if (!&Apache::lonnet::domain($udom)) { |
my @alldoms = &Apache::lonnet::all_domains(); |
|
if (!grep(/^\Q$udom\E$/,@alldoms)) { |
$disallowed{'domain'} .= $currclone.','; |
$disallowed{'domain'} .= $currclone.','; |
} else { |
} else { |
$clean_clonelist .= $currclone.','; |
$clean_clonelist .= $currclone.','; |
Line 3143 sub change_clone {
|
Line 3152 sub change_clone {
|
my @allowclone; |
my @allowclone; |
&extract_cloners($clonelist,\@allowclone); |
&extract_cloners($clonelist,\@allowclone); |
foreach my $currclone (@allowclone) { |
foreach my $currclone (@allowclone) { |
if (!grep(/^$currclone$/,@$oldcloner)) { |
if (!grep/^$currclone$/,@$oldcloner) { |
if ($currclone ne '*') { |
if ($currclone ne '*') { |
($uname,$udom) = split(/:/,$currclone); |
($uname,$udom) = split/:/,$currclone; |
if ($uname && $udom && $uname ne '*') { |
if ($uname && $udom && $uname ne '*') { |
if (&Apache::lonnet::homeserver($uname,$udom) ne 'no_host') { |
if (&Apache::lonnet::homeserver($uname,$udom) ne 'no_host') { |
my %currclonecrs = &Apache::lonnet::dump('environment',$udom,$uname,'cloneable'); |
my %currclonecrs = &Apache::lonnet::dump('environment',$udom,$uname,'cloneable'); |
Line 3163 sub change_clone {
|
Line 3172 sub change_clone {
|
} |
} |
} |
} |
foreach my $oldclone (@$oldcloner) { |
foreach my $oldclone (@$oldcloner) { |
if (!grep(/^\Q$oldclone\E$/,@allowclone)) { |
if (!grep/^$oldclone$/,@allowclone) { |
if ($oldclone ne '*') { |
if ($oldclone ne '*') { |
($uname,$udom) = split(/:/,$oldclone); |
($uname,$udom) = split/:/,$oldclone; |
if ($uname && $udom && $uname ne '*' ) { |
if ($uname && $udom && $uname ne '*' ) { |
if (&Apache::lonnet::homeserver($uname,$udom) ne 'no_host') { |
if (&Apache::lonnet::homeserver($uname,$udom) ne 'no_host') { |
my %currclonecrs = &Apache::lonnet::dump('environment',$udom,$uname,'cloneable'); |
my %currclonecrs = &Apache::lonnet::dump('environment',$udom,$uname,'cloneable'); |