Exemplo n.º 1
0
$tool_content .="
    <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
Exemplo n.º 2
0
            $num = Database::get()->querySingle("SELECT COUNT(*) AS count
                 FROM lp_rel_learnPath_module AS LPM,
                      lp_module AS M,
                      lp_asset AS A
                WHERE M.module_id = LPM.module_id
                  AND M.startAsset_id = A.asset_id
                  AND A.path = ?s
                  AND LPM.learnPath_id = ?d
                  AND M.course_id = ?d", $insertedExercise, $_SESSION['path_id'], $course_id)->count;

            if ($num == 0) {
                // used in another LP but not in this one, so reuse the module id reference instead of creating a new one
                insertInLearningPath($thisExerciseModule->module_id, $order);
                $messBox .= "<p>" . disp_message_box1(q($exercise->title) . " : " . $langExInsertedAsModule . "<br>", "success") . "</p>";
            } else {
                $messBox .= "<p>" . disp_message_box1(q($listex->title) . " : " . $langExAlreadyUsed . "<br>", "caution") . "</p>";
            }
        }
    } // end if request
} //end while

if(!empty($messBox)) {
    $tool_content .= "<div class='alert alert-warning'>";
    $tool_content .= $messBox;
    $tool_content .= "</div>";
}

//STEP ONE : display form to add an exercise
$tool_content .= display_my_exercises("", "");

//STEP TWO : display learning path content