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


PHP lms_steam::semester_get_courses方法代码示例

本文整理汇总了PHP中lms_steam::semester_get_courses方法的典型用法代码示例。如果您正苦于以下问题:PHP lms_steam::semester_get_courses方法的具体用法?PHP lms_steam::semester_get_courses怎么用?PHP lms_steam::semester_get_courses使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在lms_steam的用法示例。


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

示例1: deleteExamDataOnCourse

<?php

include "../../../etc/koala.conf.php";
include "../classes/exam_organization_conf.php";
function deleteExamDataOnCourse($courseObject, $ageOfDataInDays)
{
}
echo "Script for deleting marked exam data\n";
$newline = "\n";
echo "Loggin in...{$newline}";
$steam_user = new lms_user(STEAM_ROOT_LOGIN, STEAM_ROOT_PW);
//TODO: use phpsteam here. this fails if wrong login data for root
$steam_user->login();
$user_module = $GLOBALS["STEAM"]->get_module("users");
$current_semester = steam_factory::groupname_to_object($GLOBALS["STEAM"]->get_id(), SYNC_KOALA_SEMESTER, 0);
echo "Current semester is {$current_semester} {$newline}";
//$courses_koala  = lms_steam::semester_get_courses( $current_semester->get_id() );
$courses_koala = lms_steam::semester_get_courses(1117);
//id der kurs-gruppe
echo "Searching for courses...{$newline}";
foreach ($courses_koala as $course) {
    echo "Course found {$newline}";
}
echo "finished searching for courses!{$newline}";
开发者ID:rolwi,项目名称:koala,代码行数:24,代码来源:deleteMarkedExamData.php

示例2: define

#!/usr/bin/php5
<?php 
require_once "/var/www/koala/etc/koala.conf.php";
require_once PATH_CLASSES . "lms_ldap.class.php";
require_once PATH_LIB . "cache_handling.inc.php";
require_once "Cache/Lite/Function.php";
if (!defined("LOG_HISLSFSYNC")) {
    define("LOG_HISLSFSYNC", LOG_MESSAGES);
}
logging::write_log(LOG_HISLSFSYNC, "HISLSF_SYNC\t=== START ===");
// SEMESTER UND KURSE ERMITTELN AUS KOALA ERMITTELN
$steam_user = new lms_user(STEAM_ROOT_LOGIN, STEAM_ROOT_PW);
$steam_user->login();
$user_module = $GLOBALS["STEAM"]->get_module("users");
$current_semester = steam_factory::groupname_to_object($GLOBALS["STEAM"]->get_id(), SYNC_KOALA_SEMESTER, 0);
$courses_koala = lms_steam::semester_get_courses($current_semester->get_id());
$hislsf_course_ids = array();
foreach ($courses_koala as $course) {
    if ($course["COURSE_HISLSF_ID"] > 0) {
        $hislsf_course_ids[$course["COURSE_HISLSF_ID"]] = SYNC_KOALA_SEMESTER . "." . $course["OBJ_NAME"];
    }
}
// DATENBANK INITIALISIEREN
$db = mysql_connect(SYNC_DB_SERVER, SYNC_DB_USER, SYNC_DB_PW);
if (!$db) {
    error_log("HISLSF_SYNC\tKeine Verbindung zur Datenbank");
    exit;
}
if (!mysql_select_db(SYNC_DB_NAME, $db)) {
    error_log("HISLSF_SYNC\tAuswahl der Datenbank schlug fehl");
    exit;
开发者ID:rolwi,项目名称:koala,代码行数:31,代码来源:synchronize_participants.php

示例3: header

<?php

include_once "../../etc/koala.conf.php";
$portal = lms_portal::get_instance();
$portal->initialize(GUEST_NOT_ALLOWED);
$user = lms_steam::get_current_user();
if (!lms_steam::is_koala_admin($user)) {
    header("location:/");
    exit;
}
$search_extension = "exam_organization";
$result = array();
$courses = lms_steam::semester_get_courses(lms_steam::get_current_semester()->get_id());
foreach ($courses as $course) {
    $koala_course = new koala_group_course(steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $course["OBJ_ID"]));
    $extensions = $koala_course->get_extensions();
    foreach ($extensions as $extension) {
        if ($extension->get_name() == $search_extension) {
            $result[] = $course;
        }
    }
}
//var_dump($result);
$html = <<<END
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>koaLA Admin - find big files</title>
<style type="text/css">
* {margin:0; padding:0; outline:0}
开发者ID:rolwi,项目名称:koala,代码行数:31,代码来源:find_course_with_extension.php


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