当前位置: 首页>>代码示例>>PHP>>正文


PHP popup_form函数代码示例

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


在下文中一共展示了popup_form函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: print_header

 function print_header()
 {
     global $CFG;
     popup_form('admin.php?type=' . $this->type . '&path=', $this->current_assignments, 'path_selector', $this->path, 'Year/College/Major', '', '', false, 'self', get_string('academic_current', 'block_student_gradeviewer'));
     // Once we have everything we need, then we can load the javascript
     // for the auto complete
     echo '<script type="text/javascript">';
     foreach ($this->fields as $field => $values) {
         echo data_reduce($field, $values);
     }
     echo '</script>';
     // Get all the libraries required for the yui stuff
     require_js(array($CFG->wwwroot . '/lib/yui/yahoo/yahoo-min.js', $CFG->wwwroot . '/lib/yui/event/event-min.js', $CFG->wwwroot . '/lib/yui/animation/animation-min.js', $CFG->wwwroot . '/lib/yui/yahoo-dom-event/yahoo-dom-event.js', $CFG->wwwroot . '/lib/yui/autocomplete/autocomplete-min.js', $CFG->wwwroot . '/blocks/student_gradeviewer/admin/functions.js'));
     // The yui autocomplete has to have the most complicated html setup
     echo '<div class="admin_header">
             <div class="yui-skin-sam">
               <form method="post">
                 <div class="admin_inputs">
               ' . array_reduce($this->input_fields, array($this, 'input_reduce'), ' ') . '
                 </div>
                 <div class="submit_button">
                 <input type="submit" value="' . get_string('submit') . '">
                 </div>
               </form>
             </div>
           </div>';
     $this->print_errors();
     $header_strings = array_reduce($this->input_fields, array($this, 'header_strings'), '');
     $assigning = get_string('admin_assigning', 'block_student_gradeviewer');
     $this->header_string($assigning . $header_strings);
 }
开发者ID:rrusso,项目名称:EARS,代码行数:31,代码来源:admin_academics.php

示例2: print_header

 function print_header()
 {
     popup_form('admin.php?type=' . $this->type . '&amp;path=', $this->mentors, 'mentor_selector', $this->path, 'choose', '', '', false, 'self', get_string('person_assign', 'block_student_gradeviewer'));
     $this->print_errors();
     if (isset($this->mentors[$this->path])) {
         $a->person = $this->mentors[$this->path];
     }
     $header = $this->path == 0 ? get_string('person_select', 'block_student_gradeviewer') : get_string('person_mentors', 'block_student_gradeviewer', $a);
     $this->header_string($header);
 }
开发者ID:rrusso,项目名称:EARS,代码行数:10,代码来源:admin_person.php

示例3: print_header

 function print_header()
 {
     global $CFG;
     popup_form('admin.php?type=' . $this->type . '&amp;path=', $this->sports, 'sport_selector', $this->path, '', '', '', false, 'self', get_string('sports_assign', 'block_student_gradeviewer'));
     if ($this->path != 'NA') {
         echo ' <a href="admin.php?type=name&amp;path=' . $this->path . '"><img src="' . $CFG->pixpath . '/i/edit.gif"/></a>';
     }
     // Any validation errors should be printed first
     $this->print_errors();
     $this->header_string(get_string('admin_assigning', 'block_student_gradeviewer') . $this->get_sport());
 }
开发者ID:rrusso,项目名称:EARS,代码行数:11,代码来源:admin_sports.php

示例4: update_student_status_menu

function update_student_status_menu($userid, $courseid)
{
    global $CFG;
    $userid = optional_param('userid', 0, PARAM_INT);
    if ($userid > 0) {
        $user = get_record('user', 'id', $userid);
    } else {
        $user = $USER;
    }
    if (!($post = get_record('ilpconcern_status', 'userid', $user->id))) {
        $post->status = 0;
    }
    $options = array(get_string('green', 'ilpconcern'), get_string('amber', 'ilpconcern'), get_string('red', 'ilpconcern'));
    popup_form($CFG->wwwroot . '/mod/ilpconcern/concerns_view.php?' . ($courseid > 1 ? 'courseid=' . $courseid . '&amp;' : '') . '&amp;userid=' . $userid . '&amp;action=updatestatus&amp;studentstatus=', $options, "studentstatus", $post->status, "", "", "", false, 'self', get_string('updatestatus', 'ilpconcern'));
}
开发者ID:hmatulis,项目名称:RTL-BIDI-Hebrew-Moodle-Plugins,代码行数:15,代码来源:lib.php

