<li><a href="wizard_modules.php"><i class="fa fa-sitemap"></i> Modules</a></li> <li class="active"><a href="wizard_image_crop.php?task=selectImage"><i class="fa fa-picture-o"></i> Images</a></li> </ul> </nav> <div class="container-fluid"> <?php if (isset($_GET['task'])) { $task = $_GET['task']; } else { if (isset($_POST['task'])) { $task = $_POST['task']; } } switch ($task) { case 'selectImage': selectImage(); break; case 'uploadTempImage': uploadTempImage($courseID); break; case 'cropImage': cropImage($courseID); break; } function selectImage() { // TEMPLATE ARRAY (templateName, minWidth,minHeight, ratioWidth,ratioHeight) $templates = $GLOBALS['templates']; echo '<div> <h3>Step 1: Select An Image</h3> <div class="row-fluid">
//################################## DOCUMENT MODULE DEFAULT TIME BOX #################################\\ //#####################################################################################################\\ if ($is_allowedToEdit && $module['contentType'] == CTDOCUMENT_) { if ($cmd == "updateDefaultTime") { $out .= documentDefaultTimeBox(UPDATE_); } else { $out .= documentDefaultTimeBox(DISPLAY_); } } //####################################################################################\\ //############################ PROGRESS AND START LINK #############################\\ //####################################################################################\\ /* Display PROGRESS */ if ($module['contentType'] != CTLABEL_) { if ($resultBrowsed && count($resultBrowsed) > 0 && $module['contentType'] != CTLABEL_) { $contentType_img = selectImage($resultBrowsed['contentType']); $contentType_alt = selectAlt($resultBrowsed['contentType']); if ($resultBrowsed['contentType'] == CTSCORM_) { $contentDescType = get_lang('SCORM 1.2 conformable content'); } if ($resultBrowsed['contentType'] == CTEXERCISE_) { $contentDescType = get_lang('Exercises'); } if ($resultBrowsed['contentType'] == CTDOCUMENT_) { $contentDescType = get_lang('Document'); } $out .= '<b>' . get_lang('Your progression in this module') . '</b><br /><br />' . "\n\n" . '<table align="center" class="claroTable" border="0" cellspacing="2">' . "\n" . '<thead>' . "\n" . '<tr class="headerX">' . "\n" . '<th>' . get_lang('Information') . '</th>' . "\n" . '<th>' . get_lang('Values') . '</th>' . "\n" . '</tr>' . "\n" . '</thead>' . "\n\n" . '<tbody>' . "\n\n"; //display type of the module $out .= '<tr>' . "\n" . '<td>' . get_lang('Module type') . '</td>' . "\n" . '<td><img src="' . $contentType_img . '" alt="' . $contentType_alt . '" /> ' . $contentDescType . '</td>' . "\n" . '</tr>' . "\n\n"; //display total time already spent in the module $out .= '<tr>' . "\n" . '<td>' . get_lang('Total time') . '</td>' . "\n" . '<td>' . $resultBrowsed['total_time'] . '</td>' . "\n" . '</tr>' . "\n\n";
//make update to change the comment in the database for this module case "exComment": if (isset($_REQUEST['module_id']) && isset($_REQUEST['comment'])) { $sql = "UPDATE `" . $TABLEMODULE . "`\n SET `comment` = '" . claro_sql_escape($_REQUEST['comment']) . "'\n WHERE `module_id` = " . (int) $_REQUEST['module_id']; claro_sql_query($sql); } break; } $sql = "SELECT M.*,\n count(M.`module_id`) AS timesUsed\n FROM `" . $TABLEMODULE . "` AS M\n LEFT JOIN `" . $TABLELEARNPATHMODULE . "` AS LPM ON LPM.`module_id` = M.`module_id`\n WHERE M.`contentType` != '" . CTSCORM_ . "'\n AND M.`contentType` != '" . CTLABEL_ . "'\n GROUP BY M.`module_id`\n ORDER BY M.`name` ASC, M.`contentType`ASC, M.`accessibility` ASC"; $result = claro_sql_query($sql); $atleastOne = false; $out .= '<table class="claroTable" width="100%" border="0" cellspacing="2">' . '<thead>' . "\n" . '<tr class="headerX" align="center" valign="top">' . "\n" . '<th>' . "\n" . get_lang('Module') . "\n" . '</th>' . "\n" . '<th>' . "\n" . get_lang('Delete') . "\n" . '</th>' . "\n" . '<th>' . "\n" . get_lang('Rename') . "\n" . '</th>' . "\n" . '<th>' . "\n" . get_lang('Comment') . "\n" . '</th>' . "\n" . '</tr>' . "\n" . '</thead>' . "\n" . '<tbody>' . "\n"; // Display modules of the pool of this course while ($list = mysql_fetch_array($result)) { //DELETE , RENAME, COMMENT $contentType_img = selectImage($list['contentType']); $contentType_alt = selectAlt($list['contentType']); $out .= '<tr>' . "\n" . '<td align="left">' . "\n" . '<img src="' . $contentType_img . '" alt="' . $contentType_alt . '" /> ' . $list['name'] . "\n" . '</td>' . "\n" . '<td align="center">' . "\n" . '<a href="' . claro_htmlspecialchars(Url::Contextualize($_SERVER['PHP_SELF'] . '?cmd=eraseModule&cmdid=' . $list['module_id'])) . '"' . ' onclick="return confirmation(\'' . clean_str_for_javascript($list['name']) . '\', \'' . $list['timesUsed'] . '\');">' . '<img src="' . get_icon_url('delete') . '" alt="' . get_lang('Delete') . '" />' . '</a>' . "\n" . '</td>' . "\n" . '<td align="center">' . "\n" . '<a href="' . claro_htmlspecialchars(Url::Contextualize($_SERVER['PHP_SELF'] . '?cmd=rqRename&module_id=' . $list['module_id'])) . '">' . '<img src="' . get_icon_url('edit') . '" alt="' . get_lang('Rename') . '" />' . '</a>' . "\n" . '</td>' . "\n" . '<td align="center">' . "\n" . '<a href="' . claro_htmlspecialchars(Url::Contextualize($_SERVER['PHP_SELF'] . '?cmd=rqComment&module_id=' . $list['module_id'])) . '">' . '<img src="' . get_icon_url('comment') . '" alt="' . get_lang('Comment') . '" />' . '</a>' . "\n" . '</td>' . "\n" . '</tr>' . "\n\n"; if (isset($list['comment'])) { $out .= '<tr>' . '<td colspan="5">' . '<small>' . $list['comment'] . '</small>' . '</td>' . '</tr>'; } $atleastOne = true; } //end while another module to display if ($atleastOne == false) { $out .= '<tr><td align="center" colspan="5">' . get_lang('No module') . '</td></tr>' . "\n"; } // Display button to add selected modules $out .= '</tbody>' . "\n" . '</table>'; $claroline->display->body->appendContent($out); echo $claroline->display->render();
//$tool_content .= "<div class='row'> // <div class='col-sm-3'> // <strong>$langProgInModuleTitle:</strong> // </div> // <div class='col-sm-9'>hjgfjhgf // </div> // </div> // "; //############################ PROGRESS AND START LINK #############################\\ /* Display PROGRESS */ if ($module->contentType != CTLABEL_) { // if ($resultBrowsed && $module->contentType != CTLABEL_) { $contentType_img = selectImage($resultBrowsed->contentType); $contentType_alt = selectAlt($resultBrowsed->contentType); if ($resultBrowsed->contentType == CTSCORM_ || $resultBrowsed->contentType == CTSCORMASSET_) { $contentDescType = $langSCORMTypeDesc; } if ($resultBrowsed->contentType == CTEXERCISE_) { $contentDescType = $langEXERCISETypeDesc; } if ($resultBrowsed->contentType == CTDOCUMENT_) { $contentDescType = $langDOCUMENTTypeDesc; } if ($resultBrowsed->contentType == CTLINK_) { $contentDescType = $langLINKTypeDesc; } if ($resultBrowsed->contentType == CTCOURSE_DESCRIPTION_) {
// Display modules of the pool of this course if (!$num_results == 0) { $tool_content .= "<table class=\"table-default\"> <tr class='list-header'> <th colspan='2'>" . $langLearningObjects . "</th> <th class='text-center'>" . icon('fa-gears') . "</th> </tr>"; } foreach ($result as $list) { //DELETE , RENAME, COMMENT $contentType_img = selectImage($list->contentType); $contentType_alt = selectAlt($list->contentType); $tool_content .= "<tr><td width='1'>".icon($contentType_img, $contentType_alt)."</td> <td class='text-left'><b>" . q($list->name) . "</b>"; if ($list->comment) { $tool_content .= "<br /><small style=\"color: #a19b99;\"><b>$langComments</b>: " . $list->comment . "</small>"; } $tool_content .= "</td><td class='option-btn-cell'>"; $tool_content .= action_button(array( array('title' => $langRename, 'url' => "$_SERVER[SCRIPT_NAME]?course=$course_code&cmd=rqRename&module_id=$list->module_id", 'icon' => 'fa-pencil'), array('title' => $langComments, 'url' => "$_SERVER[SCRIPT_NAME]?course=$course_code&cmd=rqComment&module_id=$list->module_id",