version 1.255.2.7, 2009/03/18 02:50:49
|
version 1.273.4.4, 2010/01/24 23:20:16
|
Line 110 sub list_discussion {
|
Line 110 sub list_discussion {
|
return $blocktext; |
return $blocktext; |
} |
} |
|
|
my @bgcols = ("#cccccc","#eeeeee"); |
my @bgcols = ("LC_disc_old_item","LC_disc_new_item"); |
my $discussiononly=0; |
my $discussiononly=0; |
if ($mode eq 'board') { $discussiononly=1; } |
if ($mode eq 'board') { $discussiononly=1; } |
unless ($env{'request.course.id'}) { return ''; } |
unless ($env{'request.course.id'}) { return ''; } |
Line 169 sub list_discussion {
|
Line 169 sub list_discussion {
|
|
|
my $cdom = $env{'course.'.$cid.'.domain'}; |
my $cdom = $env{'course.'.$cid.'.domain'}; |
my $cnum = $env{'course.'.$cid.'.num'}; |
my $cnum = $env{'course.'.$cid.'.num'}; |
|
my $crstype = &Apache::loncommon::course_type(); |
|
|
|
|
# Get information about students and non-students in course for filtering display of posts |
# Get information about students and non-students in course for filtering display of posts |
my %roleshash = (); |
my %roleshash = (); |
Line 434 imscp_v1p1.xsd http://www.imsglobal.org/
|
Line 436 imscp_v1p1.xsd http://www.imsglobal.org/
|
} |
} |
</script> |
</script> |
|; |
|; |
$discussion.='<form name="readchoices" method="post" action="/adm/feedback?chgreads='.$ressymb.'" ><table bgcolor="#AAAAAA" cellpadding="2" cellspacing="2" border="0">'; |
$discussion.='<form name="readchoices" method="post" action="/adm/feedback?chgreads='.$ressymb.'" >'. |
|
"\n".'<table class="LC_discussion">'; |
$discussion .= &action_links_bar($colspan,$ressymb,$visible, |
$discussion .= &action_links_bar($colspan,$ressymb,$visible, |
$newpostsflag,$group, |
$newpostsflag,$group, |
$prevread,$markondisp); |
$prevread,$markondisp); |
Line 547 imscp_v1p1.xsd http://www.imsglobal.org/
|
Line 550 imscp_v1p1.xsd http://www.imsglobal.org/
|
} |
} |
$copyresult.=&replicate_attachments($imsitems{$alldiscussion{$post}}{'allattachments'},$tempexport); |
$copyresult.=&replicate_attachments($imsitems{$alldiscussion{$post}}{'allattachments'},$tempexport); |
} else { |
} else { |
$discussion.='<td bgcolor="'.$bgcols[$newitem{$alldiscussion{$post}}]. |
$discussion.='<td class="'.$bgcols[$newitem{$alldiscussion{$post}}]. |
'" colspan="'.$colspan.'">'. $discussionitems[$alldiscussion{$post}]. |
'" colspan="'.$colspan.'">'. $discussionitems[$alldiscussion{$post}]. |
'</td></tr>'; |
'</td></tr>'; |
} |
} |
Line 557 imscp_v1p1.xsd http://www.imsglobal.org/
|
Line 560 imscp_v1p1.xsd http://www.imsglobal.org/
|
my $colspan=$maxdepth+1; |
my $colspan=$maxdepth+1; |
$discussion .= <<END; |
$discussion .= <<END; |
<tr bgcolor="#FFFFFF"> |
<tr bgcolor="#FFFFFF"> |
<td colspan="$colspan" valign="top"> |
<td colspan="$colspan" class="LC_disc_action_links_bar"> |
<table border="0" bgcolor="#FFFFFF" width="100%" cellspacing="2" cellpadding="2"> |
<table class="LC_disc_action_table"> |
<tr> |
<tr> |
<td align="left"> |
<td align="left"> |
<table border="0" cellpadding="0" cellspacing="4"> |
<table border="0" cellpadding="0" cellspacing="4"> |
Line 596 END
|
Line 599 END
|
my %sort_types = (); |
my %sort_types = (); |
my %role_types = (); |
my %role_types = (); |
my %status_types = (); |
my %status_types = (); |
&sort_filter_names(\%sort_types,\%role_types,\%status_types); |
&sort_filter_names(\%sort_types,\%role_types,\%status_types,$crstype); |
|
|
$discussion .= '<td><font size="-1"><b>'.&mt('Sorted by').'</b>: '.$sort_types{$sortposts}.'<br />'; |
$discussion .= '<td><font size="-1"><b>'.&mt('Sorted by').'</b>: '.$sort_types{$sortposts}.'<br />'; |
if (defined($env{'form.totposters'})) { |
if (defined($env{'form.totposters'})) { |
Line 639 END
|
Line 642 END
|
if ($dischash{$toggkey}) { |
if ($dischash{$toggkey}) { |
my $storebutton = &mt('Save read/unread changes'); |
my $storebutton = &mt('Save read/unread changes'); |
$discussion.='<td align="right">'. |
$discussion.='<td align="right">'. |
'<input type="hidden" name="discsymb" value="'.$ressymb.'">'."\n". |
'<input type="hidden" name="discsymb" value="'.$ressymb.'" />'."\n". |
'<input type="button" name="readoptions" value="'.$storebutton.'"'. |
'<input type="button" name="readoptions" value="'.$storebutton.'"'. |
' onClick="this.form.submit();">'."\n". |
' onClick="this.form.submit();" />'."\n". |
'</td>'; |
'</td>'; |
} |
} |
$discussion .= (<<END); |
$discussion .= (<<END); |
Line 722 END
|
Line 725 END
|
&postingform_display($mode,$ressymb,$now,$subject, |
&postingform_display($mode,$ressymb,$now,$subject, |
$comment,$outputtarget,$attachnum, |
$comment,$outputtarget,$attachnum, |
$currnewattach,$currdelold, |
$currnewattach,$currdelold, |
$group); |
$group,$crstype); |
} |
} |
} else { |
} else { |
$discussion.= |
$discussion.= |
&postingform_display($mode,$ressymb,$now,$subject, |
&postingform_display($mode,$ressymb,$now,$subject, |
$comment,$outputtarget,$attachnum, |
$comment,$outputtarget,$attachnum, |
$currnewattach,$currdelold); |
$currnewattach,$currdelold,'',$crstype); |
} |
} |
} |
} |
} else { |
} else { |
Line 765 sub send_message_link {
|
Line 768 sub send_message_link {
|
my $output = '<span class="LC_message_link">'. |
my $output = '<span class="LC_message_link">'. |
' <a href="/adm/feedback?sendmessageonly=1&symb='. |
' <a href="/adm/feedback?sendmessageonly=1&symb='. |
&escape($ressymb).'"><img alt="" src="'. |
&escape($ressymb).'"><img alt="" src="'. |
&Apache::loncommon::lonhttpdurl('/adm/lonMisc/feedback.gif'). |
&Apache::loncommon::lonhttpdurl('/res/adm/pages/com.png'). |
'" border="0" />'.&mt('Send Message').'</a></span>'; |
'" border="0" />'.&mt('Send Feedback').'</a></span>'; |
return $output; |
return $output; |
} |
} |
|
|
sub action_links_bar { |
sub action_links_bar { |
my ($colspan,$ressymb,$visible,$newpostsflag,$group,$prevread,$markondisp) = @_; |
my ($colspan,$ressymb,$visible,$newpostsflag,$group,$prevread,$markondisp) = @_; |
my $discussion = '<tr><td bgcolor="#DDDDBB" colspan="'.$colspan.'">'. |
my $discussion = '<tr><td class="LC_disc_action_links_bar" colspan="'.$colspan.'">'. |
'<table border="0" width="100%" bgcolor="#DDDDBB"><tr>'; |
'<table width="100%" class="LC_disc_action_table"><tr>'. |
|
'<td class="LC_disc_action_left">'; |
my $escsymb=&escape($ressymb); |
my $escsymb=&escape($ressymb); |
if ($visible>2) { |
if ($visible>2) { |
$discussion .= '<td align="left">'. |
$discussion .= '<a href="/adm/feedback?cmd=threadedon&symb='.$escsymb; |
'<a href="/adm/feedback?cmd=threadedon&symb='.$escsymb; |
|
if ($newpostsflag) { |
if ($newpostsflag) { |
$discussion .= '&previous='.$prevread; |
$discussion .= '&previous='.$prevread; |
} |
} |
Line 789 sub action_links_bar {
|
Line 792 sub action_links_bar {
|
} |
} |
$discussion .= &group_args($group); |
$discussion .= &group_args($group); |
$discussion .='">'.&mt('Chronological View').'</a> |
$discussion .='">'.&mt('Chronological View').'</a> |
<a href= "/adm/feedback?cmd=sortfilter&symb='.$escsymb; |
<a href="/adm/feedback?cmd=sortfilter&symb='.$escsymb; |
if ($newpostsflag) { |
if ($newpostsflag) { |
$discussion .= '&previous='.$prevread; |
$discussion .= '&previous='.$prevread; |
} |
} |
$discussion .= &group_args($group); |
$discussion .= &group_args($group); |
$discussion .='">'.&mt('Sorting/Filtering options').'</a>'.(' ' x2); |
$discussion .='">'.&mt('Sorting/Filtering options').'</a>'.(' ' x2); |
} else { |
|
$discussion .= '<td align="left">'; |
|
} |
} |
$discussion .='<a href= "/adm/feedback?export='.$escsymb; |
$discussion .='<a href="/adm/feedback?export='.$escsymb; |
if ($newpostsflag) { |
if ($newpostsflag) { |
$discussion .= '&previous='.$prevread; |
$discussion .= '&previous='.$prevread; |
} |
} |
Line 806 sub action_links_bar {
|
Line 807 sub action_links_bar {
|
$discussion .= '">'.&mt('Export').'?</a> </td>'; |
$discussion .= '">'.&mt('Export').'?</a> </td>'; |
if ($newpostsflag) { |
if ($newpostsflag) { |
if (!$markondisp) { |
if (!$markondisp) { |
$discussion .='<td align="right"><a href="/adm/preferences?action=changediscussions'; |
$discussion .='<td class="LC_disc_action_right"><a href="/adm/preferences?action=changediscussions'; |
$discussion .= &group_args($group); |
$discussion .= &group_args($group); |
$discussion .= '">'. |
$discussion .= '">'. |
&mt('Preferences on what is marked as NEW'). |
&mt('Preferences on what is marked as NEW'). |
Line 825 sub action_links_bar {
|
Line 826 sub action_links_bar {
|
|
|
sub postingform_display { |
sub postingform_display { |
my ($mode,$ressymb,$now,$subject,$comment,$outputtarget,$attachnum, |
my ($mode,$ressymb,$now,$subject,$comment,$outputtarget,$attachnum, |
$currnewattach,$currdelold,$group) = @_; |
$currnewattach,$currdelold,$group,$crstype) = @_; |
my $newattachmsg; |
my $newattachmsg; |
my %lt = &Apache::lonlocal::texthash( |
my %lt = &Apache::lonlocal::texthash( |
'note' => 'Note: in anonymous discussion, your name is visible only to course faculty', |
'note' => 'Note: in anonymous discussion, your name is visible only to course faculty', |
Line 834 sub postingform_display {
|
Line 835 sub postingform_display {
|
'poan' => 'Post Anonymous Discussion', |
'poan' => 'Post Anonymous Discussion', |
'newa' => 'New attachments', |
'newa' => 'New attachments', |
); |
); |
|
if ($crstype eq 'Community') { |
|
$lt{'note'} = &mt('Note: in anonymous discussion, your name is visible only to community facilitators'); |
|
} |
my $postingform = (<<ENDDISCUSS); |
my $postingform = (<<ENDDISCUSS); |
<form action="/adm/feedback" method="post" name="mailform" enctype="multipart/form-data"> <input type="submit" name="discuss" value="$lt{'podi'}" /> |
<form action="/adm/feedback" method="post" name="mailform" enctype="multipart/form-data"> <input type="submit" name="discuss" value="$lt{'podi'}" /> |
<input type="submit" name="anondiscuss" value="$lt{'poan'}" /> <input type="hidden" name="symb" value="$ressymb" /> |
<input type="submit" name="anondiscuss" value="$lt{'poan'}" /> <input type="hidden" name="symb" value="$ressymb" /> |
Line 861 ENDDISCUSS
|
Line 865 ENDDISCUSS
|
} |
} |
my $blockblog = &Apache::loncommon::blocking_status('blogs'); |
my $blockblog = &Apache::loncommon::blocking_status('blogs'); |
if (!$blockblog) { |
if (!$blockblog) { |
$postingform .= &add_blog_checkbox(); |
$postingform .= &add_blog_checkbox($crstype); |
} |
} |
$postingform .= "</form>\n"; |
$postingform .= "</form>\n"; |
if ($outputtarget ne 'tex') { |
if ($outputtarget ne 'tex') { |
Line 1247 sub build_posting_display {
|
Line 1251 sub build_posting_display {
|
<p><table border="0" width="100%"> |
<p><table border="0" width="100%"> |
<tr><td align="left"> </td>'; |
<tr><td align="left"> </td>'; |
} |
} |
$$discussionitems[$idx] .= '<td align ="left"> '. |
$$discussionitems[$idx] .= '<td align="left"> '. |
'<b>'.$subject.'</b> '. |
'<b>'.$subject.'</b> '. |
$sender.'</b> '.$vgrlink.' ('. |
$sender.'</b> '.$vgrlink.' ('. |
&Apache::lonlocal::locallocaltime($posttime).')</td>'; |
&Apache::lonlocal::locallocaltime($posttime).')</td>'; |
Line 1478 sub mail_screen {
|
Line 1482 sub mail_screen {
|
} |
} |
|
|
my %lt = &Apache::lonlocal::texthash( |
my %lt = &Apache::lonlocal::texthash( |
'plch' => 'Please check at least one of the following feedback types:', |
|
'myqu' => 'My question/comment/feedback:', |
'myqu' => 'My question/comment/feedback:', |
'title' => 'Title', |
'title' => 'Title', |
'reta' => 'Retained attachments', |
'reta' => 'Retained attachments', |
Line 1684 END
|
Line 1687 END
|
END |
END |
} elsif ($env{'form.editdisc'}) { |
} elsif ($env{'form.editdisc'}) { |
$r->print(<<END); |
$r->print(<<END); |
<input type="hidden" name="editdisc" value ="$env{'form.editdisc'}" /> |
<input type="hidden" name="editdisc" value="$env{'form.editdisc'}" /> |
<input type="hidden" name="parentmsg" value ="$parentmsg" /> |
<input type="hidden" name="parentmsg" value="$parentmsg" /> |
END |
END |
} |
} |
$r->print(<<END); |
$r->print(<<END); |
$lt{'plch'} |
|
$options<hr /> |
$options<hr /> |
$quote |
$quote |
<p>$lt{'myqu'}</p> |
<p>$lt{'myqu'}</p> |
<p> |
<p> |
$latexHelp |
$latexHelp |
|
</p> |
|
<p> |
$lt{'title'}: <input type="text" name="subject" size="30" value="$subject" /></p> |
$lt{'title'}: <input type="text" name="subject" size="30" value="$subject" /></p> |
<p> |
<p> |
<textarea name="comment" id="comment" cols="60" rows="10" wrap="hard">$comment |
<textarea name="comment" id="comment" cols="60" rows="10" wrap="hard">$comment |
Line 1925 END
|
Line 1929 END
|
&Apache::loncommon::end_page(); |
&Apache::loncommon::end_page(); |
$r->print(<<END); |
$r->print(<<END); |
$start_page |
$start_page |
<form name="modifydisp" method="POST" action="/adm/feedback"> |
<form name="modifydisp" method="post" action="/adm/feedback"> |
$lt{'sdpf'}<br/> $lt{'prca'} <ol><li>$lt{'whpo'}</li><li>$lt{'unwh'}</li><li>$lt{'wipa'}</li></ol> |
$lt{'sdpf'}<br/> $lt{'prca'} <ol><li>$lt{'whpo'}</li><li>$lt{'unwh'}</li><li>$lt{'wipa'}</li></ol> |
<br /> |
<br /> |
END |
END |
Line 1968 END
|
Line 1972 END
|
<br /> |
<br /> |
<input type="hidden" name="symb" value="$symb" /> |
<input type="hidden" name="symb" value="$symb" /> |
<input type="hidden" name="previous" value="$previous" /> |
<input type="hidden" name="previous" value="$previous" /> |
<input type="hidden" name="$dispchgA" value=""/> |
<input type="hidden" name="$dispchgA" value="" /> |
<input type="hidden" name="$dispchgB" value=""/> |
<input type="hidden" name="$dispchgB" value="" /> |
<input type="hidden" name="$markchg" value=""/> |
<input type="hidden" name="$markchg" value="" /> |
<input type="hidden" name="$toggchg" value="" /> |
<input type="hidden" name="$toggchg" value="" /> |
<input type="button" name="sub" value="$save" onClick="javascript:setDisp()" /> |
<input type="button" name="sub" value="$save" onClick="javascript:setDisp()" /> |
END |
END |
Line 2003 sub print_sortfilter_options {
|
Line 2007 sub print_sortfilter_options {
|
my $group_sel = ''; |
my $group_sel = ''; |
my $numgroupvis = 5; |
my $numgroupvis = 5; |
my %sectioncount = &Apache::loncommon::get_sections(); |
my %sectioncount = &Apache::loncommon::get_sections(); |
|
my @courseroles = qw(st ad ep ta in); |
|
my $crstype = &Apache::loncommon::course_type(); |
|
my $ccrole = 'cc'; |
|
if ($crstype eq 'Community') { |
|
$ccrole = 'co'; |
|
} |
|
push(@courseroles,$ccrole); |
|
|
if ($env{'request.course.sec'} !~ /^\s*$/) { #Restrict section choice to current section |
if ($env{'request.course.sec'} !~ /^\s*$/) { #Restrict section choice to current section |
@sections = ('all',$env{'request.course.sec'}); |
@sections = ('all',$env{'request.course.sec'}); |
Line 2066 sub print_sortfilter_options {
|
Line 2077 sub print_sortfilter_options {
|
my %sort_types = (); |
my %sort_types = (); |
my %role_types = (); |
my %role_types = (); |
my %status_types = (); |
my %status_types = (); |
&sort_filter_names(\%sort_types,\%role_types,\%status_types); |
&sort_filter_names(\%sort_types,\%role_types,\%status_types,$crstype); |
|
|
my $js = <<END; |
my $js = <<END; |
<script type="text/javascript"> |
<script type="text/javascript"> |
Line 2113 END
|
Line 2124 END
|
|
|
$r->print(<<END); |
$r->print(<<END); |
$start_page |
$start_page |
<form name="modifyshown" method="POST" action="/adm/feedback"> |
<form name="modifyshown" method="post" action="/adm/feedback"> |
<b>$lt{'diso'}</b><br/> $lt{'prca'} |
<b>$lt{'diso'}</b><br/> $lt{'prca'} |
<br /><br /> |
<br /><br /> |
<table border="0"> |
<table border="0"> |
Line 2155 $start_page
|
Line 2166 $start_page
|
<select name="rolefilter" multiple="multiple" size="5"> |
<select name="rolefilter" multiple="multiple" size="5"> |
<option value="all">$role_types{'all'}</option> |
<option value="all">$role_types{'all'}</option> |
<option value="st">$role_types{'st'}</option> |
<option value="st">$role_types{'st'}</option> |
<option value="cc">$role_types{'cc'}</option> |
<option value="$ccrole">$role_types{$ccrole}</option> |
<option value="in">$role_types{'in'}</option> |
<option value="in">$role_types{'in'}</option> |
<option value="ta">$role_types{'ta'}</option> |
<option value="ta">$role_types{'ta'}</option> |
<option value="ep">$role_types{'ep'}</option> |
<option value="ep">$role_types{'ep'}</option> |
|
<option value="ad">$role_types{'ad'}</option> |
<option value="cr">$role_types{'cr'}</option> |
<option value="cr">$role_types{'cr'}</option> |
</select> |
</select> |
</td> |
</td> |
Line 2475 sub redirect_back {
|
Line 2487 sub redirect_back {
|
} |
} |
my $grouptag; |
my $grouptag; |
if ($group ne '') { |
if ($group ne '') { |
$grouptag = '<input type="hidden" name="group" value="'.$group.'" />'; my $refarg; |
$grouptag = '<input type="hidden" name="group" value="'.$group.'" />'; |
|
my $refarg; |
if (exists($env{'form.ref'})) { |
if (exists($env{'form.ref'})) { |
$refarg = '&ref='.$env{'form.ref'}; |
$refarg = '&ref='.$env{'form.ref'}; |
$grouptag .= '<input type="hidden" name="ref" value="'.$env{'form.ref'}.'" />'; |
$grouptag .= '<input type="hidden" name="ref" value="'.$env{'form.ref'}.'" />'; |
Line 2557 ENDNOREDIRTWO
|
Line 2570 ENDNOREDIRTWO
|
|
|
sub screen_header { |
sub screen_header { |
my ($feedurl,$symb) = @_; |
my ($feedurl,$symb) = @_; |
|
my $crscontent = &mt('Question/Comment/Feedback about course content'); |
|
my $crspolicy = &mt('Question/Comment/Feedback about course policy'); |
|
my $contribdisc = &mt('Contribution to course discussion of resource'); |
|
my $anoncontrib = &mt('Anonymous contribution to course discussion of resource'); |
|
my $namevis = &mt('name only visible to course faculty'); |
|
my $crstype; |
|
if ($env{'request.course.id'}) { |
|
$crstype = &Apache::loncommon::course_type(); |
|
if ($crstype eq 'Community') { |
|
$crscontent = &mt('Question/Comment/Feedback about community content'); |
|
$crspolicy = &mt('Question/Comment/Feedback about community policy'); |
|
$contribdisc = &mt('Contribution to community discussion of resource'); |
|
$anoncontrib = &mt('Anonymous contribution to community discussion of resource'); |
|
$namevis = &mt('name only visible to community facilitators'); |
|
} |
|
} |
my $msgoptions=''; |
my $msgoptions=''; |
my $discussoptions=''; |
my $discussoptions=''; |
unless (($env{'form.replydisc'}) || ($env{'form.editdisc'})) { |
unless (($env{'form.replydisc'}) || ($env{'form.editdisc'})) { |
Line 2577 sub screen_header {
|
Line 2606 sub screen_header {
|
if (&feedback_available(0,1)) { |
if (&feedback_available(0,1)) { |
$msgoptions.= |
$msgoptions.= |
'<p><label><input type="radio" name="discuss" value="course" /> '. |
'<p><label><input type="radio" name="discuss" value="course" /> '. |
($optionhash{'comment'}?$optionhash{'comment'}:&mt('Question/Comment/Feedback about course content')). |
($optionhash{'comment'}?$optionhash{'comment'}:$crscontent). |
'</label></p>'; |
'</label></p>'; |
} |
} |
if (&feedback_available(0,0,1)) { |
if (&feedback_available(0,0,1)) { |
$msgoptions.= |
$msgoptions.= |
'<p><label><input type="radio" name="discuss" value="policy" /> '. |
'<p><label><input type="radio" name="discuss" value="policy" /> '. |
($optionhash{'policy'}?$optionhash{'policy'}:&mt('Question/Comment/Feedback about course policy')). |
($optionhash{'policy'}?$optionhash{'policy'}:$crspolicy). |
'</label></p>'; |
'</label></p>'; |
} |
} |
} |
} |
Line 2594 sub screen_header {
|
Line 2623 sub screen_header {
|
$env{'request.course.id'}. |
$env{'request.course.id'}. |
($env{'request.course.sec'}?'/'.$env{'request.course.sec'}:''))) { |
($env{'request.course.sec'}?'/'.$env{'request.course.sec'}:''))) { |
$discussoptions='<label><input type="radio" name="discuss" value="nonanon" checked="checked" /> '. |
$discussoptions='<label><input type="radio" name="discuss" value="nonanon" checked="checked" /> '. |
&mt('Contribution to course discussion of resource'); |
$contribdisc. |
$discussoptions.='</label><br /><label><input type="radio" name="discuss" value="anon" /> '. |
'</label><br /><label><input type="radio" name="discuss" value="anon" /> '. |
&mt('Anonymous contribution to course discussion of resource'). |
$anoncontrib. |
' <i>('.&mt('name only visible to course faculty').')</i></label> '. |
' <i>('.$namevis.')</i></label> '. |
|
|
'<a href="/adm/preferences?action=changescreenname">'.&mt('Change Screenname').'</a>'; |
'<a href="/adm/preferences?action=changescreenname">'.&mt('Change Screenname').'</a>'; |
my $blockblog = &Apache::loncommon::blocking_status('blogs'); |
my $blockblog = &Apache::loncommon::blocking_status('blogs'); |
if (!$blockblog) { |
if (!$blockblog) { |
$discussoptions.= &add_blog_checkbox(); |
$discussoptions.= &add_blog_checkbox($crstype); |
} |
} |
} |
} |
} |
} |
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('/res/adm/pages/com.png').'" />' |
|
.' '.&mt('Send Feedback').'</h2><p>'.&Apache::lonhtmlcommon::coursepreflink(&mt('Feedback Settings'),'feedback').'</p>' |
|
.$msgoptions; |
|
} |
if ($discussoptions) { |
if ($discussoptions) { |
$discussoptions='<h2><img src="'.&Apache::loncommon::lonhttpdurl('/adm/lonMisc/chat.gif').'" />'.&mt('Discussion Contributions').'</h2>'.$discussoptions; } |
$discussoptions='<h2><img src="'.&Apache::loncommon::lonhttpdurl('/adm/lonMisc/chat.gif').'" />' |
|
.' '.&mt('Discussion Contributions').'</h2><p>'.&Apache::lonhtmlcommon::coursepreflink(&mt('Discussion Settings'),'discussion').'</p>' |
|
.$discussoptions; |
|
} |
return $msgoptions.$discussoptions; |
return $msgoptions.$discussoptions; |
} |
} |
|
|
Line 2903 sub show_preview {
|
Line 2940 sub show_preview {
|
); |
); |
} |
} |
|
|
|
sub contains_block_html { |
|
my ($message)=@_; |
|
return ($message =~ m{ |
|
<(br|h1|h2|h3|h4|h5|h6|p|ol|ul|table|pre|address|blockquote|center|div) |
|
\s* |
|
(\w+\=['"]\w+['"])* |
|
\s* |
|
( |
|
\s*/>| |
|
>.*</\1\s*> |
|
)}xs |
|
); |
|
} |
|
|
sub newline_to_br { |
sub newline_to_br { |
my ($message)=@_; |
my ($message)=@_; |
Line 2933 sub generate_preview_button {
|
Line 2983 sub generate_preview_button {
|
return(<<ENDPREVIEW); |
return(<<ENDPREVIEW); |
<br /> |
<br /> |
<form name="preview" action="/adm/feedback?preview=1" method="post" target="preview"> |
<form name="preview" action="/adm/feedback?preview=1" method="post" target="preview"> |
<input type="hidden" name="subject"> |
<input type="hidden" name="subject" /> |
<input type="hidden" name="comment" /> |
<input type="hidden" name="comment" /> |
<input type="button" value="$pre" |
<input type="button" value="$pre" |
onClick="if (typeof(document.$formname.onsubmit)=='function') {document.$formname.onsubmit();};this.form.comment.value=document.$formname.$fieldname.value;this.form.subject.value=document.$formname.subject.value;this.form.submit();" /> |
onClick="if (typeof(document.$formname.onsubmit)=='function') {document.$formname.onsubmit();};this.form.comment.value=document.$formname.$fieldname.value;this.form.subject.value=document.$formname.subject.value;this.form.submit();" /> |
Line 3042 END
|
Line 3092 END
|
$r->print('<input type="hidden" name="deloldattach" value="'.$item.'" />'."\n"); |
$r->print('<input type="hidden" name="deloldattach" value="'.$item.'" />'."\n"); |
} |
} |
$r->print(<<END); |
$r->print(<<END); |
<input type="button" name="rtntoedit" value="$lt{'stch'}" onClick="setAction()"/> |
<input type="button" name="rtntoedit" value="$lt{'stch'}" onClick="setAction()" /> |
</form> |
</form> |
$end_page |
$end_page |
END |
END |
Line 3104 this.form.submit();" />
|
Line 3154 this.form.submit();" />
|
<input type="hidden" name="timestamp" value="$now" /> |
<input type="hidden" name="timestamp" value="$now" /> |
<input type="hidden" name="subject" /> |
<input type="hidden" name="subject" /> |
<input type="hidden" name="comment" /> |
<input type="hidden" name="comment" /> |
<input type="hidden" name="blog" value = "0" /> |
<input type="hidden" name="blog" value="0" /> |
<input type="hidden" name="discuss" value = "0" /> |
<input type="hidden" name="discuss" value="0" /> |
<input type="hidden" name="numoldver" value="$numoldver" /> |
<input type="hidden" name="numoldver" value="$numoldver" /> |
ENDATTACH |
ENDATTACH |
if (defined($deloldattach)) { |
if (defined($deloldattach)) { |
Line 3234 sub construct_attachmenturl {
|
Line 3284 sub construct_attachmenturl {
|
} |
} |
|
|
sub add_blog_checkbox { |
sub add_blog_checkbox { |
my ($checkstatus); |
my ($crstype) = @_; |
|
my $checkstatus; |
if ($env{'form.blog'}) { |
if ($env{'form.blog'}) { |
$checkstatus = 'checked="checked"'; |
$checkstatus = 'checked="checked"'; |
} |
} |
Line 3248 function setblogvalue() {
|
Line 3299 function setblogvalue() {
|
} |
} |
} |
} |
</script><br /> |
</script><br /> |
<label><input type="checkbox" name="blog" '.$checkstatus.' /> '. |
<label><input type="checkbox" name="blog" '.$checkstatus.' /> '; |
&mt('Add to my public course blog').'</label><br />'."\n"; |
if ($crstype eq 'Community') { |
|
$output .= &mt('Add to my public community blog'); |
|
} else { |
|
$output .= &mt('Add to my public course blog'); |
|
} |
|
$output .= '</label><br />'."\n"; |
return $output; |
return $output; |
} |
} |
|
|
Line 3273 sub has_discussion {
|
Line 3329 sub has_discussion {
|
} |
} |
|
|
sub sort_filter_names { |
sub sort_filter_names { |
my ($sort_types,$role_types,$status_types) = @_; |
my ($sort_types,$role_types,$status_types,$crstype) = @_; |
%{$sort_types} = ( |
if (ref($sort_types) eq 'HASH') { |
|
%{$sort_types} = ( |
ascdate => 'Date order - oldest first', |
ascdate => 'Date order - oldest first', |
descdate => 'Date order - newest first', |
descdate => 'Date order - newest first', |
thread => 'Threaded', |
thread => 'Threaded', |
Line 3282 sub sort_filter_names {
|
Line 3339 sub sort_filter_names {
|
username => 'By domain and username', |
username => 'By domain and username', |
lastfirst => 'By last name, first name' |
lastfirst => 'By last name, first name' |
); |
); |
%{$role_types} = ( |
} |
all => 'All roles', |
my @courseroles = qw(st in ta ep ad); |
st => 'Students', |
if ($crstype eq 'Community') { |
cc => 'Course Coordinators', |
push(@courseroles,'co'); |
in => 'Instructors', |
} else { |
ta => 'TAs', |
push(@courseroles,'cc'); |
ep => 'Exam proctors', |
} |
ad => 'Administrators', |
if (ref($role_types) eq 'HASH') { |
cr => 'Custom roles' |
foreach my $role (@courseroles) { |
); |
$role_types->{$role} = &Apache::lonnet::plaintext($role,$crstype); |
%{$status_types} = ( |
} |
all => 'Roles of any status', |
$role_types->{'all'} = 'All roles'; |
Active => 'Only active roles', |
$role_types->{'cr'} = 'Custom role'; |
Expired => 'Only past roles', |
} |
Future => 'Only future roles', |
if (ref($status_types) eq 'HASH') { |
); |
%{$status_types} = ( |
|
all => 'Roles of any status', |
|
Active => 'Only active roles', |
|
Expired => 'Only past roles', |
|
Future => 'Only future roles', |
|
); |
|
} |
} |
} |
|
|
sub handler { |
sub handler { |
my $r = shift; |
my $r = shift; |
if ($r->header_only) { |
if ($r->header_only) { |
Line 3314 sub handler {
|
Line 3377 sub handler {
|
['hide','unhide','deldisc','postdata','preview','replydisc','editdisc','cmd','symb','onlyunread','allposts','onlyunmark','previous','markread','markonread','markondisp','toggoff','toggon','modifydisp','changes','navtime','navmaps','navurl','sortposts','applysort','rolefilter','statusfilter','sectionpick','groupick','posterlist','userpick','attach','origpage','currnewattach','deloldattach','keepold','allversions','export','sendmessageonly','group','ref']); |
['hide','unhide','deldisc','postdata','preview','replydisc','editdisc','cmd','symb','onlyunread','allposts','onlyunmark','previous','markread','markonread','markondisp','toggoff','toggon','modifydisp','changes','navtime','navmaps','navurl','sortposts','applysort','rolefilter','statusfilter','sectionpick','groupick','posterlist','userpick','attach','origpage','currnewattach','deloldattach','keepold','allversions','export','sendmessageonly','group','ref']); |
my $group = $env{'form.group'}; |
my $group = $env{'form.group'}; |
my %attachmax = ( |
my %attachmax = ( |
text => '(128 KB max size)', |
text => &mt('(128 KB max size)'), |
num => 131072, |
num => 131072, |
); |
); |
if ($env{'form.editdisc'}) { |
if ($env{'form.editdisc'}) { |
Line 3825 ENDREDIR
|
Line 3888 ENDREDIR
|
$env{'user.domain'}, |
$env{'user.domain'}, |
'CourseBlog_'.$env{'request.course.id'}, |
'CourseBlog_'.$env{'request.course.id'}, |
$subject,$message,$feedurl,'public'); |
$subject,$message,$feedurl,'public'); |
$blog='<br />'.&mt('Added to my course blog').'<br />'; |
if (&Apache::loncommon::course_type() eq 'Community') { |
|
$blog='<br />'.&mt('Added to my community blog').'<br />'; |
|
} else { |
|
$blog='<br />'.&mt('Added to my course blog').'<br />'; |
|
} |
} |
} |
|
|
# Receipt screen and redirect back to where came from |
# Receipt screen and redirect back to where came from |
Line 3974 sub get_resource_title {
|
Line 4041 sub get_resource_title {
|
|
|
1; |
1; |
__END__ |
__END__ |
|
|
|
|
|
=pod |
|
|
|
=head1 NAME |
|
|
|
Apache::lonfeedback.pm |
|
|
|
=head1 SYNOPSIS |
|
|
|
Handles feedback from students to instructors and system administrators. |
|
|
|
Provides a screenshot of the current resource, as well as previous attempts if the resource was a homework. |
|
|
|
Used by lonmsg.pm. |
|
|
|
This is part of the LearningOnline Network with CAPA project |
|
described at http://www.lon-capa.org. |
|
|
|
=head1 OVERVIEW |
|
|
|
None |
|
|
|
=head1 SUBROUTINES |
|
|
|
=over |
|
|
|
=item discussion_open() |
|
|
|
=item discussion_visible() |
|
|
|
=item list_discussion() |
|
|
|
=item send_feedback_link() |
|
|
|
=item send_message_link() |
|
|
|
=item action_links_bar() |
|
|
|
=item postingform_display() |
|
|
|
=item build_posting_display |
|
|
|
=item filter_regexp() |
|
|
|
=item get_post_contents() |
|
|
|
=item replicate_attachments() |
|
|
|
=item mail_screen() |
|
|
|
=item print_display_options() |
|
|
|
=item print_sortfilter_options() |
|
|
|
=item print_showposters() |
|
|
|
=item get_post_versions() |
|
|
|
=item get_post_attachments() |
|
|
|
=item fail_redirect() |
|
|
|
=item redirect_back() |
|
|
|
=item no_redirect_back() |
|
|
|
=item screen_header() |
|
|
|
=item resource_output() |
|
|
|
=item clear_out_html() |
|
|
|
=item assemble_email() |
|
|
|
=item feedback_available() |
|
|
|
=item send_msg() |
|
|
|
=item adddiscuss() |
|
|
|
=item get_discussion_info() |
|
|
|
=item show_preview() |
|
|
|
=item newline_to_br() |
|
|
|
=item generate_preview_button() |
|
|
|
=item modify_attachments() |
|
|
|
=item process_attachments() |
|
|
|
=item generate_attachments_button() |
|
|
|
=item extract_attachments() |
|
|
|
=item construct_attachmenturl() |
|
|
|
=item add_blog_checkbox() |
|
|
|
=item has_discussion() |
|
|
|
=item sort_filter_names() |
|
|
|
=item handler() |
|
|
|
=item blocked_reply_or_edit() |
|
|
|
=item wrap_symb() |
|
|
|
=item dewrapper() |
|
|
|
=item get_feedurl() |
|
|
|
=item get_feedurl_and_clean_symb() |
|
|
|
=item editing_allowed() |
|
|
|
=item check_group_priv() |
|
|
|
=item group_args() |
|
|
|
=item get_resource_title() |
|
|
|
=back |
|
|
|
=cut |