示例5: report_stats_mode_menu

function report_stats_mode_menu($course, $mode, $time, $url)
{
    global $CFG;
    /*        
    $reportoptions = stats_get_report_options($course->id, $mode);
    $timeoptions = report_stats_timeoptions($mode);
    if (empty($timeoptions)) {
        print_error('nostatstodisplay', '', $CFG->wwwroot.'/course/view.php?id='.$course->id);
    }
    */
    $options = array();
    $options[STATS_MODE_GENERAL] = get_string('statsmodegeneral');
    $options[STATS_MODE_DETAILED] = get_string('statsmodedetailed');
    if (has_capability('coursereport/stats:view', get_context_instance(CONTEXT_SYSTEM))) {
        $options[STATS_MODE_RANKED] = get_string('reports');
    }
    return popup_form($url . "?course={$course->id}&amp;time={$time}&amp;mode=", $options, 'switchmode', $mode, '', '', '', true);
}
开发者ID:JackCanada,项目名称:moodle-hacks,代码行数:18,代码来源:lib.php

示例6: get_content

 function get_content()
 {
     global $CFG, $ME, $COURSE;
     //get list of themes
     $themes = get_list_of_themes();
     if ($this->content !== NULL) {
         return $this->content;
     }
     $this->content->footer = '';
     $this->content->text = '';
     $context = get_context_instance(CONTEXT_BLOCK, $this->instance->id);
     if (has_capability('block/session_theme:switchthemes', $context)) {
         $this->content->text .= popup_form($ME . '?id=' . $COURSE->id . '&amp;theme=', $themes, 'sessionthemeform', current_theme(), 'choose', '', '', true);
         $this->content->footer .= '';
     } else {
         $this->content = '';
     }
     return $this->content;
 }
开发者ID:hmatulis,项目名称:RTL-BIDI-Hebrew-Moodle-Plugins,代码行数:19,代码来源:block_session_theme.php

示例7: print_header

 function print_header($title)
 {
     global $USER, $CFG;
     $replacements = array('%fullname%' => get_string('mymoodle', 'my'));
     foreach ($replacements as $search => $replace) {
         $title = str_replace($search, $replace, $title);
     }
     $site = get_site();
     $button = update_mymoodle_icon($USER->id);
     $nav = get_string('mymoodle', 'my');
     $header = $site->shortname . ': ' . $nav;
     $navlinks = array(array('name' => $nav, 'link' => '', 'type' => 'misc'));
     $navigation = build_navigation($navlinks);
     $loggedinas = user_login_string($site);
     if (empty($CFG->langmenu)) {
         $langmenu = '';
     } else {
         $currlang = current_language();
         $langs = get_list_of_languages();
         $langlabel = get_accesshide(get_string('language'));
         $langmenu = popup_form($CFG->wwwroot . '/my/index.php?lang=', $langs, 'chooselang', $currlang, '', '', '', true, 'self', $langlabel);
     }
     print_header($title, $header, $navigation, '', '', true, $button, $loggedinas . $langmenu);
 }
开发者ID:JackCanada,项目名称:moodle-hacks,代码行数:24,代码来源:pagelib.php

