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


PHP ArtefactTypeComment::make_public_form方法代码示例

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


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

示例1: render_instance

 public static function render_instance(BlockInstance $instance, $editing = false)
 {
     global $USER;
     if ($editing) {
         $smarty = smarty_core();
         $smarty->assign('editing', get_string('ineditordescription1', 'blocktype.comment/comment'));
         $html = $smarty->fetch('blocktype:comment:comment.tpl');
         return $html;
     }
     // Feedback list pagination requires limit/offset params
     $limit = param_integer('limit', 10);
     $offset = param_integer('offset', 0);
     $showcomment = param_integer('showcomment', null);
     // Create the "make feedback private form" now if it's been submitted
     if (param_variable('make_public_submit', null)) {
         pieform(ArtefactTypeComment::make_public_form(param_integer('comment')));
     } else {
         if (param_variable('delete_comment_submit_x', null)) {
             pieform(ArtefactTypeComment::delete_comment_form(param_integer('comment')));
         }
     }
     $view = new View($instance->get('view'));
     $submittedgroup = (int) $view->get('submittedgroup');
     if ($USER->is_logged_in() && $submittedgroup && group_user_can_assess_submitted_views($submittedgroup, $USER->get('id'))) {
         $releaseform = true;
     } else {
         $releaseform = false;
     }
     // If the view has comments turned off, tutors can still leave
     // comments if the view is submitted to their group.
     if (!empty($releaseform) || $view->user_comments_allowed($USER)) {
         $addfeedbackpopup = true;
     }
     safe_require('artefact', 'comment');
     $commentoptions = ArtefactTypeComment::get_comment_options();
     $commentoptions->limit = $limit;
     $commentoptions->offset = $offset;
     $commentoptions->showcomment = $showcomment;
     $commentoptions->view = $instance->get_view();
     $feedback = ArtefactTypeComment::get_comments($commentoptions);
     $smarty = smarty_core();
     $smarty->assign('feedback', $feedback);
     if (isset($addfeedbackpopup)) {
         $smarty->assign('enablecomments', 1);
         $smarty->assign('addfeedbackpopup', $addfeedbackpopup);
     }
     $html = $smarty->fetch('blocktype:comment:comment.tpl');
     return $html;
 }
开发者ID:kienv,项目名称:mahara,代码行数:49,代码来源:lib.php

示例2: time

} else {
    // To save the atime in the db - make it a millisecond in the past
    // so it differs from the atime in the View constructor and so triggers
    // the saving of the atime change. Can't use $view->set('dirty', true)
    // as that will also get the view object to update the mtime which is not
    // what we want.
    $view->set('atime', time() - 1);
    $view->commit();
}
// Feedback list pagination requires limit/offset params
$limit = param_integer('limit', 10);
$offset = param_integer('offset', 0);
$showcomment = param_integer('showcomment', null);
// Create the "make feedback private form" now if it's been submitted
if (param_variable('make_public_submit', null)) {
    pieform(ArtefactTypeComment::make_public_form(param_integer('comment')));
} else {
    if (param_variable('delete_comment_submit_x', null)) {
        pieform(ArtefactTypeComment::delete_comment_form(param_integer('comment')));
    }
}
$owner = $view->get('owner');
$viewtype = $view->get('type');
if ($viewtype == 'profile' || $viewtype == 'dashboard' || $viewtype == 'grouphomepage') {
    redirect($view->get_url());
}
define('TITLE', $view->get('title'));
$collection = $view->get('collection');
$submittedgroup = (int) $view->get('submittedgroup');
if ($USER->is_logged_in() && $submittedgroup && group_user_can_assess_submitted_views($submittedgroup, $USER->get('id'))) {
    // The user is a tutor of the group that this view has
开发者ID:agwells,项目名称:Mahara-1,代码行数:31,代码来源:view.php


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