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


PHP Wiki::setDescription方法代码示例

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


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

示例1: create_wiki

function create_wiki($gid = false, $wikiName = 'New wiki')
{
    $creatorId = claro_get_current_user_id();
    $tblList = claro_sql_get_course_tbl();
    $config = array();
    $config["tbl_wiki_properties"] = $tblList["wiki_properties"];
    $config["tbl_wiki_pages"] = $tblList["wiki_pages"];
    $config["tbl_wiki_pages_content"] = $tblList["wiki_pages_content"];
    $config["tbl_wiki_acls"] = $tblList["wiki_acls"];
    $con = Claroline::getDatabase();
    $acl = array();
    if ($gid) {
        $acl = WikiAccessControl::defaultGroupWikiACL();
    } else {
        $acl = WikiAccessControl::defaultCourseWikiACL();
    }
    $wiki = new Wiki($con, $config);
    $wiki->setTitle($wikiName);
    $wiki->setDescription('This is a sample wiki');
    $wiki->setACL($acl);
    $wiki->setGroupId($gid);
    $wikiId = $wiki->save();
    $wikiTitle = $wiki->getTitle();
    $mainPageContent = sprintf("This is the main page of the Wiki %s. Click on edit to modify the content.", $wikiTitle);
    $wikiPage = new WikiPage($con, $config, $wikiId);
    $wikiPage->create($creatorId, '__MainPage__', $mainPageContent, date("Y-m-d H:i:s"), true);
}
开发者ID:rhertzog,项目名称:lcs,代码行数:27,代码来源:lib.createwiki.php

示例2: Wiki

         $wikiTitle = $wiki->getTitle();
         $wikiDesc = $wiki->getDescription();
         $wikiACL = $wiki->getACL();
         $groupId = $wiki->getGroupId();
     } else {
         $message = get_lang("Invalid Wiki Id");
         $action = 'error';
     }
     break;
     // execute edit
 // execute edit
 case 'exEdit':
     if ($wikiId == 0) {
         $wiki = new Wiki($con, $config);
         $wiki->setTitle($wikiTitle);
         $wiki->setDescription($wikiDesc);
         $wiki->setACL($wikiACL);
         $wiki->setGroupId($groupId);
         $wikiId = $wiki->save();
         //notify wiki modification
         $eventNotifier->notifyCourseEvent('wiki_added', claro_get_current_course_id(), claro_get_current_tool_id(), $wikiId, claro_get_current_group_id(), '0');
         $mainPageContent = sprintf(get_lang("This is the main page of the Wiki %s. Click on '''Edit''' to modify the content."), $wikiTitle);
         $wikiPage = new WikiPage($con, $config, $wikiId);
         if ($wikiPage->create($creatorId, '__MainPage__', $mainPageContent, date("Y-m-d H:i:s"), true)) {
             $message = get_lang("Wiki creation succeed");
             $dialogBox->success($message);
         } else {
             $message = get_lang("Wiki creation failed");
             $dialogBox->error($message . ":" . $wikiPage->getError());
         }
     } elseif ($wikiStore->wikiIdExists($wikiId)) {
开发者ID:rhertzog,项目名称:lcs,代码行数:31,代码来源:wiki.php

示例3: array

                /** ********Create Group Wiki*********** */
                //Set ACL
                $wikiACL = array();
                $wikiACL['course_read'] = true;
                $wikiACL['course_edit'] = false;
                $wikiACL['course_create'] = false;
                $wikiACL['group_read'] = true;
                $wikiACL['group_edit'] = true;
                $wikiACL['group_create'] = true;
                $wikiACL['other_read'] = false;
                $wikiACL['other_edit'] = false;
                $wikiACL['other_create'] = false;

                $wiki = new Wiki();
                $wiki->setTitle($langGroup . " " . $group_num . " - Wiki");
                $wiki->setDescription('');
                $wiki->setACL($wikiACL);
                $wiki->setGroupId($id);
                $wikiId = $wiki->save();

                $mainPageContent = $langWikiMainPageContent;

                $wikiPage = new WikiPage($wikiId);
                $wikiPage->create($uid, '__MainPage__', $mainPageContent, '', date("Y-m-d H:i:s"), true);
                /*             * ************************************ */

                Log::record($course_id, MODULE_ID_GROUPS, LOG_INSERT, array('id' => $id,
                                                                            'name' => "$langGroup $group_num",
                                                                            'max_members' => $group_max,
                                                                            'secret_directory' => $secretDirectory));
            }
开发者ID:nikosv,项目名称:openeclass,代码行数:31,代码来源:index.php


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