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


PHP hierarchy::set_confirmation方法代码示例

本文整理汇总了PHP中hierarchy::set_confirmation方法的典型用法代码示例。如果您正苦于以下问题:PHP hierarchy::set_confirmation方法的具体用法?PHP hierarchy::set_confirmation怎么用?PHP hierarchy::set_confirmation使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在hierarchy的用法示例。


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

示例1: hierarchy

 /**
  * To display success and error message based on condition
  * @param  int $output it holds reultent value
  * @param string $success it holds the success message
  * @param string $error - error message
  * @param string $currenturl(display the confirmation message in this url)
  * @param object $data used to print dynamic string
  * @return display confirmation message
  */
 function success_error_msg($output, $success, $error, $currenturl, $data) {
     $hier = new hierarchy();
     if ($output)
         $confirm_msg = get_string($success, 'local_lecturetype', $data);
     else
         $confirm_msg = get_string($error, 'local_lecturetype', $data);
     $hier->set_confirmation($confirm_msg, $currenturl, array('style' => 'notifysuccess'));
 }
开发者ID:anilch,项目名称:Personel,代码行数:17,代码来源:lib.php

示例2: hierarchy

 /**
  * To display success and error message based on condition
  * @param  int $output it holds reultent value
  * @param string $success it holds the success message
  * @param string $error - error message
  * @param string $currenturl(display the confirmation message in this url)
  * @param object $data used to print dynamic string
  * @return display confirmation message
  */
 function success_error_msg($output, $success, $error, $currenturl, $data) {
     $hier = new hierarchy();
     if ($output) {
         $confirm_msg = get_string($success, 'local_examtype', $data);
         $options = array('style' => 'notifysuccess');
     } else {
         $confirm_msg = get_string($error, 'local_examtype', $data);
         $options = array('style' => 'notifyproblem');
     }
     $hier->set_confirmation($confirm_msg, $currenturl, $options);
 }
开发者ID:anilch,项目名称:Personel,代码行数:20,代码来源:lib.php

示例3: mentorrejectdropcourse

/**
* @method mentorrejectdropcourse
* @todo used to update data when mentor rejected drop course request(student request)
* @param int $userid user id
* @param int $courseid class id
* @return display confirmation message
* */
function mentorrejectdropcourse($userid, $courseid) {

    global $DB;
    $hierarchy = new hierarchy();
    $usercourse = $DB->get_records('local_course_adddrop', array('userid' => $userid, 'classid' => $courseid));
    $returnurl = new moodle_url('/local/adddrop/mentor.php?current=pending');
    foreach ($usercourse as $usercourses) {
        $publish = new stdClass();
        $publish->id = $usercourses->id;
        $publish->mentorapproval = 2;
        $out = $DB->update_record('local_course_adddrop', $publish);
    }
    if ($out) {
        $message = get_string('mentorrejectedcourse', 'local_courseregistration');
        $hierarchy->set_confirmation($message, $returnurl, array('style' => 'notifysuccess'));
    }
}
开发者ID:anilch,项目名称:Personel,代码行数:24,代码来源:lib.php

示例4: array

     * @author Naveen Kumar<naveen@eabyas.in>
     * (Resolved) Added succes message after updating the department visibilty
     */
    if ($data->visible == 1) {
        $data->visible = 'Activated';
    } else {
        $data->visible = 'Inactivated';
    }
    if ($result) {
        $message = get_string('dept_success', 'local_departments', $data);
        $style = array('style' => 'notifysuccess');
    } else {
        $message = get_string('dept_failure', 'local_departments', $data);
        $style = array('style' => 'notifyproblem');
    }
    $hier1->set_confirmation($message, $returnurl, $style);
}
//-------end of code hide and show-------------------------------------------
//for edit purpose  //
if ($id > 0)
    $PAGE->navbar->add(get_string('edit_department', 'local_departments'));
else
    $PAGE->navbar->add(get_string('createdept', 'local_departments'));
echo $OUTPUT->header();
//----------------manage dept heading------------------------
echo $OUTPUT->heading(get_string('dept_heading', 'local_departments'));

