• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP helpbutton函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中helpbutton函数的典型用法代码示例。如果您正苦于以下问题:PHP helpbutton函数的具体用法?PHP helpbutton怎么用?PHP helpbutton使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了helpbutton函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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;
 }
开发者ID:rrusso,项目名称:EARS,代码行数:36,代码来源:block_student_gradeviewer.php


示例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;
 }
开发者ID:hmatulis,项目名称:RTL-BIDI-Hebrew-Moodle-Plugins,代码行数:27,代码来源:block_search_metadata.php


示例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;
 }
开发者ID:edwinphillips,项目名称:moodle-485cb39,代码行数:28,代码来源:block_search_forums.php


示例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;
 }
开发者ID:BackupTheBerlios,项目名称:samouk-svn,代码行数:29,代码来源:field.class.php


示例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 . '&nbsp;', 'forumng-button-to-link');
 }
开发者ID:hmatulis,项目名称:RTL-BIDI-Hebrew-Moodle-Plugins,代码行数:12,代码来源:manualmark_forum_feature.php


示例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="" />');
 }
开发者ID:hmatulis,项目名称:RTL-BIDI-Hebrew-Moodle-Plugins,代码行数:19,代码来源:block_wiki_index_current.php


示例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;
}
开发者ID:r007,项目名称:PMoodle,代码行数:24,代码来源:edit.php


示例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 . '&amp;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 . '&amp;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 . '&amp;open=0&amp;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 . '&amp;open=1&amp;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>';
 }
开发者ID:hmatulis,项目名称:RTL-BIDI-Hebrew-Moodle-Plugins,代码行数:40,代码来源:block_openshare.php


示例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;
 }
开发者ID:hmatulis,项目名称:RTL-BIDI-Hebrew-Moodle-Plugins,代码行数:39,代码来源:block_ousearch.php


示例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;
 }
开发者ID:hmatulis,项目名称:RTL-BIDI-Hebrew-Moodle-Plugins,代码行数:5,代码来源:block_wiki_new_page.php


示例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);
开发者ID:BackupTheBerlios,项目名称:samouk-svn,代码行数:31,代码来源:groupaddnote.php


示例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 . '">&nbsp;</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 . '&amp;userid=' . $auser->id . '&amp;mode=single' . '&amp;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);
 }
开发者ID:BackupTheBerlios,项目名称:samouk-svn,代码行数:101,代码来源:lib.php


示例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') . ':&nbsp;' . "\n";
    echo '<input type="text" name="search" value="' . s($search) . '" />&nbsp;<input type="submit" value="' . get_string('search') . '" /></div></form>' . "\n";
}
$perpageurl = preg_replace('/&amp;perpage=\\d*/', '', $baseurl);
if ($perpage == SHOW_ALL_PAGE_SIZE) {
开发者ID:nicolasconnault,项目名称:moodle2.0,代码行数:31,代码来源:index.php


示例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) . '&nbsp(' . 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;
 }
开发者ID:hit-moodle,项目名称:onlinejudge,代码行数:81,代码来源:assignment.class.php


示例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);
}
开发者ID:juacas,项目名称:moodle-mod_blended,代码行数:31,代码来源:generateQuizesPDF.php


示例16: question_list

