当前位置: 首页>>代码示例>>PHP>>正文


PHP lesson_unseen_question_jump函数代码示例

本文整理汇总了PHP中lesson_unseen_question_jump函数的典型用法代码示例。如果您正苦于以下问题:PHP lesson_unseen_question_jump函数的具体用法?PHP lesson_unseen_question_jump怎么用?PHP lesson_unseen_question_jump使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了lesson_unseen_question_jump函数的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: get_string

                    }
                    if (!empty($errors)) {
                        // print out the errors if any
                        echo $lessonoutput->header($lesson, $cm, '', false, null, get_string('completethefollowingconditions', 'lesson', format_string($lesson->name)));
                        echo $lessonoutput->dependancy_errors($dependentlesson, $errors);
                        echo $lessonoutput->footer();
                        exit;
                    }
                }
            }
        }
    }
}
// this is called if a student leaves during a lesson
if ($pageid == LESSON_UNSEENBRANCHPAGE) {
    $pageid = lesson_unseen_question_jump($lesson, $USER->id, $pageid);
}
// display individual pages and their sets of answers
// if pageid is EOL then the end of the lesson has been reached
// for flow, changed to simple echo for flow styles, michaelp, moved lesson name and page title down
$attemptflag = false;
if (empty($pageid)) {
    // make sure there are pages to view
    if (!$DB->get_field('lesson_pages', 'id', array('lessonid' => $lesson->id, 'prevpageid' => 0))) {
        if (!$canmanage) {
            $lesson->add_message(get_string('lessonnotready2', 'lesson'));
            // a nice message to the student
        } else {
            if (!$DB->count_records('lesson_pages', array('lessonid' => $lesson->id))) {
                redirect("{$CFG->wwwroot}/mod/lesson/edit.php?id={$cm->id}");
                // no pages - redirect to add pages
开发者ID:alanaipe2015,项目名称:moodle,代码行数:31,代码来源:view.php

示例2: elseif

} elseif ($result->newpageid != LESSON_CLUSTERJUMP && $page->id != 0 && $result->newpageid > 0) {
    // going to check to see if the page that the user is going to view next, is a cluster page.
    // If so, dont display, go into the cluster.  The $result->newpageid > 0 is used to filter out all of the negative code jumps.
    $newpage = $lesson->load_page($result->newpageid);
    if ($newpageid = $newpage->override_next_page($result->newpageid)) {
        $result->newpageid = $newpageid;
    }
} elseif ($result->newpageid == LESSON_UNSEENBRANCHPAGE) {
    if ($canmanage) {
        if ($page->nextpageid == 0) {
            $result->newpageid = LESSON_EOL;
        } else {
            $result->newpageid = $page->nextpageid;
        }
    } else {
        $result->newpageid = lesson_unseen_question_jump($lesson, $USER->id, $page->id);
    }
} elseif ($result->newpageid == LESSON_PREVIOUSPAGE) {
    $result->newpageid = $page->prevpageid;
} elseif ($result->newpageid == LESSON_RANDOMPAGE) {
    $result->newpageid = lesson_random_question_jump($lesson, $page->id);
} elseif ($result->newpageid == LESSON_CLUSTERJUMP) {
    if ($canmanage) {
        if ($page->nextpageid == 0) {
            // if teacher, go to next page
            $result->newpageid = LESSON_EOL;
        } else {
            $result->newpageid = $page->nextpageid;
        }
    } else {
        $result->newpageid = $lesson->cluster_jump($page->id);
开发者ID:sebastiansanio,项目名称:tallerdeprogramacion2fiuba,代码行数:31,代码来源:continue.php


注:本文中的lesson_unseen_question_jump函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。