示例8: menuitems_to_html

 protected function menuitems_to_html($menuitems, $depth = 0)
 {
     if (empty($menuitems)) {
         return '';
     }
     $options = array();
     $children = array();
     $selected = '';
     foreach ($menuitems as $menuitem) {
         $options[$menuitem->url] = $menuitem->title;
         if ($menuitem->childtree) {
             // Sort of hackish, but works
             $selected = $menuitem->url;
             $children[] = $this->menuitems_to_html($menuitem->childtree, $depth + 1);
         }
         // This selected takes priority
         if (!empty($menuitem->active)) {
             $selected = $menuitem->url;
         }
     }
     $html = popup_form('', $options, "pagemenudropdown{$depth}", $selected, 'choose', '', '', true);
     $html .= "<br /><br />\n" . implode("<br /><br />\n", $children);
     return $html;
 }
开发者ID:hmatulis,项目名称:RTL-BIDI-Hebrew-Moodle-Plugins,代码行数:24,代码来源:select.class.php

示例9: IN

                                             FROM ' . $CFG->prefix . 'user
                                             WHERE ' . $select . '
                                             AND id NOT IN (
                                                 SELECT u.id
                                                 FROM ' . $CFG->prefix . 'role_assignments r,
                                                 ' . $CFG->prefix . 'user u
                                                 WHERE r.contextid = ' . $contextid . '
                                                 AND u.id = r.userid
                                                 AND r.roleid = ' . $roleid . '
                                                 ' . $selectsql . ')
                                             ORDER BY lastname ASC, firstname ASC');
     $usercount = $availableusers->_numOfRows;
 }
 echo '<div class="selector">';
 $assignableroles = array('0' => get_string('listallroles', 'role') . '...') + $assignableroles;
 popup_form("{$CFG->wwwroot}/{$CFG->admin}/roles/assign.php?userid={$userid}&amp;courseid={$courseid}&amp;contextid={$contextid}&amp;roleid=", $assignableroles, 'switchrole', $roleid, '', '', '', false, 'self', $strroletoassign);
 echo '</div>';
 print_simple_box_start('center');
 include 'assign.html';
 print_simple_box_end();
 if (!empty($errors)) {
     $msg = '<p>';
     foreach ($errors as $e) {
         $msg .= $e . '<br />';
     }
     $msg .= '</p>';
     print_simple_box_start('center');
     notify($msg);
     print_simple_box_end();
 }
 //Back to Assign Roles button
开发者ID:kai707,项目名称:ITSA-backup,代码行数:31,代码来源:assign.php

