Bug #4769
closedTools sort ignored
0%
Description
If you set the sort of the tools in the CourseModule, this value is ignored.
Updated by Anthony Hurst almost 11 years ago
- Target version set to Backlog (default)
Updated by Anthony Hurst almost 11 years ago
- Status changed from New to Needs more info
On which page is the sort set?
Updated by Parcifal Aertssen almost 11 years ago
that's the point, it isn't set. If we set the sort property of the tools when we create the courses, it is also ignored. The tools are also ordered in english, even if you set the language to dutch. That's why we started setting the sort property in the first place. Here is some code we were using when we discovered this bug:
//tools
$tools = CourseModule :: convert_tools(WeblcmsDataManager :: get_tools('basic'), null);
foreach ($tools as $tool)
{
$name = $tool->get_name();
//echo $name.'<br/>';
if($name=='document' || $name=='announcement' || $name=='link'){
$tool->set_visible(1);
//TODO: sortering werkt niet?
switch($name){
case 'announcement':
$tool->set_sort(1);
break;
case 'link':
$tool->set_sort(2); //rechter kolom
break;
case 'document':
$tool->set_sort(3);
break;
}
}else{
$tool->set_visible(0);
}
}
$course->set_tools($tools);
Updated by Sven Vanpoucke almost 11 years ago
- Status changed from Needs more info to Needs testing
- Assignee set to Parcifal Aertssen
There is no tool sort anymore for tools. I've added some logic to use the translations for odering
Updated by Parcifal Aertssen almost 11 years ago
- Status changed from Needs testing to Bug resolved
splendid!