當前位置: 首頁>>代碼示例>>PHP>>正文


PHP scorm_simple_play函數代碼示例

本文整理匯總了PHP中scorm_simple_play函數的典型用法代碼示例。如果您正苦於以下問題:PHP scorm_simple_play函數的具體用法?PHP scorm_simple_play怎麽用?PHP scorm_simple_play使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了scorm_simple_play函數的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: unset

    unset($SESSION->scorm_scoid);
}
$strscorms = get_string("modulenameplural", "scorm");
$strscorm = get_string("modulename", "scorm");
if ($course->id != SITEID) {
    if ($scorms = get_all_instances_in_course('scorm', $course)) {
        // The module SCORM activity with the least id is the course
        $firstscorm = current($scorms);
        if (!($course->format == 'scorm' && $firstscorm->id == $scorm->id)) {
            $navlinks[] = array('name' => $strscorms, 'link' => "index.php?id={$course->id}", 'type' => 'activity');
        }
    }
}
$pagetitle = strip_tags($course->shortname . ': ' . format_string($scorm->name));
add_to_log($course->id, 'scorm', 'pre-view', 'view.php?id=' . $cm->id, "{$scorm->id}");
if (has_capability('mod/scorm:skipview', get_context_instance(CONTEXT_MODULE, $cm->id)) && scorm_simple_play($scorm, $USER)) {
    exit;
}
//
// Print the page header
//
$navlinks = array();
$navlinks[] = array('name' => format_string($scorm->name, true), 'link' => "view.php?id={$cm->id}", 'type' => 'activityinstance');
$navigation = build_navigation($navlinks);
print_header($pagetitle, $course->fullname, $navigation, '', '', true, update_module_button($cm->id, $course->id, $strscorm), navmenu($course, $cm));
if (has_capability('mod/scorm:viewreport', $context)) {
    $trackedusers = scorm_get_count_users($scorm->id, $cm->groupingid);
    if ($trackedusers > 0) {
        echo "<div class=\"reportlink\"><a {$CFG->frametarget} href=\"report.php?id={$cm->id}\"> " . get_string('viewalluserreports', 'scorm', $trackedusers) . '</a></div>';
    } else {
        echo '<div class="reportlink">' . get_string('noreports', 'scorm') . '</div>';
開發者ID:r007,項目名稱:PMoodle,代碼行數:31,代碼來源:view.php

示例2: array

    if (isset($courseformat->coursedisplay) && $courseformat->coursedisplay == COURSE_DISPLAY_MULTIPAGE) {
        $sectionid = $cm->sectionnum;
    }
    $PAGE->requires->data_for_js('scormplayerdata', array('launch' => $launch, 'currentorg' => $orgidentifier, 'sco' => $scoid, 'scorm' => $scorm->id, 'courseurl' => course_get_url($course, $sectionid)->out(false), 'cwidth' => $scorm->width, 'cheight' => $scorm->height, 'popupoptions' => $scorm->options), true);
    $PAGE->requires->js('/mod/scorm/view.js', true);
}
if (isset($SESSION->scorm)) {
    unset($SESSION->scorm);
}
$strscorms = get_string("modulenameplural", "scorm");
$strscorm = get_string("modulename", "scorm");
$shortname = format_string($course->shortname, true, array('context' => $context));
$pagetitle = strip_tags($shortname . ': ' . format_string($scorm->name));
add_to_log($course->id, 'scorm', 'pre-view', 'view.php?id=' . $cm->id, "{$scorm->id}", $cm->id);
if (empty($launch) && has_capability('mod/scorm:skipview', $contextmodule)) {
    scorm_simple_play($scorm, $USER, $contextmodule, $cm->id);
}
//
// Print the page header
//
$PAGE->set_title($pagetitle);
$PAGE->set_heading($course->fullname);
echo $OUTPUT->header();
echo $OUTPUT->heading(format_string($scorm->name));
if (!empty($action) && confirm_sesskey() && has_capability('mod/scorm:deleteownresponses', $contextmodule)) {
    if ($action == 'delete') {
        $confirmurl = new moodle_url($PAGE->url, array('action' => 'deleteconfirm'));
        echo $OUTPUT->confirm(get_string('deleteuserattemptcheck', 'scorm'), $confirmurl, $PAGE->url);
        echo $OUTPUT->footer();
        exit;
    } else {
開發者ID:tyleung,項目名稱:CMPUT401MoodleExams,代碼行數:31,代碼來源:view.php

示例3: get_config

$PAGE->set_url($url);
$forcejs = get_config('scorm', 'forcejavascript');
if (!empty($forcejs)) {
    $PAGE->add_body_class('forcejavascript');
}
require_login($course->id, false, $cm);
$context = get_context_instance(CONTEXT_COURSE, $course->id);
$contextmodule = get_context_instance(CONTEXT_MODULE, $cm->id);
if (isset($SESSION->scorm_scoid)) {
    unset($SESSION->scorm_scoid);
}
$strscorms = get_string("modulenameplural", "scorm");
$strscorm = get_string("modulename", "scorm");
$pagetitle = strip_tags($course->shortname . ': ' . format_string($scorm->name));
add_to_log($course->id, 'scorm', 'pre-view', 'view.php?id=' . $cm->id, "{$scorm->id}", $cm->id);
if (has_capability('mod/scorm:skipview', $contextmodule) && scorm_simple_play($scorm, $USER, $contextmodule)) {
    exit;
}
//
// Print the page header
//
$PAGE->set_title($pagetitle);
$PAGE->set_heading($course->fullname);
echo $OUTPUT->header();
$currenttab = 'info';
require $CFG->dirroot . '/mod/scorm/tabs.php';
// Print the main part of the page
echo $OUTPUT->heading(format_string($scorm->name));
$attemptstatus = '';
if ($scorm->displayattemptstatus == 1) {
    $attemptstatus = scorm_get_attempt_status($USER, $scorm);
開發者ID:sebastiansanio,項目名稱:tallerdeprogramacion2fiuba,代碼行數:31,代碼來源:view.php


注:本文中的scorm_simple_play函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。