コード例 #1
0
ファイル: project.php プロジェクト: Gavinthisisit/Moodle
$submissions = $teamwork->get_instance_submissions($instanceid, $phase, $page * $perpage, $perpage);
$shownames = has_capability('mod/teamwork:viewauthornames', $teamwork->context);
echo $output->render($pagingbar);
foreach ($submissions as $submission) {
    echo $output->render($teamwork->prepare_submission_summary($submission, $shownames));
}
echo $output->render($pagingbar);
echo $output->perpage_selector($perpage);
echo $output->box_end();
print_collapsible_region_end();
$ismember = $DB->get_record('teamwork_teammembers', array('userid' => $USER->id, 'team' => $teamrecord->id));
if ($ismember) {
    // Output own submissions here
    print_collapsible_region_start('', 'workshop-viewlet-ownsubmission', get_string('yoursubmission', 'teamwork'));
    echo $output->box_start('generalbox ownsubmission');
    $countsubmissions = $teamwork->count_submissions($USER->id);
    $perpage = get_user_preferences('teamwork_perpage', 10);
    $pagingbar = new paging_bar($countsubmissions, $page, $perpage, $PAGE->url, 'page');
    $submissions = $teamwork->get_submissions($USER->id, $phase, 0, $page * $perpage, $perpage);
    $shownames = has_capability('mod/teamwork:viewauthornames', $teamwork->context);
    echo $output->render($pagingbar);
    foreach ($submissions as $submission) {
        echo $output->render($teamwork->prepare_submission_summary($submission, $shownames));
    }
    echo $output->render($pagingbar);
    echo $output->perpage_selector($perpage);
    echo $output->single_button("submission.php?teamwork={$w}&instance={$instancerecord->id}", get_string('createsubmission', 'teamwork'), 'get');
    echo $output->box_end();
    print_collapsible_region_end();
}
print_collapsible_region_start('', 'workshop-viewlet-teamforum', get_string('teamforum', 'teamwork'));
コード例 #2
0
ファイル: student_info.php プロジェクト: Gavinthisisit/Moodle
echo $output->header();
$user_record = $DB->get_record('user', array('id' => $uid));
$team_member_record = $DB->get_record('teamwork_teammembers', array('userid' => $uid));
$teamid = $team_member_record->team;
$team_record = $DB->get_record('teamwork_team', array('id' => $teamid));
$project_record = $DB->get_record('teamwork_instance', array('team' => $teamid));
echo $output->heading(format_string($project_record->title . '@' . $team_record->name . ':' . $user_record->lastname . ' ' . $user_record->firstname));
// Output team submissions here
print_collapsible_region_start('', 'teamwork-studentinfo-teaminfo', '所在团队情况');
$teaminfo = new teamwork_team_info($w, $teamid);
echo $output->render($teaminfo);
print_collapsible_region_end();
// Output own submissions here
print_collapsible_region_start('', 'workshop-viewlet-ownsubmission', get_string('studentsubmission', 'teamwork'));
echo $output->box_start('generalbox ownsubmission');
$countsubmissions = $teamwork->count_submissions($uid);
$perpage = get_user_preferences('teamwork_perpage', 10);
$pagingbar = new paging_bar($countsubmissions, $page, $perpage, $PAGE->url, 'page');
$submissions = $teamwork->get_all_submissions($uid, 0, $page * $perpage, $perpage);
$shownames = has_capability('mod/teamwork:viewauthornames', $teamwork->context);
echo $output->render($pagingbar);
foreach ($submissions as $submission) {
    echo $output->render($teamwork->prepare_submission_summary($submission, $shownames));
}
echo $output->render($pagingbar);
echo $output->perpage_selector($perpage);
echo $output->box_end();
print_collapsible_region_end();
print_collapsible_region_start('', 'workshop-viewlet-owncommmit', '用户给出的评价');
//get_string('studentsubmission', 'teamwork'));
echo $output->box_start('generalbox ownsubmission');