本文整理汇总了PHP中helpbutton函数的典型用法代码示例。如果您正苦于以下问题:PHP helpbutton函数的具体用法?PHP helpbutton怎么用?PHP helpbutton使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了helpbutton函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: get_content
/**
* Content generation method of block; list of page links
**/
function get_content()
{
if ($this->content !== NULL) {
return $this->content;
}
global $CFG, $USER;
$this->content = new stdClass();
$this->content->icons = array();
$this->content->footer = '';
$this->content->items = array();
$context = get_context_instance(CONTEXT_SYSTEM);
$mentor = has_capability('block/student_gradeviewer:viewgrades', $context) || has_capability('block/student_gradeviewer:sportsviewgrades', $context);
$admin = has_capability('block/student_gradeviewer:academicadmin', $context) || has_capability('block/student_gradeviewer:sportsadmin', $context);
// If they can't view the grades, then they can't query
if ($mentor) {
$this->content->items[] = '<a href="' . $CFG->wwwroot . '/blocks/student_gradeviewer/viewgrades.php">' . get_string('view_grades', 'block_student_gradeviewer') . '</a>';
}
// This is solely for the admins of the systems, or the Moodle admins
if ($admin) {
$admin = get_string('admin', 'block_student_gradeviewer');
$this->content->items[] = '<a href="' . $CFG->wwwroot . '/blocks/student_gradeviewer/admin.php">' . $admin . '</a>' . helpbutton('admin', $admin, 'block_student_gradeviewer', true, false, '', true);
}
if ($mentor || $admin) {
$this->content->items[] = '<a href="' . $CFG->wwwroot . '/blocks/student_gradeviewer/analysis.php">
' . get_string('analysis', 'block_student_gradeviewer') . '</a>';
}
// Primary instructors can configure their digest options
$cps_user = CoursePrefsUser::findByUnique($USER->username);
if (!empty($CFG->cas_email) and $cps_user and $cps_user->getSectionsInfoAsTeacher()) {
$this->content->items[] = '<a href="' . $CFG->wwwroot . '/blocks/student_gradeviewer/options.php">' . get_string('options', 'block_student_gradeviewer') . '</a>';
}
return $this->content;
}
示例2: get_content
function get_content()
{
global $CFG;
if ($this->content !== NULL) {
return $this->content;
}
$this->content = new stdClass();
$this->content->footer = '';
if (empty($this->instance)) {
$this->content->text = '';
return $this->content;
}
$advancedsearch = get_string('advancedsearch', 'block_search_metadata');
//Accessibility: replaced <input value=">" type="submit"> with button-embedded image.
$this->content->text = '<div class="searchform">';
//$this->content->text .= '<form name="search" action="'.$CFG->wwwroot.'/mod/metadatadc/search_metadata.php" style="display:inline">';
$this->content->text .= '<form name="search" action="' . $CFG->wwwroot . '/blocks/' . $this->name() . '/search_allmetadata.php" style="display:inline">';
$this->content->text .= '<input name="id" type="hidden" value="' . $this->instance->pageid . '" />';
// course
// $this->content->text .= '<input name="id" type="hidden" value="0" />'; // course
$this->content->text .= '<input name="search" type="text" size="16" value="" />';
$this->content->text .= '<button type="submit" title="' . get_string('search') . '"><img src="' . $CFG->pixpath . '/a/r_go.gif" alt="" class="resize" /><span class="accesshide">' . get_string('search') . '</span></button><br />';
$this->content->text .= '<a href="' . $CFG->wwwroot . '/blocks/' . $this->name() . '/search_allmetadata.php?id=' . $this->instance->pageid . '">' . $advancedsearch . '</a>';
$this->content->text .= helpbutton('search_los', $advancedsearch, 'moodle', true, false, '', true);
$this->content->text .= '</form></div>';
return $this->content;
}
示例3: get_content
function get_content()
{
global $CFG, $THEME;
if ($this->content !== NULL) {
return $this->content;
}
$this->content = new stdClass();
$this->content->footer = '';
if (empty($this->instance)) {
$this->content->text = '';
return $this->content;
}
$advancedsearch = get_string('advancedsearch', 'block_search_forums');
$search = get_string('search');
//Accessibility: replaced <input value=" />" type="submit"> with configurable text/'silent' character.
// Theme config, $CFG->block_search_button = get_arrow_right() .'<span class="accesshide">'.get_string('search').'</span>';
$button = isset($CFG->block_search_button) ? $CFG->block_search_button : get_string('go');
$this->content->text = '<div class="searchform">';
$this->content->text .= '<form action="' . $CFG->wwwroot . '/mod/forum/search.php" style="display:inline"><fieldset class="invisiblefieldset">';
$this->content->text .= '<input name="id" type="hidden" value="' . $this->instance->pageid . '" />';
// course
$this->content->text .= '<label class="accesshide" for="searchform_search">' . $search . '</label>' . '<input id="searchform_search" name="search" type="text" size="16" />';
$this->content->text .= '<button id="searchform_button" type="submit" title="' . $search . '">' . $button . '</button><br />';
$this->content->text .= '<a href="' . $CFG->wwwroot . '/mod/forum/search.php?id=' . $this->instance->pageid . '">' . $advancedsearch . '</a>';
$this->content->text .= helpbutton('search', $advancedsearch, 'moodle', true, false, '', true);
$this->content->text .= '</fieldset></form></div>';
return $this->content;
}
示例4: display_add_field
function display_add_field($recordid = 0)
{
global $CFG;
$text = '';
$format = 0;
if ($recordid) {
if ($content = get_record('data_content', 'fieldid', $this->field->id, 'recordid', $recordid)) {
$text = $content->content;
$format = $content->content1;
}
}
$str = '<div title="' . $this->field->description . '">';
if (can_use_richtext_editor()) {
// Show a rich text html editor.
$str .= $this->gen_textarea(true, $text);
$str .= helpbutton("richtext", get_string("helprichtext"), 'moodle', true, true, '', true);
$str .= '<input type="hidden" name="field_' . $this->field->id . '_content1' . '" value="' . FORMAT_HTML . '" />';
} else {
// Show a normal textarea. Also let the user specify the format to be used.
$str .= $this->gen_textarea(false, $text);
// Get the available text formats for this field.
$formatsForField = format_text_menu();
$str .= '<br />';
$str .= choose_from_menu($formatsForField, 'field_' . $this->field->id . '_content1', $format, 'choose', '', '', true);
$str .= helpbutton('textformat', get_string('helpformatting'), 'moodle', true, false, '', true);
}
$str .= '</div>';
return $str;
}
示例5: display
public function display($forum)
{
// Work out current status
$manualmark = !forum::mark_read_automatically();
$current = get_string($manualmark ? 'manualmark_manual' : 'manualmark_auto', 'forumng');
// Make a help button
$change = get_string('manualmark_change', 'forumng');
$helpbutton = helpbutton('manualmark', $change, 'forumng', true, false, '', true);
// Get the button form
$params = $forum->get_link_params_array();
return parent::get_button($forum, $change, 'feature/manualmark/change.php', true, $params, $helpbutton, 'forumng-manualmark', $current . ' ', 'forumng-button-to-link');
}
示例6: init
function init()
{
global $CFG, $WS;
$this->title = get_string('block_index_current', 'wiki') . helpbutton('index_current', get_string('block_index_current', 'wiki'), 'wiki', true, false, '', true);
$this->version = 2004081200;
//initiates images array
if (isset($WS->dfcourse)) {
$imgclass = 'wiki_folding_co';
} else {
$imgclass = 'wiki_folding';
}
if (right_to_left()) {
$squaredir = 'left';
} else {
$squaredir = 'right';
}
// rtl support (nadavkav patch)
$this->images = array('plus' => '<img src="' . $CFG->wwwroot . '/mod/wiki/images/plus.gif" class="' . $imgclass . '" alt="" />', 'minus' => '<img src="' . $CFG->wwwroot . '/mod/wiki/images/minus.gif" class="' . $imgclass . '" alt="" />', 'square' => '<img src="' . $CFG->wwwroot . '/mod/wiki/images/square-' . $squaredir . '.png" alt="" />');
}
示例7: module_specific_controls
/**
* Callback function called from question_list() function (which is called from showbank())
*/
function module_specific_controls($totalnumber, $recurse, $category, $cmid)
{
$catcontext = get_context_instance_by_id($category->contextid);
if (has_capability('moodle/question:useall', $catcontext)) {
for ($i = 1; $i <= min(10, $totalnumber); $i++) {
$randomcount[$i] = $i;
}
for ($i = 20; $i <= min(100, $totalnumber); $i += 10) {
$randomcount[$i] = $i;
}
$out = '<br />';
$out .= get_string('addrandom', 'quiz', choose_from_menu($randomcount, 'randomcount', '1', '', '', '', true));
$out .= '<input type="hidden" name="recurse" value="' . $recurse . '" />';
$out .= "<input type=\"hidden\" name=\"categoryid\" value=\"{$category->id}\" />";
$out .= ' <input type="submit" name="addrandom" value="' . get_string('add') . '" />';
$out .= helpbutton('random', get_string('random', 'quiz'), 'quiz', true, false, '', true);
} else {
$out = '';
}
return $out;
}
示例8: get_content
function get_content()
{
global $CFG, $USER, $SITE, $course, $context;
$this->content = new stdClass();
$this->content->items = array();
$this->content->icons = array();
//if Course web site...
if ($course->id !== SITEID and has_capability('moodle/course:update', $context)) {
$this->title .= ' ' . helpbutton('openshare', 'OpenShare', 'block_openshare', true, false, '', true);
//Query for OpenShare enabled at course level
$opencourse = get_record("block_openshare_courses", "courseid", $course->id);
//If OpenShare enabled on this course...
if ($opencourse->status == 1) {
//Link to update OpenShare status of course modules en masse
$this->content->items[] = '<a href="' . $CFG->wwwroot . '/blocks/openshare/open_mods_set.php?id=' . $this->instance->pageid . '&sesskey=' . sesskey() . '">' . get_string('openmodsset', 'block_openshare') . '</a>';
$this->content->icons[] = '<img src="' . $CFG->wwwroot . '/blocks/openshare/images/open.png" alt="cc" />';
//Link to update teacher and students membership in this course's OpenShare group, Course Members
$this->content->items[] = '<a href="' . $CFG->wwwroot . '/blocks/openshare/group_members.php?id=' . $this->instance->pageid . '&sesskey=' . sesskey() . '">' . get_string('updatemembers', 'block_openshare') . '</a>';
$this->content->icons[] = '<img src="' . $CFG->pixpath . '/c/user.gif" alt="user" />';
$this->content->icons[] = '<img src="' . $CFG->pixpath . '/i/cross_red_small.gif" alt="no" />';
//Link to disable OpenShare for this courses
$this->content->items[] = '<a href="' . $CFG->wwwroot . '/blocks/openshare/open_course_set.php?id=' . $this->instance->pageid . '&open=0&sesskey=' . sesskey() . '">' . get_string('disablecourse', 'block_openshare') . '</a>';
} elseif ($opencourse->status < 1) {
//Link to enable OpenShare for this course
$this->content->icons[] = '<img src="' . $CFG->pixpath . '/i/tick_green_small.gif" alt="yes" />';
$this->content->items[] = '<a href="' . $CFG->wwwroot . '/blocks/openshare/open_course_set.php?id=' . $this->instance->pageid . '&open=1&sesskey=' . sesskey() . '">' . get_string('enablecourse', 'block_openshare') . '</a>';
}
} else {
//if not in a course, show the OpenShare courses RSS feed
//$this->content->items[]='<a href="'.$CFG->wwwroot.'/rss/xml_generate.php">'.get_string('coursesfeed','block_openshare').'</a>';
//$this->content->icons[]='<img src="'.$CFG->pixpath.'/i/rss.gif" alt="rss" />';
/*
if(has_capability('moodle/course:update', $context){
//Update OpenShare status of course modules en masse
$this->content->items[]='<a href="'.$CFG->wwwroot.'/blocks/openshare/open_mods_set.php">'.get_string('openmodsset','block_openshare').'</a>';
$this->content->icons[]='<img src="'.$CFG->wwwroot.'/blocks/openshare/images/cc.png" alt="cc" />';
}*/
}
$this->content->footer = '<div style="font-size: 75%; margin: .5em 0;"><a href="http://flexknowlogy.learningfield.org/addons/openshare/">' . get_string('blockfooter', 'block_openshare') . '</a></div>';
}
示例9: get_content
function get_content()
{
if ($this->content !== NULL) {
return $this->content;
}
global $CFG, $PAGE;
$this->content = new stdClass();
$this->content->footer = ' ';
$plugin = '';
$searchtype = 'choose';
if ($this->config) {
$searchtype = $this->config->searchtype;
if ($searchtype === 'forumng') {
$title = get_string('searchforums', 'block_ousearch');
$this->title = $title . ' ' . helpbutton('search_forums', $title, 'forumng', true, false, '', true);
$plugin = 'mod/forumng';
} elseif ($searchtype === 'multiactivity') {
$this->title = get_string('searchthiswebsite', 'block_ousearch');
}
}
//If search type is not set print a warning or hide the block
if ($searchtype === 'choose') {
//Print a warning when editing is on
if ($PAGE->user_is_editing()) {
$this->content->text = get_string('seachtypeisnotselected', 'block_ousearch');
//Hide the block when editing is off
} else {
$this->title = '';
$this->content->text = '';
}
return $this->content;
}
$this->content->text = "\n<form method='get' action='{$CFG->wwwroot}/blocks/ousearch/search.php'>\n<div>\n<input type='hidden' name='course' value='{$this->instance->pageid}'/>\n<input type='hidden' name='plugin' value='{$plugin}'/>\n<input type='text' name='query' size='12'\n/><input type='submit' value='" . get_string('search') . "'/>\n</div>\n</form>\n";
// Print a notice for user when edisting
if ($searchtype === 'multiactivity' && $PAGE->user_is_editing()) {
$this->content->text .= get_string('searchthiswebsitenotice', 'block_ousearch');
}
return $this->content;
}
示例10: init
function init()
{
$this->title = get_string('block_new_page', 'wiki') . helpbutton('new_page', get_string('block_new_page', 'wiki'), 'wiki', true, false, '', true);
$this->version = 2004081200;
}
示例11: note_get_state_names
echo '<input type="hidden" name="sesskey" value="' . $USER->sesskey . '" />';
$state_names = note_get_state_names();
// the first time list hack
if (empty($users)) {
foreach ($_POST as $k => $v) {
if (preg_match('/^user(\\d+)$/', $k, $m)) {
$users[] = $m[1];
}
}
}
$strpublishstate = get_string('publishstate', 'notes');
$userlist = array();
foreach ($users as $k => $v) {
if (!($user = get_record('user', 'id', $v))) {
continue;
}
echo '<input type="hidden" name="userid[' . $k . ']" value="' . $v . '" />';
$userlist[] = fullname($user, true);
}
echo '<p>';
echo get_string('users') . ': ' . implode(', ', $userlist) . '.';
echo '</p>';
echo '<p>' . get_string('content', 'notes');
helpbutton('writing', get_string('helpwriting'));
echo '<br /><textarea name="content" rows="5" cols="50">' . strip_tags(@$content) . '</textarea></p>';
echo '<p>' . $strpublishstate;
helpbutton('status', $strpublishstate, 'notes');
choose_from_menu($state_names, 'state', empty($state) ? NOTES_STATE_PUBLIC : $state, '');
echo '</p>';
echo '<input type="submit" value="' . get_string('savechanges') . '" /></div></form>';
print_footer($course);
示例12: display_submissions
//.........这里部分代码省略.........
$grade = '<div id="g' . $auser->id . '">' . $menu . '</div>';
} else {
$grade = '<div id="g' . $auser->id . '">-</div>';
}
}
if ($final_grade->locked or $final_grade->overridden) {
$comment = '<div id="com' . $auser->id . '">' . $final_grade->str_feedback . '</div>';
} else {
if ($quickgrade) {
$comment = '<div id="com' . $auser->id . '">' . '<textarea tabindex="' . $tabindex++ . '" name="submissioncomment[' . $auser->id . ']" id="submissioncomment' . $auser->id . '" rows="2" cols="20">' . $auser->submissioncomment . '</textarea></div>';
} else {
$comment = '<div id="com' . $auser->id . '"> </div>';
}
}
}
if (empty($auser->status)) {
/// Confirm we have exclusively 0 or 1
$auser->status = 0;
} else {
$auser->status = 1;
}
$buttontext = $auser->status == 1 ? $strupdate : $strgrade;
///No more buttons, we use popups ;-).
$popup_url = '/mod/assignment/submissions.php?id=' . $this->cm->id . '&userid=' . $auser->id . '&mode=single' . '&offset=' . $offset++;
$button = link_to_popup_window($popup_url, 'grade' . $auser->id, $buttontext, 600, 780, $buttontext, 'none', true, 'button' . $auser->id);
$status = '<div id="up' . $auser->id . '" class="s' . $auser->status . '">' . $button . '</div>';
$finalgrade = '<span id="finalgrade_' . $auser->id . '">' . $final_grade->str_grade . '</span>';
$outcomes = '';
if ($uses_outcomes) {
foreach ($grading_info->outcomes as $n => $outcome) {
$outcomes .= '<div class="outcome"><label>' . $outcome->name . '</label>';
$options = make_grades_menu(-$outcome->scaleid);
if ($outcome->grades[$auser->id]->locked or !$quickgrade) {
$options[0] = get_string('nooutcome', 'grades');
$outcomes .= ': <span id="outcome_' . $n . '_' . $auser->id . '">' . $options[$outcome->grades[$auser->id]->grade] . '</span>';
} else {
$outcomes .= ' ';
$outcomes .= choose_from_menu($options, 'outcome_' . $n . '[' . $auser->id . ']', $outcome->grades[$auser->id]->grade, get_string('nooutcome', 'grades'), '', 0, true, false, 0, 'outcome_' . $n . '_' . $auser->id);
}
$outcomes .= '</div>';
}
}
$row = array($picture, fullname($auser), $grade, $comment, $studentmodified, $teachermodified, $status, $finalgrade);
if ($uses_outcomes) {
$row[] = $outcomes;
}
$table->add_data($row);
}
}
/// Print quickgrade form around the table
if ($quickgrade) {
echo '<form action="submissions.php" id="fastg" method="post">';
echo '<div>';
echo '<input type="hidden" name="id" value="' . $this->cm->id . '" />';
echo '<input type="hidden" name="mode" value="fastgrade" />';
echo '<input type="hidden" name="page" value="' . $page . '" />';
echo '</div>';
//echo '<div style="text-align:center"><input type="submit" name="fastg" value="'.get_string('saveallfeedback', 'assignment').'" /></div>';
}
$table->print_html();
/// Print the whole table
if ($quickgrade) {
echo '<div style="text-align:center"><input type="submit" name="fastg" value="' . get_string('saveallfeedback', 'assignment') . '" /></div>';
echo '</form>';
}
/// End of fast grading form
/// Mini form for setting user preference
echo '<br />';
echo '<form id="options" action="submissions.php?id=' . $this->cm->id . '" method="post">';
echo '<div>';
echo '<input type="hidden" id="updatepref" name="updatepref" value="1" />';
echo '<table id="optiontable" align="right">';
echo '<tr align="right"><td>';
echo '<label for="perpage">' . get_string('pagesize', 'assignment') . '</label>';
echo ':</td>';
echo '<td>';
echo '<input type="text" id="perpage" name="perpage" size="1" value="' . $perpage . '" />';
helpbutton('pagesize', get_string('pagesize', 'assignment'), 'assignment');
echo '</td></tr>';
echo '<tr align="right">';
echo '<td>';
print_string('quickgrade', 'assignment');
echo ':</td>';
echo '<td>';
if ($quickgrade) {
echo '<input type="checkbox" name="quickgrade" value="1" checked="checked" />';
} else {
echo '<input type="checkbox" name="quickgrade" value="1" />';
}
helpbutton('quickgrade', get_string('quickgrade', 'assignment'), 'assignment') . '</p></div>';
echo '</td></tr>';
echo '<tr>';
echo '<td colspan="2" align="right">';
echo '<input type="submit" value="' . get_string('savepreferences') . '" />';
echo '</td></tr></table>';
echo '</div>';
echo '</form>';
///End of mini form
print_footer($this->course);
}
示例13: get_string
}
if ($bulkoperations) {
echo '<br /><div class="buttons">';
echo '<input type="button" onclick="checkall()" value="' . get_string('selectall') . '" /> ';
echo '<input type="button" onclick="checknone()" value="' . get_string('deselectall') . '" /> ';
$displaylist = array();
$displaylist['messageselect.php'] = get_string('messageselectadd');
if (!empty($CFG->enablenotes) && has_capability('moodle/notes:manage', $context) && $context->id != $frontpagectx->id) {
$displaylist['addnote.php'] = get_string('addnewnote', 'notes');
$displaylist['groupaddnote.php'] = get_string('groupaddnewnote', 'notes');
}
if ($context->id != $frontpagectx->id) {
$displaylist['extendenrol.php'] = get_string('extendenrol');
$displaylist['groupextendenrol.php'] = get_string('groupextendenrol');
}
helpbutton("participantswithselectedusers", get_string("withselectedusers"));
choose_from_menu($displaylist, "formaction", "", get_string("withselectedusers"), "if(checksubmit(this.form))this.form.submit();", "");
echo '<input type="hidden" name="id" value="' . $course->id . '" />';
echo '<div id="noscriptparticipantsform" style="display: inline;">';
echo '<input type="submit" value="' . get_string('ok') . '" /></div>';
echo '<script type="text/javascript">' . "\n//<![CDATA[\n" . 'document.getElementById("noscriptparticipantsform").style.display = "none";' . "\n//]]>\n" . '</script>';
echo '</div>';
echo '</div>';
echo '</form>';
}
if ($bulkoperations && $totalcount > $perpage * 3) {
echo '<form action="index.php" class="searchform"><div><input type="hidden" name="id" value="' . $course->id . '" />' . get_string('search') . ': ' . "\n";
echo '<input type="text" name="search" value="' . s($search) . '" /> <input type="submit" value="' . get_string('search') . '" /></div></form>' . "\n";
}
$perpageurl = preg_replace('/&perpage=\\d*/', '', $baseurl);
if ($perpage == SHOW_ALL_PAGE_SIZE) {
示例14: view_summary
/**
* Display auto generated info about the assignment
*/
function view_summary($submission = null, $return = false)
{
global $USER, $CFG;
$table = new Object();
$table->id = 'summary';
$table->class = 'generaltable';
$table->align = array('right', 'left');
$table->size = array('20%', '');
$table->width = '100%';
// Language
$item_name = get_string('assignmentlangs', 'assignment_onlinejudge') . ':';
$lang = get_string('lang' . $this->onlinejudge->language, 'assignment_onlinejudge');
$table->data[] = array($item_name, $lang);
if (is_null($submission)) {
$submission = $this->get_submission();
}
// Status
$item_name = get_string('status') . helpbutton('status', get_string('status'), 'assignment_onlinejudge', true, false, '', true) . ':';
$item = get_string('notavailable');
if (!empty($submission->status)) {
$item = get_string('status' . $submission->status, 'assignment_onlinejudge');
}
$table->data[] = array($item_name, $item);
// Judge time
$item_name = get_string('judgetime', 'assignment_onlinejudge') . ':';
$item = get_string('notavailable');
if (isset($submission->judgetime)) {
$item = userdate($submission->judgetime) . ' (' . get_string('early', 'assignment', format_time(time() - $submission->judgetime)) . ')';
}
$table->data[] = array($item_name, $item);
// Information
$item_name = get_string('info', 'assignment_onlinejudge') . ':';
$item = get_string('notavailable');
if (isset($submission->status)) {
if ($submission->status === 'pending') {
if (empty($CFG->assignment_oj_daemon_pid)) {
//Judge from cron
$lastcron = get_field('modules', 'lastcron', 'name', 'assignment');
$left = ceil(($lastcron + $CFG->assignment_oj_cronfreq - time()) / 60);
$left = $left > 0 ? $left : 0;
$submission->info = get_string('infopending', 'assignment_onlinejudge', $left);
} else {
$submission->info = get_string('notavailable');
}
} else {
if ($submission->status !== 'ac' && $submission->status !== 'ce' && empty($submission->info)) {
$submission->info = get_string('info' . $submission->status, 'assignment_onlinejudge');
}
}
if (!empty($submission->info)) {
$item = $submission->info;
}
}
$options = new stdClass();
$options->para = false;
$table->data[] = array($item_name, format_text(stripslashes($item), FORMAT_MOODLE, $options));
// Statistics
$item_name = get_string('statistics', 'assignment_onlinejudge') . ':';
$item = get_string('notavailable');
if (isset($submission->id)) {
$item = '';
$ac_rate = $this->get_statistics($submission, &$item);
if (!empty($item)) {
$item .= '<br />' . get_string('successrate', 'assignment_onlinejudge') . ': ' . round($ac_rate * 100, 2) . '%';
}
}
$table->data[] = array($item_name, $item);
// Output (Show to teacher only)
$context = get_context_instance(CONTEXT_MODULE, $this->cm->id);
if (has_capability('mod/assignment:grade', $context) && isset($submission->output)) {
$table->data[] = array(get_string('output', 'assignment_onlinejudge') . ':', format_text(stripslashes($submission->output), FORMAT_PLAIN));
}
$output = print_table($table, true);
if ($return) {
return $output;
}
echo $output;
}
示例15: mtrace
if ($cron == 1) {
mtrace("<p>Su cuestionario sera generado mas tarde</a></p>");
$continue = "{$CFG->wwwroot}/mod/blended/edit_paperquiz.php?a={$a}";
print_continue($continue);
// Finish the page
print_footer($course);
} else {
// Generate every job matching this data. (This makes a grouping of attempts)
$job->quiz = $quiz->id;
$job->userid = $USER->id;
$job->blended = $blended->id;
$job->timestamp = $timestamp;
list($numattempts, $pdfFile) = generateJobs($job);
if ($numattempts > 0) {
$tex = new object();
$tex->href = "{$CFG->wwwroot}/files/index.php?id={$course->id}&wdir=%2F{$pdfFile->inCourseFolderRelativePath}";
$tex->hrefText = $pdfFile->inCourseFolderRelativePath;
$tex->directLinkhref = "{$CFG->wwwroot}/file.php/{$pdfFile->RelativePath}?forcedownload=1";
$tex->directLinkText = $pdfFile->Name;
echo get_string("PDFgeneratedMessage", "blended", $tex);
} else {
echo "<p>No PDF file generated.</p>";
}
$continue = "{$CFG->wwwroot}/mod/blended/edit_paperquiz.php?a={$a}";
print_continue($continue);
// Finish the page
echo "<center>";
helpbutton($page = 'generateQuizesPDF', get_string('pagehelp', 'blended'), $module = 'blended', $image = true, $linktext = true, $text = '', $return = false, $imagetext = '');
echo "</center>";
print_footer($course);
}