Пример #1
0
$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');
/*
$associate = $DB->get_record('teamwork_associate_twf', array('course' => $course->id, 'teamwork' => $w));
$countsubmissions = count($DB->get_records('twf_discussions', array('twf' => $associate->twf, 'teamwork' => $w, 'instance' => $instanceid, 'phase' => $phase)));