Ejemplo n.º 1
0
    $tool_content .= action_bar(array(
                array('title' => $langBack,
                      'url' => "index.php",
                      'icon' => 'fa-reply',
                      'level' => 'primary-label'))); 
    
    // display tab header
    $tool_content .= '' . "\n\n"
            . '    <div class="table-responsive"><table class="table-default">' . "\n"
            . '    <tr class="list-header">' . "\n"
            . '      <th class="text-left">' . $langStudent . '</th>' . "\n"
            . '      <th width="5px">' . $langProgress . '</th>' . "\n"
            . '    </tr>' . "\n";

    // display tab content
    foreach ($usersList as $user) {
        $lpProgress = get_learnPath_progress($path_id, $user->id);
        $tool_content .= "\n    <tr>";
        $tool_content .= '' . "\n"
                . '      <td><a href="detailsUserPath.php?course=' . $course_code . '&amp;uInfo=' . $user->id . '&amp;path_id=' . $path_id . '">' . q($user->surname) . ' ' . q($user->givenname) . '</a></td>' . "\n"
                . '      <td align="right">'
                . disp_progress_bar($lpProgress, 1)
                . '</td>' . "\n"
                . '    </tr>' . "\n";
    }
    // foot of table
    $tool_content .= '    ' . "\n\n" . '    </table></div>' . "\n\n";
}

draw($tool_content, 2, null, $head_content);
Ejemplo n.º 2
0
    $tool_content .= "<div class='alert alert-warning'>{$langNoLearningPath}</div>";
    draw($tool_content, 2, null, $head_content);
    exit;
} else {
    $tool_content .= "<div class='alert alert-info'>\n           <b>{$langDumpUserDurationToFile}: </b>1. <a href='dumpuserlearnpathdetails.php?course={$course_code}'>{$langcsvenc2}</a>\n                2. <a href='dumpuserlearnpathdetails.php?course={$course_code}&amp;enc=1253'>{$langcsvenc1}</a>          \n          </div>";
}
// display tab header
$tool_content .= "\n  <table class='table-default'>\n  <tr>\n    <th class='left'><div align='left'>{$langStudent}</div></th>\n    <th width='120'>{$langAm}</th>\n    <th>{$langGroup}</th>\n    <th colspan='2'>{$langProgress}&nbsp;&nbsp;</th>\n  </tr>\n";
// display tab content
$k = 0;
foreach ($usersList as $user) {
    // list available learning paths
    $learningPathList = Database::get()->queryArray("SELECT learnPath_id FROM lp_learnPath WHERE course_id = ?d", $course_id);
    $iterator = 1;
    $globalprog = 0;
    $tool_content .= "  <tr>";
    foreach ($learningPathList as $learningPath) {
        // % progress
        $prog = get_learnPath_progress($learningPath->learnPath_id, $user->id);
        if ($prog >= 0) {
            $globalprog += $prog;
        }
        $iterator++;
    }
    $total = round($globalprog / ($iterator - 1));
    $tool_content .= '    <td><a href="detailsUser.php?course=' . $course_code . '&amp;uInfo=' . $user->id . '">' . q($user->surname) . ' ' . q($user->givenname) . '</a></td>' . '    <td class="center">' . q(uid_to_am($user->id)) . '</td>' . '    <td align="center">' . user_groups($course_id, $user->id) . '</td>' . '    <td class="right" width=\'120\'>' . disp_progress_bar($total, 1) . '</td>' . '    <td align="left" width=\'10\'>' . $total . '%</td>' . '</tr>';
    $k++;
}
// foot of table
$tool_content .= '</table>';
draw($tool_content, 2, null, $head_content);
Ejemplo n.º 3
0
 .'<li>'.$langEmail.': ';
 if( empty($trackedUser['email']) )	$tool_content .= $langNoEmail;
 else 			$tool_content .= $trackedUser['email'];

 $tool_content .= '</li>'."\n"
 .'</ul>'."\n"
 .'</p>'."\n";
