Project

General

Profile

Bug #4769

Tools sort ignored

Added by Parcifal Aertssen over 7 years ago. Updated about 7 years ago.

Status:
Bug resolved
Priority:
Normal
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.

History

#1

Updated by Anthony Hurst over 7 years ago

  • Target version set to Backlog (default)
#2

Updated by Anthony Hurst over 7 years ago

  • Status changed from New to Needs more info

On which page is the sort set?

#3

Updated by Parcifal Aertssen over 7 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);

#4

Updated by Sven Vanpoucke about 7 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

#5

Updated by Parcifal Aertssen about 7 years ago

  • Status changed from Needs testing to Bug resolved

splendid!

Also available in: Atom PDF