[svn r12842] Fixed parse error

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

@ -6569,32 +6569,20 @@ 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 .= '<form method="POST">';
$return .= '<table class="lp_form">'; $return .= '<table class="lp_form">';
$return .= '<tr>'; $return .= '<tr>';
$return .= '<th></th>'; $return .= '<th></th>';
$return .= '<th class="exercise">'.get_lang("Minimum").'</th>'; $return .= '<th class="exercise">'.get_lang("Minimum").'</th>';
$return .= '<th class="exercise">'.get_lang("Maximum").'</th>'; $return .= '<th class="exercise">'.get_lang("Maximum").'</th>';
$return .= '</tr>'; $return .= '</tr>';
$return .= '<tr>'; $return .= '<tr>';
$return .= '<td class="radio" colspan="3">'; $return .= '<td class="radio" colspan="3">';
$return .= '<input checked="checked" id="idNone" name="prerequisites" style="margin-left:0; margin-right:10px;" type="radio" />'; $return .= '<input checked="checked" id="idNone" name="prerequisites" style="margin-left:0; margin-right:10px;" type="radio" />';
$return .= '<label for="idNone">'.get_lang("None").'</label>'; $return .= '<label for="idNone">'.get_lang("None").'</label>';
$return .= '</td>'; $return .= '</td>';
$return .= '</tr>'; $return .= '</tr>';
$sql = " $sql = "
@ -6604,9 +6592,7 @@ function display_thread_form($action = 'add', $id = 0, $extra_info = '')
lp_id = " . $this->lp_id; lp_id = " . $this->lp_id;
$result = api_sql_query($sql, __FILE__, __LINE__); $result = api_sql_query($sql, __FILE__, __LINE__);
$arrLP = array(); $arrLP = array();
while($row = Database::fetch_array($result)) while($row = Database::fetch_array($result))
{ {
$arrLP[] = array( $arrLP[] = array(
@ -6633,74 +6619,41 @@ function display_thread_form($action = 'add', $id = 0, $extra_info = '')
{ {
if($arrLP[$i]['id'] == $item_id) if($arrLP[$i]['id'] == $item_id)
break; break;
$return .= '<tr>'; $return .= '<tr>';
$return .= '<td class="radio"' . (($arrLP[$i]['item_type'] != TOOL_QUIZ) ? ' colspan="3"' : '') . '>'; $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'] . '" />'; $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 .= '<img alt="" src="../img/lp_' . $arrLP[$i]['item_type'] . '.png" style="margin-right:5px;" title="" />'; $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>'; $return .= '<label for="id' . $arrLP[$i]['id'] . '">' . stripslashes($arrLP[$i]['title']) . '</label>';
$return .= '</td>'; $return .= '</td>';
$return .= '<td class="radio"' . (($arrLP[$i]['item_type'] != TOOL_HOTPOTATOES) ? ' colspan="3"' : '') . ' />';
$return .= '<td class="radio"' . (($arrLP[$i]['item_type'] != TOOL_HOTPOTATOES) ? ' colspan="3"' : '') . '>';
if($arrLP[$i]['item_type'] == TOOL_QUIZ) if($arrLP[$i]['item_type'] == TOOL_QUIZ)
{ {
$return .= '<td class="exercise">'; $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 .= '<input maxlength="3" name="min_' . $arrLP[$i]['id'] . '" type="text" value="' . (($arrLP[$i]['id'] == $preq_id) ? $preq_min : 0) . '" />';
$return .= '</td>'; $return .= '</td>';
$return .= '<td class="exercise">'; $return .= '<td class="exercise">';
$return .= '<input maxlength="3" name="max_' . $arrLP[$i]['id'] . '" type="text" value="' . $arrLP[$i]['max_score'] . '" disabled="true" />'; $return .= '<input maxlength="3" name="max_' . $arrLP[$i]['id'] . '" type="text" value="' . $arrLP[$i]['max_score'] . '" disabled="true" />';
$return .= '</td>'; $return .= '</td>';
} }
if($arrLP[$i]['item_type'] == TOOL_HOTPOTATOES)
if($arrLP[$i]['item_type'] == TOOL_HOTPOTATOES)
{ {
$return .= '<td class="exercise">'; $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 .= '<input maxlength="3" name="min_' . $arrLP[$i]['id'] . '" type="text" value="' . (($arrLP[$i]['id'] == $preq_id) ? $preq_min : 0) . '" />';
$return .= '</td>'; $return .= '</td>';
$return .= '<td class="exercise">'; $return .= '<td class="exercise">';
$return .= '<input maxlength="3" name="max_' . $arrLP[$i]['id'] . '" type="text" value="' . $arrLP[$i]['max_score'] . '" disabled="true" />'; $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 .= '<tr>'; $return .= '<tr>';
$return .= '<td colspan="3">'; $return .= '<td colspan="3">';
$return .= '<input class="button" name="submit_button" type="submit" value="'.get_lang("Ok").'" /></td>' . "\n"; $return .= '<input class="button" name="submit_button" type="submit" value="'.get_lang("Ok").'" /></td>' . "\n";
$return .= '</td>'; $return .= '</td>';
$return .= '</tr>'; $return .= '</tr>';
$return .= '</table>'; $return .= '</table>';
$return .= '</form>'; $return .= '</form>';
$return .= '</div>'; $return .= '</div>';
return $return; return $return;

Loading…
Cancel
Save