/**
* Prints the table of questions in a category with interactions
*
* @param object $course   The course object
* @param int $categoryid  The id of the question category to be displayed
* @param int $quizid      The quiz id if we are in the context of a particular quiz, 0 otherwise
* @param int $recurse     This is 1 if subcategories should be included, 0 otherwise
* @param int $page        The number of the page to be displayed
* @param int $perpage     Number of questions to show per page
* @param boolean $showhidden   True if also hidden questions should be displayed
* @param boolean $showquestiontext whether the text of each question should be shown in the list
*/
function question_list($course, $categoryid, $quizid = 0, $recurse = 1, $page = 0, $perpage = 100, $showhidden = false, $sortorder = 'qtype, name ASC', $showquestiontext = false)
{
    global $USER, $CFG, $THEME;
    $qtypemenu = question_type_menu();
    if ($rqp_types = get_records('question_rqp_types')) {
        foreach ($rqp_types as $type) {
            $qtypemenu['rqp_' . $type->id] = $type->name;
        }
    }
    $strcategory = get_string("category", "quiz");
    $strquestion = get_string("question", "quiz");
    $straddquestions = get_string("addquestions", "quiz");
    $strimportquestions = get_string("importquestions", "quiz");
    $strexportquestions = get_string("exportquestions", "quiz");
    $strnoquestions = get_string("noquestions", "quiz");
    $strselect = get_string("select", "quiz");
    $strselectall = get_string("selectall", "quiz");
    $strselectnone = get_string("selectnone", "quiz");
    $strcreatenewquestion = get_string("createnewquestion", "quiz");
    $strquestionname = get_string("questionname", "quiz");
    $strdelete = get_string("delete");
    $stredit = get_string("edit");
    $straction = get_string("action");
    $strrestore = get_string('restore');
    $straddtoquiz = get_string("addtoquiz", "quiz");
    $strtype = get_string("type", "quiz");
    $strcreatemultiple = get_string("createmultiple", "quiz");
    $strpreview = get_string("preview", "quiz");
    if (!$categoryid) {
        echo "<p style=\"text-align:center;\"><b>";
        print_string("selectcategoryabove", "quiz");
        echo "</b></p>";
        if ($quizid) {
            echo "<p>";
            print_string("addingquestions", "quiz");
            echo "</p>";
        }
        return;
    }
    if (!($category = get_record('question_categories', 'id', $categoryid))) {
        notify('Category not found!');
        return;
    }
    $canedit = has_capability('moodle/question:manage', get_context_instance(CONTEXT_COURSE, $category->course));
    $editingquiz = false;
    if ($quizid) {
        $cm = get_coursemodule_from_instance('quiz', $quizid);
        $editingquiz = has_capability('mod/quiz:manage', get_context_instance(CONTEXT_MODULE, $cm->id));
    }
    echo '<div class="boxaligncenter">';
    $formatoptions = new stdClass();
    $formatoptions->noclean = true;
    echo format_text($category->info, FORMAT_MOODLE, $formatoptions, $course->id);
    echo '<table><tr>';
    // check if editing questions in this category is allowed
    if ($canedit) {
        echo "<td valign=\"top\"><b>{$strcreatenewquestion}:</b></td>";
        echo '<td valign="top" align="right">';
        popup_form("{$CFG->wwwroot}/question/question.php?category={$category->id}&amp;qtype=", $qtypemenu, "addquestion", "", "choose", "", "", false, "self");
        echo '</td><td valign="top" align="right">';
        helpbutton("questiontypes", $strcreatenewquestion, "quiz");
        echo '</td>';
    } else {
        echo '<td>';
        print_string("publishedit", "quiz");
        echo '</td>';
    }
    echo '</tr></table>';
    echo '</div>';
    $categorylist = $recurse ? question_categorylist($category->id) : $category->id;
    // hide-feature
    $showhidden = $showhidden ? '' : " AND hidden = '0'";
    if (!($totalnumber = count_records_select('question', "category IN ({$categorylist}) AND parent = '0' {$showhidden}"))) {
        echo "<p style=\"text-align:center;\">";
        print_string("noquestions", "quiz");
        echo "</p>";
        return;
    }
    if (!($questions = get_records_select('question', "category IN ({$categorylist}) AND parent = '0' {$showhidden}", $sortorder, '*', $page * $perpage, $perpage))) {
        // There are no questions on the requested page.
        $page = 0;
        if (!($questions = get_records_select('question', "category IN ({$categorylist}) AND parent = '0' {$showhidden}", $sortorder, '*', 0, $perpage))) {
            // There are no questions at all
            echo "<p style=\"text-align:center;\">";
            print_string("noquestions", "quiz");
            echo "</p>";
            return;
        }
//.........这里部分代码省略.........
开发者ID:veritech,项目名称:pare-project,代码行数:101,代码来源:editlib.php


示例17: htmlspecialchars

        echo '<p>
                <a href="' . htmlspecialchars('export.php?action=exportfile&id=' . $id) . '">' . get_string('export_questions', 'feedback') . '</a>/
                <a href="' . htmlspecialchars('import.php?id=' . $id) . '">' . get_string('import_questions', 'feedback') . '</a>
            </p>';
    }
    // print_simple_box_end();
    print_box_end();
}
///////////////////////////////////////////////////////////////////////////
///print the Item-Edit-section
///////////////////////////////////////////////////////////////////////////
if ($do_show == 'edit') {
    $add_item_form->display();
    if (is_array($feedbackitems)) {
        $itemnr = 0;
        $helpbutton = helpbutton('preview', get_string('preview', 'feedback'), 'feedback', true, false, '', true);
        print_heading($helpbutton . get_string('preview', 'feedback'));
        if (isset($SESSION->feedback->moving) and $SESSION->feedback->moving->shouldmoving == 1) {
            print_heading('<a href="' . htmlspecialchars($ME . '?id=' . $id) . '">' . get_string('cancel_moving', 'feedback') . '</a>');
        }
        // print_simple_box_start('center', '80%');
        print_box_start('generalbox boxaligncenter boxwidthwide');
        //check, if there exists required-elements
        $countreq = $DB->count_records('feedback_item', array('feedback' => $feedback->id, 'required' => 1));
        if ($countreq > 0) {
            // echo '<font color="red">(*)' . get_string('items_are_required', 'feedback') . '</font>';
            echo '<span class="feedback_required_mark">(*)' . get_string('items_are_required', 'feedback') . '</span>';
        }
        echo '<table>';
        if (isset($SESSION->feedback->moving) and  

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP helper函数代码示例发布时间:2022-05-15
下一篇:
PHP help_verify_template函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap