$cmdList = array(); $cmdList[] = array('img' => 'back', 'name' => get_lang('Back to module list'), 'url' => $pathBack); // Display $out = ''; if (!empty($dialogBox)) { $out .= $dialogBox->render(); } $out .= claro_html_tool_title(get_lang('Module edition'), null, $cmdList); //####################################################################################\\ //################################## MODULE NAME BOX #################################\\ //####################################################################################\\ $cmd = isset($_REQUEST['cmd']) ? $_REQUEST['cmd'] : ''; if ($cmd == "updateName") { $out .= nameBox(MODULE_, UPDATE_); } else { $out .= nameBox(MODULE_, DISPLAY_); } if ($module['contentType'] != CTLABEL_) { //####################################################################################\\ //############################### MODULE COMMENT BOX #################################\\ //####################################################################################\\ //#### COMMENT #### courseAdmin cannot modify this if this is a imported module ####\\ // this the comment of the module in ALL learning paths if ($cmd == "updatecomment") { $out .= commentBox(MODULE_, UPDATE_); } elseif ($cmd == "delcomment") { $out .= commentBox(MODULE_, DELETE_); } else { $out .= commentBox(MODULE_, DISPLAY_); } //#### ADDED COMMENT #### courseAdmin can always modify this ####\\
<div class='panel panel-default'> <div class='panel-heading'> <h3 class='panel-title'>$langLearningObjectData</h3> </div> <div class='panel-body'> <div class='row margin-bottom-fat'> <div class='col-sm-3'> <strong>$langTitle:</strong> </div> <div class='col-sm-9'>"; $cmd = ( isset($_REQUEST['cmd']) && is_string($_REQUEST['cmd']) ) ? (string) $_REQUEST['cmd'] : ''; if ($cmd == "updateName") { $tool_content .= "" . disp_message_box1(nameBox(MODULE_, UPDATE_, $langModify)) . ""; } else { $tool_content .= "" . nameBox(MODULE_, DISPLAY_) . ""; } $tool_content .= "</div> </div> <div class='row margin-bottom-fat'> <div class='col-sm-3'> <strong>$langComments:</strong> </div> <div class='col-sm-9'>"; if ($module->contentType != CTLABEL_) { //############################### MODULE COMMENT BOX #################################\\ //#### COMMENT #### courseAdmin cannot modify this if this is a imported module ####\\ // this the comment of the module in ALL learning paths if ($cmd == "updatecomment") { $tool_content .= commentBox(MODULE_, UPDATE_);
break; } // STEP 1 : FIND THE ORDER OF THE ANNOUNCEMENT if ($module->learnPath_module_id == $thisLPMId) { $thisLPMOrder = $module->rank; $thisLPMOrderFound = true; } } } $tool_content .= "<fieldset><legend>{$langLearningPathData}</legend><table class='table-default'>"; //############################ LEARNING PATH NAME BOX ################################\\ $tool_content .= "<tr><th width='70'>{$langTitle}:</th>"; if ($cmd == "updateName") { $tool_content .= disp_message_box(nameBox(LEARNINGPATH_, UPDATE_, $langModify)); } else { $tool_content .= "<td>" . nameBox(LEARNINGPATH_, DISPLAY_); } $tool_content .= "</td></tr>"; //############################ LEARNING PATH COMMENT BOX #############################\\ $tool_content .= "\n <tr>\n <th width=\"90\">{$langComments}:</th>\n <td>"; if ($cmd == "updatecomment") { $tool_content .= commentBox(LEARNINGPATH_, UPDATE_); } elseif ($cmd == "delcomment") { $tool_content .= commentBox(LEARNINGPATH_, DELETE_); } else { $tool_content .= commentBox(LEARNINGPATH_, DISPLAY_); } $tool_content .= "</td>\n </tr>\n </table>\n </fieldset>\n <fieldset>\n <legend>{$langLearningPathConfigure}</legend>\n <table class='table-default'>"; // -------------------- create label ------------------- if (isset($displayCreateLabelForm) && $displayCreateLabelForm) { $tool_content .= "\n <tr>\n <th width=\"200\">{$langLabel}:</th>\n <td>\n <form action=\"" . $_SERVER['SCRIPT_NAME'] . "?course={$course_code}\" method=\"post\">\n <label for=\"newLabel\">" . $langNewLabel . ": </label> \n <input type=\"text\" name=\"newLabel\" id=\"newLabel\" maxlength=\"255\" / size=\"30\" >\n <input type=\"hidden\" name=\"cmd\" value=\"createLabel\" />\n <input type=\"submit\" value=\"" . $langCreate . "\" />\n </form>\n </td>\n </tr>";
$maxDeep = $flatElementList[$i]['children']; } } /* ================================================================ OUTPUT STARTS HERE ================================================================ */ $out = ''; if (!empty($dialogBox)) { $out .= $dialogBox->render(); } // display title $out .= claro_html_tool_title($nameTools); //####################################################################################\\ //##################################### TITLE ########################################\\ //####################################################################################\\ $out .= nameBox(LEARNINGPATH_, DISPLAY_); // and comment ! $out .= commentBox(LEARNINGPATH_, DISPLAY_); //####################################################################################\\ //############################## MODULE TABLE HEADER #################################\\ //####################################################################################\\ $out .= '<br />' . "\n" . '<table class="claroTable" width="100%" border="0" cellspacing="2">' . "\n" . '<tr class="headerX" align="center" valign="top">' . "\n" . '<th colspan="' . ($maxDeep + 1) . '">' . get_lang('Module') . '</th>' . "\n"; if (claro_is_user_authenticated()) { // show only progress column for authenticated users $out .= '<th colspan="2">' . get_lang('Progress') . '</th>' . "\n"; if (!isLearnPathProgressionEmpty(claro_get_current_user_id(), $_SESSION['path_id']) && (get_conf('cllnp_resetByUserAllowed', false) || claro_is_allowed_to_edit())) { $out .= '<th>' . get_lang('Reset'); //reset link for this learning path $out .= ' <a href="' . Url::Contextualize($_SERVER['PHP_SELF'] . '?cmd=resetLearnPathProgression&path_id=' . $_SESSION['path_id']) . '" onclick="return confirm(\'' . clean_str_for_javascript(get_lang('Do you really want to reset this learning path?')) . '\');"><img src="' . get_icon_url('delete') . '" alt="' . get_lang('Reset') . '" /></a>' . "\n"; $out .= '</th>' . "\n"; }