當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。