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

PHP print_tabs函数代码示例

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

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



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

示例1: activequiz_view_tabs

/**
 * Prints local lib tabs
 *
 * @param \mod_activequiz\activequiz $RTQ Realtime quiz class
 * @param                            $currenttab
 *
 * @return string HTML string of the tabs
 */
function activequiz_view_tabs($RTQ, $currenttab)
{
    $tabs = array();
    $row = array();
    $inactive = array();
    $activated = array();
    if ($RTQ->has_capability('mod/activequiz:attempt')) {
        $row[] = new tabobject('view', new moodle_url('/mod/activequiz/view.php', array('id' => $RTQ->getCM()->id)), get_string('view', 'activequiz'));
    }
    if ($RTQ->has_capability('mod/activequiz:editquestions')) {
        $row[] = new tabobject('edit', new moodle_url('/mod/activequiz/edit.php', array('cmid' => $RTQ->getCM()->id)), get_string('edit', 'activequiz'));
    }
    if ($RTQ->has_capability('mod/activequiz:seeresponses')) {
        $row[] = new tabobject('responses', new moodle_url('/mod/activequiz/responses.php', array('id' => $RTQ->getCM()->id)), get_string('responses', 'activequiz'));
    }
    if ($currenttab == 'view' && count($row) == 1) {
        // No tabs for students
        echo '<br />';
    } else {
        $tabs[] = $row;
    }
    if ($currenttab == 'responses') {
        $activated[] = 'responses';
    }
    if ($currenttab == 'edit') {
        $activated[] = 'edit';
    }
    if ($currenttab == 'view') {
        $activated[] = 'view';
    }
    return print_tabs($tabs, $currenttab, $inactive, $activated, true);
}
开发者ID:agarnav,项目名称:moodle-mod_activequiz,代码行数:40,代码来源:locallib.php


示例2: print_tabs

 function print_tabs()
 {
     $id = $this->required_param('id', PARAM_INT);
     $page = $this->get_tab_page();
     $params = array('id' => $id);
     $rows = array();
     $row = array();
     // main row of tabs
     foreach ($page->tabs as $tab) {
         $tab = $page->add_defaults_to_tab($tab);
         if ($tab['showtab'] === true) {
             $target = new $tab['page'](array_merge($tab['params'], $params));
             $row[] = new tabobject($tab['tab_id'], $target->get_url(), $tab['name']);
         }
     }
     $rows[] = $row;
     // assigned/unassigned tabs
     $assignedpage = clone $this->get_basepage();
     unset($assignedpage->params['_assign']);
     $unassignedpage = clone $assignedpage;
     $unassignedpage->params['_assign'] = 'assign';
     list($assigned_string, $unassigned_string) = $this->get_assigned_strings();
     $row = array(new tabobject('assigned', $assignedpage->get_url(), $assigned_string), new tabobject('unassigned', $unassignedpage->get_url(), $unassigned_string));
     if ($unassignedpage->can_do()) {
         $rows[] = $row;
     }
     print_tabs($rows, isset($rows[1]) ? $this->is_assigning() ? 'unassigned' : 'assigned' : get_class($this), array(), array(get_class($this)));
 }
开发者ID:remotelearner,项目名称:elis.cm,代码行数:28,代码来源:associationpage2.class.php


