Project

General

Profile

Bug #1287

Learning Path : Cannot move a Thread on build view + fix

Added by Hubert Borderiou about 9 years ago. Updated about 9 years ago.

Status:
Feature implemented
Priority:
High
Category:
-
Target version:
Start date:
12/05/2010
Due date:
% Done:

100%

Estimated time:
Complexity:
Easy
SCRUM pts - complexity:
0.5

Description

If you add an Thread object in your Learning Path, you cannot Move it in the Build section, you have no menu to do it.

In file /main/newscorm|learnpath.class.php
function display_move_item
the TOOL_THREAD case had been forgotten.
Just have to had it I guess.

 function display_move_item($item_id) {
  global $_course; //will disappear
  global $charset;
  $return = '';

  if (is_numeric($item_id)) {
   $tbl_lp_item = Database :: get_course_table(TABLE_LP_ITEM);

   $sql = "SELECT *
     FROM " . $tbl_lp_item . " 
     WHERE id = " . $item_id;

   $res = Database::query($sql);
   $row = Database :: fetch_array($res);

   switch ($row['item_type']) {
    case 'dokeos_chapter' :
    case 'dir' :
    case 'asset' :
     $return .= $this->display_manipulate($item_id, $row['item_type']);
     $return .= $this->display_item_form($row['item_type'], get_lang('MoveCurrentChapter'), 'move', $item_id, $row);
     break;

    case 'dokeos_module' :
     $return .= $this->display_manipulate($item_id, $row['item_type']);
     $return .= $this->display_item_form($row['item_type'], 'Move th current module:', 'move', $item_id, $row);
     break;
    case TOOL_DOCUMENT :
     $return .= $this->display_manipulate($item_id, $row['item_type']);
     $return .= $this->display_document_form('move', $item_id, $row);
     break;
    case TOOL_LINK :
     $return .= $this->display_manipulate($item_id, $row['item_type']);
     $return .= $this->display_link_form('move', $item_id, $row);
     break;
    case TOOL_HOTPOTATOES :
     $return .= $this->display_manipulate($item_id, $row['item_type']);
     $return .= $this->display_link_form('move', $item_id, $row);
     break;
    case TOOL_QUIZ :
     $return .= $this->display_manipulate($item_id, $row['item_type']);
     $return .= $this->display_quiz_form('move', $item_id, $row);
     break;
    case TOOL_STUDENTPUBLICATION :
     $return .= $this->display_manipulate($item_id, $row['item_type']);
     $return .= $this->display_student_publication_form('move', $item_id, $row);
     break;
    case TOOL_FORUM :
     $return .= $this->display_manipulate($item_id, $row['item_type']);
     $return .= $this->display_forum_form('move', $item_id, $row);
     break;
    case TOOL_THREAD :
     $return .= $this->display_manipulate($item_id, $row['item_type']);
     $return .= $this->display_forum_form('move', $item_id, $row);
   }
  }
  return $return;
 }

History

#1

Updated by Yannick Warnier about 9 years ago

  • Status changed from New to Assigned
  • Assignee set to Julio Montoya
  • Priority changed from Normal to High
#2

Updated by Anonymous about 9 years ago

  • Status changed from Assigned to Needs more info
  • % Done changed from 0 to 100

Done (see http://code.google.com/p/chamilo/source/detail?r=eb3ae0e1f6bf17216269e6e40431a9bc9b6cf299&repo=classic). Waiting for feedback. Thank you Hubert for all those bug fixes

#3

Updated by Julio Montoya about 9 years ago

  • Assignee changed from Julio Montoya to Hubert Borderiou
#4

Updated by Yannick Warnier about 9 years ago

  • SCRUM pts - complexity changed from ? to 0.5

If no feedback this Friday, just close it. I can't see any problematic code in the suggestion.

#5

Updated by Yannick Warnier about 9 years ago

  • Status changed from Needs more info to Feature implemented

Also available in: Atom PDF