Project

General

Profile

Actions

Bug #4769

closed

Tools sort ignored

Added by Parcifal Aertssen about 11 years ago. Updated almost 11 years ago.

Status:
Bug resolved
Priority:
Normal
Assignee:
Parcifal Aertssen
Start date:
18/05/2012
Due date:
% Done:

0%

Estimated time:
Complexity:
Normal

Description

If you set the sort of the tools in the CourseModule, this value is ignored.

Actions #1

Updated by Anthony Hurst almost 11 years ago

  • Target version set to Backlog (default)
Actions #2

Updated by Anthony Hurst almost 11 years ago

  • Status changed from New to Needs more info

On which page is the sort set?

Actions #3

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);

Actions #4

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

Actions #5

Updated by Parcifal Aertssen almost 11 years ago

  • Status changed from Needs testing to Bug resolved

splendid!

Actions

Also available in: Atom PDF