示例3: print_tabs

 /**
  * Prints the tabs for the learning path type
  *
  * @param string $currenttab Tab to highlight
  * @return void
  **/
 function print_tabs($currenttab = 'layout')
 {
     global $COURSE;
     $context = get_context_instance(CONTEXT_COURSE, $COURSE->id);
     $tabs = $row = $inactive = $active = array();
     $row[] = new tabobject('view', $this->url_get_full(), get_string('editpage', 'format_page'));
     if (has_capability('format/page:addpages', $context)) {
         $row[] = new tabobject('addpage', $this->url_build('action', 'editpage'), get_string('addpage', 'format_page'));
     }
     if (has_capability('format/page:managepages', $context)) {
         $row[] = new tabobject('manage', $this->url_build('action', 'manage'), get_string('manage', 'format_page'));
     }
     if (has_capability('moodle/local:managepageactivities', $context)) {
         $row[] = new tabobject('activities', $this->url_build('action', 'activities'), get_string('managemods', 'format_page'));
     }
     if (has_capability('moodle/local:classifylearningpath', $context)) {
         $row[] = new tabobject('classify', $this->url_build('action', 'classify'), get_string('classification', 'local'));
     }
     if (has_capability('moodle/local:savelearningpathtemplate', $context)) {
         $row[] = new tabobject('backup', $this->url_build('action', 'backup'), get_string('makebackup', 'local'));
     }
     $tabs[] = $row;
     if (in_array($currenttab, array('layout', 'settings', 'view'))) {
         $active[] = 'view';
         $row = array();
         $row[] = new tabobject('layout', $this->url_get_full(), get_string('layout', 'format_page'));
         $row[] = new tabobject('settings', $this->url_get_full(array('action' => 'editpage')), get_string('settings', 'format_page'));
         $tabs[] = $row;
     }
     print_tabs($tabs, $currenttab, $inactive, $active);
 }
开发者ID:nadavkav,项目名称:MoodleTAO,代码行数:37,代码来源:pagelib.php


示例4: show_tabs

function show_tabs($cm, $context, $currenttab = 'sessions')
{
    $toprow = array();
    if (has_capability('mod/attforblock:manageattendances', $context) or has_capability('mod/attforblock:takeattendances', $context) or has_capability('mod/attforblock:changeattendances', $context)) {
        $toprow[] = new tabobject('sessions', 'manage.php?id=' . $cm->id, get_string('sessions', 'attforblock'));
    }
    if (has_capability('mod/attforblock:manageattendances', $context)) {
        $toprow[] = new tabobject('add', "sessions.php?id={$cm->id}&amp;action=add", get_string('add', 'attforblock'));
    }
    if (has_capability('mod/attforblock:viewreports', $context)) {
        $toprow[] = new tabobject('report', 'report.php?id=' . $cm->id, get_string('report', 'attforblock'));
        $toprow[] = new tabobject('advancedreport', 'adv_report.php?id=' . $cm->id, get_string('advancedreport', 'attforblock'));
    }
    if (has_capability('mod/attforblock:export', $context)) {
        $toprow[] = new tabobject('export', 'export.php?id=' . $cm->id, get_string('export', 'quiz'));
    }
    if (has_capability('mod/attforblock:changepreferences', $context)) {
        $toprow[] = new tabobject('settings', 'attsettings.php?id=' . $cm->id, get_string('settings', 'attforblock'));
    }
    if (has_capability('mod/attforblock:manageattendances', $context) or has_capability('mod/attforblock:takeattendances', $context) or has_capability('mod/attforblock:changeattendances', $context)) {
        $toprow[] = new tabobject('teachers', 'addteachers.php?id=' . $cm->id, get_string('teachers', 'attforblock'));
        $toprow[] = new tabobject('subjects', 'addsubjects.php?id=' . $cm->id, get_string('subjects', 'attforblock'));
        $toprow[] = new tabobject('sessiontitles', 'addtitles.php?id=' . $cm->id, get_string('sessiontitles', 'attforblock'));
        $toprow[] = new tabobject('scan', 'scan.php?id=' . $cm->id, get_string('scan', 'attforblock'));
    }
    $tabs = array($toprow);
    print_tabs($tabs, $currenttab);
}
开发者ID:hmatulis,项目名称:RTL-BIDI-Hebrew-Moodle-Plugins,代码行数:28,代码来源:locallib.php


示例5: bookmarks_print_tabs

/**
 * 
 * 
 * 
 * 
 */
function bookmarks_print_tabs($cmid, $action)
{
    $baseurl = 'view.php?id=' . $cmid . '&action=';
    $tabs = array();
    $rows = array();
    $rows[] = new tabobject('viewmy', $baseurl . 'viewmy', get_string('mybookmarks', 'bookmarks'), 'viewmy', false);
    $rows[] = new tabobject('viewall', $baseurl . 'viewall', get_string('allbookmarks', 'bookmarks'), 'viewall', false);
    $rows[] = new tabobject('search', $baseurl . 'search', get_string('search', 'bookmarks'), 'search', false);
    $tabs[] = $rows;
    print_tabs($tabs, $action);
}
开发者ID:laiello,项目名称:moodle-social-bookmarking,代码行数:17,代码来源:locallib.php


示例6: build_tabs_template

function build_tabs_template($active)
{
    global $CFG;
    $options = array();
    $inactive = array();
    $activetwo = array();
    $currenttab = $active;
    $options[] = new tabobject('add', $CFG->wwwroot . '/mod/diplome/add.php', get_string('add', 'diplome'), get_string('rolladd', 'diplome'), true);
    $options[] = new tabobject('edit', $CFG->wwwroot . '/mod/diplome/edit.php?view=all', get_string('edit', 'diplome'), get_string('rolledit', 'diplome'), true);
    $tabs = array($options);
    print_tabs($tabs, $currenttab, $inactive, $activetwo);
}
开发者ID:ruxandra25,项目名称:diplome,代码行数:12,代码来源:locallib.php


示例7: forumng_feature_deleted_print_tabs

/**
 *
 * @param string $selected is the selected tab
 * @param  array $params url parameters to be encoded
 */
function forumng_feature_deleted_print_tabs($selected, $params)
{
    global $CFG;
    $tabrow = array();
    $listurl = new moodle_url('/mod/forumng/feature/deletedposts/list.php', $params);
    $deletedpostslisturl = new moodle_url('/mod/forumng/feature/deletedposts/deletedpostslist.php', $params);
    $tabrow[] = new tabobject('list', $listurl->out(), get_string('deleteddiscussions', 'forumngfeature_deletedposts'));
    $tabrow[] = new tabobject('deletedpostslist', $deletedpostslisturl->out(), get_string('deletedposts', 'forumngfeature_deletedposts'));
    $tabs = array();
    $tabs[] = $tabrow;
    print_tabs($tabs, $selected, array(''), array(''));
    print '<div id="forumng_belowtabs">';
}
开发者ID:ULCC-QMUL,项目名称:moodle-mod_forumng,代码行数:18,代码来源:locallib.php


示例8: build_tabs_local

function build_tabs_local($active, $number)
{
    global $CFG;
    $options = array();
    $inactive = array();
    $activetwo = array();
    $currenttab = $active;
    for ($i = 1; $i <= $number; $i++) {
        $options[] = new tabobject('dash_' . $i, $CFG->wwwroot . '/mod/feedbackccna/dashboard.php?type=' . $i, get_string('name_' . $i, 'feedbackccna'), get_string('desc_' . $i, 'feedbackccna'), true);
    }
    $tabs = array($options);
    print_tabs($tabs, $currenttab, $inactive, $activetwo);
}
开发者ID:nastasie-octavian,项目名称:feedbackccna,代码行数:13,代码来源:locallib.php


示例9: draw_settings_tab_menu

 /**
  * Prints the tab menu for the plugin settings
  *
  * @param string $currenttab The currect tab to be styled as selected
  */
 public function draw_settings_tab_menu($currenttab, $notice = null)
 {
     global $OUTPUT;
     $tabs = array();
     $tabs[] = new tabobject('turnitinsettings', 'settings.php', get_string('config', 'plagiarism_turnitin'), get_string('config', 'plagiarism_turnitin'), false);
     $tabs[] = new tabobject('turnitindefaults', 'settings.php?do=defaults', get_string('defaults', 'plagiarism_turnitin'), get_string('defaults', 'plagiarism_turnitin'), false);
     $tabs[] = new tabobject('turnitinshowusage', 'settings.php?do=viewreport', get_string('showusage', 'plagiarism_turnitin'), get_string('showusage', 'plagiarism_turnitin'), false);
     $tabs[] = new tabobject('turnitinsaveusage', 'settings.php?do=savereport', get_string('saveusage', 'plagiarism_turnitin'), get_string('saveusage', 'plagiarism_turnitin'), false);
     $tabs[] = new tabobject('turnitinerrors', 'settings.php?do=errors', get_string('errors', 'plagiarism_turnitin'), get_string('errors', 'plagiarism_turnitin'), false);
     print_tabs(array($tabs), $currenttab);
     if (!is_null($notice)) {
         echo $OUTPUT->box($notice["message"], 'generalbox boxaligncenter', $notice["type"]);
     }
 }
