--- loncom/interface/lonfeedback.pm 2010/01/24 03:13:55 1.273.4.3 +++ loncom/interface/lonfeedback.pm 2010/01/25 03:56:00 1.273.4.6 @@ -1,7 +1,7 @@ # The LearningOnline Network # Feedback # -# $Id: lonfeedback.pm,v 1.273.4.3 2010/01/24 03:13:55 raeburn Exp $ +# $Id: lonfeedback.pm,v 1.273.4.6 2010/01/25 03:56:00 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -354,10 +354,10 @@ sub list_discussion { $togglink = 'toggoff'; } - $chglink .= '&changes='.$displinkA.'_'.$displinkB.'_'.$marklink.'_'.$togglink; + $chglink .= '&changes='.$displinkA.'_'.$displinkB.'_'.$marklink.'_'.$togglink; if ($newpostsflag) { - $chglink .= '&previous='.$prevread; + $chglink .= '&previous='.$prevread; } $chglink.=&group_args($group); @@ -420,7 +420,7 @@ imscp_v1p1.xsd http://www.imsglobal.org/ var symbparm = symb+':::'+idx var prevparm = "" if (newflag == 1) { - prevparm = "&previous="+previous + prevparm = "&previous="+previous } if (caller == 'studentdelete') { if (confirm("$lt{'aysu'}\\n$lt{'dpwn'},\\n$lt{'bwco'}")) { @@ -448,7 +448,7 @@ imscp_v1p1.xsd http://www.imsglobal.org/ $discussion.="\n".'
- $lt{'cuse'}: | + $lt{'cuse'}:END @@ -589,7 +589,7 @@ END | - $lt{'chgt'}? + $lt{'chgt'}? |
'.&mt('NEW').' | '; } else { $$newitem{$idx} = 0; $$discussionitems[$idx] .= ' -
'; } $$discussionitems[$idx] .= ' | '. ''.$subject.' '. - $sender.' '.$vgrlink.' ('. + $sender.' '.$vgrlink.' ('. &Apache::lonlocal::locallocaltime($posttime).') | '; if ($$dischash{$toggkey}) { $$discussionitems[$idx].=''. $ctlink.' | '; } $$discussionitems[$idx].= '
'. - $message.''; + $message.''; if ($contrib{$idx.':history'}) { my @postversions = (); $$discussionitems[$idx] .= &mt('This post has been edited by the author.'); @@ -1701,7 +1703,7 @@ $latexHelp
$lt{'title'}:
-
END
@@ -1738,7 +1740,7 @@ END
$r->print(<
$lt{'soor'} | -- | $lt{'sprs'} | -- | $lt{'spur'} | -- | $lt{'spse'} | -- | $lt{'spgr'} | -- | $lt{'psub'} | +$lt{'soor'} | ++ | $lt{'sprs'} | ++ | $lt{'spur'} | ++ | $lt{'spse'} | ++ | $lt{'spgr'} | ++ | $lt{'psub'} |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -2194,7 +2196,7 @@ $start_page
- + END if (exists($env{'form.group'})) { $r->print(''); @@ -2317,7 +2319,7 @@ END - + $end_page END @@ -2420,7 +2422,7 @@ sub redirect_back { if ($previous > 0) { $qrystr = 'previous='.$previous; if ($feedurl =~ /\?register=1/) { - $feedurl .= '&'.$qrystr; + $feedurl .= '&'.$qrystr; } else { $feedurl .= '?'.$qrystr; } @@ -2429,14 +2431,14 @@ sub redirect_back { if (defined($sort)) { my $sortqry = 'sortposts='.$sort; if (($feedurl =~ /\?register=1/) || ($feedurl =~ /\?previous=/)) { - $feedurl .= '&'.$sortqry; + $feedurl .= '&'.$sortqry; } else { $feedurl .= '?'.$sortqry; } $sorttag = ''; if (defined($numpicks)) { my $userpickqry = 'totposters='.$numpicks; - $feedurl .= '&'.$userpickqry; + $feedurl .= '&'.$userpickqry; $userpicktag = ''; } else { if (ref($sectionpick) eq 'ARRAY') { @@ -2450,7 +2452,7 @@ sub redirect_back { $sectag =~ s/,$//; $sectag .= '" />'; } else { - $feedurl .= '§ionpick='.$sectionpick; + $feedurl .= '§ionpick='.$sectionpick; $sectag = ''; } if (ref($grouppick) eq 'ARRAY') { @@ -2464,7 +2466,7 @@ sub redirect_back { $grptag =~ s/,$//; $grptag .= '" />'; } else { - $feedurl .= '&grouppick='.$grouppick; + $feedurl .= '&grouppick='.$grouppick; $grptag = ''; } if (ref($rolefilter) eq 'ARRAY') { @@ -2481,7 +2483,7 @@ sub redirect_back { $feedurl .= '&rolefilter='.$rolefilter; $roletag = ''; } - $feedurl .= '&statusfilter='.$statusfilter; + $feedurl .= '&statusfilter='.$statusfilter; $statustag =''; } } @@ -2940,6 +2942,19 @@ 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 { my ($message)=@_; @@ -2973,7 +2988,7 @@ sub generate_preview_button { +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();" /> ENDPREVIEW } @@ -3028,7 +3043,7 @@ $toolarge
|