Issue Details (XML | Word | Printable)

Key: MDL-19341
Type: Bug Bug
Status: Open Open
Priority: Minor Minor
Assignee: Valery Fremaux
Reporter: Tatsuya Shirai
Votes: 1
Watchers: 2
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Moodle

Adding filed 'user_id' at document.php, but it does not return by process_results()

Created: 29/May/09 07:43 PM   Updated: 08/Jun/09 02:50 PM
Component/s: Global search
Affects Version/s: 1.9.5
Fix Version/s: None

Issue Links:
Relates
 

Participants: Tatsuya Shirai and Valery Fremaux
Security Level: None
Affected Branches: MOODLE_19_STABLE


 Description  « Hide
We can use to get user-image file (function print_user_picture(), lib/weblib.php) by using user_id.
The API for storing the parameter 'user_id' is prepared insearch/documents/document.php;

$this->addField(Zend_Search_Lucene_Field::Keyword('user_id', $user_id));

On the other hand, function process_results() in search/querylib.php does not return user_id.

Patch is as follows;

if ($i >= ($page - 1) * $this->results_per_page){
$resultdoc->number = $realindex;
$resultdoc->url = $hit->url;
$resultdoc->title = $hit->title;
$resultdoc->score = $hit->score;
$resultdoc->doctype = $hit->doctype;
$resultdoc->author = $hit->author;
$resultdoc->courseid = $hit->course_id;
// (Shirai143): Add from here
$resultdoc->user_id = $hit->user_id;
// (Shirai143): Add to here


user_id is very useful parameter!



 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Valery Fremaux added a comment - 30/May/09 11:56 PM
I'm searching the final use of the $resultdoc->user_id .... I would prefer to name the var userid for consistance.

Valery Fremaux added a comment - 31/May/09 03:54 AM
found in your patch in query.php

Everything OK.


Tatsuya Shirai added a comment - 08/Jun/09 02:50 PM
I think that this issue are resolved by valery, Everytihing OK.