• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP wimba_add_log函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: voicetools_get_average_length_messages_per_user

/**
 * This method returns average message length for all users who are all posted messages for given resource id.
 * @param rid - Resource ID
 * @return an array. Each item contains an other array where the key will be message_len and screen_name
 */
function voicetools_get_average_length_messages_per_user($rid)
{
    global $CFG;
    $soapclient = new soap_client($CFG->voicetools_servername . VT_API_SERVICES, true);
    $err = $soapclient->getError();
    if ($err) {
        wimba_add_log(WIMBA_ERROR, voiceboard_LOGS, __FUNCTION__ . ' : Error to create the soap element');
        return false;
    }
    $resource = array($CFG->voicetools_adminusername, $CFG->voicetools_adminpassword, $rid);
    $result = $soapclient->call(VT_API_GET_AVERAGE_MESSAGE_LENGTH_PER_USER, $resource);
    if ($soapclient->fault) {
        wimba_add_log(WIMBA_ERROR, voiceboard_LOGS, __FUNCTION__ . ' : Fault with the web service : ' . $soapclient->fault);
        return false;
    } else {
        // Check for errors
        $err = $soapclient->getError();
        if ($err == "operation getAverageMessageLengthPerUser not present.") {
            return "not_implemented";
        } else {
            if ($err) {
                wimba_add_log(WIMBA_ERROR, voiceboard_LOGS, __FUNCTION__ . ' : error with the web service : ' . $err);
                return false;
            }
        }
    }
    return pairsetToArray($result);
}
开发者ID:nagyistoce,项目名称:moodle-Teach-Pilot,代码行数:33,代码来源:WimbaVoicetoolsAPI.php


示例2: lcapi_getMP4Status

 function lcapi_getMP4Status($archiveId, $startGenerate, $userid)
 {
     if (empty($archiveId)) {
         wimba_add_log(WIMBA_ERROR, WC, __FUNCTION__ . "archive should not be empty");
         return false;
     }
     $params = "&class_id=" . $this->prefix . $archiveId;
     if (!empty($startGenerate)) {
         $params .= "&start_generate={$startGenerate}";
     }
     if (!empty($userid)) {
         $params .= "&user_id=" . $userid;
     }
     $enc_params = str_replace(" ", "+", $params);
     $response = $this->lcapi_send_query(LCAPI_FUNCTION_GET_MP4_STATUS, $enc_params);
     preg_match("(\\d*)", $response, $matches);
     $lc_respcode = $matches[0];
     if ($lc_respcode != 100) {
         $this->lcapi_error(LCAPI_ECRUD);
         wimba_add_log(WIMBA_ERROR, WC, __FUNCTION__ . ") with {$lc_respcode}");
         return false;
     }
     list(, $body) = explode("\n", $response, 2);
     $records = explode(LCAPI_RECORD_SEPARATOR, $body);
     $lines = explode("\n", $records[0]);
     foreach ($lines as $line) {
         if (!empty($line)) {
             list($key, $value) = explode("=", $line);
             if (!empty($key)) {
                 $audioInfo[$key] = $value;
             }
         }
     }
     if ($userid != null) {
         $authToken = $this->lcapi_get_session($userid, "");
     }
     $audioFile = new LCAudioFileStatus($audioInfo, $authToken);
     return $audioFile;
 }
开发者ID:nagyistoce,项目名称:moodle-Teach-Pilot,代码行数:39,代码来源:lcapi.php


示例3: optional_param