示例10: array

    }
    $rolenames = array(-1 => $strallsiteusers) + $rolenames;
}
/// If there are multiple Roles in the course, then show a drop down menu for switching
if (count($rolenames) > 1) {
    echo '<div class="rolesform">';
    echo '<label for="rolesform_jump">' . get_string('currentrole', 'role') . '&nbsp;</label>';
    if ($context->id != $frontpagectx->id) {
        $rolenames = array(0 => get_string('all')) + $rolenames;
    } else {
        if (!$CFG->defaultfrontpageroleid) {
            // we do not want "All users with role" - we already have all users in defualt frontpage role option
            $rolenames = array(0 => get_string('userswithrole', 'role')) + $rolenames;
        }
    }
    popup_form("{$CFG->wwwroot}/user/index.php?contextid={$context->id}&amp;sifirst=&amp;silast=&amp;roleid=", $rolenames, 'rolesform', $roleid, '');
    echo '</div>';
} else {
    if (count($rolenames) == 1) {
        // when all users with the same role - print its name
        echo '<div class="rolesform">';
        echo get_string('role') . ': ';
        $rolename = reset($rolenames);
        echo $rolename;
        echo '</div>';
    }
}
if ($roleid > 0) {
    if (!($currentrole = $DB->get_record('role', array('id' => $roleid)))) {
        print_error('invalidroleid');
    }
开发者ID:nicolasconnault,项目名称:moodle2.0,代码行数:31,代码来源:index.php

示例11: action_default

 function action_default()
 {
     // Get parameters
     $sort = optional_param('sort', 'name', PARAM_ALPHA);
     $dir = optional_param('dir', 'ASC', PARAM_ALPHA);
     $page = optional_param('page', 0, PARAM_INT);
     $perpage = optional_param('perpage', 30, PARAM_INT);
     // how many per page
     $namesearch = trim(optional_param('search', '', PARAM_TEXT));
     $alpha = optional_param('alpha', '', PARAM_ALPHA);
     $parent = $this->optional_param('id', 0, PARAM_INT);
     $classification = $this->optional_param('classification', NULL, PARAM_SAFEDIR);
     if ($parent) {
         $this->print_tabs('subclusters', array('id' => $parent));
     }
     // Define columns
     $columns = array('name' => get_string('cluster_name', 'block_curr_admin'), 'display' => get_string('cluster_description', 'block_curr_admin'));
     $extrafilters = array('contexts' => clusterpage::get_contexts('block/curr_admin:cluster:view'), 'parent' => $parent, 'classification' => $classification);
     $items = cluster_get_listing($sort, $dir, $page * $perpage, $perpage, $namesearch, $alpha, $extrafilters);
     $numitems = cluster_count_records($namesearch, $alpha, $extrafilters);
     clusterpage::get_contexts('block/curr_admin:cluster:edit');
     clusterpage::get_contexts('block/curr_admin:cluster:delete');
     $this->print_list_view($items, $numitems, $columns, $filter = null, $alphaflag = true, $searchflag = true);
     if ($this->optional_param('id', 0, PARAM_INT)) {
         //get the non-parent clusters that are accessible based on the edit capability
         $contexts = clusterpage::get_contexts('block/curr_admin:cluster:edit');
         $non_parent_clusters = cluster_get_possible_sub_clusters($this->optional_param('id', 0, PARAM_INT), $contexts);
         //display the dropdown if there are one or more available clusters
         if (count($non_parent_clusters) > 0) {
             echo '<div align="center">';
             echo get_string('cluster_subcluster_prompt', 'block_curr_admin') . ': ';
             $url = $this->get_new_page(array('action' => 'subcluster', 'id' => $this->optional_param('id', 0, PARAM_INT)))->get_url() . '&amp;subclusterid=';
             popup_form($url, $non_parent_clusters, 'assignsubcluster', '', 'Choose...');
             echo '</div>';
         }
     }
 }
开发者ID:remotelearner,项目名称:elis.cm,代码行数:37,代码来源:clusterpage.class.php

示例12: 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

示例13: rand

                 }
                 if ($section < $course->numsections) {
                     // Add a arrow to move section down
                     echo '<a href="view.php?id=' . $course->id . '&amp;random=' . rand(1, 10000) . '&amp;section=' . $section . '&amp;move=1&amp;sesskey=' . $USER->sesskey . '#section-' . ($section + 1) . '" title="' . $strmovedown . '">' . '<img src="' . $CFG->pixpath . '/t/down.gif" class="iconsmall down" alt="' . $strmovedown . '" /></a><br />';
                 }
             }
             echo '</td></tr>';
             echo '<tr class="section separator"><td colspan="3" class="spacer"></td></tr>';
         }
         $section++;
         $weekdate = $nextweekdate;
     }
     echo '</table>';
     if (!empty($sectionmenu)) {
         echo '<div class="jumpmenu">';
         echo popup_form($CFG->wwwroot . '/course/view.php?id=' . $course->id . '&amp;', $sectionmenu, 'sectionmenu', '', get_string('jumpto'), '', '', true);
         echo '</div>';
     }
     print_container_end();
     echo '</td>';
     break;
 case 'right':
     // The right column
     if (blocks_have_content($pageblocks, BLOCK_POS_RIGHT) || $editing) {
         echo '<td style="width: ' . $preferred_width_right . 'px;" id="right-column">';
         print_container_start();
         blocks_print_group($PAGE, $pageblocks, BLOCK_POS_RIGHT);
         print_container_end();
         echo '</td>';
     }
     break;
开发者ID:JackCanada,项目名称:moodle-hacks,代码行数:31,代码来源:format.php

示例14: blocks_print_adminblock