开发者ID:jmcgettrick,项目名称:moodle-plagiarism_turnitin,代码行数:19,代码来源:turnitinplugin_view.class.php


示例10: bookmarks_print_tabs

function bookmarks_print_tabs($cmid, $action)
{
    $baseurl = 'view.php?id=' . $cmid . '&action=';
    $tabs = array();
    $rows = array();
    $rows[] = new tabobject('viewall', $baseurl . 'viewall', get_string('allbookmarks', 'bookmarks'), 'viewall', false);
    $rows[] = new tabobject('viewmy', $baseurl . 'viewmy', get_string('mybookmarks', 'bookmarks'), 'viewmy', false);
    $context = get_context_instance(CONTEXT_MODULE, $cmid);
    if (has_capability('mod/bookmarks:additem', $context)) {
        $rows[] = new tabobject('additem', 'edit.php?id=' . $cmid, get_string('additem', 'bookmarks'), 'additem', false);
    }
    $rows[] = new tabobject('search', $baseurl . 'search', get_string('search', 'bookmarks'), 'search', false);
    $tabs[] = $rows;
    print_tabs($tabs, $action);
}
开发者ID:hmatulis,项目名称:RTL-BIDI-Hebrew-Moodle-Plugins,代码行数:15,代码来源:locallib.php


示例11: print_html_body_begin

function print_html_body_begin($parameters=null){
	global $config, $sess, $auth, $errors, $message;

	if (!$parameters) $parameters=null;

	// call user defined function at html body begin
	if (isset($parameters['run_at_html_body_begin']) and function_exists($parameters['run_at_html_body_begin']))
		$parameters['run_at_html_body_begin']($parameters);
	
	//virtual(multidomain_get_file($config->html_prolog));
	if (isset($parameters['title']) and $parameters['title']) echo $parameters['title'];
	//virtual(multidomain_get_file($config->html_separator));

?>

	<?if (isset($parameters['tab_collection']) and $parameters['tab_collection']) { 
		print_tabs($parameters['tab_collection'], 
					isset($parameters['path_to_pages'])?$parameters['path_to_pages']:null, 
					isset($parameters['selected_tab'])?$parameters['selected_tab']:null);

		//count tabs
		$num_of_tabs=0;
		foreach($parameters['tab_collection'] as $tab)
			if ($tab->enabled) $num_of_tabs++;
					
					?>
	<div id="swContent">

	<!-- contenet of div must be sufficient wide in order to tabs displays in one line -->
	<div style="height:1px; width:<?echo ($num_of_tabs*100)- 50;?>px;">&nbsp;</div>
	
	<?}?>

<?	
	print_errors($errors);                    // Display error
	print_message($message);

	if ($errors or $message) echo "<br />";
} //end function print_html_body_begin
开发者ID:BackupTheBerlios,项目名称:sipums,代码行数:39,代码来源:page.php