require_once "../../config.php";
require_once 'lib/php/common/WimbaLib.php';
require_once 'lib/php/vt/WimbaVoicetoolsAPI.php';
$user = optional_param("user", PARAM_ALPHANUM);
$pass = optional_param("pass", PARAM_ALPHANUM);
$server = optional_param("server", PARAM_TEXT);
$result = voicetools_api_check_documentbase($server, $user, $pass, $CFG->wwwroot);
if ($result != "ok") {
    if (get_string($result, 'voicetools') == "[[" . $result . "]]") {
        //the error description is not in the bundle
        wimba_add_log(WIMBA_ERROR, "wimbaConfiguration", $result);
        echo get_string("generic_error", 'voicetools');
    } else {
        wimba_add_log(WIMBA_ERROR, "wimbaConfiguration", get_String($result, 'voicetools'));
        echo get_string($result, 'voicetools');
    }
} else {
    $php_extension = get_loaded_extensions();
    for ($i = 0; $i < count($php_extension); $i++) {
        if ($php_extension[$i] == "libxml" || $php_extension[$i] == "domxml") {
            wimba_add_log(WIMBA_INFO, 'wimbaConfiguration', "The module is well configured");
            echo $result;
            exit;
        }
    }
    wimba_add_log(WIMBA_INFO, 'wimbaConfiguration', "domxml is not installed");
    echo get_string("domxml", 'voicetools');
}
//add important informations to the log
wimba_add_log(WIMBA_INFO, 'wimbaConfiguration', "php info :\n" . print_r(get_loaded_extensions(), true));
开发者ID:nagyistoce,项目名称:moodle-Teach-Pilot,代码行数:30,代码来源:testConfig.php


示例4: get_string

