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


PHP lesson_display_teacher_warning函数代码示例

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


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

示例1: redirect

            $result->newpageid = LESSON_EOL;
        } else {
            $result->newpageid = $page->nextpageid;
        }
    } else {
        $result->newpageid = $lesson->cluster_jump($page->id);
    }
}
if ($result->nodefaultresponse) {
    // Don't display feedback
    redirect(new moodle_url('/mod/lesson/view.php', array('id' => $cm->id, 'pageid' => $result->newpageid)));
}
/// Set Messages
if ($canmanage) {
    // This is the warning msg for teachers to inform them that cluster and unseen does not work while logged in as a teacher
    if (lesson_display_teacher_warning($lesson)) {
        $warningvars = new stdClass();
        $warningvars->cluster = get_string("clusterjump", "lesson");
        $warningvars->unseen = get_string("unseenpageinbranch", "lesson");
        $lesson->add_message(get_string("teacherjumpwarning", "lesson", $warningvars));
    }
    // Inform teacher that s/he will not see the timer
    if ($lesson->timed) {
        $lesson->add_message(get_string("teachertimerwarning", "lesson"));
    }
}
// Report attempts remaining
if ($result->attemptsremaining != 0 && !$lesson->review && !$reviewmode) {
    $lesson->add_message(get_string('attemptsremaining', 'lesson', $result->attemptsremaining));
}
// Report if max attempts reached
开发者ID:sebastiansanio,项目名称:tallerdeprogramacion2fiuba,代码行数:31,代码来源:continue.php

示例2: lesson_cluster_jump

            // if teacher, go to next page
            $newpageid = LESSON_EOL;
        } else {
            $newpageid = $page->nextpageid;
        }
    } else {
        $newpageid = lesson_cluster_jump($lesson->id, $USER->id, $pageid);
    }
}
if ($nodefaultresponse) {
    // Don't display feedback
    redirect("{$CFG->wwwroot}/mod/lesson/view.php?id={$cm->id}&pageid={$newpageid}");
}
/// Set Messages
// This is the warning msg for teachers to inform them that cluster and unseen does not work while logged in as a teacher
if (has_capability('mod/lesson:manage', $context) and lesson_display_teacher_warning($lesson->id)) {
    $warningvars->cluster = get_string("clusterjump", "lesson");
    $warningvars->unseen = get_string("unseenpageinbranch", "lesson");
    lesson_set_message(get_string("teacherjumpwarning", "lesson", $warningvars));
}
// Inform teacher that s/he will not see the timer
if ($lesson->timed and has_capability('mod/lesson:manage', $context)) {
    lesson_set_message(get_string("teachertimerwarning", "lesson"));
}
// Report attempts remaining
if ($attemptsremaining != 0) {
    lesson_set_message(get_string('attemptsremaining', 'lesson', $attemptsremaining));
}
// Report if max attempts reached
if ($maxattemptsreached != 0) {
    lesson_set_message('(' . get_string("maximumnumberofattemptsreached", "lesson") . ')');
开发者ID:BackupTheBerlios,项目名称:samouk-svn,代码行数:31,代码来源:continue.php


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