version 1.182, 2006/03/04 00:59:53
|
version 1.185, 2006/03/15 22:06:08
|
Line 2224 $html
|
Line 2224 $html
|
<meta http-equiv="pragma" content="no-cache" /> |
<meta http-equiv="pragma" content="no-cache" /> |
<meta HTTP-EQUIV="Refresh" CONTENT="2; url=$feedurl" /> |
<meta HTTP-EQUIV="Refresh" CONTENT="2; url=$feedurl" /> |
</head> |
</head> |
<body bgcolor="#FFFFFF" onLoad='if (window.name!="loncapaclient") { this.document.reldt.submit(); self.close(); }'> |
<body bgcolor="#FFFFFF" onLoad='if (window.name!="loncapaclient") { this.document.reldt.submit(); self.window.close(); }'> |
<img align="right" src="$logo" /> |
<img align="right" src="$logo" /> |
$typestyle |
$typestyle |
<b>Sent $sendsomething message(s), and $sendposts post(s).</b> |
<b>Sent $sendsomething message(s), and $sendposts post(s).</b> |
Line 2264 ENDNOREDIR
|
Line 2264 ENDNOREDIR
|
my $logo=&Apache::loncommon::lonhttpdurl('/adm/lonIcons/lonlogos.gif'); |
my $logo=&Apache::loncommon::lonhttpdurl('/adm/lonIcons/lonlogos.gif'); |
$r->print (<<ENDNOREDIRTWO); |
$r->print (<<ENDNOREDIRTWO); |
</head> |
</head> |
<body bgcolor="#FFFFFF" onLoad='if (window.name!="loncapaclient") { self.close(); }'> |
<body bgcolor="#FFFFFF" onLoad='if (window.name!="loncapaclient") { self.window.close(); }'> |
<img align="right" src="$logo" /> |
<img align="right" src="$logo" /> |
<b>$nofeed</b> |
<b>$nofeed</b> |
<br /><a href="$feedurl">$continue</a> |
<br /><a href="$feedurl">$continue</a> |
Line 2314 sub screen_header {
|
Line 2314 sub screen_header {
|
' <i>('.&mt('name only visible to course faculty').')</i></label> '. |
' <i>('.&mt('name only visible to course faculty').')</i></label> '. |
'<a href="/adm/preferences?action=changescreenname">'.&mt('Change Screenname').'</a>'; |
'<a href="/adm/preferences?action=changescreenname">'.&mt('Change Screenname').'</a>'; |
} |
} |
#$discussoptions.='<br /><label><input type="checkbox" name="blog" /> '. |
$discussoptions.='<br /><label><input type="checkbox" name="blog" /> '. |
# &mt('Add to my public course blog').'</label>'; |
&mt('Add to my public course blog').'</label>'; |
} |
} |
if ($msgoptions) { $msgoptions='<h2><img src="'.&Apache::loncommon::lonhttpdurl('/adm/lonMisc/feedback.gif').'" />'.&mt('Sending Messages').'</h2>'.$msgoptions; } |
if ($msgoptions) { $msgoptions='<h2><img src="'.&Apache::loncommon::lonhttpdurl('/adm/lonMisc/feedback.gif').'" />'.&mt('Sending Messages').'</h2>'.$msgoptions; } |
if ($discussoptions) { |
if ($discussoptions) { |
Line 2541 sub adddiscuss {
|
Line 2541 sub adddiscuss {
|
} |
} |
if (($symb) && ($email)) { |
if (($symb) && ($email)) { |
if ($env{'form.editdisc'}) { |
if ($env{'form.editdisc'}) { |
my %newcontrib = (); |
|
$contrib{'ip'}=$ENV{'REMOTE_ADDR'}; |
$contrib{'ip'}=$ENV{'REMOTE_ADDR'}; |
$contrib{'host'}=$Apache::lonnet::perlvar{'lonHostID'}; |
$contrib{'host'}=$Apache::lonnet::perlvar{'lonHostID'}; |
$contrib{'timestamp'} = time; |
$contrib{'timestamp'} = time; |
Line 2584 sub adddiscuss {
|
Line 2583 sub adddiscuss {
|
} |
} |
} |
} |
$contrib{'history'} .= $oldcontrib{$oldidx.':timestamp'}; |
$contrib{'history'} .= $oldcontrib{$oldidx.':timestamp'}; |
foreach (keys %contrib) { |
|
my $key = $oldidx.':'.&Apache::lonnet::escape($oldsymb).':'.$_; |
|
$newcontrib{$key} = $contrib{$_}; |
|
} |
|
my $put_reply = &Apache::lonnet::putstore($env{'request.course.id'}, |
my $put_reply = &Apache::lonnet::putstore($env{'request.course.id'}, |
$oldsymb,$oldidx,\%contrib, |
$oldsymb,$oldidx,\%contrib, |
$env{'course.'.$env{'request.course.id'}.'.domain'}, |
$env{'course.'.$env{'request.course.id'}.'.domain'}, |
Line 3138 $html
|
Line 3133 $html
|
<meta http-equiv="pragma" content="no-cache" /> |
<meta http-equiv="pragma" content="no-cache" /> |
<meta HTTP-EQUIV="Refresh" CONTENT="2; url=$feedurl" /> |
<meta HTTP-EQUIV="Refresh" CONTENT="2; url=$feedurl" /> |
</head> |
</head> |
<body bgcolor="#FFFFFF" onLoad='if (window.name!="loncapaclient") { this.document.reldt.submit(); self.close(); }'> |
<body bgcolor="#FFFFFF" onLoad='if (window.name!="loncapaclient") { this.document.reldt.submit(); self.window.close(); }'> |
<img align="right" src="$logo" /> |
<img align="right" src="$logo" /> |
$textline |
$textline |
<form name="reldt" action="$feedurl" target="loncapaclient"> |
<form name="reldt" action="$feedurl" target="loncapaclient"> |
Line 3498 sub editing_allowed {
|
Line 3493 sub editing_allowed {
|
my $cid = $env{'request.course.id'}; |
my $cid = $env{'request.course.id'}; |
my $role = (split(/\./,$env{'request.role'}))[0]; |
my $role = (split(/\./,$env{'request.role'}))[0]; |
my $section = $env{'request.course.sec'}; |
my $section = $env{'request.course.sec'}; |
my $allow_editing_config = $env{'course.'.$env{'request.course.id'}. |
my $allow_editing_config = |
'.allow_discussion_post_editing'}; |
$env{'course.'.$cid.'.allow_discussion_post_editing'}; |
if ($allow_editing_config =~ m/^\s*yes\s*$/i) { |
if ($allow_editing_config =~ m/^\s*yes\s*$/i) { |
$can_edit = 1; |
$can_edit = 1; |
} else { |
} else { |
my @editor_roles = split(/,/,$allow_editing_config); |
foreach my $editor (split(/,/,$allow_editing_config)) { |
if (@editor_roles > 0) { |
my ($editor_role,$editor_sec) = split(/:/,$editor); |
foreach my $editor (@editor_roles) { |
if ($editor_role eq $role |
my ($editor_role,$editor_sec) = split(/:/,$editor); |
&& defined($editor_sec) |
if ($editor_role eq $role) { |
&& defined($section) |
if (defined($editor_sec)) { |
&& $editor_sec eq $section) { |
if (defined($section)) { |
$can_edit = 1; |
if ($editor_sec eq $section) { |
last; |
$can_edit = 1; |
} |
last; |
if ($editor_role eq $role |
} |
&& !defined($editor_sec)) { |
} |
$can_edit = 1; |
} else { |
} |
$can_edit = 1; |
} |
last; |
|
} |
|
} |
|
} |
|
} |
|
} |
} |
return $can_edit; |
return $can_edit; |
} |
} |