示例12: print_tabs

 function print_tabs()
 {
     $id = $this->required_param('id', PARAM_INT);
     $page = $this->get_tab_page();
     $params = array('id' => $id);
     $rows = $row;
     $row = array();
     // main row of tabs
     foreach ($page->tabs as $tab) {
         $tab = $page->add_defaults_to_tab($tab);
         if ($tab['showtab'] === true) {
             $target = new $tab['page'](array_merge($tab['params'], $params));
             $row[] = new tabobject($tab['tab_id'], $target->get_url(), $tab['name']);
         }
     }
     $rows[] = $row;
     // assigned/unassigned tabs
     $assignedpage = $this->get_basepage();
     $unassignedpage = clone $assignedpage;
     $unassignedpage->params['mode'] = 'unassign';
     $row = array(new tabobject('assigned', $assignedpage->get_url(), get_string('assigned', 'block_curr_admin')), new tabobject('unassigned', $unassignedpage->get_url(), get_string('unassigned', 'block_curr_admin')));
     $rows[] = $row;
     print_tabs($rows, $this->optional_param('mode', 'unassign', PARAM_ACTION) == 'assign' ? 'assigned' : 'unassigned', array(), array(get_class($this)));
 }
开发者ID:remotelearner,项目名称:elis.cm,代码行数:24,代码来源:selectionpage.class.php


示例13: draw_tool_tab_menu

 /**
  * Prints the tab link menu across the top of the activity module
  *
  * @param object $cm The moodle course module object for this instance
  * @param object $selected The query string parameter to determine the page we are on
  * @param array $notice
  */
 public function draw_tool_tab_menu($cm, $selected)
 {
     global $CFG;
     $tabs = array();
     if (has_capability('mod/turnitintooltwo:grade', context_module::instance($cm->id))) {
         $tabs[] = new tabobject('submissions', $CFG->wwwroot . '/mod/turnitintooltwo/view.php?id=' . $cm->id . '&do=submissions', get_string('allsubmissions', 'turnitintooltwo'), get_string('allsubmissions', 'turnitintooltwo'), false);
         $tabs[] = new tabobject('tutors', $CFG->wwwroot . '/mod/turnitintooltwo/view.php?id=' . $cm->id . '&do=tutors', get_string('turnitintutors', 'turnitintooltwo'), get_string('turnitintutors', 'turnitintooltwo'), false);
         $tabs[] = new tabobject('students', $CFG->wwwroot . '/mod/turnitintooltwo/view.php?id=' . $cm->id . '&do=students', get_string('turnitinstudents', 'turnitintooltwo'), get_string('turnitinstudents', 'turnitintooltwo'), false);
     } else {
         $tabs[] = new tabobject('submissions', $CFG->wwwroot . '/mod/turnitintooltwo/view.php?id=' . $cm->id . '&do=submissions', get_string('mysubmissions', 'turnitintooltwo'), get_string('mysubmissions', 'turnitintooltwo'), false);
     }
     print_tabs(array($tabs), $selected);
 }
开发者ID:NeillM,项目名称:moodle-mod_turnitintooltwo,代码行数:20,代码来源:turnitintooltwo_view.class.php


示例14: print_tabs

        } else {
            ########### tabs
            print_tabs(array("object_type" => $typename));
            edit_permissions(array("type" => 'OBJ'));
        }
        ?>
	</table>
