--- loncom/interface/lonfeedback.pm 2010/01/25 03:30:23 1.273.4.5 +++ loncom/interface/lonfeedback.pm 2009/11/04 17:45:49 1.278 @@ -1,7 +1,7 @@ # The LearningOnline Network # Feedback # -# $Id: lonfeedback.pm,v 1.273.4.5 2010/01/25 03:30:23 raeburn Exp $ +# $Id: lonfeedback.pm,v 1.278 2009/11/04 17:45:49 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -91,7 +91,7 @@ sub list_discussion { if (not &discussion_visible($status)) { if ($mode ne 'board') { &Apache::lonenc::check_encrypt(\$ressymb); - return '
'.&send_message_link($ressymb); + return '
"; } } if ($group ne '' && $mode eq 'board') { @@ -103,9 +103,12 @@ sub list_discussion { my ($blocked,$blocktext) = &Apache::loncommon::blocking_status('boards'); if ($blocked) { + $blocktext = '
'; + }else{ + $blocktext.=""; } return $blocktext; } @@ -171,7 +174,6 @@ sub list_discussion { 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 my %roleshash = (); my %roleinfo = (); @@ -567,7 +569,7 @@ imscp_v1p1.xsd http://www.imsglobal.org/ + $lt{'cuse'}:
- $lt{'cuse'}:  END @@ -589,7 +591,7 @@ END   - $lt{'chgt'}? + $lt{'chgt'}?
@@ -757,9 +759,9 @@ sub send_feedback_link { my $output = ''. ' '. - ''.&mt('Post Discussion').''; + '" border="0" />'.&mt('Post Discussion').''; return $output; } @@ -767,9 +769,9 @@ sub send_message_link { my ($ressymb) = @_; my $output = ''. ' '.&mt('Send Feedback').''; + '" border="0" />'.&mt('Send Feedback').''; return $output; } @@ -813,7 +815,7 @@ sub action_links_bar { &mt('Preferences on what is marked as NEW'). '
'.&mt('Mark NEW posts no longer new').''; + $discussion .= '">'.&mt('Mark NEW posts no longer new').''; } else { $discussion .= ' '; } @@ -1014,7 +1016,6 @@ sub build_posting_display { $contrib{$idx.':senderdomain'}).' ('. $contrib{$idx.':sendername'}.':'. $contrib{$idx.':senderdomain'}.')'; - $sender = ''.$sender.''; if ($contrib{$idx.':anonymous'}) { $sender.=' ['.$$anonhash{$key}.'] '. $screenname; @@ -1022,7 +1023,6 @@ sub build_posting_display { if ($see_anonymous) { $sender.=&Apache::loncommon::student_image_tag($contrib{$idx.':senderdomain'},$contrib{$idx.':sendername'}); } - $sender = ''.$sender.''; # Set up for sorting by domain, then username unless (defined($$usernamesort{$contrib{$idx.':senderdomain'}})) { %{$$usernamesort{$contrib{$idx.':senderdomain'}}} = (); @@ -1172,7 +1172,7 @@ sub build_posting_display { $$imsitems{$idx}{'attach'}=$attachtxt{$numoldver}; $$imsitems{$idx}{'timestamp'}=$contrib{$idx.':timestamp'}; $$imsitems{$idx}{'sender'}=$plainname.' ('. - $contrib{$idx.':sendername'}.' at '. + $contrib{$idx.':sendername'}.':'. $contrib{$idx.':senderdomain'}.')'; $$imsitems{$idx}{'isanonymous'}='false'; if ($contrib{$idx.':anonymous'}) { @@ -1255,7 +1255,7 @@ sub build_posting_display { } $$discussionitems[$idx] .= '  '. ''.$subject.'  '. - $sender.' '.$vgrlink.' ('. + $sender.' '.$vgrlink.' ('. &Apache::lonlocal::locallocaltime($posttime).')'; if ($$dischash{$toggkey}) { $$discussionitems[$idx].='  '. @@ -1369,7 +1369,7 @@ sub get_post_contents { $$plainname, $$contrib{$idx.':sendername'}, $$contrib{$idx.':senderdomain'}).' ('. - $$contrib{$idx.':sendername'}.' at '. + $$contrib{$idx.':sendername'}.':'. $$contrib{$idx.':senderdomain'}.')'; my $attachmenturls = $$contrib{$idx.':attachmenturl'}; my @postversions = (); @@ -1484,6 +1484,7 @@ sub mail_screen { } my %lt = &Apache::lonlocal::texthash( + 'plch' => 'Please check at least one of the following feedback types:', 'myqu' => 'My question/comment/feedback:', 'title' => 'Title', 'reta' => 'Retained attachments', @@ -1665,10 +1666,15 @@ END END + # Breadcrumbs + my $brcrum = [{'href' => '', + 'text' => 'Resource Feedback and Discussion'}]; + my %onload = ('onload' => 'window.focus();setposttype();'); my $start_page= &Apache::loncommon::start_page('Resource Feedback and Discussion',$js, - {'add_entries' => \%onload}); + {'add_entries' => \%onload, + 'bread_crumbs' => $brcrum,}); if ($quote ne '') { &newline_to_br(\$quote); @@ -1694,6 +1700,7 @@ END END } $r->print(< $quote

$lt{'myqu'}

@@ -2016,7 +2023,7 @@ sub print_sortfilter_options { $ccrole = 'co'; } push(@courseroles,$ccrole); - + if ($env{'request.course.sec'} !~ /^\s*$/) { #Restrict section choice to current section @sections = ('all',$env{'request.course.sec'}); $numvisible = 2; @@ -2131,17 +2138,17 @@ $start_page

- - - - - - - - - - - + + + + + + + + + + +
$lt{'soor'} $lt{'sprs'} $lt{'spur'} $lt{'spse'} $lt{'spgr'} $lt{'psub'}$lt{'soor'} $lt{'sprs'} $lt{'spur'} $lt{'spse'} $lt{'spgr'} $lt{'psub'}
@@ -2625,11 +2632,10 @@ sub screen_header { $env{'request.course.id'}. ($env{'request.course.sec'}?'/'.$env{'request.course.sec'}:''))) { $discussoptions='
'. - + $contribdisc. + '
'. ''.&mt('Change Screenname').''; my $blockblog = &Apache::loncommon::blocking_status('blogs'); if (!$blockblog) { @@ -2639,12 +2645,12 @@ sub screen_header { } if ($msgoptions) { $msgoptions='

' - .' '.&mt('Send Feedback').'

'.&Apache::lonhtmlcommon::coursepreflink(&mt('Feedback Settings'),'feedback').'

' + .' '.&mt('Send Feedback').'' .$msgoptions; } if ($discussoptions) { $discussoptions='

' - .' '.&mt('Discussion Contributions').'

'.&Apache::lonhtmlcommon::coursepreflink(&mt('Discussion Settings'),'discussion').'

' + .' '.&mt('Discussion Contributions').'' .$discussoptions; } return $msgoptions.$discussoptions; @@ -2696,6 +2702,9 @@ sub assemble_email { 'orig' => 'Original screen output (if applicable)', 'corr' => 'Correct Answer(s) (if applicable)', ); + if (&Apache::loncommon::course_type() eq 'Community') { + $lt{'prev'} = &mt('Previous attempts of member (if applicable)'); + } my $email=<<"ENDEMAIL"; $message ENDEMAIL @@ -2942,19 +2951,6 @@ 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*/>| - >.* - )}xs - ); -} sub newline_to_br { my ($message)=@_; @@ -3014,8 +3010,12 @@ sub modify_attachments { END + # Breadcrumbs + my $brcrum = [{'href' => '', + 'text' => 'Discussion Post Attachments'}]; my $start_page = - &Apache::loncommon::start_page('Discussion Post Attachments',$js); + &Apache::loncommon::start_page('Discussion Post Attachments',$js, + {'bread_crumbs' => $brcrum,}); my $orig_subject = &unescape($env{'form.subject'}); my $subject=&clear_out_html($orig_subject,undef,1); @@ -3043,7 +3043,7 @@ $toolarge
- Subject: $subject

+ Subject: $subject

END if ($idx) { if ($attachmenturls) { @@ -3357,14 +3357,14 @@ sub sort_filter_names { } 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', - ); + all => 'Roles of any status', + Active => 'Only active roles', + Expired => 'Only past roles', + Future => 'Only future roles', + ); } } - + sub handler { my $r = shift; if ($r->header_only) { @@ -3424,7 +3424,13 @@ sub handler { &Apache::loncommon::no_cache($r); $r->send_http_header; - $r->print(&Apache::loncommon::start_page('Discussion Post Versions')); + # Breadcrumbs + my $brcrum = [{'href' => '', + 'text' => 'Discussion Post Versions'}]; + + $r->print(&Apache::loncommon::start_page('Discussion Post Versions',undef, + {'bread_crumbs' => $brcrum,}) + ); my $crs='/'.$env{'request.course.id'}; if ($env{'request.course.sec'}) {