$sentence1 = get_string('vtpopupshouldappear.1', 'voiceemail');
$sentence2 = "<a href='javascript:startVoiceTools()';>" . get_string('vtpopupshouldappear.2', 'voiceemail') . "</a>";
$sentence3 = get_string('vtpopupshouldappear.3', 'voiceemail');
$strLaunchComment = $sentence1 . $sentence2 . $sentence3;
//get the informations related to the Vt resource
$vtAction = new vtAction($USER->email);
$dbResource = get_record("voiceemail_resources", "id", $voicetool->rid);
$resource = $vtAction->getResource($dbResource->rid);
//check the availability of the resource
$roleSwitch = isSwitch();
//the user have switched his role?
//determinate the role for the wimba tools
$context = get_context_instance(CONTEXT_MODULE, $cm->id);
$role = voiceemail_getRole($context);
if ($resource->error == true) {
    wimba_add_log(WIMBA_ERROR, voiceemail_LOGS, "view.php : problem to get the resource(rid : " . $voicetool->rid . ") linked to this activity");
    error(get_string("problem_vt", "voiceemail"), "{$CFG->wwwroot}/course/view.php?id={$course->id}");
}
$currentUser = $vtAction->createUser($USER->firstname . "_" . $USER->lastname, $USER->email);
$currentUserRights = $vtAction->createUserRights($resource->getType(), $role);
$resource->setEmailFrom($USER->email);
//get the vt session
$vtSession = $vtAction->getVtSession($resource, $currentUser, $currentUserRights);
if (function_exists("build_navigation")) {
    $cm->modname = "voiceemail";
    $cm->name = $voicetool->name;
    $navigation = build_navigation('', $cm);
    print_header("{$course->shortname}: {$voicetool->name}", $course->fullname, $navigation, "", "", true, update_module_button($cm->id, $course->id, $strvoicetool . " " . get_string('activity', 'voiceemail')), navmenu($course));
} else {
    $navigation = array();
    if ($course->id != SITEID) {
开发者ID:nagyistoce,项目名称:moodle-Teach-Pilot,代码行数:31,代码来源:view.php


示例5: voicepresentation_get_voicetool_informations

/**
* List all the resource for the course given
* @param $courseId - the current course id
* @return the  of the boards rid 
*/
function voicepresentation_get_voicetool_informations($rid)
{
    $tool = get_record('voicepresentation_resources', 'rid', $rid);
    if (empty($tool)) {
        wimba_add_log(WIMBA_INFO, voicepresentation_LOGS, "No resources have been created yet");
        return null;
    } else {
        if ($tool === false) {
            wimba_add_log(WIMBA_ERROR, voicepresentation_LOGS, "Problem to get the list of resources");
            error("Response get_board_list : query to database failed");
            return "error_moodleDatabase";
        }
    }
    wimba_add_log(WIMBA_DEBUG, voicepresentation_LOGS, "list of resource :\n" . print_r($tool, true));
    return $tool;
}
开发者ID:nagyistoce,项目名称:moodle-Teach-Pilot,代码行数:21,代码来源:lib.php


示例6: foreach

foreach (getKeysOfGeneralParameters() as $param) {
    $value = optional_param($param["value"], $param["default_value"], $param["type"]);
    if ($value != null) {
        $params[$param["value"]] = $value;
    }
}
require_login($params["enc_course_id"]);
$uiManager = new WimbaUI($params);
wimba_add_log(WIMBA_DEBUG, voicepresentation_LOGS, "getXmlListPanel : parameters  \n" . print_r($params, true));
if (isset($params["error"])) {
    wimba_add_log(WIMBA_ERROR, voicepresentation_LOGS, "getXmlListPanel : " . get_string($params["error"], 'voicepresentation'));
    $uiManager->setError(get_string($params["error"], 'voicepresentation'));
} else {
    //Session Management
    if ($uiManager->getSessionError() === false) {
        $message = "";
        if (!empty($messageProduct) && !empty($messageAction)) {
            $message = get_string("message_" . $messageProduct . "_start", "voicepresentation") . "  " . get_string("message_" . $messageAction . "_end", "voicepresentation");
        }
        $uiManager->getVTPrincipalView($message, "presentation");
    } else {
        //bad session
        wimba_add_log(WIMBA_ERROR, voicepresentation_LOGS, "getXmlListPanel : " . get_string('error_session', 'voicepresentation'));
        $uiManager->setError(get_string('error_session', 'voicepresentation'));
    }
}
wimba_add_log(WIMBA_DEBUG, voicepresentation_LOGS, "getXmlListPanel : xml generated \n" . $uiManager->getXmlString());
if (isset($error_wimba)) {
    $uiManager->setError(get_string('error_display', 'voicepresentation'));
}
echo $uiManager->getXmlString();
开发者ID:nagyistoce,项目名称:moodle-Teach-Pilot,代码行数:31,代码来源:generateXmlMainPanel.php


示例7: manage_error

function manage_error($errno, $error, $file, $line, $context)
{
    global $error_wimba;
    if ($errno == E_USER_ERROR or $errno == E_ERROR) {
        wimba_add_log(WIMBA_ERROR, "general", $error . " in " . $file . " line " . $line);
        $error_wimba = true;
    } else {
        if ($errno < E_USER_NOTICE) {
            wimba_add_log(WIMBA_DEBUG, "general", $error . " in " . $file . " line " . $line);
        }
    }
}
开发者ID:nagyistoce,项目名称:moodle-Teach-Pilot,代码行数:12,代码来源:WimbaLib.php


示例8: voiceauthoring_get_block_informations

function voiceauthoring_get_block_informations($blockId)
{
    $recorder = get_record('voiceauthoring_block', 'bid', $blockId);
    if ($recorder === false) {
        $recorder->bid = $blockId;
        $recorder->comment = "Configure this block to add a description";
        $recorder->title = "Voice Authoring";
        $id = insert_record("voiceauthoring_block", $recorder);
    }
    wimba_add_log(WIMBA_DEBUG, voiceauthoring_LOGS, "Recorder informations : \n" . print_r($recorder, true));
    return $recorder;
}
开发者ID:nagyistoce,项目名称:moodle-Teach-Pilot,代码行数:12,代码来源:lib.php


示例9: getListVoiceTools

 /**
  * 
  * 
  */
 function getListVoiceTools()
 {
     $resources = array();
     $list = voiceemail_get_voicetools_list($this->session->hparams["course_id"]);
     if ($list != false) {
         $vtResources = voicetools_api_get_resources($list["rid"]);
         if ($vtResources === false) {
             wimba_add_log(WIMBA_ERROR, voiceemail_LOGS, "Problem to get the list of resources from the voiceemail_LOGS server");
             return false;
         } else {
             $ressources = $vtResources->getResources();
         }
     } else {
         wimba_add_log(WIMBA_ERROR, voiceemail_LOGS, "Problem to get the list of resources from the databse");
         return false;
     }
     for ($i = 0; $i < count($ressources); $i++) {
         $resource = $vtResources->getResource($i);
         $grade = -1;
         $rid = $resource->getRid();
         if ($list["info"][$rid]->gradeid != -1) {
             $grade = $list["info"][$rid]->gradeid;
         }
         if ($list["info"][$rid]->availability == "0") {
             $preview = false;
         } elseif ($list["info"][$rid]->start_date == -1 && $list["info"][$rid]->end_date == -1) {
             $preview = true;
         } elseif ($list["info"][$rid]->start_date == -1 && time() <= $list["info"][$rid]->end_date) {
             $preview = true;
         } elseif ($list["info"][$rid]->start_date < time() && $list["info"][$rid]->end_date == -1) {
             $preview = true;
         } elseif ($list["info"][$rid]->start_date < time() && time() < $list["info"][$rid]->end_date) {
             $preview = true;
         } else {
             $preview = false;
         }
         $xmlResource = new XmlResource($rid, $resource->getTitle(), $preview, "manageAction.php", $this->session->url_params . "&time=" . time() . "&action=launch", $grade);
         $xmlResource->setTooltipAvailability(get_string("tooltipVT_" . $preview . "_student", 'voiceemail'));
         if ($this->session->isInstructor() || !$this->session->isInstructor() && $preview) {
             $xmlResource->setType($resource->getType());
             $resources[$resource->getTitle() . $resource->getRid()] = $xmlResource;
         }
     }
     return $resources;
 }
开发者ID:nagyistoce,项目名称:moodle-Teach-Pilot,代码行数:49,代码来源:WimbaUI.php


示例10: elseif

         $messageProduct = "presentation";
     } elseif ($params['type'] == "pc") {
         $result = $vtAction->modifyPodcaster($params["resource_id"]);
         $messageAction = "updated";
         $messageProduct = "pc";
     }
     if ($result != NULL) {
         //create the object to store in the db
         $resource_id = updateResource($result->getRid(), $session->getCourseId(), $params);
         if (empty($resource_id)) {
             error_log(__FUNCTION__ . " : Problem to update the resource on the database", TRUE);
             redirection($redirectionUrl . '&error=problem_bd');
         }
         $messageType = $params['type'] . 'Updated';
     } else {
         wimba_add_log(WIMBA_ERROR, voicepresentation_LOGS, "manageAction : Problem to add the resource into the database");
         redirection($redirectionUrl . '&error=problem_vt');
     }
 } elseif ($params['action'] == 'delete') {
     /* Bug 28439 - We need to check if the resource has a grade book associated with it
        before we try and delete it */
     $resourceDb = get_record("voicepresentation_resources", "rid", $params["resource_id"]);
     if ($resourceDb->gradeid != -1) {
         voicepresentation_delete_grade_column($params["resource_id"], $params["enc_course_id"]);
     }
     $result = $vtAction->deleteResource($params["resource_id"]);
     if ($result != NULL) {
         //if no error during the creation
         if (!voicepresentation_delete_all_instance_of_resource($params["resource_id"])) {
             notify("Could not delete the activities for the voicetools:" . $params["resource_id"]);
         }
开发者ID:nagyistoce,项目名称:moodle-Teach-Pilot,代码行数:31,代码来源:manageAction.php


示例11: liveclassroom_delete_all_instance_of_room

function liveclassroom_delete_all_instance_of_room($roomid)
{
    global $CFG;
    // / Given an ID of an instance of this module,
    // / this function will permanently delete the instance
    // / and any data that depends on it.
    $api = new LCApi($CFG->liveclassroom_servername, $CFG->liveclassroom_adminusername, $CFG->liveclassroom_adminpassword);
    $result = true;
    if ($liveclassrooms = get_records("liveclassroom", "type", $roomid)) {
        $roomname = $api->lcapi_get_room_name($liveclassroom->type);
        // Delete any dependent records here #
        foreach ($liveclassrooms as $liveclassroom) {
            // get the course_module instance linked to the liveclassroom instance
            if (!($cm = get_coursemodule_from_instance("liveclassroom", $liveclassroom->id, $liveclassroom->course))) {
                error("Course Module ID was incorrect");
            }
            if (!delete_course_module($cm->id)) {
                wimba_add_log(WIMBA_ERROR, WC, "Problem to delete the course module : " . $cm->id);
                $result = false;
                // Delete a course module and any associated data at the course level (events)
                // notify("Could not delete the $cm->id (coursemodule)");
            }
            if (!delete_records("liveclassroom", "id", "{$liveclassroom->id}")) {
                wimba_add_log(WIMBA_ERROR, WC, "Problem to delete all the activities associated to the voice tools");
                $result = false;
            }
            // delete in the course section too
            if (!delete_mod_from_section($cm->id, "{$cm->section}")) {
                wimba_add_log(WIMBA_ERROR, WC, "Could not delete the " . $cm->id . " from that section : " . $cm->section);
                $result = false;
                // notify("Could not delete the $mod->modulename from that section");
            }
        }
    }
    return $result;
}
开发者ID:nagyistoce,项目名称:moodle-Teach-Pilot,代码行数:36,代码来源:lib.php


示例12: optional_param

       GET URL INFORMATIONS
       ********************/
    $action = optional_param('action', "");
    // Course Module ID, or
    $typeProduct = $params['type'];
    if ($action == 'update') {
        //get the information of the resource
        $currentBoard = voicetools_api_get_resource($params["resource_id"]);
        if (!isset($currentBoard) || $currentBoard->error == true) {
            wimba_add_log(WIMBA_ERROR, voicepresentation_LOGS, "getXmlNewPanel : " . get_string('problem_vt', 'voicepresentation'));
            $uiManager->setError(get_string('problem_vt', 'voicepresentation'));
        } else {
            $currentBoardInformations = voicepresentation_get_wimbaVoice_Informations($params["resource_id"]);
            $uiManager->setCurrentProduct($typeProduct, $currentBoard, $currentBoardInformations);
        }
    } else {
        $uiManager->setCurrentProduct($typeProduct);
    }
    $display = $uiManager->getVTSettingsView($action, $createWorkflow);
} else {
    wimba_add_log(WIMBA_ERROR, voicepresentation_LOGS, "getXmlNewPanel : " . get_string('error_session', 'voicepresentation'));
    $uiManager->setError(get_string('error_session', 'voicepresentation'));
}
wimba_add_log(WIMBA_DEBUG, voicepresentation_LOGS, "getXmlListPanel : parameters  \n" . $uiManager->getXmlString());
if (isset($error_wimba)) {
    $uiManager->setError(get_string('error_display', 'voicepresentation'));
}
echo $uiManager->getXmlString();
?>

开发者ID:nagyistoce,项目名称:moodle-Teach-Pilot,代码行数:29,代码来源:generateXmlSettingsPanel.php


示例13: voiceemail_deleteCalendarEvent

function voiceemail_deleteCalendarEvent($instanceNumber)
{
    /// Basic event record for the database.
    global $CFG;
    if (!($event = get_record('event', 'instance', $instanceNumber, 'modulename', 'voiceemail'))) {
        wimba_add_log(WIMBA_ERROR, voiceemail_LOGS, "Problem to delete calendar event : " . $instanceNumber);
        return false;
    }
    $result = delete_records("event", "id", $event->id);
}
开发者ID:nagyistoce,项目名称:moodle-Teach-Pilot,代码行数:10,代码来源:lib.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP win_is_writable函数代码示例发布时间:2022-05-23
下一篇:
PHP wikify_links函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap