Пример #1
0
    // 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 ####\\
    // this is a comment for THIS module in THIS learning path
    if ($cmd == "updatespecificComment") {
        $out .= commentBox(LEARNINGPATHMODULE_, UPDATE_);
    } elseif ($cmd == "delspecificComment") {
        $out .= commentBox(LEARNINGPATHMODULE_, DELETE_);
    } else {
        $out .= commentBox(LEARNINGPATHMODULE_, DISPLAY_);
    }
}
//  if($module['contentType'] != CTLABEL_ )
//#####################################################################################################\\
//################################## 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 #############################\\
Пример #2
0
//############################ 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>&nbsp;\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>";
}
// --------------- learning path course admin links ------------------------------
if (!isset($displayCreateLabelForm)) {
    $tool_content .= "\n    <tr>\n      <th width=\"200\">{$langLabel}:</th>\n      <td><a href=\"" . $_SERVER['SCRIPT_NAME'] . "?course={$course_code}&amp;cmd=createLabel\">" . $langCreate . "</a></td>\n    </tr>";
}
$tool_content .= "\n    <tr>\n      <th rowspan=\"2\">{$langLearningObjects}:</th>\n      <td>";
$tool_content .= "{$langAdd}: <a href=\"insertMyDoc.php?course={$course_code}\" title=\"{$langDocumentAsModule}\">" . $langDocumentAsModuleLabel . "</a> | <a href=\"insertMyExercise.php?course={$course_code}\" title=\"{$langExerciseAsModule}\">" . $langExerciseAsModuleLabel . "</a> | <a href=\"insertMyLink.php?course={$course_code}\" title=\"{$langLinkAsModule}\">" . $langLinkAsModuleLabel . "</a> | <a href=\"insertMyMedia.php?course={$course_code}\" title=\"{$langMediaAsModule}\">" . $langMediaAsModuleLabel . "</a> | <a href=\"insertMyDescription.php?course={$course_code}\" title=\"{$langCourseDescriptionAsModule}\">" . $langCourseDescriptionAsModuleLabel . "</a>\n      </td>\n    </tr>";
$tool_content .= "\n    <tr>\n      <td>{$langReuse}: <a href=\"insertMyModule.php?course={$course_code}\" title=\"{$langModuleOfMyCourse}\">" . $langModuleOfMyCourse . "</a>\n      </td>\n    </tr>";
$tool_content .= "\n    </table>\n    </fieldset>";
if (isset($displayChangePosForm) && $displayChangePosForm) {
Пример #3
0
for ($i = 0; $i < sizeof($flatElementList); $i++) {
    if ($flatElementList[$i]['children'] > $maxDeep) {
        $maxDeep = $flatElementList[$i]['children'];
    }
}

/* ================================================================
  OUTPUT STARTS HERE
  ================================================================ */

// comment
if (commentBox(LEARNINGPATH_, DISPLAY_)) {
    $tool_content .= "
        <div class='row'>
            <div class='col-xs-12'>"
                . commentBox(LEARNINGPATH_, DISPLAY_) .
            "</div>
        </div>
    ";
}

// --------------------------- module table header --------------------------
$tool_content .= "<div class='table-responsive'>";
$tool_content .= "<table class='table-default'>";
$tool_content .= "<tr class='list-header'><th colspan=\"" . ($maxDeep + 2) . "\"><div align=\"left\">&nbsp;&nbsp;<b>" . $langLearningObjects . "</b></div></th>\n";


// show only progress column for authenticated users
if ($uid) {
    $tool_content .= '<th><b>' . $langProgress . '</b></th>' . "\n";
}
Пример #4
0
}
/* ================================================================
  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 .= '&nbsp;&nbsp;&nbsp;<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";
    }
}
$out .= '</tr>' . "\n\n" . '<tbody>' . "\n\n";
Пример #5
0
$first_blocked = false;
$moduleNb = 0;
// look for maxDeep
$maxDeep = 1;
// used to compute colspan of <td> cells
for ($i = 0; $i < sizeof($flatElementList); $i++) {
    if ($flatElementList[$i]['children'] > $maxDeep) {
        $maxDeep = $flatElementList[$i]['children'];
    }
}
/* ================================================================
  OUTPUT STARTS HERE
  ================================================================ */
// comment
if (commentBox(LEARNINGPATH_, DISPLAY_)) {
    $tool_content .= "\n    <table width='100%' class='tbl'>\n    <tr>\n      <th><div align='left'>" . $langComments . "&nbsp;" . $langLearningPath1 . ":</div></th>\n    </tr>\n    <tr class='odd'>\n      <td><small>" . commentBox(LEARNINGPATH_, DISPLAY_) . "</small></td>\n    </tr>\n    </table>\n    <br />";
}
// --------------------------- module table header --------------------------
$tool_content .= "<table width='99%' class='tbl_alt'>";
$tool_content .= "<tr><th colspan=\"" . ($maxDeep + 2) . "\"><div align=\"left\">&nbsp;&nbsp;<b>" . $langLearningObjects . "</b></div></th>\n";
// show only progress column for authenticated users
if ($uid) {
    $tool_content .= '<th colspan="2"><b>' . $langProgress . '</b></th>' . "\n";
}
$tool_content .= "</tr>\n";
// ------------------ module table list display -----------------------------------
if (!isset($globalProg)) {
    $globalProg = 0;
}
$ind = 1;
foreach ($flatElementList as $module) {