function blocks_print_adminblock(&$page, &$pageblocks)
{
    global $USER;
    $missingblocks = blocks_get_missing($page, $pageblocks);
    if (!empty($missingblocks)) {
        $strblocks = '<div class="title"><h2>';
        $strblocks .= get_string('blocks');
        $strblocks .= '</h2></div>';
        $stradd = get_string('add');
        foreach ($missingblocks as $blockid) {
            $block = blocks_get_record($blockid);
            $blockobject = block_instance($block->name);
            if ($blockobject === false) {
                continue;
            }
            if (!$blockobject->user_can_addto($page)) {
                continue;
            }
            $menu[$block->id] = $blockobject->get_title();
        }
        asort($menu);
        $target = $page->url_get_full(array('sesskey' => $USER->sesskey, 'blockaction' => 'add'));
        $content = popup_form($target . '&amp;blockid=', $menu, 'add_block', '', $stradd . '...', '', '', true);
        print_side_block($strblocks, $content, NULL, NULL, NULL, array('class' => 'block_adminblock'));
    }
}
开发者ID:edwinphillips,项目名称:moodle-485cb39,代码行数:26,代码来源:blocklib.php

示例15: 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 $cm      The course module record if we are in the context of a particular module, 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($contexts, $pageurl, $categoryandcontext, $cm = null, $recurse = 1, $page = 0, $perpage = 100, $showhidden = false, $sortorder = 'typename', $sortorderdecoded = 'qtype, name ASC', $showquestiontext = false, $addcontexts = array())
{
    global $USER, $CFG, $THEME, $COURSE;
    $lastchangedid = optional_param('lastchanged', 0, PARAM_INT);
    list($categoryid, $contextid) = explode(',', $categoryandcontext);
    $qtypemenu = question_type_menu();
    $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");
    $strmove = get_string('moveqtoanothercontext', 'question');
    $strview = get_string("view");
    $straction = get_string("action");
    $strrestore = get_string('restore');
    $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>";
        return;
    }
    if (!($category = get_record('question_categories', 'id', $categoryid, 'contextid', $contextid))) {
        notify('Category not found!');
        return;
    }
    $catcontext = get_context_instance_by_id($contextid);
    $canadd = has_capability('moodle/question:add', $catcontext);
    //check for capabilities on all questions in category, will also apply to sub cats.
    $caneditall = has_capability('moodle/question:editall', $catcontext);
    $canuseall = has_capability('moodle/question:useall', $catcontext);
    $canmoveall = has_capability('moodle/question:moveall', $catcontext);
    if ($cm and $cm->modname == 'quiz') {
        $quizid = $cm->instance;
    } else {
        $quizid = 0;
    }
    $returnurl = $pageurl->out();
    $questionurl = new moodle_url("{$CFG->wwwroot}/question/question.php", array('returnurl' => $returnurl));
    if ($cm !== null) {
        $questionurl->param('cmid', $cm->id);
    } else {
        $questionurl->param('courseid', $COURSE->id);
    }
    $questionmoveurl = new moodle_url("{$CFG->wwwroot}/question/contextmoveq.php", array('returnurl' => $returnurl));
    if ($cm !== null) {
        $questionmoveurl->param('cmid', $cm->id);
    } else {
        $questionmoveurl->param('courseid', $COURSE->id);
    }
    echo '<div class="boxaligncenter">';
    $formatoptions = new stdClass();
    $formatoptions->noclean = true;
    echo format_text($category->info, FORMAT_MOODLE, $formatoptions, $COURSE->id);
    echo '<table><tr>';
    if ($canadd) {
        echo '<td valign="top" align="right">';
        popup_form($questionurl->out(false, array('category' => $category->id)) . '&amp;qtype=', $qtypemenu, "addquestion", "", "choose", "", "", false, "self", "<strong>{$strcreatenewquestion}</strong>");
        echo '</td><td valign="top" align="right">';
        helpbutton("questiontypes", $strcreatenewquestion, "quiz");
        echo '</td>';
    } else {
        echo '<td>';
        print_string('nopermissionadd', 'question');
        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}", $sortorderdecoded, '*', $page * $perpage, $perpage))) {
//.........这里部分代码省略.........
开发者ID:edwinphillips,项目名称:moodle-485cb39,代码行数:101,代码来源:editlib.php


注:本文中的popup_form函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。