try {
    //checking the id is greater than one...if its fetching content from table...used in edit purpose
    if ($id > 0) {
        if (!($tool = $DB->get_record('local_department', array('id' => $id)))) {
开发者ID:anilch,项目名称:Personel,代码行数:31,代码来源:departments.php

示例5: foreach

        }
        else {
            /* ---insertion part--- */
            foreach ($temp_set as $k => $v) {
                $temp->schoolid = $form_data['schoolid'];
                $temp->name = $v;
                if (empty($form_data[$v]))
                    $form_data[$v] = 0;
                $temp->value = $form_data[$v];
                $DB->insert_record('local_school_settings', $temp);
            }
        }
        /* ---end of else--- */
        $confirm_msg = get_string('suc_update', 'local_cobaltsettings');
        $options = array('style' => 'notifysuccess');
        $hier1->set_confirmation($confirm_msg, $currenturl, $options);
    }
    /* ---end of main if--- */

    $registrar_asigned_school = $schoolid;
    foreach ($registrar_asigned_school as $r_s) {
        $line = array();
        $school = $DB->get_record('local_school', array('id' => $r_s->id));
        $line[] = $school->fullname;
        /* ---used to fetch existing school settings--- */
        $exists_set = $DB->get_records('local_school_settings', array('schoolid' => $school->id));
        $bcheck = '';
        $pcheck = '';
        $ocheck = '';
        $ccheck = '';
        $opcheck = '';
开发者ID:anilch,项目名称:Personel,代码行数:31,代码来源:school_settings.php

示例6: hierarchy

require_once(dirname(__FILE__) . '/../../config.php');
global $CFG, $USER, $DB;
require_once($CFG->dirroot . '/local/lib.php');
$id = optional_param('recid', 0, PARAM_INT);
$tid = optional_param('tid', 0, PARAM_INT);
$reject = optional_param('reject', 0, PARAM_INT);
$PAGE->set_url('/local/request/reject.php');
$PAGE->set_title(get_string('pluginname', 'local_profilechange'));
$PAGE->set_heading(get_string('pluginname', 'local_profilechange'));
$hierarchy = new hierarchy();
$PAGE->set_pagelayout('admin');
require_login();
$PAGE->navbar->add(get_string('myprofile', 'local_profilechange'));
$PAGE->navbar->add(get_string('pluginname', 'local_profilechange'));
echo $OUTPUT->header();
$hierarchy = new hierarchy();
if ($id > 0) {
    $value = $DB->set_field('local_request_profile_change', 'reg_approval', $reject, array('id' => $id));
    $message = get_string('reject_profile_change', 'local_request');
    $nexturl = '../../local/request/approval_profile.php';
    $style = array('style' => 'notifysuccess');
    $hierarchy->set_confirmation($message, $nexturl, $style);
}if ($tid > 0) {
    $value = $DB->set_field('local_request_transcript', 'reg_approval', $reject, array('id' => $tid));
    $message = get_string('reject_transcript', 'local_request');
    $nexturl = '../../local/request/approval_transcript.php';
    $style = array('style' => 'notifysuccess');
    $hierarchy->set_confirmation($message, $nexturl, $style);
}echo $OUTPUT->footer();
?>
开发者ID:anilch,项目名称:Personel,代码行数:30,代码来源:reject.php

示例7: time

    $fromform->notification = 0;
    $fromform->requested_date = time();
    $fromform->reg_approval = 0;
    $fromform->regapproval_date = 0;
    $registrar = $DB->get_records_sql("select userid from {local_school_permissions} where roleid = 9 and schoolid = {$fromform->school_id} group by userid");
    foreach ($registrar as $reg) {
        $registrarid = $reg->userid;
    }
    $userto = $DB->get_record('user', array('id' => $registrarid));
    $userfrom = $DB->get_record('user', array('id' => $USER->id));
    $message = get_string('reqidcardsmsg', 'local_request');
    if ($DB->insert_record('local_request_idcard', $fromform)) {
        message_post_message($userfrom, $userto, $message, FORMAT_HTML);
        $conmessage = get_string('requestsubmit', 'local_request');
        $options = array('style' => 'notifysuccess');
        $hierarchy->set_confirmation($conmessage, $nexturl, $options);
    }
}

echo $OUTPUT->header();
$check = $DB->get_record_sql("SELECT * FROM {local_request_idcard} WHERE studentid = {$USER->id} AND reg_approval = 0");
if (!empty($check)) {
    $message = get_string('requestiderror', 'local_request');
    $options = array('style' => 'notifyproblem');
    $hierarchy->set_confirmation($message, $nexturl, $options);
}

echo $OUTPUT->heading(get_string('requisitions_id', 'local_request'));
$currenttab = 'request';
$requestid->requestidtabview($currenttab);
开发者ID:anilch,项目名称:Personel,代码行数:30,代码来源:requestid.php

示例8: array

if (isset($formdata->confirmdelete) AND $formdata->confirmdelete == 1) {
    if (!$template = $DB->get_record("evaluation_template", array("id"=>$deletetempl))) {
        print_error('error');
    }

   // if ($template->ispublic) {
    //    $systemcontext = get_system_context();
    //    require_capability('mod/evaluation:createpublictemplate', $systemcontext);
    //    require_capability('mod/evaluation:deletetemplate', $systemcontext);
   // }

    evaluation_delete_template($template);
    $message = get_string('templatedelsuccess','local_evaluations');
     $style = array('style'=>'notifysuccess');
 $hierarchy->set_confirmation($message,$deleteurl->out(false),$style);
    //redirect($deleteurl->out(false));
}

/// Print the page header
$strevaluations = get_string("modulenameplural", "local_evaluations");
$strevaluation  = get_string("modulename", "local_evaluations");
$strdeleteevaluation = get_string('delete_template', 'local_evaluations');

//$PAGE->set_heading(format_string($course->fullname));
$PAGE->set_title(format_string($evaluation->name));
echo $OUTPUT->header();



/// Print the main part of the page
开发者ID:anilch,项目名称:Personel,代码行数:30,代码来源:delete_template.php

示例9: registrarrejectcourse

/**
 * @method registrarrejectcourse
 * @todo used when registrar rejected the student request( for course enrollment), particular student status will be updated.
 * @param int $courseid Course id, int $userid user id
 * @return-- display confirmation message
 */
function registrarrejectcourse($userid, $classid) {

    global $DB, $USER;
    $returnurl = new moodle_url('/local/courseregistration/registrar.php?current=pending');
    $usercourse = $DB->get_records('local_user_clclasses', array('userid' => $userid, 'classid' => $classid));

    foreach ($usercourse as $usercourses) {

        $publish = new stdClass();
        $publish->id = $usercourses->id;
        $publish->registrarapproval = 2;
        $out = $DB->update_record('local_user_clclasses', $publish);
    }
    /* ---start of vijaya--- */
    $conf = new object();
    $hierarchy = new hierarchy();
    $conf->username = $DB->get_field('user', 'username', array('id' => $userid));
    $conf->classname = $DB->get_field('local_clclasses', 'fullname', array('id' => $classid));
    $message = get_string('msg_rej_cls_req', 'local_courseregistration', $conf);
    $userfrom = $DB->get_record('user', array('id' => $USER->id));
    $userto = $DB->get_record('user', array('id' => $userid));
    $message_post_message = message_post_message($userfrom, $userto, $message, FORMAT_HTML);
    /* ---end of vijaya--- */
    $message = get_string('reject_success', 'local_courseregistration', $conf);
    $style = array('style' => 'notifysuccess');
    $hierarchy->set_confirmation($message, $returnurl, $style);
    //return $returnurl;
}
开发者ID:anilch,项目名称:Personel,代码行数:34,代码来源:lib.php

示例10: array

 /* ---------school filter--------- */
$schoolids = $assignee_ob->check_loginuser_registrar_admin();
    
$assignee_ob->assignmentor_tabs($currenttab);
if (isset($CFG->allowframembedding) and ! $CFG->allowframembedding) {
    echo $OUTPUT->box(get_string('desc_view_mentor', 'local_assignmentor'));
}

/* ------code starts- to unassign students from mentor ----- */
if ($id and $unassign and confirm_sesskey()) {
    $del = $DB->delete_records('local_assignmentor_tostudent', array('id' => $id));
    if ($del) {
        $success = get_string('success_unassign_mentor', 'local_assignmentor');
        $options = array('style' => 'notifysuccess');
        $hier->set_confirmation($success, $currenturl, $options);
    } else {
        $error = get_string('error_unassign_mentor', 'local_assignmentor');
        $options = array('style' => 'notifyproblem');
        $hier->set_confirmation($error, $currenturl, $options);
    }
}
echo $OUTPUT->box_start('generalbox boxaligncenter boxwidthwide');
echo $OUTPUT->box_end();
try {
   
    /* ----only displaying registrar enroll school informations------ */
    foreach ($schoolids as $sid) {
        if ($sid->id != null) {
            $temp[] = $sid->id;
        }
开发者ID:anilch,项目名称:Personel,代码行数:30,代码来源:index.php

示例11: school

$school = new school();
/* ---Adding the users to the school --- */
/* ---when Registrar select the users to the school and submits to assign users--- */
if (!empty($moveto) and $data = data_submitted()) {

    if (!$destschool = $DB->get_record('local_school', array('id' => $data->moveto))) {
        print_error('cannotfindschool', '', '', $data->moveto);
    }
    /*
     * ###Bugreport #189-Assign Regsitrar
     * @author Naveen Kumar<naveen@eabyas.in>
     * (Resolved) Removed success message from the loop, So that it won't redirect
     */
    $currenturl = "{$CFG->wwwroot}/local/collegestructure/assignusers.php";
    if (empty($data)) {
        $hierarche->set_confirmation(get_string('pleaseselectschool', 'local_collegestructure'), $currenturl);
    }
    $users = array();

    foreach ($data as $key => $value) {
        if (preg_match('/^c\d+$/', $key)) {
            $userid = substr($key, 1);
            array_push($users, $userid);
        }
    }

    $school->add_users($users, $data->moveto);
}
/* ---end of the user assigning to schools--- */

/* ---Prepare the standard URL params for this page. We'll need them later--- */
开发者ID:anilch,项目名称:Personel,代码行数:31,代码来源:assignusers.php

示例12: sizeof



//echo $OUTPUT->box_end();
$returnurl = new moodle_url('/local/departments/display_instructor.php');
$currenturl = "{$CFG->wwwroot}/local/departments/display_instructor.php";

try {
//------after selecting insrtuctor and department(assigning instructor to department)---------
    $data = data_submitted();
    if (!empty($moveto) && !empty($data)) {
        if (!empty($data->check)) {
            $res = $dept_ob->assign_instructor_department($data);
            $dept_ob->success_error_msg($res, 'sassign_ins', 'eassign_ins', $currenturl);
        }
        $select_msg = get_string('select_instructor', 'local_departments');
        $hier1->set_confirmation($select_msg, $currenturl);
    }
//--------------------------------------------------------
// checking if login user is registrar or admin
    $schoolid = $dept_ob->check_loginuser_registrar_admin();

//-------$count used to avoid school filter(if registrar assigned to more than one school then filter will)
    $count = sizeof($schoolid);
    if ($count > 1) {
        $schoollist = $hier1->get_school_parent($schoolid, '', true);
        $select = new single_select(new moodle_url('/local/departments/assign_instructor.php'), 'slsid', $schoollist, $slsid, null, null);
        $select->set_label(get_string('schoolid', 'local_collegestructure'));
        echo $OUTPUT->render($select);
        echo '</br>';
        $temp_sid = $slsid;
    } else {
开发者ID:anilch,项目名称:Personel,代码行数:29,代码来源:assign_instructor.php

示例13: array

        $defaultschoolid = $DB->get_record('local_department', array('id' => $dept_id));
        $flag = 0;
        if ($defaultschoolid->schoolid == $sid)
            $flag = 1;
        $used_dept = $DB->get_records('local_cobaltcourses', array('schoolid' => $sid, 'departmentid' => $dept_id));
        if (empty($used_dept) && ($flag == 0)) {
            $DB->delete_records('local_assignedschool_dept', array('id' => $id));
            $dept_name = $DB->get_record('local_department', array('id' => $dept_id));
            $school_name = $DB->get_record('local_school', array('id' => $sid));
            $msg_strings = new stdClass();
            $msg_strings->school = $school_name->fullname;
            $msg_strings->department = $dept_name->fullname;
            $unassign_dept_msg = get_string('unassign_dept_msg', 'local_departments', $msg_strings);
            $options = array('style' => 'notifysuccess');
            $hier1->set_confirmation($unassign_dept_msg, $currenturl, $options);
        } else {
            $options = array('style' => 'notifyproblem');
            $error_unassign_msg = get_string('error_unassign_msg', 'local_departments');
            $hier1->set_confirmation($error_unassign_msg, $currenturl, $options);
        }
    }
}
if ($sid and $unassign and confirm_sesskey()) {
    $strheading = get_string('unassign_school', 'local_departments');
    $PAGE->navbar->add($strheading);
    $PAGE->set_title($strheading);
    echo $OUTPUT->header();
    $currenttab = 'assign_school';
    //$dept_ob->dept_tabs($currenttab);
    echo $OUTPUT->heading($strheading);
开发者ID:anilch,项目名称:Personel,代码行数:30,代码来源:assign_school.php

示例14: array

        $conf->deptname = $DB->get_field('local_department', 'fullname', array('id' => $dept->departmentid));
        /* ---end of vijaya--- */
        if ($DB->delete_records('local_dept_instructor', array('id' => $id))) {
            /* ---start of vijaya--- */
            $message = get_string('msg_del_ins_dept', 'local_departments', $conf);
            $userfrom = $DB->get_record('user', array('id' => $USER->id));
            $userto = $DB->get_record('user', array('id' => $dept->instructorid));
            /* Bug report #253  -  Invoice Messages
             * @author hemalatha c arun <hemalatha@eabyas.in> 
             * Resolved - changed the message format
             */
            $message_post_message = message_post_message($userfrom, $userto, $message, FORMAT_HTML);
            /* ---end of vijaya--- */
            $options = array('style' => 'notifysuccess');
            $suc_unassign_ins = get_string('success_unassign_ins', 'local_departments', $temp);
            $hier1->set_confirmation($suc_unassign_ins, $currenturl, $options);
        } else {
            $options = array('style' => 'notifyproblem');
            $error_unassign_ins = get_string('error_unassign_ins', 'local_departments', $temp);
            $hier1->set_confirmation($error_unassign_ins, $currenturl, $options);
        }
    }
}
if ($id and $unassign and confirm_sesskey()) {
    $strheading = get_string('unassign_instructor', 'local_departments');
    $PAGE->navbar->add($strheading);
    $PAGE->set_title($strheading);
    echo $OUTPUT->header();
    $currenttab = 'display_instructor';
    //$dept_ob->dept_tabs($currenttab);
    echo $OUTPUT->heading($strheading);
开发者ID:anilch,项目名称:Personel,代码行数:31,代码来源:display_instructor.php

示例15: classes_remove_criteria

 /**
  * @method classes_remove_criteria
  * @param int $exam Exam ID
  * @todo To delete the class completion
  */
 public function classes_remove_criteria($exam, $id) {
     global $DB, $CFG;
     $hierarche = new hierarchy ();
     $currenturl = "{$CFG->wwwroot}/local/clclasses/examsetting.php?id={$id}";
     $delete = $DB->delete_records('local_class_completion', array('id' => $exam));
     if ($delete)
         $hierarche->set_confirmation(get_string('removedscuccess', 'local_clclasses'), $currenturl, array('style' => 'notifysuccess'));
 }
开发者ID:anilch,项目名称:Personel,代码行数:13,代码来源:lib.php


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