<?php 
    } elseif ($site->fdat['tab'] == 'seo') {
        ################# BODY START
        ?>
<body>
<table border="0" cellpadding="0" cellspacing="0" style="width:100%; height:100%">
<?php 
        ########### tabs
        print_tabs(array("object_type" => $typename));
        include_once 'edit_object_metadata.php';
        if ($site->fdat['op'] == 'edit') {
            if ($site->fdat['op2'] == 'save') {
                salvesta_objekt_metadata();
            }
            edit_objekt_metadata();
        }
        ?>
	</table>
<?php 
    }
    # / 2. tab SEO
    ######################
} else {
    # browseri kontroll, agent=Netscape
开发者ID:sauruscms,项目名称:Saurus-CMS-Community-Edition,代码行数:31,代码来源:edit.php


示例15: grade_print_tabs

/**
 * Print grading plugin selection tab-based navigation.
 *
 * @param string  $active_type type of plugin on current page - import, export, report or edit
 * @param string  $active_plugin active plugin type - grader, user, cvs, ...
 * @param array   $plugin_info Array of plugins
 * @param boolean $return return as string
 *
 * @return nothing or string if $return true
 */
function grade_print_tabs($active_type, $active_plugin, $plugin_info, $return=false) {
    global $CFG, $COURSE;

    if (!isset($currenttab)) { //TODO: this is weird
        $currenttab = '';
    }

    $tabs = array();
    $top_row  = array();
    $bottom_row = array();
    $inactive = array($active_plugin);
    $activated = array($active_type);

    $count = 0;
    $active = '';

    foreach ($plugin_info as $plugin_type => $plugins) {
        if ($plugin_type == 'strings') {
            continue;
        }

        // If $plugins is actually the definition of a child-less parent link:
        if (!empty($plugins->id)) {
            $string = $plugins->string;
            if (!empty($plugin_info[$active_type]->parent)) {
                $string = $plugin_info[$active_type]->parent->string;
            }

            $top_row[] = new tabobject($plugin_type, $plugins->link, $string);
            continue;
        }

        $first_plugin = reset($plugins);
        $url = $first_plugin->link;

        if ($plugin_type == 'report') {
            $url = $CFG->wwwroot.'/grade/report/index.php?id='.$COURSE->id;
        }

        $top_row[] = new tabobject($plugin_type, $url, $plugin_info['strings'][$plugin_type]);

        if ($active_type == $plugin_type) {
            foreach ($plugins as $plugin) {
                $bottom_row[] = new tabobject($plugin->id, $plugin->link, $plugin->string);
                if ($plugin->id == $active_plugin) {
                    $inactive = array($plugin->id);
                }
            }
        }
    }

    // Do not display rows that contain only one item, they are not helpful.
    if (count($top_row) > 1) {
        $tabs[] = $top_row;
    }
    if (count($bottom_row) > 1) {
        $tabs[] = $bottom_row;
    }
    if (empty($tabs)) {
        return;
    }

    $rv = html_writer::div(print_tabs($tabs, $active_plugin, $inactive, $activated, true), 'grade-navigation');

    if ($return) {
        return $rv;
    } else {
        echo $rv;
    }
}
开发者ID:EsdrasCaleb,项目名称:moodle,代码行数:80,代码来源:lib.php


示例16: max

$numberoflisteners = max(quiz_number_of_pages($quiz->questions), 1);
for ($pageiter = 1; $pageiter <= $numberoflisteners; $pageiter++) {
    $quizeditconfig->dialoglisteners[] = 'addrandomdialoglaunch_' . $pageiter;
}
$PAGE->requires->data_for_js('quiz_edit_config', $quizeditconfig);
$PAGE->requires->js('/question/qengine.js');
$PAGE->requires->js('/mod/quiz/edit.js');
$PAGE->requires->js_init_call('quiz_edit_init');
// Print the tabs to switch mode.
if ($quiz_reordertool) {
    $currenttab = 'reorder';
} else {
    $currenttab = 'edit';
}
$tabs = array(array(new tabobject('edit', new moodle_url($thispageurl, array('reordertool' => 0)), get_string('editingquiz', 'quiz')), new tabobject('reorder', new moodle_url($thispageurl, array('reordertool' => 1)), get_string('orderingquiz', 'quiz'))));
print_tabs($tabs, $currenttab);
if ($quiz_qbanktool) {
    $bankclass = '';
    $quizcontentsclass = '';
} else {
    $bankclass = 'collapsed ';
    $quizcontentsclass = 'quizwhenbankcollapsed';
}
echo '<div class="questionbankwindow ' . $bankclass . 'block">';
echo '<div class="header"><div class="title"><h2>';
echo get_string('questionbankcontents', 'quiz') . ' <a href="' . $thispageurl->out(true, array('qbanktool' => '1')) . '" id="showbankcmd">[' . get_string('show') . ']</a>
       <a href="' . $thispageurl->out(true, array('qbanktool' => '0')) . '" id="hidebankcmd">[' . get_string('hide') . ']</a>';
echo '</h2></div></div><div class="content">';
echo '<span id="questionbank"></span>';
echo '<div class="container">';
echo '<div id="module" class="module">';
开发者ID:saurabh947,项目名称:MoodleLearning,代码行数:31,代码来源:edit.php


示例17: grade_print_tabs

/**
 * Print grading plugin selection tab-based navigation.
 *
 * @param string  $active_type type of plugin on current page - import, export, report or edit
 * @param string  $active_plugin active plugin type - grader, user, cvs, ...
 * @param array   $plugin_info Array of plugins
 * @param boolean $return return as string
 *
 * @return nothing or string if $return true
 */
function grade_print_tabs($active_type, $active_plugin, $plugin_info, $return = false)
{
    global $CFG, $COURSE;
    if (!isset($currenttab)) {
        //TODO: this is weird
        $currenttab = '';
    }
    $tabs = array();
    $top_row = array();
    $bottom_row = array();
    $inactive = array($active_plugin);
    $activated = array();
    $count = 0;
    $active = '';
    foreach ($plugin_info as $plugin_type => $plugins) {
        if ($plugin_type == 'strings') {
            continue;
        }
        // If $plugins is actually the definition of a child-less parent link:
        if (!empty($plugins->id)) {
            $string = $plugins->string;
            if (!empty($plugin_info[$active_type]->parent)) {
                $string = $plugin_info[$active_type]->parent->string;
            }
            $top_row[] = new tabobject($plugin_type, $plugins->link, $string);
            continue;
        }
        $first_plugin = reset($plugins);
        $url = $first_plugin->link;
        if ($plugin_type == 'report') {
            $url = $CFG->wwwroot . '/grade/report/index.php?id=' . $COURSE->id;
        }
        $top_row[] = new tabobject($plugin_type, $url, $plugin_info['strings'][$plugin_type]);
        if ($active_type == $plugin_type) {
            foreach ($plugins as $plugin) {
                $bottom_row[] = new tabobject($plugin->id, $plugin->link, $plugin->string);
                if ($plugin->id == $active_plugin) {
                    $inactive = array($plugin->id);
                }
            }
        }
    }
    $tabs[] = $top_row;
    $tabs[] = $bottom_row;
    if ($return) {
        return print_tabs($tabs, $active_type, $inactive, $activated, true);
    } else {
        print_tabs($tabs, $active_type, $inactive, $activated);
    }
}
开发者ID:EmmanuelYupit,项目名称:educursos,代码行数:60,代码来源:lib.php


示例18: tabobject

                $defaultemplate = 'addtemplate';
            } else {
                $defaultemplate = 'singletemplate';
            }
        }
        $row[] = new tabobject('templates', $CFG->wwwroot . '/mod/data/templates.php?d=' . $data->id . '&amp;mode=' . $defaultemplate, get_string('templates', 'data'));
        $row[] = new tabobject('fields', $CFG->wwwroot . '/mod/data/field.php?d=' . $data->id, get_string('fields', 'data'));
        $row[] = new tabobject('presets', $CFG->wwwroot . '/mod/data/preset.php?d=' . $data->id, get_string('presets', 'data'));
    }
}
$tabs[] = $row;
if ($currenttab == 'templates' and isset($mode)) {
    $inactive[] = 'templates';
    $templatelist = array('listtemplate', 'singletemplate', 'addtemplate', 'rsstemplate', 'csstemplate', 'jstemplate');
    $row = array();
    $currenttab = '';
    foreach ($templatelist as $template) {
        $row[] = new tabobject($template, "templates.php?d={$data->id}&amp;mode={$template}", get_string($template, 'data'));
        if ($template == $mode) {
            $currenttab = $template;
        }
    }
    if ($currenttab == '') {
        $currenttab = $mode = 'singletemplate';
    }
    $tabs[] = $row;
    $activetwo = array('templates');
}
/// Print out the tabs and continue!
print_tabs($tabs, $currenttab, $inactive, $activetwo);
开发者ID:veritech,项目名称:pare-project,代码行数:30,代码来源:tabs.php


