[svn r12842] Fixed parse error

skala
Yannick Warnier 18 years ago
parent 3acd17f0fa
commit 1b0508eee2
  1. 213
      main/newscorm/learnpath.class.php

@ -6569,138 +6569,91 @@ function display_thread_form($action = 'add', $id = 0, $extra_info = '')
$preq_max = $row['max_score']; $preq_max = $row['max_score'];
$return = $this->display_manipulate($item_id, TOOL_DOCUMENT); $return = $this->display_manipulate($item_id, TOOL_DOCUMENT);
$return .= '<div style="margin:3px 10px;">'; $return .= '<div style="margin:3px 10px;">';
$return .= '<p class="lp_title">'.get_lang("AddEditPrerequisites").'</p>';
$return .= '<p class="lp_title">'.get_lang("AddEditPrerequisites").'</p>'; $return .= '<form method="POST">';
$return .= '<table class="lp_form">';
$return .= '<form method="POST">'; $return .= '<tr>';
$return .= '<th></th>';
$return .= '<table class="lp_form">'; $return .= '<th class="exercise">'.get_lang("Minimum").'</th>';
$return .= '<th class="exercise">'.get_lang("Maximum").'</th>';
$return .= '<tr>'; $return .= '</tr>';
$return .= '<tr>';
$return .= '<th></th>'; $return .= '<td class="radio" colspan="3">';
$return .= '<th class="exercise">'.get_lang("Minimum").'</th>'; $return .= '<input checked="checked" id="idNone" name="prerequisites" style="margin-left:0; margin-right:10px;" type="radio" />';
$return .= '<th class="exercise">'.get_lang("Maximum").'</th>'; $return .= '<label for="idNone">'.get_lang("None").'</label>';
$return .= '</td>';
$return .= '</tr>'; $return .= '</tr>';
$return .= '<tr>'; $sql = "
SELECT *
$return .= '<td class="radio" colspan="3">'; FROM " . $tbl_lp_item . "
WHERE
$return .= '<input checked="checked" id="idNone" name="prerequisites" style="margin-left:0; margin-right:10px;" type="radio" />'; lp_id = " . $this->lp_id;
$return .= '<label for="idNone">'.get_lang("None").'</label>';
$result = api_sql_query($sql, __FILE__, __LINE__);
$return .= '</td>'; $arrLP = array();
while($row = Database::fetch_array($result))
$return .= '</tr>'; {
$arrLP[] = array(
$sql = " 'id' => $row['id'],
SELECT * 'item_type' => $row['item_type'],
FROM " . $tbl_lp_item . " 'title' => $row['title'],
WHERE 'description' => $row['description'],
lp_id = " . $this->lp_id; 'parent_item_id' => $row['parent_item_id'],
'previous_item_id' => $row['previous_item_id'],
$result = api_sql_query($sql, __FILE__, __LINE__); 'next_item_id' => $row['next_item_id'],
'max_score' => $row['max_score'],
$arrLP = array(); 'min_score' => $row['min_score'],
'next_item_id' => $row['next_item_id'],
while($row = Database::fetch_array($result)) 'display_order' => $row['display_order']);
{ }
$arrLP[] = array(
'id' => $row['id'], $this->tree_array($arrLP);
'item_type' => $row['item_type'],
'title' => $row['title'], $arrLP = $this->arrMenu;
'description' => $row['description'],
'parent_item_id' => $row['parent_item_id'], unset($this->arrMenu);
'previous_item_id' => $row['previous_item_id'],
'next_item_id' => $row['next_item_id'], for($i = 0; $i < count($arrLP); $i++)
'max_score' => $row['max_score'], {
'min_score' => $row['min_score'], if($arrLP[$i]['id'] == $item_id)
'next_item_id' => $row['next_item_id'], break;
'display_order' => $row['display_order']); $return .= '<tr>';
} $return .= '<td class="radio"' . (($arrLP[$i]['item_type'] != TOOL_QUIZ) ? ' colspan="3"' : '') . '>';
$return .= '<input' . (($arrLP[$i]['id'] == $preq_id) ? ' checked="checked" ' : '') . (($arrLP[$i]['item_type'] == 'dokeos_module' || $arrLP[$i]['item_type'] == 'dokeos_chapter') ? ' disabled="disabled" ' : ' ') . 'id="id' . $arrLP[$i]['id'] . '" name="prerequisites" style="margin-left:' . $arrLP[$i]['depth'] * 10 . 'px; margin-right:10px;" type="radio" value="' . $arrLP[$i]['id'] . '" />';
$this->tree_array($arrLP); $return .= '<img alt="" src="../img/lp_' . $arrLP[$i]['item_type'] . '.png" style="margin-right:5px;" title="" />';
$return .= '<label for="id' . $arrLP[$i]['id'] . '">' . stripslashes($arrLP[$i]['title']) . '</label>';
$arrLP = $this->arrMenu; $return .= '</td>';
$return .= '<td class="radio"' . (($arrLP[$i]['item_type'] != TOOL_HOTPOTATOES) ? ' colspan="3"' : '') . ' />';
unset($this->arrMenu);
if($arrLP[$i]['item_type'] == TOOL_QUIZ)
for($i = 0; $i < count($arrLP); $i++) {
{ $return .= '<td class="exercise">';
if($arrLP[$i]['id'] == $item_id) $return .= '<input maxlength="3" name="min_' . $arrLP[$i]['id'] . '" type="text" value="' . (($arrLP[$i]['id'] == $preq_id) ? $preq_min : 0) . '" />';
break; $return .= '</td>';
$return .= '<td class="exercise">';
$return .= '<tr>'; $return .= '<input maxlength="3" name="max_' . $arrLP[$i]['id'] . '" type="text" value="' . $arrLP[$i]['max_score'] . '" disabled="true" />';
$return .= '</td>';
$return .= '<td class="radio"' . (($arrLP[$i]['item_type'] != TOOL_QUIZ) ? ' colspan="3"' : '') . '>'; }
if($arrLP[$i]['item_type'] == TOOL_HOTPOTATOES)
$return .= '<input' . (($arrLP[$i]['id'] == $preq_id) ? ' checked="checked" ' : '') . (($arrLP[$i]['item_type'] == 'dokeos_module' || $arrLP[$i]['item_type'] == 'dokeos_chapter') ? ' disabled="disabled" ' : ' ') . 'id="id' . $arrLP[$i]['id'] . '" name="prerequisites" style="margin-left:' . $arrLP[$i]['depth'] * 10 . 'px; margin-right:10px;" type="radio" value="' . $arrLP[$i]['id'] . '" />'; {
$return .= '<td class="exercise">';
$return .= '<input maxlength="3" name="min_' . $arrLP[$i]['id'] . '" type="text" value="' . (($arrLP[$i]['id'] == $preq_id) ? $preq_min : 0) . '" />';
$return .= '<img alt="" src="../img/lp_' . $arrLP[$i]['item_type'] . '.png" style="margin-right:5px;" title="" />'; $return .= '</td>';
$return .= '<td class="exercise">';
$return .= '<label for="id' . $arrLP[$i]['id'] . '">' . stripslashes($arrLP[$i]['title']) . '</label>'; $return .= '<input maxlength="3" name="max_' . $arrLP[$i]['id'] . '" type="text" value="' . $arrLP[$i]['max_score'] . '" disabled="true" />';
$return .= '</td>';
$return .= '</td>'; }
$return .='</tr>';
}
$return .= '<td class="radio"' . (($arrLP[$i]['item_type'] != TOOL_HOTPOTATOES) ? ' colspan="3"' : '') . '>'; $return .= '<tr>';
$return .= '<td colspan="3">';
$return .= '<input class="button" name="submit_button" type="submit" value="'.get_lang("Ok").'" /></td>' . "\n";
if($arrLP[$i]['item_type'] == TOOL_QUIZ) $return .= '</td>';
{ $return .= '</tr>';
$return .= '<td class="exercise">'; $return .= '</table>';
$return .= '</form>';
$return .= '<input maxlength="3" name="min_' . $arrLP[$i]['id'] . '" type="text" value="' . (($arrLP[$i]['id'] == $preq_id) ? $preq_min : 0) . '" />';
$return .= '</td>';
$return .= '<td class="exercise">';
$return .= '<input maxlength="3" name="max_' . $arrLP[$i]['id'] . '" type="text" value="' . $arrLP[$i]['max_score'] . '" disabled="true" />';
$return .= '</td>';
}
if($arrLP[$i]['item_type'] == TOOL_HOTPOTATOES)
{
$return .= '<td class="exercise">';
$return .= '<input maxlength="3" name="min_' . $arrLP[$i]['id'] . '" type="text" value="' . (($arrLP[$i]['id'] == $preq_id) ? $preq_min : 0) . '" />';
$return .= '</td>';
$return .= '<td class="exercise">';
$return .= '<input maxlength="3" name="max_' . $arrLP[$i]['id'] . '" type="text" value="' . $arrLP[$i]['max_score'] . '" disabled="true" />';
$return .= '</td>';
}
$return .= '<tr>';
$return .= '<td colspan="3">';
$return .= '<input class="button" name="submit_button" type="submit" value="'.get_lang("Ok").'" /></td>' . "\n";
$return .= '</td>';
$return .= '</tr>';
$return .= '</table>';
$return .= '</form>';
$return .= '</div>'; $return .= '</div>';
return $return; return $return;

Loading…
Cancel
Save