Пример #1
0
<?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}";
Пример #2
0
#!/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;
Пример #3
0
<?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}