*/
// get list of learning paths of this course
// list available learning paths
$lpList = Database::get()->queryArray("SELECT name, learnPath_id\n\t\t\t FROM lp_learnPath \n                        WHERE course_id = ?d\n\t\t     ORDER BY `rank`", $course_id);
// table header
$tool_content .= '<table width="99%" class="tbl_alt">' . "\n" . '      <tr>' . "\n" . '        <th>&nbsp;</th>' . "\n" . '        <th align="left"><div align="left">' . $langLearningPath . '</div></th>' . "\n" . '        <th colspan="2">' . $langProgress . '</th>' . "\n" . '      </tr>' . "\n";
if (count($lpList) == 0) {
    $tool_content .= '    <tr>' . "\n" . '        <td colspan="3" align="center">' . $langNoLearningPath . '</td>' . "\n" . '      </tr>' . "\n";
} else {
    // display each learning path with the corresponding progression of the user
    $k = 0;
    foreach ($lpList as $lpDetails) {
        if ($k % 2 == 0) {
            $tool_content .= "      <tr class=\"even\">";
        } else {
            $tool_content .= "      <tr class=\"odd\">";
        }
        $lpProgress = get_learnPath_progress($lpDetails->learnPath_id, $_GET['uInfo']);
        $tool_content .= '' . "\n" . "        <td width='1'><img src='{$themeimg}/arrow.png' alt='' /></td>\n" . '        <td><a href="detailsUserPath.php?course=' . $course_code . '&amp;uInfo=' . $_GET['uInfo'] . '&amp;path_id=' . $lpDetails->learnPath_id . '">' . htmlspecialchars($lpDetails->name) . '</a></td>' . "\n" . '        <td align="right" width="120">' . "" . disp_progress_bar($lpProgress, 1) . '</td>' . "\n" . '        <td align="left" width="10">' . $lpProgress . '%</td>' . "\n" . '      </tr>' . "\n";
        $k++;
    }
}
$tool_content .= '      </table>' . "\n";
draw($tool_content, 2, null, $head_content);
Ejemplo n.º 4
0
function check_LPM_validity($is_editor, $course_code, $extraQuery = false, $extraDepth = false)
{
    global $course_id;
    $depth = $extraDepth ? "../" : "./";
    if (!isset($_SESSION['path_id']) || !isset($_SESSION['lp_module_id']) || empty($_SESSION['path_id']) || empty($_SESSION['lp_module_id'])) {
        header("Location: " . $depth . "index.php?course={$course_code}");
        exit;
    }
    if ($extraQuery) {
        $lp = Database::get()->querySingle("SELECT visible FROM lp_learnPath WHERE learnPath_id = ?d AND `course_id` = ?d", $_SESSION['path_id'], $course_id);
        if (!$is_editor && $lp->visible == 0) {
            // if the learning path is invisible, don't allow users in it
            header("Location: " . $depth . "index.php?course={$course_code}");
            exit;
        }
        if (!$is_editor) {
            // check for blocked learning path
            $rank0 = Database::get()->querySingle("SELECT `rank` FROM lp_learnPath \n                                WHERE learnPath_id = ?d AND `course_id` = ?d ORDER BY `rank` LIMIT 1", $_SESSION['path_id'], $course_id)->rank;
            $lps = Database::get()->queryArray("SELECT `learnPath_id`, `lock` FROM lp_learnPath WHERE `course_id` = ?d AND `rank` < ?d", $course_id, $rank0);
            foreach ($lps as $lp) {
                if ($lp->lock == 'CLOSE') {
                    $prog = get_learnPath_progress($lp->learnPath_id, $_SESSION['uid']);
                    if ($prog < 100) {
                        header("Location: ./index.php?course={$course_code}");
                    }
                }
            }
        }
    }
    $visfrom = "FROM lp_rel_learnPath_module WHERE learnPath_id = ?d AND module_id = ?d";
    $lpmcnt = Database::get()->querySingle("SELECT COUNT(visible) AS count " . $visfrom, $_SESSION['path_id'], $_SESSION['lp_module_id'])->count;
    $lpm = Database::get()->querySingle("SELECT visible " . $visfrom, $_SESSION['path_id'], $_SESSION['lp_module_id']);
    if ($lpmcnt <= 0 || !$is_editor && $lpm->visible == 0) {
        // if the combination path/module is invalid, don't allow users in it
        header("Location: " . $depth . "index.php?course={$course_code}");
        exit;
    }
    if (!$is_editor) {
        // check if we try to overwrite a blocked module
        $lpm_id = Database::get()->querySingle("SELECT `lock`, `rank` FROM lp_rel_learnPath_module \n                                WHERE `learnPath_id` = ?d AND module_id = ?d", $_SESSION['path_id'], $_SESSION['lp_module_id']);
        $q = Database::get()->queryArray("SELECT learnPath_module_id \n                                            FROM lp_rel_learnPath_module \n                                           WHERE learnPath_id = ?d \n                                             AND `rank` < ?d", $_SESSION['path_id'], $lpm_id->rank);
        foreach ($q as $m) {
            $progress = Database::get()->querySingle("SELECT credit, lesson_status \n                                                        FROM lp_user_module_progress \n                                                       WHERE learnPath_module_id = ?d\n                                                         AND learnPath_id = ?d\n                                                         AND user_id = ?d", $m->learnPath_module_id, $_SESSION['path_id'], $_SESSION['uid']);
            if ($lpm_id->lock == 'CLOSE' && ($progress->credit != 'CREDIT' || $progress->lesson_status != 'COMPLETED' && $progress->lesson_status != 'PASSED')) {
                header("Location: " . $depth . "index.php?course={$course_code}");
                exit;
            }
        }
    }
}
Ejemplo n.º 5
0
function update_user_gradebook_activities($gradebook_id, $uid) { 
    require_once 'include/lib/learnPathLib.inc.php';
    $gradebook = Database::get()->querySingle("SELECT * FROM gradebook WHERE id = ?d", $gradebook_id);
    $gradebookActivities = Database::get()->queryArray("SELECT * FROM gradebook_activities WHERE gradebook_id = ?d AND auto = 1", $gradebook_id);
    foreach ($gradebookActivities as $gradebookActivity) {
        if ($gradebookActivity->module_auto_type == GRADEBOOK_ACTIVITY_LP){
            $grade = get_learnPath_progress($gradebookActivity->module_auto_id, $uid)/100;
            $allow_insert = $grade ? TRUE : FALSE;
        } elseif ($gradebookActivity->module_auto_type == GRADEBOOK_ACTIVITY_EXERCISE) {
            $exerciseUserRecord = Database::get()->querySingle("SELECT total_score, total_weighting "
                    . "FROM exercise_user_record "
                    . "WHERE eid = ?d "
                    . "AND uid = $uid "
                    . "AND record_end_date <= '$gradebook->end_date' "
                    . "AND record_end_date >= '$gradebook->start_date' "
                    . "ORDER BY total_score/total_weighting DESC limit 1", $gradebookActivity->module_auto_id);
            if ($exerciseUserRecord) {
                $grade = $exerciseUserRecord->total_score/$exerciseUserRecord->total_weighting;
                $allow_insert = TRUE;
            }
        } elseif ($gradebookActivity->module_auto_type == GRADEBOOK_ACTIVITY_ASSIGNMENT) {
            $assignment = Database::get()->querySingle("SELECT * FROM assignment WHERE id = ?d", $gradebookActivity->module_auto_id);
            if ($assignment->group_submissions) {
                $group_members = Database::get()->queryArray("SELECT group_id FROM group_members WHERE user_id = ?d", $uid);
                $extra_sql = '';
                if ($group_members) {
                    $group_ids_arr = [];
                    foreach ($group_members as $group_member) {
                        array_push($group_ids_arr, $group_member->group_id);
                    }
                    $sql_ready_group_ids = implode(', ', $group_ids_arr);
                    $grd = Database::get()->querySingle("SELECT assignment_submit.grade AS grade, assignment.max_grade AS max_grade "
                            . "FROM assignment_submit, assignment "
                            . "WHERE assignment_submit.assignment_id = assignment.id "
                            . "AND assignment.id =?d "
                            . "AND assignment_submit.submission_date <= '$gradebook->end_date' "
                            . "AND assignment_submit.submission_date >= '$gradebook->start_date' "                            
                            . "AND assignment_submit.group_id IN ($sql_ready_group_ids)", $gradebookActivity->module_auto_id);                
                }                
            } else {
                $grd = Database::get()->querySingle("SELECT assignment_submit.grade AS grade, assignment.max_grade AS max_grade "
                        . "FROM assignment_submit, assignment "
                        . "WHERE assignment_submit.assignment_id = assignment.id "
                        . "AND assignment.id =?d "
                        . "AND assignment_submit.submission_date <= '$gradebook->end_date' "
                        . "AND assignment_submit.submission_date >= '$gradebook->start_date' "                         
                        . "AND assignment_submit.uid = $uid", $gradebookActivity->module_auto_id);                
            }
            if (isset($grd) && $grd) {
                $grade = $grd->grade/$grd->max_grade;            
                $allow_insert = TRUE;
            }         
        }
        if (isset($allow_insert) && $allow_insert) {
            update_gradebook_book($uid, $gradebookActivity->module_auto_id, $grade, $gradebookActivity->module_auto_type, $gradebook_id);
        }
        unset($allow_insert);
    }
}
Ejemplo n.º 6
0
if (get_conf('is_trackingEnabled')) {
    // display a list of user and their respective progress
    $sql = "SELECT U.`nom`, U.`prenom`, U.`user_id`\n          FROM `" . $tbl_user . "` AS U, `" . $tbl_rel_course_user . "`     AS CU\n          WHERE U.`user_id`= CU.`user_id`\n           AND CU.`code_cours` = '" . claro_sql_escape(claro_get_current_course_id()) . "'";
    $usersList = claro_sql_query_fetch_all($sql);
    // display tab header
    $out .= '<table class="claroTable emphaseLine" width="100%" border="0" cellspacing="2">' . "\n\n" . '<tr class="headerX" align="center" valign="top">' . "\n" . '<th>' . get_lang('Student') . '</th>' . "\n" . '<th colspan="2">' . get_lang('Progress') . '</th>' . "\n" . '</tr>' . "\n\n" . '<tbody>' . "\n\n";
    // display tab content
    foreach ($usersList as $user) {
        // list available learning paths
        $sql = "SELECT LP.`learnPath_id`\n                 FROM `" . $tbl_lp_learnPath . "` AS LP";
        $learningPathList = claro_sql_query_fetch_all($sql);
        $iterator = 1;
        $globalprog = 0;
        foreach ($learningPathList as $learningPath) {
            // % progress
            $prog = get_learnPath_progress($learningPath['learnPath_id'], $user['user_id']);
            if ($prog >= 0) {
                $globalprog += $prog;
            }
            $iterator++;
        }
        if ($iterator == 1) {
            $out .= '<tr><td align="center" colspan="8">' . get_lang('No learning path') . '</td></tr>' . "\n\n";
        } else {
            $total = round($globalprog / ($iterator - 1));
            $out .= '<tr>' . "\n" . '<td><a href="' . get_path('clarolineRepositoryWeb') . 'tracking/userReport.php?userId=' . $user['user_id'] . '">' . $user['nom'] . ' ' . $user['prenom'] . '</a></td>' . "\n" . '<td align="right">' . claro_html_progress_bar($total, 1) . '</td>' . "\n" . '<td align="left"><small>' . $total . '%</small></td>' . "\n" . '</tr>' . "\n\n";
        }
    }
    // foot of table
    $out .= '</tbody>' . "\n\n" . '</table>' . "\n\n";
} else {
Ejemplo n.º 7
0
        }
        // DISPLAY MOVE DOWN COMMAND only if it is not the bottom learning path
        if ($iterator < $LPNumber) {
            $out .= '<td>' . "\n" . '<a href="' . claro_htmlspecialchars(Url::Contextualize($_SERVER['PHP_SELF'] . '?cmd=moveDown&move_path_id=' . $list['learnPath_id'])) . '">' . "\n" . '<img src="' . get_icon_url('move_down') . '" alt="' . get_lang('Move down') . '" />' . "\n" . '</a>' . "\n" . '</td>' . "\n";
        } else {
            $out .= '<td>&nbsp;</td>' . "\n";
        }
        // EXPORT links
        $out .= '<td>' . "\n" . '<a href="' . claro_htmlspecialchars(Url::Contextualize($_SERVER['PHP_SELF'] . '?cmd=export&path_id=' . $list['learnPath_id'])) . '" >' . '<img src="' . get_icon_url('export') . '" alt="' . get_lang('Export') . '" />' . '</a>' . "\n" . '</td>' . "\n";
        if (get_conf('is_trackingEnabled')) {
            // statistics links
            $out .= '<td>' . "\n" . '<a href="' . claro_htmlspecialchars(Url::Contextualize(get_path('clarolineRepositoryWeb') . 'tracking/learnPath_details.php?path_id=' . $list['learnPath_id'])) . '">' . "\n" . '<img src="' . get_icon_url('statistics') . '" alt="' . get_lang('Tracking') . '" />' . '</a>' . "\n" . '</td>' . "\n";
        }
    } elseif ($lpUid) {
        // % progress
        $prog = get_learnPath_progress($list['learnPath_id'], $lpUid);
        if (!isset($globalprog)) {
            $globalprog = 0;
        }
        if ($prog >= 0) {
            $globalprog += $prog;
        }
        $out .= '<td align="right">' . claro_html_progress_bar($prog, 1) . '</td>' . "\n" . '<td align="left">' . '<small>' . $prog . '% </small>' . '</td>';
    }
    $out .= '</tr>' . "\n";
    $iterator++;
}
// end while
$out .= '</tbody>' . "\n" . '<tfoot>';
if ($iterator == 1) {
    $out .= '<tr>' . "\n" . '<td align="center" colspan="8">' . "\n" . get_lang('No learning path') . '</td>' . "\n" . '</tr>';
Ejemplo n.º 8
0
        header("Location: ./learningPathAdmin.php?course=$course_code&path_id=" . $_SESSION['path_id']);
        exit();
} else {
        if ($lp->visible == 0) {
            // if the learning path is invisible, don't allow users in it
            header("Location: ./index.php?course=$course_code");
            exit();
        }

        // check for blocked learning path        
	$lps = Database::get()->querySingle("SELECT `learnPath_id`, `rank` FROM lp_learnPath 
                            WHERE learnPath_id = ?d AND course_id = $course_id ORDER BY `rank`", $_SESSION['path_id']);
        $lpaths = Database::get()->queryArray("SELECT `learnPath_id`, `lock` FROM lp_learnPath WHERE course_id = ?d AND `rank` < ?d", $course_id, $lps->rank);
        foreach ($lpaths as $lp) {
                if ($lp->lock == 'CLOSE') {
                    $prog = get_learnPath_progress($lp->learnPath_id, $_SESSION['uid']);                    
                    if ($prog != 0) {                                                    
                        header("Location: ./index.php?course=$course_code");
                    }
                }
        }
}

// main page
if ($uid) {
    $uidCheckString = "AND UMP.`user_id` = " . intval($uid);
} else { // anonymous
    $uidCheckString = "AND UMP.`user_id` IS NULL ";
}

$sql = "SELECT LPM.`learnPath_module_id`, LPM.`parent`,
Ejemplo n.º 9
0
                }
            }
        }
    } else {
        //else of !$is_blocked condition , we have already been blocked before, so we continue beeing blocked : we don't display any links to next paths any longer
        $tool_content .= "      <td width='20'><img src='{$themeimg}/arrow.png' alt='' /></td><td>" . $list->name . "</td>\n";
    }
    // DISPLAY ADMIN LINK-----------------------------------------------------------
    if ($is_editor) {
        // 5 administration columns
        // LOCK link
        $is_real_dir = is_dir(realpath($webDir . "/courses/" . $course_code . "/scormPackages/path_" . $list->learnPath_id));
        $tool_content .= "      <td class='option-btn-cell'>" . action_button(array(array('title' => $langBlock, 'url' => $_SERVER['SCRIPT_NAME'] . "?course={$course_code}&amp;cmd=mkBlock&amp;cmdid=" . $list->learnPath_id, 'icon' => 'fa-unlock', 'show' => $list->lock == 'OPEN'), array('title' => $langAltMakeNotBlocking, 'url' => $_SERVER['SCRIPT_NAME'] . "?course={$course_code}&amp;cmd=mkUnblock&amp;cmdid=" . $list->learnPath_id, 'icon' => 'fa-lock', 'level' => 'primary', 'show' => !($list->lock == 'OPEN')), array('title' => $langTracking, 'url' => "details.php?course={$course_code}&amp;path_id=" . $list->learnPath_id, 'icon' => 'fa-search'), array('title' => $langVisible, 'url' => $_SERVER['SCRIPT_NAME'] . "?course={$course_code}&amp;cmd=mkVisibl&amp;visibility_path_id=" . $list->learnPath_id, 'icon' => 'fa-eye-slash', 'show' => $list->visible == 0), array('title' => $langVisible, 'url' => $_SERVER['SCRIPT_NAME'] . "?course={$course_code}&amp;cmd=mkInvisibl&amp;visibility_path_id=" . $list->learnPath_id, 'icon' => 'fa-plus-circle', 'confirm' => $list->lock == 'CLOSE' ? $langAlertBlockingPathMadeInvisible : null, 'confirm_title' => "", 'confirm_button' => $langAccept, 'show' => $list->visible != 0), array('title' => $langModify, 'url' => "learningPathAdmin.php?course={$course_code}&amp;path_id=" . $list->learnPath_id, 'icon' => 'fa-edit'), array('title' => $langDelete, 'url' => $_SERVER['SCRIPT_NAME'] . "?course={$course_code}&amp;cmd=delete&amp;del_path_id=" . $list->learnPath_id, 'icon' => 'fa-times', 'class' => 'delete', 'confirm' => $is_real_dir ? $langAreYouSureToDeleteScorm + " '" . $list->name . "'" : $langDelete), array('title' => $langUp, 'level' => 'primary', 'url' => $_SERVER['SCRIPT_NAME'] . "?course={$course_code}&amp;cmd=moveUp&amp;move_path_id=" . $list->learnPath_id, 'icon' => 'fa-arrow-up', 'disabled' => $iterator == 1), array('title' => $langDown, 'level' => 'primary', 'url' => $_SERVER['SCRIPT_NAME'] . "?course={$course_code}&amp;cmd=moveDown&amp;move_path_id=" . $list->learnPath_id, 'icon' => 'fa-arrow-down', 'disabled' => $iterator >= $LPNumber), array('title' => $langExport2004, 'url' => $_SERVER['SCRIPT_NAME'] . '?course=' . $course_code . '&amp;cmd=export&amp;path_id=' . $list->learnPath_id, 'icon' => 'fa-download'), array('title' => $langExport12, 'url' => $_SERVER['SCRIPT_NAME'] . '?course=' . $course_code . '&amp;cmd=export12&amp;path_id=' . $list->learnPath_id, 'icon' => 'fa-download'), array('title' => $langExportIMSCP, 'url' => $_SERVER['SCRIPT_NAME'] . '?course=' . $course_code . '&amp;cmd=exportIMSCP&amp;path_id=' . $list->learnPath_id, 'icon' => 'fa-download'))) . "</td>\n";
    } elseif ($uid) {
        // % progress
        $prog = get_learnPath_progress($list->learnPath_id, $uid);
        if (!isset($globalprog)) {
            $globalprog = 0;
        }
        if ($prog >= 0) {
            $globalprog += $prog;
        }
        $tool_content .= "<td class='text-right' width='120'>" . disp_progress_bar($prog, 1) . "</td>\n";
        $tool_content .= "<td class='text-left' width='10'>" . $prog . "% </td>";
    }
    $tool_content .= "</tr>\n";
    $iterator++;
    $ind++;
}
// end while
if (!$is_editor && $iterator != 1 && $uid) {
Ejemplo n.º 10
0
function getLearnpathProgressStudentRow($path_id, $user)
{
    if (!isLearnPathProgressionEmpty($user['user_id'], $path_id)) {
        $groupBy = empty($_GET['groupBy']) ? '' : $_GET['groupBy'];
        $resetCell = '<td align="center"><a href="' . Url::Contextualize($_SERVER['PHP_SELF'] . '?cmd=resetLearnPath&path_id=' . (int) $path_id . '&user_id=' . (int) $user['user_id'] . '&groupBy=' . $groupBy) . '" onclick="return confirm(\'' . clean_str_for_javascript(get_lang('Do you really want to reset the learning path of ') . $user['prenom'] . ' ' . $user['nom']) . '?\');"><img src="' . get_icon_url('delete') . '" alt="' . get_lang('Reset') . '" /></a></td>' . "\n";
    } else {
        $resetCell = '<td align="center">' . get_lang('No results available') . '</td>' . "\n";
    }
    $lpProgress = get_learnPath_progress($path_id, $user['user_id']);
    $out = '<tr>' . "\n" . '<td><a href="lp_modules_details.php?uInfo=' . $user['user_id'] . '&amp;path_id=' . $path_id . '">' . $user['nom'] . ' ' . $user['prenom'] . '</a></td>' . "\n" . '<td align="right">' . claro_html_progress_bar($lpProgress, 1) . '</td>' . "\n" . '<td align="left"><small>' . $lpProgress . '%</small></td>' . "\n" . $resetCell . '</tr>' . "\n\n";
    return $out;
}
Ejemplo n.º 11
0
if ($moduleNb > 1) {
    if ($previousModule != '') {
        $prevNextString .= '<li><a href="navigation/viewModule.php?course=' . $course_code . '&amp;viewModule_id=' . $previousModule . '" target="scoFrame"><i class="fa fa-arrow-circle-left fa-lg"></i> </a></li>';
    } else {
        $prevNextString .= "<li><a href='#' class='inactive'><i class='fa fa-arrow-circle-left'></i></a></li>";
    }
    if ($nextModule != '') {
        $prevNextString .= '<li><a href="navigation/viewModule.php?course=' . $course_code . '&amp;viewModule_id=' . $nextModule . '" target="scoFrame"><i class="fa fa-arrow-circle-right fa-lg"></i></a></li>';
    } else {
        $prevNextString .= "<li><a href='#' class='inactive'><i class='fa fa-arrow-circle-right'></i></a></li>";
    }
}
load_js('jquery-' . JQUERY_VERSION . '.min');
echo "<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN' 'http://www.w3.org/TR/html4/loose.dtd'>\n<html>\n<head><title>-</title>\n    <meta http-equiv='Content-Type' content='text/html; charset={$charset}'>\n    <!-- jQuery -->\n    <script type='text/javascript' src='{$urlAppend}js/jquery-2.1.1.min.js'></script>\n\n    <!-- Latest compiled and minified JavaScript -->\n    <script src='{$urlAppend}template/default/js/bootstrap.min.js'></script>\n        \n    <script type='text/javascript' src='{$urlAppend}js/jquery.cookie.js'></script>\n        \n    <!-- Our javascript -->\n    <script type='text/javascript' src='{$urlAppend}template/default/js/main.js'></script>\n\n    <!-- Latest compiled and minified CSS -->\n    <link rel='stylesheet' href='{$urlAppend}template/default/CSS/bootstrap-custom.css'>\n\n    <!-- Optional theme -->\n    <link rel='stylesheet' href='{$urlAppend}template/default/CSS/bootstrap-theme.min.css'>\n\n    <!-- Font Awesome - A font of icons -->\n    <link href='{$urlAppend}template/default/CSS/font-awesome-4.2.0/css/font-awesome.css' rel='stylesheet'>\n        \n    {$head_content}\n\n    <style>\n        .navbar-inverse .navbar-nav > li > a {color: whitesmoke;}\n        .navbar-inverse .navbar-nav > li > a.inactive, .navbar-inverse .navbar-nav > li > a.inactive:hover, .navbar-inverse .navbar-nav > li > a.inactive:focus {color: #9d9d9d; cursor: default;}\n        .navbar-inverse .navbar-nav > li > a:hover, .navbar-inverse .navbar-nav > li > a:focus { color: #9BCCF7; }   \n        a#leftTOCtoggler {\n            color: whitesmoke;\n        }\n        .navbar-collapse.collapse {\n        display: block!important;\n        }\n\n        .navbar-nav>li, .navbar-nav {\n        float: left !important;\n        }\n\n        .navbar-nav.navbar-right:last-child {\n        margin-right: -15px !important;\n        }\n\n        .navbar-right {\n        float: right!important;\n        }        \n    </style>    \n    <script type='text/javascript'>\n    /* <![CDATA[ */\n    \n    \$(document).ready(function() {\n        var leftTOChiddenStatus = 0;\n        if (\$.cookie('leftTOChiddenStatus') !== undefined) {\n            leftTOChiddenStatus = \$.cookie('leftTOChiddenStatus');\n        }\n        var fs = window.parent.document.getElementById('colFrameset');\n        var fsJQe = \$('#colFrameset', window.parent.document);\n        if (leftTOChiddenStatus != fsJQe.hasClass('hidden')) {\n            fsJQe.toggleClass('hidden');\n            if (fsJQe.hasClass('hidden')) {\n                fs.cols = '0, *';\n            } else {\n                fs.cols = '200, *';\n            }\n        }\n        \$('#leftTOCtoggler').on('click', function() {\n            var fs = window.parent.document.getElementById('colFrameset');\n            var fsJQe = \$('#colFrameset', window.parent.document);\n            \n            fsJQe.toggleClass('hidden');\n            if (fsJQe.hasClass('hidden')) {\n                fs.cols = '0, *';\n                \$.cookie('leftTOChiddenStatus', 1, { path: '/' });\n            } else {\n                fs.cols = '200, *';\n                \$.cookie('leftTOChiddenStatus', 0, { path: '/' });\n            }\n        });\n    });\n    \n    /* ]]> */\n    </script>\n</head>\n<body>\n\n    <nav class='navbar navbar-inverse navbar-static-top' role='navigation'>\n            <div class='container-fluid'>\n                <div class='navbar-header col-xs-2'>\n                  <a id='leftTOCtoggler' class='btn pull-left' style='margin-top:12px;'><i class='fa fa-bars fa-lg'></i></a>\n                  <a class='navbar-brand hidden-xs' href='#'><img class='img-responsive' style='height:20px;' src='{$themeimg}/eclass-new-logo-small.png'></a>\n                </div>\n                <div class='navbar-header col-xs-10 pull-right'>\n                    <ul class='nav navbar-nav navbar-right'>\n                        {$prevNextString}\n                        <li><a href='{$returl}' target='_top'><i class='fa fa-reply fa-lg'></i> <span class='hidden-xs'>{$langBack}</span></a></li>\n                    </ul>                \n                    <div class='pull-right'>";
if ($uid) {
    $lpProgress = get_learnPath_progress((int) $_SESSION['path_id'], $uid);
    echo disp_progress_bar($lpProgress, 1);
}
echo "</div>\n                </div>                \n            </div>       \n    </nav>\n    </body>\n</html>";
//<div class='header'>
//    <div class='tools'>
//    <div class='lp_right'>$prevNextString&nbsp;<a href='$returl' target='_top'>
//        <img src='$themeimg/lp/nofullscreen.png' alt='$langQuitViewer' title='$langQuitViewer' /></a></div>
//    <div class='lp_left'>
//        <a href='{$urlAppend}courses/$course_code' target='_top' title='" .
// q($currentCourseName) . "'>" . q(ellipsize($currentCourseName, 35)) . "</a> &#187;
//        <a href='{$urlAppend}modules/learnPath/index.php?course=$course_code' target='_top'>
//                $langLearningPaths</a> &#187;
//        <a href='$returl' title='" . q($lpName) . "' target='_top'>" . q(ellipsize($lpName, 40)) . "</a>
//        &nbsp;&nbsp;|&nbsp;&nbsp;
//        <a id='leftTOCtoggler' href='#'>$langLPViewerToggleLeftTOC</a></div>