Revision: 546
Author: geof.glass
Date: Fri Jun 22 12:59:32 2012
Log: Fix all forum text search on summary page (from Oksana)
Fix ofuserid error in summary query (from Oksana)
http://code.google.com/p/marginalia/source/detail?r=546
Modified:
/moodle/trunk/moodle/blocks/marginalia/MoodleMarginalia.js
/moodle/trunk/moodle/blocks/marginalia/annotation_summary_query.php
/moodle/trunk/moodle/blocks/marginalia/summary.php
=======================================
--- /moodle/trunk/moodle/blocks/marginalia/MoodleMarginalia.js Wed Jun 20
22:56:48 2012
+++ /moodle/trunk/moodle/blocks/marginalia/MoodleMarginalia.js Fri Jun 22
12:59:32 2012
@@ -157,7 +157,7 @@
// Ensure the sheet drop-down reflects the actual sheet to be shown
// This relies on preferences being saved correctly. Otherwise, the user
may
- // pick a different user, visit another page, click back and find that the
+ // change the dropdown, visit another page, click back and find that the
// sheet control shows the wrong thing.
var sheetCtrl = document.getElementById( 'ansheet' );
if ( sheetCtrl )
@@ -317,7 +317,7 @@
{
var marginalia = window.marginalia;
var sheet = sheetControl.value;
-
+
// Check to see whether this is a special case with a named handler
if ( this.handlers[ sheet ] )
this.handlers[ sheet ]( this, marginalia );
=======================================
--- /moodle/trunk/moodle/blocks/marginalia/annotation_summary_query.php Wed
Jun 20 22:56:48 2012
+++ /moodle/trunk/moodle/blocks/marginalia/annotation_summary_query.php Fri
Jun 22 12:59:32 2012
@@ -601,10 +601,12 @@
function get_conds( &$params, $summary )
{
$params[ 'object_type' ] = AN_OTYPE_POST;
- $params[ 'ofuserid' ] = (int) $summary->ofuser->id;
$cond = "\n AND a.object_type= :object_type";
if ( $summary->ofuser )
+ {
+ $params[ 'ofuserid' ] = (int) $summary->ofuser->id;
$cond .= " AND a.quote_author_id= :ofuserid";
+ }
return $cond;
}
}
=======================================
--- /moodle/trunk/moodle/blocks/marginalia/summary.php Wed Jun 20 22:56:48
2012
+++ /moodle/trunk/moodle/blocks/marginalia/summary.php Fri Jun 22 12:59:32
2012
@@ -156,7 +156,7 @@
$PAGE->set_url( '/mod/forum/summary.php' );
if ( null != $this->course )
{
-
$PAGE->set_title("$this->course->shortname: ".get_string( 'summary_title',
ANNOTATION_STRINGS ) );
+
$PAGE->set_title($this->course->shortname.": ".get_string( 'summary_title',
ANNOTATION_STRINGS ) );
$PAGE->set_heading($this->course->fullname);
}
else