本文整理汇总了PHP中hierarchy::count_profilechange_req_from_student方法的典型用法代码示例。如果您正苦于以下问题:PHP hierarchy::count_profilechange_req_from_student方法的具体用法?PHP hierarchy::count_profilechange_req_from_student怎么用?PHP hierarchy::count_profilechange_req_from_student使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类hierarchy
的用法示例。
在下文中一共展示了hierarchy::count_profilechange_req_from_student方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: render_cocustommenu
//.........这里部分代码省略.........
<ul class='dropdown-menu'>";
$content .="<li><a href=$CFG->wwwroot/local/courseregistration/index.php>Register to Course/Class</a></li>";
$content .="</ul></li>";
//--------------------end of course registration----------------------------------------------------------------------------------------------
//--------------------Requests links----------------------------------------------------------------------------------------------------------
$content .="<li class='dropdown'>
<a href='#' class='dropdown-toggle' data-toggle='dropdown'>My Requests<b class='caret'></b></a>
<ul class='dropdown-menu'>";
$content .="<li><a href=$CFG->wwwroot/local/request/request_id.php>ID Card</a></li>";
$content .="<li><a href=$CFG->wwwroot/local/request/request_profile.php>Profile Change</a></li>";
$content .="<li><a href=$CFG->wwwroot/local/request/request_transcript.php>Transcript</a></li>";
$content .="<li><a href=$CFG->wwwroot/local/request/course_exem.php>Course Exemption</a></li>";
$content .="</ul></li>";
//-----------------------------end of requests links-------------------------------------------------------------------------------------------
$content .="<li><a href=$CFG->wwwroot/local/helpmanuals/student/index.html target='_blank'>Help Manual</a></li>";
}
}
// for mentor starts-------------------------------------------
if (has_capability('local/classes:approvemystudentclasses', $systemcontext) && !is_siteadmin()) {
$content .="<li><a href=$CFG->wwwroot/local/mentor>My Students</a></li>";
$content .="<li><a href=$CFG->wwwroot/local/helpmanuals/mentor/index.html target='_blank'>Help Manual</a></li>";
}
// mentor ends
if (isloggedin() & !isguestuser()) {
$msgnotification = message_count_unread_messages($USER);
$heirarchy = new hierarchy();
$request = new requests();
$applicationnotice = $heirarchy->count_admissions_from_applicants($USER->id);
$requestnotice = $request->all_student_requests_count($USER->id);
$courserequestnotice = $heirarchy->count_course_requests_from_students($USER->id);
$transcriptnotice = $heirarchy->count_transcript_req_from_student($USER->id);
$courseexemptionnotice = $heirarchy->count_coureexe_req_from_student($USER->id);
$profilechangenotice = $heirarchy->count_profilechange_req_from_student($USER->id);
$idcardnotice = $heirarchy->count_idcard_req_from_student($USER->id);
$newappnotice = $heirarchy->count_new_admission_req_from_student($USER->id);
$transferappnotice = $heirarchy->count_transfer_admission_req_from_student($USER->id);
$totalrequest = $courserequestnotice + $requestnotice;
$content .="<li><a href=$CFG->wwwroot/message/ title='Messages' id='messages'>
<sup id='msgnotice'>$msgnotification</sup></a></li>";
$context = context_user::instance($USER->id);
if (has_capability('local/classes:enrollclass', $context) && !is_siteadmin()) {
$allapprovals = $request->all_approved_requests($USER->id);
$transcriptapprovals = $heirarchy->count_trasncripts_approve_from_registrar($USER->id);
$courseexemptionapproval = $heirarchy->count_courseexe_approve_from_registrar($USER->id);
$idcardapproval = $heirarchy->count_idcard_approve_from_registrar($USER->id);
$profilechangeapproval = $heirarchy->count_profilechange_approve_from_registrar($USER->id);
$content .="<li class='dropdown'>
<a href='#' class='dropdown-toggle open' data-toggle='dropdown' id='allrequests' title='Request Approvals'>
<sup id='arequests'>$allapprovals</sup></a>
<ul class='dropdown-menu'>";
$content .="<li><a href=$CFG->wwwroot/local/request/request_transcript.php>Transcripts($transcriptapprovals)</a></li>";
$content .="<li><a href=$CFG->wwwroot/local/request/course_exem.php>Coures Exemptions($courseexemptionapproval)</a></li>";
$content .="<li><a href=$CFG->wwwroot/local/request/request_id.php>ID Card($idcardapproval)</a></li>";
$content .="<li><a href=$CFG->wwwroot/local/request/request_profile.php>Profile Change($profilechangeapproval)</a></li>";
$content .="</ul></li>";
}
if (has_capability('local/collegestructure:manage', $systemcontext) && !is_siteadmin($USER->id)) {
$content .="<li class='dropdown'>
<a href='#' class='dropdown-toggle' data-toggle='dropdown' id='apprequests' title='Applicant Requests'>
<sup id='requests'>$applicationnotice</sup></a>
<ul class='dropdown-menu'>";
$content .="<li><a href=$CFG->wwwroot/local/admission/viewapplicant.php>New Application($newappnotice)</a></li>";
$content .="<li><a href=$CFG->wwwroot/local/admission/transferapplicant.php>Transfer Application($transferappnotice)</a></li>";
$content .="</ul></li>";
示例2: cobalt_new_requests
/**
* Outputs the messages menu
* @return custom_menu object
*/
public function cobalt_new_requests() {
global $CFG, $USER;
if (!isloggedin() || isguestuser()) {
return false;
}
$heirarchy = new hierarchy();
//$request = new requests();
$applicationnotice = $heirarchy->count_admissions_from_applicants($USER->id);
//$requestnotice = $request->all_student_requests_count($USER->id);
$courserequestnotice = $heirarchy->count_course_requests_from_students($USER->id);
$transcriptnotice = $heirarchy->count_transcript_req_from_student($USER->id);
$courseexemptionnotice = $heirarchy->count_coureexe_req_from_student($USER->id);
$profilechangenotice = $heirarchy->count_profilechange_req_from_student($USER->id);
$idcardnotice = $heirarchy->count_idcard_req_from_student($USER->id);
$totalrequest = $courserequestnotice /*+ $requestnotice*/;
$systemcontext = context_system::instance();
$content = '<ul class="nav">';
if ((has_capability('local/collegestructure:manage', $systemcontext) || has_capability('local/classes:approvemystudentclasses', $systemcontext)) && !is_siteadmin($USER->id)) {
$content .="<li class='dropdown'>
<a class='dropdown-toggle' title='Requests' data-toggle='dropdown' href='#'>
<i class='fa fa-envelope-o'></i>
<sup id='arequests'>$totalrequest</sup>
<i class='fa fa-caret-right'></i>
</a>
<ul class='dropdown-menu'>";
}
if ((has_capability('local/collegestructure:manage', $systemcontext) || has_capability('local/classes:approvemystudentclasses', $systemcontext)) && !is_siteadmin($USER->id)) {
$content .="<li><a href=$CFG->wwwroot/local/courseregistration/registrar.php?current=pending>Approve Course (<b class='counts'>$courserequestnotice </b>)</a></li>";
}
if (has_capability('local/collegestructure:manage', $systemcontext) && !is_siteadmin($USER->id)) {
$content .="<li><a href=$CFG->wwwroot/local/request/approval_transcript.php>Approve Transcripts (<b class='counts'>$transcriptnotice</b>)</a></li>";
$content .="<li><a href=$CFG->wwwroot/local/request/approveexem.php>Approve Coures Exemptions (<b class='counts'>$courseexemptionnotice</b>)</a></li>";
$content .="<li><a href=$CFG->wwwroot/local/request/approval_id.php>Approve ID Card (<b class='counts'>$idcardnotice</b>)</a></li>";
$content .="<li><a href=$CFG->wwwroot/local/request/approval_profile.php>Approve Profile Change (<b class='counts'>$profilechangenotice</b>)</a></li>";
}
if ((has_capability('local/collegestructure:manage', $systemcontext) || has_capability('local/classes:approvemystudentclasses', $systemcontext)) && !is_siteadmin($USER->id)) {
$content .="</ul></li>";
}
$content .= '</ul>';
return $content;
$messages = $this->get_user_messages();
$totalmessages = count($messages['messages']);
if (empty($totalmessages)) {
$messagemenuicon = html_writer::tag('i', '', array('class' => 'fa fa-envelope-o'));
$messagetitle = get_string('nomessagesfound', 'theme_essential');
$messagemenutext = html_writer::span($messagemenuicon);
$messagemenu->add(
$messagemenutext,
new moodle_url('/message/index.php', array('viewing' => 'recentconversations')),
$messagetitle,
9999
);
} else {
if (empty($messages['newmessages'])) {
$messagemenuicon = html_writer::tag('i', '', array('class' => 'fa fa-envelope-o'));
} else {
$messagemenuicon = html_writer::tag('i', '', array('class' => 'fa fa-envelope'));
}
$messagetitle = get_string('unreadmessages', 'message', $messages['newmessages']);
$messagemenutext = html_writer::tag('span', $messages['newmessages']) . $messagemenuicon;
$messagesubmenu = $messagemenu->add(
$messagemenutext,
new moodle_url('/message/index.php', array('viewing' => 'recentconversations')),
$messagetitle,
9999
);
foreach ($messages['messages'] as $message) {
$addclass = 'read';
$iconadd = '-o';
if ($message->unread) {
$addclass = 'unread';
$iconadd = '';
}
if ($message->type === 'notification') {
$messagecontent = html_writer::start_div('notification ' . $addclass);
$messagecontent .= html_writer::tag('i', '', array('class' => 'fa fa-info-circle icon'));
$messagecontent .= html_writer::start_span('msg-time');
$messagecontent .= html_writer::tag('i', '', array('class' => 'fa fa-comment' . $iconadd));
$messagecontent .= $this->get_time_difference($message->date);
//.........这里部分代码省略.........