I don't see all categories in filter

I don't see all categories in filter

by Juan Marcos Rodríguez -
Number of replies: 3

Hello,

I've created a configurable report, and add a category filter. When I view the report, I see almost categories, but not all of them.

We work with several moodle's 1.9, and some one work well, and other don't show all categories.

I don't know why this happened. Can anyone help me?

Thank you.

Average of ratings: -
In reply to Juan Marcos Rodríguez

Re: I don't see all categories in filter

by Juan Marcos Rodríguez -

We found the problem. It was calling courses, and not categories.

 

Thank you.

In reply to Juan Marcos Rodríguez

Re: I don't see all categories in filter

by Juan Leyva -
Picture of Core developers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

Hi Juan, but is a bug in the code? Can you report where you find it?

In reply to Juan Leyva

Re: I don't see all categories in filter

by amit janghu -

In configurable_reports\components\filters\categories\plugin.class.php

In function 

function print_filter(&$mform){

.....

.....

$categorieslist = $reportclass->elements_by_conditions($conditions);
}
else{
$categorieslist = array_keys($DB->get_records('course'));  // line number  74... you are passing 'course' it is supposed to be 'course_categories'
}

...............

Anyways, thanks for creating this plugin.