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


PHP workshop::overall_feedback_content_options方法代码示例

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


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

示例1: redirect

    $assessmenteditable = false;
}

// load the grading strategy logic
$strategy = $workshop->grading_strategy_instance();

// load the assessment form and process the submitted data eventually
$mform = $strategy->get_assessment_form($PAGE->url, 'assessment', $assessment, $assessmenteditable);

// Set data managed by the workshop core, subplugins set their own data themselves.
$currentdata = (object)array(
    'feedbackauthor' => $assessment->feedbackauthor,
    'feedbackauthorformat' => $assessment->feedbackauthorformat,
);
if ($assessmenteditable and $workshop->overallfeedbackmode) {
    $currentdata = file_prepare_standard_editor($currentdata, 'feedbackauthor', $workshop->overall_feedback_content_options(),
        $workshop->context, 'mod_workshop', 'overallfeedback_content', $assessment->id);
    if ($workshop->overallfeedbackfiles) {
        $currentdata = file_prepare_standard_filemanager($currentdata, 'feedbackauthorattachment',
            $workshop->overall_feedback_attachment_options(), $workshop->context, 'mod_workshop', 'overallfeedback_attachment',
            $assessment->id);
    }
}
$mform->set_data($currentdata);

if ($mform->is_cancelled()) {
    redirect($workshop->view_url());
} elseif ($assessmenteditable and ($data = $mform->get_data())) {
    if ($canmanage) {
        if (is_null($assessment->grade)) {
            $workshop->log('add reference assessment', $workshop->exassess_url($assessment->id), $assessment->submissionid);
开发者ID:verbazend,项目名称:AWFA,代码行数:31,代码来源:exassessment.php

示例2: array

    print_error('nopermissions', 'error', $workshop->view_url(), 'assess example submission');
}
// only the reviewer is allowed to modify the assessment
if ($canmanage and $assessment->weight == 1 or $isreviewer and $workshop->assessing_examples_allowed()) {
    $assessmenteditable = true;
} else {
    $assessmenteditable = false;
}
// load the grading strategy logic
$strategy = $workshop->grading_strategy_instance();
// load the assessment form and process the submitted data eventually
$mform = $strategy->get_assessment_form($PAGE->url, 'assessment', $assessment, $assessmenteditable);
// Set data managed by the workshop core, subplugins set their own data themselves.
$currentdata = (object) array('feedbackauthor' => $assessment->feedbackauthor, 'feedbackauthorformat' => $assessment->feedbackauthorformat);
if ($assessmenteditable and $workshop->overallfeedbackmode) {
    $currentdata = file_prepare_standard_editor($currentdata, 'feedbackauthor', $workshop->overall_feedback_content_options(), $workshop->context, 'mod_workshop', 'overallfeedback_content', $assessment->id);
    if ($workshop->overallfeedbackfiles) {
        $currentdata = file_prepare_standard_filemanager($currentdata, 'feedbackauthorattachment', $workshop->overall_feedback_attachment_options(), $workshop->context, 'mod_workshop', 'overallfeedback_attachment', $assessment->id);
    }
}
$mform->set_data($currentdata);
if ($mform->is_cancelled()) {
    redirect($workshop->view_url());
} elseif ($assessmenteditable and $data = $mform->get_data()) {
    // Let the grading strategy subplugin save its data.
    $rawgrade = $strategy->save_assessment($assessment, $data);
    // Store the data managed by the workshop core.
    $coredata = (object) array('id' => $assessment->id);
    if (isset($data->feedbackauthor_editor)) {
        $coredata->feedbackauthor_editor = $data->feedbackauthor_editor;
        $coredata = file_postupdate_standard_editor($coredata, 'feedbackauthor', $workshop->overall_feedback_content_options(), $workshop->context, 'mod_workshop', 'overallfeedback_content', $assessment->id);
开发者ID:alanaipe2015,项目名称:moodle,代码行数:31,代码来源:exassessment.php


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