示例19: tabobject

    $browserow[] = new tabobject('edit', '#', get_string('edit'));
}
/// Put all this info together
$tabrows = array();
$tabrows[] = $browserow;
// Always put these at the top
if ($toolsrow) {
    $tabrows[] = $toolsrow;
}
?>
  <div class="glossarydisplay">


<?php 
if ($showcommonelements && count($tabrows[0]) > 1) {
    print_tabs($tabrows, $tab, $inactive, $activated);
}
?>

  <div class="entrybox">

<?php 
if (!isset($category)) {
    $category = "";
}
switch ($tab) {
    case GLOSSARY_CATEGORY_VIEW:
        glossary_print_categories_menu($cm, $glossary, $hook, $category);
        break;
    case GLOSSARY_APPROVAL_VIEW:
        glossary_print_approval_menu($cm, $glossary, $mode, $hook, $sortkey, $sortorder);
开发者ID:evltuma,项目名称:moodle,代码行数:31,代码来源:tabs.php


示例20: turnitintool_draw_menu

/**
 * Prints the tab link menu across the top of the activity module
 *
 * @param object $cm The moodle course module object for this instance
 * @param object $do The query string parameter to determine the page we are on
 */
function turnitintool_draw_menu($cm, $do)
{
    global $CFG, $USER;
    $tabs[] = new tabobject('intro', $CFG->wwwroot . '/mod/turnitintool/view.php' . '?id=' . $cm->id . '&do=intro', get_string('turnitintoolintro', 'turnitintool'), get_string('turnitintoolintro', 'turnitintool'), false);
    if (has_capability('mod/turnitintool:grade', turnitintool_get_context('MODULE', $cm->id))) {
        $tabs[] = new tabobject('submissions', $CFG->wwwroot . '/mod/turnitintool/view.php' . '?id=' . $cm->id . '&do=submissions', get_string('submitpaper', 'turnitintool'), get_string('submitpaper', 'turnitintool'), false);
        $tabs[] = new tabobject('allsubmissions', $CFG->wwwroot . '/mod/turnitintool/view.php' . '?id=' . $cm->id . '&do=allsubmissions', get_string('allsubmissions', 'turnitintool'), get_string('allsubmissions', 'turnitintool'), false);
        $tabs[] = new tabobject('options', $CFG->wwwroot . '/mod/turnitintool/view.php' . '?id=' . $cm->id . '&do=options', get_string('options', 'turnitintool'), get_string('options', 'turnitintool'), false);
    } else {
        $tabs[] = new tabobject('submissions', $CFG->wwwroot . '/mod/turnitintool/view.php' . '?id=' . $cm->id . '&do=submissions', get_string('mysubmissions', 'turnitintool'), get_string('mysubmissions', 'turnitintool'), false);
    }
    echo '<div class="clearfix"></div>';
    if ($do == 'notes') {
        $tabs[] = new tabobject('notes', '', get_string('notes', 'turnitintool'), get_string('notes', 'turnitintool'), false);
        $inactive = array('notes');
        $selected = 'notes';
    } else {
        if ($do == 'tutors') {
            $tabs[] = new tabobject('tutors', '', get_string('turnitintutors', 'turnitintool'), get_string('turnitintutors', 'turnitintool'), false);
            $inactive = array('tutors');
            $selected = 'tutors';
        } else {
            $inactive = array();
            $selected = $do;
        }
    }
    print_tabs(array($tabs), $selected, $inactive);
}
开发者ID:ccle,项目名称:moodle-mod_turnitintool,代码行数:34,代码来源:lib.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP print_tag_option_list函数代码示例发布时间:2022-05-15
下一篇:
PHP print_table_start函数代码示例发布时间: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