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


PHP lms_steam::semester_get_user_coursememberships方法代码示例

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


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

示例1: get_cache_function

 }
 echo "</contacts>" . "\n";
 //echo "<courses current_semester_name=\"" . STEAM_CURRENT_SEMESTER . "\">";
 $cache = get_cache_function("ORGANIZATION", 600);
 $semesters = $cache->call("lms_steam::get_semesters");
 $no_semesters = count($semesters);
 if ($no_semesters > 0) {
     foreach ($semesters as $semester) {
         if ($semester["OBJ_NAME"] == STEAM_CURRENT_SEMESTER) {
             $current_semester_obj_id = $semester["OBJ_ID"];
             $current_semester_obj_name = $semester["OBJ_NAME"];
         }
     }
     echo "<courses current_semester_name=\"" . $current_semester_obj_name . "\" current_semester_id=\"" . $current_semester_obj_id . "\">" . "\n";
     foreach ($semesters as $semester) {
         $memberships = lms_steam::semester_get_user_coursememberships($semester["OBJ_ID"], $user);
         $no_memberships = count($memberships);
         // Array
         // (
         //    [1040] => Array
         //        (
         //            [OBJ_ID] => 1040
         //            [OBJ_NAME] => 0001
         //            [COURSE_NAME] => Testkurs (0001)
         //            [COURSE_LINK] => http://localhost/semester/WS0809/0001/
         //            [SEMESTER_NAME] => WS0809
         //            [COURSE_UNITS_ENABLED] => TRUE
         //        )
         //
         // )
         if ($no_memberships > 0) {
开发者ID:rolwi,项目名称:koala,代码行数:31,代码来源:getMyDetailedProfile.php

示例2: isset

        $filter_part = "";
        $content->setVariable("LINK_SEMESTER", "<a href=\"" . PATH_URL . SEMESTER_URL . "/" . $s["OBJ_NAME"] . "/?filter=" . (isset($_GET["filter"]) ? $_GET["filter"] : "") . "\">" . $s["OBJ_NAME"] . "</a>");
    }
    $content->parse("BLOCK_TABS");
}
$courses = isset($_GET["filter"]) && $_GET["filter"] == "booked" ? $cache->call("lms_steam::semester_get_courses", $current_semester->get_id(), $user->get_name()) : $cache->call("lms_steam::semester_get_courses", $current_semester->get_id());
$no_courses = count($courses);
if ($no_courses > 0) {
    $content->setCurrentBlock("BLOCK_COURSES_AVAILABLE");
    $content->setVariable("LABEL_ID", gettext("Course ID"));
    $content->setVariable("LABEL_NAME", gettext("Course Name"));
    $content->setVariable("LABEL_DESC", gettext("Information"));
    $content->setVariable("LABEL_TUTORS", gettext("Staff members"));
    $content->setVariable("LABEL_STUDENTS", gettext("Students"));
    $content->setVariable("LABEL_ACTION", gettext("Action"));
    $memberships = lms_steam::semester_get_user_coursememberships($current_semester->get_id(), lms_steam::get_current_user());
    foreach ($courses as $course) {
        $course_found = TRUE;
        /*
        //Cannot be determined after performance optimization, so deleted courses remain in course list for CACHE_LIFETIME_STATIC (1 Hour)
        if ( !isset( $memberships[ $course["OBJ_ID"] ] ) ) {
          error_log("courses_overview.php: Found deleted course in cache-data of semester=" . $current_semester->get_name() . " courseid=" . $course["OBJ_NAME"] ." description=" . $course["OBJ_DESC"] . " objectid=" . $course[ "OBJ_ID" ]);
          $course_found = FALSE;
        }
        */
        if ($course_found) {
            $is_subscribed = isset($memberships[$course["OBJ_ID"]]);
            $content->setCurrentBlock("BLOCK_COURSE");
            if (koala_group_course::is_paul_course($course["COURSE_NUMBER"])) {
                $label_course_id = $course["COURSE_NUMBER"];
            } else {
开发者ID:rolwi,项目名称:koala,代码行数:31,代码来源:courses_overview.php

示例3: frameResponse


//.........这里部分代码省略.........
                 $content->setVariable("LABEL_CREATE_SEMESTER", gettext("Create new semester"));
                 $content->parse("BLOCK_ADD_SEMESTER");
             }
             $content->parse("BLOCK_SERVER_ADMIN");
         }
         $content->parse("BLOCK_SEMESTER_ADMIN");
     }
     $content->parse("BLOCK_ACTIONBAR");
     // AUS DEM SYSTEM AUSLESEN
     $cache = get_cache_function("ORGANIZATION", 600);
     $semesters = $cache->call("lms_steam::get_semesters");
     foreach ($semesters as $s) {
         $content->setCurrentBlock("BLOCK_TABS");
         if ($s["OBJ_NAME"] == $current_semester_name) {
             $content->setVariable("TAB_STATE", "tabOut");
             $content->setVariable("LINK_SEMESTER", $s["OBJ_NAME"]);
         } else {
             $content->setVariable("TAB_STATE", "tabIn");
             $filter_part = "";
             $content->setVariable("LINK_SEMESTER", "<a href=\"" . PATH_URL . "semester/index" . "/" . $s["OBJ_NAME"] . "/" . ($isFiltered ? "booked" : "all") . "\">" . $s["OBJ_NAME"] . "</a>");
         }
         $content->parse("BLOCK_TABS");
     }
     $courses = $isFiltered ? $cache->call("lms_steam::semester_get_courses", $current_semester->get_id(), $user->get_name()) : $cache->call("lms_steam::semester_get_courses", $current_semester->get_id());
     $no_courses = count($courses);
     if ($no_courses > 0) {
         $content->setCurrentBlock("BLOCK_COURSES_AVAILABLE");
         $content->setVariable("LABEL_ID", gettext("Course ID"));
         $content->setVariable("LABEL_NAME", gettext("Course Name"));
         $content->setVariable("LABEL_DESC", gettext("Information"));
         $content->setVariable("LABEL_TUTORS", gettext("Staff members"));
         $content->setVariable("LABEL_STUDENTS", gettext("Students"));
         $content->setVariable("LABEL_ACTION", gettext("Action"));
         $memberships = \lms_steam::semester_get_user_coursememberships($current_semester->get_id(), \lms_steam::get_current_user());
         foreach ($courses as $course) {
             $course_found = TRUE;
             /* THIS WAS ALREADY COMMENTED OUT!
                //Cannot be determined after performance optimization, so deleted courses remain in course list for CACHE_LIFETIME_STATIC (1 Hour)
                if ( !isset( $memberships[ $course["OBJ_ID"] ] ) ) {
                  error_log("courses_overview.php: Found deleted course in cache-data of semester=" . $current_semester->get_name() . " courseid=" . $course["OBJ_NAME"] ." description=" . $course["OBJ_DESC"] . " objectid=" . $course[ "OBJ_ID" ]);
                  $course_found = FALSE;
                }
                */
             if ($course_found) {
                 $is_subscribed = isset($memberships[$course["OBJ_ID"]]);
                 $content->setCurrentBlock("BLOCK_COURSE");
                 if (\koala_group_course::is_paul_course($course["COURSE_NUMBER"])) {
                     $label_course_id = $course["COURSE_NUMBER"];
                 } else {
                     $label_course_id = \koala_group_course::convert_course_id($course["OBJ_NAME"]);
                 }
                 $actions = "";
                 if ($isEditMode) {
                     $actions .= "<br><a href=\"" . PATH_URL . "course_delete.php?course=" . $course["OBJ_ID"] . "\">" . gettext("Delete course") . "</a>";
                     $actions .= "<br><a href=\"" . PATH_URL . "copy_weblog_wiki.php?course=" . $course["OBJ_ID"] . "\">" . gettext("Copy Weblog/Wiki") . "</a>";
                 }
                 $content->setVariable("VALUE_ID", h($label_course_id));
                 // TODO: Passt der Link?
                 $content->setVariable("COURSE_LINK", PATH_URL . SEMESTER_URL . "/" . h($current_semester->get_name()) . "/" . h($course["OBJ_NAME"]) . "/");
                 $content->setVariable("COURSE_NAME", h($course["OBJ_DESC"]));
                 $content->setVariable("COURSE_TUTORS", h($course["COURSE_TUTORS"]));
                 $content->setVariable("VALUE_STUDENTS", $course["COURSE_NO_PARTICIPANTS"] . (isset($course["COURSE_MAX_PARTICIPANTS"]) && $course["COURSE_MAX_PARTICIPANTS"] > 0 ? " / " . $course["COURSE_MAX_PARTICIPANTS"] : ""));
                 $content->setVariable("VALUE_COURSE_DESC", h($course["COURSE_SHORT_DSC"]));
                 if ($is_subscribed) {
                     if ($course["COURSE_HISLSF_ID"] > 0) {
                         $content->setVariable("COURSE_ACTION", "Kursabmeldung erfolgt ausschlie&szlig;&uuml;ber <b><a href=\"https://lsf.uni-paderborn.de/qisserver/rds?state=wsearchv&search=2&veranstaltung.veranstid=" . trim($course["COURSE_HISLSF_ID"]) . "\" target=\"_blank\">HIS-LSF</a></b>. Die Synchronisation mit koaLA kann bis zu einer Stunde dauern.");
开发者ID:rolwi,项目名称:koala,代码行数:67,代码来源:Index.class.php


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