當前位置: 首頁>>代碼示例>>PHP>>正文


PHP workshop::prepare_submission方法代碼示例

本文整理匯總了PHP中workshop::prepare_submission方法的典型用法代碼示例。如果您正苦於以下問題:PHP workshop::prepare_submission方法的具體用法?PHP workshop::prepare_submission怎麽用?PHP workshop::prepare_submission使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在workshop的用法示例。


在下文中一共展示了workshop::prepare_submission方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: array

    if (!empty($CFG->enableplagiarism)) {
        require_once $CFG->libdir . '/plagiarismlib.php';
        echo plagiarism_print_disclosure($cm->id);
    }
    $mform->display();
    echo $output->footer();
    die;
}
// else display the submission
if ($submission->id) {
    if ($seenaspublished) {
        $showauthor = has_capability('mod/workshop:viewauthorpublished', $workshop->context);
    } else {
        $showauthor = has_capability('mod/workshop:viewauthornames', $workshop->context);
    }
    echo $output->render($workshop->prepare_submission($submission, $showauthor));
} else {
    echo $output->box(get_string('noyoursubmission', 'workshop'));
}
if ($editable) {
    if ($submission->id) {
        $btnurl = new moodle_url($PAGE->url, array('edit' => 'on', 'id' => $submission->id));
        $btntxt = get_string('editsubmission', 'workshop');
    } else {
        $btnurl = new moodle_url($PAGE->url, array('edit' => 'on'));
        $btntxt = get_string('createsubmission', 'workshop');
    }
    echo $output->single_button($btnurl, $btntxt, 'get');
}
if ($submission->id and !$edit and !$isreviewer and $canallocate and $workshop->assessing_allowed($USER->id)) {
    $url = new moodle_url($PAGE->url, array('assess' => 1));
開發者ID:alanaipe2015,項目名稱:moodle,代碼行數:31,代碼來源:submission.php

示例2: redirect

            $record->gradinggradeoverby = $USER->id;
            $record->feedbackreviewer = $data->feedbackreviewer;
            $record->feedbackreviewerformat = $data->feedbackreviewerformat;
        }
        $DB->update_record('workshop_assessments', $record);
        redirect($workshop->view_url());
    }
}

// output starts here
$output = $PAGE->get_renderer('mod_workshop');      // workshop renderer
echo $output->header();
echo $output->heading(get_string('assessedsubmission', 'workshop'), 2);

$submission = $workshop->get_submission_by_id($submission->id);     // reload so can be passed to the renderer
echo $output->render($workshop->prepare_submission($submission, has_capability('mod/workshop:viewauthornames', $workshop->context)));

// show instructions for assessing as they may contain important information
// for evaluating the assessment
if (trim($workshop->instructreviewers)) {
    $instructions = file_rewrite_pluginfile_urls($workshop->instructreviewers, 'pluginfile.php', $PAGE->context->id,
        'mod_workshop', 'instructreviewers', 0, workshop::instruction_editors_options($PAGE->context));
    print_collapsible_region_start('', 'workshop-viewlet-instructreviewers', get_string('instructreviewers', 'workshop'));
    echo $output->box(format_text($instructions, $workshop->instructreviewersformat, array('overflowdiv'=>true)), array('generalbox', 'instructions'));
    print_collapsible_region_end();
}

// extend the current assessment record with user details
$assessment = $workshop->get_assessment_by_id($assessment->id);

if ($isreviewer) {
開發者ID:nigeldaley,項目名稱:moodle,代碼行數:31,代碼來源:assessment.php


注:本文中的workshop::prepare_submission方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。