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

PHP Evaluation类代码示例

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

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



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

示例1: getVotePercentage

 /**
  * 
  * @param Evaluation $evalObj
  */
 private function getVotePercentage($evalObj)
 {
     $questionCount = count($evalObj->getQuestions());
     $votes = $evalObj->getVotes();
     $currentVotes = array();
     $usersVoted = array();
     foreach ($votes as $vote) {
         array_push($currentVotes, $vote->getVote());
         array_push($usersVoted, $vote->getUser()->getId());
     }
     $sum = array_sum($currentVotes);
     $users = count(array_unique($usersVoted));
     return $sum / ($questionCount * 5) * 100 / $users;
 }
开发者ID:camelcasetechsd,项目名称:certigate,代码行数:18,代码来源:Vote.php


示例2: getList

 public static function getList($nurser_id = '')
 {
     $model = Evaluation::model();
     $command = $model->getDbConnection()->CreateCommand();
     $condition = "c.id=b.order_id And a.id=b.customer_id And b.nurser_id={$nurser_id}";
     return $command->select('a.name,c.server_name,b.context,b.create_time,b.id')->from('t_customer a, t_evaluation b, t_order c')->where($condition)->order('b.create_time DESC')->queryAll();
 }
开发者ID:WalkerDi,项目名称:mama,代码行数:7,代码来源:Evaluation.php


示例3: run

 public function run($id)
 {
     $evaluation_info = Evaluation::model()->findByPk($id);
     if ($evaluation_info->delete()) {
         $this->controller->success('');
     }
 }
开发者ID:WalkerDi,项目名称:mama,代码行数:7,代码来源:DeleteAction.php


示例4: destroy

 public function destroy($id)
 {
     $evaluation = Evaluation::find($id);
     $evaluation->delete();
     Session::flash('message', 'Successfully deleted the Evaluations!');
     return Redirect::to('evaluations');
 }
开发者ID:GenteRH,项目名称:Prova-Gente-Teste,代码行数:7,代码来源:EvaluationController.php


示例5: run

 public function run()
 {
     $nurser_id = Yii::app()->request->getParam('id', 0);
     $evaluation_model = Evaluation::getList($nurser_id);
     //print_r($evaluation_model);die;
     $vars = array('evaluation_model' => $evaluation_model);
     $this->controller->render('index', $vars);
 }
开发者ID:WalkerDi,项目名称:mama,代码行数:8,代码来源:IndexAction.php


示例6: evaluateAction

 public function evaluateAction()
 {
     $username = $this->_getParam('username');
     if (!empty($username)) {
         $form = $this->_getEvaluationForm($username);
         if ($this->getRequest()->isPost() && $form->isValid($this->getRequest()->getPost())) {
             $values = $form->getValues();
             require_once APPLICATION_PATH . "/model/Evaluation.php";
             $table = new Evaluation();
             $date = new Zend_Date();
             $data['date'] = $date->getIso();
             $data['rating'] = $values['rating'];
             $data['motivation'] = $values['motivation'];
             $data['evaluator'] = Zend_Auth::getInstance()->getIdentity()->username;
             $data['evaluated_user'] = $username;
             $table->insert($data);
             $this->_helper->redirector('profile', 'user', 'default', array('username' => $username, 'evaluationInserted' => true));
         }
         $this->view->form = $form;
     }
 }
开发者ID:Kjir,项目名称:carpond,代码行数:21,代码来源:UserController.php


示例7: update

 public function update($id)
 {
     // Validate
     // read more on validation at http://laravel.com/docs/validation
     $rules = array('eva_name' => 'required', 'eva_duration' => 'required');
     $validator = Validator::make(Input::all(), $rules);
     // process the login
     if ($validator->fails()) {
         return Redirect::to('evaluations/' . $id . '/edit')->withErrors($validator);
     } else {
         // store
         $evaluation = new Evaluation();
         $evaluation->eva_name = Input::get('eva_name');
         $evaluation->eva_duration = Input::get('eva_duration');
         $evaluation->questions_id = Input::get('questions_id');
         $evaluation->save();
         // Redirect
         Session::flash('message', 'Successfully created Evaluation!');
         return Redirect::to('evaluations');
     }
 }
开发者ID:lucaskillo,项目名称:Prova-Gente-Teste,代码行数:21,代码来源:EvaluationController.php


示例8: afficheEvaluation

/**
 * @param $eleve
 * @param $trimestre
 */
function afficheEvaluation(Eleve $eleve, Trimestre $trimestre, $idMatiere)
{
    $evaluations = Evaluation::getByMatiereTrimestre($idMatiere, $trimestre->getIdTrimestre());
    if (count($evaluations) > 0) {
        foreach ($evaluations as $uneEvaluation) {
            $laNote = Note::getById($eleve->getIdEleve(), $uneEvaluation->getIdEvaluation());
            if (!empty($laNote->getNote())) {
                echo '<tr>
						<td colspan="3"></td>
						<td class="Evaluation">' . $uneEvaluation->getLibelleEvaluation() . '</td>';
                afficheNote($uneEvaluation->getMaxEvaluation(), $laNote->getNote());
                echo '</tr>';
            }
        }
    }
}
开发者ID:roger-jb,项目名称:edeip,代码行数:20,代码来源:modelNoteLycee.php


示例9: get_evaluations_with_result_for_student

    /**
     * Retrieve evaluations where a student has results for
     * and return them as an array of Evaluation objects
     * @param int $cat_id parent category (use 'null' to retrieve them in all categories)
     * @param int $stud_id student id
     */
    public static function get_evaluations_with_result_for_student($cat_id = null, $stud_id)
    {
        $tbl_grade_evaluations = Database::get_main_table(TABLE_MAIN_GRADEBOOK_EVALUATION);
        $tbl_grade_results = Database::get_main_table(TABLE_MAIN_GRADEBOOK_RESULT);
        $sql = 'SELECT * FROM ' . $tbl_grade_evaluations . '
				WHERE id IN (
					SELECT evaluation_id FROM ' . $tbl_grade_results . '
					WHERE user_id = ' . intval($stud_id) . ' AND score IS NOT NULL
				)';
        if (!api_is_allowed_to_edit()) {
            $sql .= ' AND visible = 1';
        }
        if (isset($cat_id)) {
            $sql .= ' AND category_id = ' . intval($cat_id);
        } else {
            $sql .= ' AND category_id >= 0';
        }
        $result = Database::query($sql);
        $alleval = Evaluation::create_evaluation_objects_from_sql_result($result);
        return $alleval;
    }
开发者ID:omaoibrahim,项目名称:chamilo-lms,代码行数:27,代码来源:evaluation.class.php


示例10: set_time_limit

<?php

set_time_limit(0);
$strPageTitle = 'Add Image';
include "../includes/logincheck.php";
if (!empty($_FILES)) {
    $objEvaluation = new Evaluation(NULL, NULL);
    $arrImageAdded = $objEvaluation->addImage(isset($_POST['imageid']) ? $_POST['imageid'] : NULL, isset($_POST['evalid']) ? $_POST['evalid'] : NULL);
    if (!empty($arrImageAdded) && $arrImageAdded != 'error') {
        echo $arrImageAdded[0];
    } else {
        echo 'error';
    }
}
开发者ID:jamestoot,项目名称:Eval,代码行数:14,代码来源:add_image.php


示例11: ini_set

<?php

include "../includes/logincheck.php";
if (!empty($_POST)) {
    if (!empty($_POST['download-pdf'])) {
        if (!ini_get('display_errors')) {
            ini_set('display_errors', '1');
        }
        require_once '../includes/html2pdf_v4.03/html2pdf.class.php';
        $iEvaluationId = $_POST['evaluation-id'];
        $html2pdf = new HTML2PDF('P', 'A4', 'en');
        $username = 'dev';
        $password = 'bradf0rd1911';
        $context = stream_context_create(array('http' => array('header' => "Authorization: Basic " . base64_encode("{$username}:{$password}"))));
        $content = file_get_contents('http://jamestoothill.co.uk/dev/eval/admin/view_eval_pdf.php?skip_auth=1HGstGtw8272891H&eval_id=' . $iEvaluationId . '&remove_formatting=true', false, $context);
        $objEvaluation = new Evaluation(NULL, NULL);
        $objEvaluation->emailEvaluation('[email protected]', 'James Toothill', $content);
        //echo $content;
        //$html2pdf->WriteHTML($content);
        //$html2pdf->Output('exemple.pdf');
        exit;
    }
}
开发者ID:jamestoot,项目名称:Eval,代码行数:23,代码来源:generate_pdf.php


示例12: get_evaluation

 /**
  * Lazy load function to get the linked evaluation
  */
 protected function get_evaluation()
 {
     if (!isset($this->evaluation)) {
         if (isset($this->ref_id)) {
             $evalarray = Evaluation::load($this->get_ref_id());
             $this->evaluation = $evalarray[0];
         } else {
             $eval = new Evaluation();
             $eval->set_category_id(-1);
             $eval->set_date(api_get_utc_datetime());
             // these values will be changed
             $eval->set_weight(0);
             //   when the link setter
             $eval->set_visible(0);
             //     is called
             $eval->set_id(-1);
             // a 'real' id will be set when eval is added to db
             $eval->set_user_id($this->get_user_id());
             $eval->set_course_code($this->get_course_code());
             $this->evaluation = $eval;
             $this->set_ref_id($eval->get_id());
         }
     }
     return $this->evaluation;
 }
开发者ID:ilosada,项目名称:chamilo-lms-icpna,代码行数:28,代码来源:evallink.class.php


示例13: elseif

# ===================================================== END: check the evalID #
# check the itemID =========================================================  #
$itemID = Request::option('itemID');
if ($itemID) {
    $_SESSION['itemID'] = $itemID;
} elseif (Request::submitted('newButton')) {
    $_SESSION['itemID'] = "root";
}
# ===================================================== END: check the itemID #
# check the rangeID ========================================================  #
if (Request::option("rangeID")) {
    $_SESSION['rangeID'] = Request::option("rangeID");
}
# ==================================================== END: check the rangeID #
# EVTAU: employees of the vote-team against urlhacking ====================== #
$eval = new Evaluation($evalID, NULL, EVAL_LOAD_NO_CHILDREN);
// someone has voted
if ($eval->hasVoted()) {
    $error = EvalCommon::createReportMessage(_("An dieser Evaluation hat bereits jemand teilgenommen. Sie darf nicht mehr verändert werden."), EVAL_PIC_ERROR, EVAL_CSS_ERROR);
    $error_msgs[] = $error->createContent();
}
// only the author or user with tutor perm in all evalRangeIDs should edit an eval
$authorID = $eval->getAuthorID();
$db = new EvaluationObjectDB();
if ($authorID != $user->id) {
    $no_permisson = 0;
    if (is_array($eval->getRangeIDs())) {
        foreach ($eval->getRangeIDs() as $rangeID) {
            $user_perm = $db->getRangePerm($rangeID, $user->id, YES);
            // every range with a lower perm than Tutor
            if ($user_perm < 7) {
开发者ID:ratbird,项目名称:hope,代码行数:31,代码来源:evaluation_admin_edit.inc.php


示例14: Evaluation

	if (isset($_POST['selectEval']) && !empty($_POST['selectEval']))
		header('location: ../Intranet/modifCpt.php?idEval='.$_POST['selectEval']);
}

if (isset($_POST['verif'])){
	if (isset($_POST['selectEval']) && !empty($_POST['selectEval']))
		header('location: ../Intranet/verifNote.php?idEval='.$_POST['selectEval']);
}

if (isset($_POST['noter'])){
	if (isset($_POST['selectEval']) && !empty($_POST['selectEval']))
		header('location: ../Intranet/affectNote.php?idEval='.$_POST['selectEval']);
}

if (isset($_POST['btAjouter'])) {
	$evaluation = new Evaluation();
	$evaluation->setDateEvaluation($_POST['addDate']);
	$evaluation->setIdMatiereNiveau(MatiereNiveau::getByMatiereNiveau($_POST['addMatiere'], $_POST['addNiveau'])->getIdMatiereNiveau());
	$evaluation->setIdTypeEvaluation($_POST['addType']);
	$evaluation->setTitreEvaluation(db_connect::escape_string($_POST['addTitre']));
//	echo $evaluation->getTitreEvaluation();
	$evaluation->setMaxEvaluation($_POST['addMax']);
	if ($evaluation->getIdTypeEvaluation() == 3)
		$evaluation->setAutreEvaluation(db_connect::escape_string($_POST['autreEval']));

	if ($evaluation->insert()){
		$msgInsert = "<h4 style='color: green'>
				L'ajout de l'&eacute;valuation a r&eacute;ussi.
			</h4>";
	}
	else{
开发者ID:roger-jb,项目名称:edeip,代码行数:31,代码来源:addEvaluation.php


示例15: api_block_anonymous_users

 * @package chamilo.gradebook
 */
require_once '../inc/global.inc.php';
api_block_anonymous_users();
$isDrhOfCourse = CourseManager::isUserSubscribedInCourseAsDrh(api_get_user_id(), api_get_course_info());
if (!$isDrhOfCourse) {
    GradebookUtils::block_students();
}
$interbreadcrumb[] = array('url' => $_SESSION['gradebook_dest'], 'name' => get_lang('Gradebook'));
//load the evaluation & category
$select_eval = Security::remove_XSS($_GET['selecteval']);
if (empty($select_eval)) {
    api_not_allowed();
}
$displayscore = ScoreDisplay::instance();
$eval = Evaluation::load($select_eval);
$overwritescore = 0;
if ($eval[0]->get_category_id() < 0) {
    // if category id is negative, then the evaluation's origin is a link
    $link = LinkFactory::get_evaluation_link($eval[0]->get_id());
    $currentcat = Category::load($link->get_category_id());
} else {
    $currentcat = Category::load($eval[0]->get_category_id());
}
//load the result with the evaluation id
if (isset($_GET['delete_mark'])) {
    $result = Result::load($_GET['delete_mark']);
    if (!empty($result[0])) {
        $result[0]->delete();
    }
}
开发者ID:KRCM13,项目名称:chamilo-lms,代码行数:31,代码来源:gradebook_view_result.php


示例16: getEvaluation

	public function getEvaluation(){
		return Evaluation::getById($this->getIdEvaluation());
	}
开发者ID:roger-jb,项目名称:edeip,代码行数:3,代码来源:EvaluationPointCpt.php


示例17: api_block_anonymous_users

 * @package chamilo.gradebook
 */
//$cidReset = true;
require_once '../inc/global.inc.php';
api_block_anonymous_users();
GradebookUtils::block_students();
$interbreadcrumb[] = array('url' => $_SESSION['gradebook_dest'] . '?', 'name' => get_lang('Gradebook'));
$interbreadcrumb[] = array('url' => $_SESSION['gradebook_dest'] . '?selectcat=' . Security::remove_XSS($_GET['selectcat']), 'name' => get_lang('Details'));
$interbreadcrumb[] = array('url' => 'gradebook_showlog_eval.php?visiblelog=' . Security::remove_XSS($_GET['visiblelog']) . '&amp;selectcat=' . Security::remove_XSS($_GET['selectcat']), 'name' => get_lang('GradebookQualifyLog'));
$this_section = SECTION_COURSES;
Display::display_header('');
echo Display::page_header(get_lang('GradebookQualifyLog'));
$t_linkeval_log = Database::get_main_table(TABLE_MAIN_GRADEBOOK_LINKEVAL_LOG);
$t_user = Database::get_main_table(TABLE_MAIN_USER);
$visible_log = Security::remove_XSS($_GET['visiblelog']);
$evaledit = Evaluation::load($visible_log);
$sql = "SELECT le.name,le.description,le.weight,le.visible,le.type,le.created_at,us.username FROM " . $t_linkeval_log . " le INNER JOIN " . $t_user . " us\n      ON le.user_id_log=us.user_id where id_linkeval_log=" . $evaledit[0]->get_id() . " and type='evaluation';";
$result = Database::query($sql);
$list_info = array();
while ($row = Database::fetch_row($result)) {
    $list_info[] = $row;
}
foreach ($list_info as $key => $info_log) {
    $list_info[$key][5] = $info_log[5] ? api_convert_and_format_date($info_log[5]) : 'N/A';
    $list_info[$key][3] = $info_log[3] == 1 ? get_lang('GradebookVisible') : get_lang('GradebookInvisible');
}
$parameters = array('visiblelog' => $visible_log, 'selectcat' => intval($_GET['selectcat']));
$table = new SortableTableFromArrayConfig($list_info, 1, 20, 'gradebookeval');
$table->set_additional_parameters($parameters);
$table->set_header(0, get_lang('GradebookNameLog'));
$table->set_header(1, get_lang('GradebookDescriptionLog'));
开发者ID:KRCM13,项目名称:chamilo-lms,代码行数:31,代码来源:gradebook_showlog_eval.php


示例18: Evaluation

<?php

$strPageTitle = 'Puckstoppers Goaltending Evaluation';
include "layout/header.php";
if (isset($_GET['eval_id']) && is_numeric($_GET['eval_id'])) {
    $iEvaluationId = $_GET['eval_id'];
    $objEvaluation = new Evaluation(NULL, $iEvaluationId);
    $blnDeleted = $objEvaluation->deleteEvaluation();
    if ($blnDeleted) {
        setTopMessage('success', 'Success! The Evaluation has been deleted.');
        header('Location: ' . $strLocation . 'admin/');
    } else {
        setTopMessage('error', 'Error! The Evaluation has not been deleted, please try again.');
        header('Location: ' . $strLocation . 'admin/');
    }
} else {
    header('Location: ' . $strLocation . 'admin/');
}
include "layout/footer_js.php";
include "layout/footer.php";
开发者ID:jamestoot,项目名称:Eval,代码行数:20,代码来源:delete_eval.php


示例19: header

                header('Location: ' . $strLocation . 'admin/view_eval.php?eval_id=' . $iEvaluationId);
            }
        } else {
            header('Cache-Control: public');
            header('Content-type: application/pdf');
            header('Content-Disposition: attachment; filename="evaluation-' . $iEvaluationId . '.pdf"');
            header('Content-Length: ' . strlen($Result));
            echo $Result;
        }
    }
}
$strPageTitle = 'Puckstoppers Goaltending Evaluation';
include "layout/header.php";
if (isset($_GET['eval_id']) && is_numeric($_GET['eval_id'])) {
    $iEvaluationId = $_GET['eval_id'];
    $objEvaluation = new Evaluation(NULL, $iEvaluationId);
    $arrEvaluation = $objEvaluation->getEvaluation();
    $objEvaluation->markComplete();
    $arrCompletedComponents = $objEvaluation->getCompletedComponents();
    $arrCompletedComments = $objEvaluation->getCompletedComments();
} else {
    header('Location: ' . $strLocation . 'admin/');
}
$objComment = new Comment(NULL, NULL, NULL);
$arrComponents = $objComment->getComponents();
$arrCommentTypes = $objComment->getCommentTypes();
?>
    <?php 
if (!empty($iEvaluationId)) {
    ?>
    <input name="evaluation-id" type="hidden" value="<?php 
开发者ID:jamestoot,项目名称:Eval,代码行数:31,代码来源:view_eval_pdf.php


示例20: Utilisateur

require_once '../Require/Objects.php';
$utilisateur = new Utilisateur();
if (isset($_SESSION['id'])) {
	$utilisateur = Utilisateur::getById($_SESSION['id']);
	if (!($utilisateur->estAdministrateur() || $utilisateur->estProfesseur())) {
		header('location: ../Intranet/mesInformations.php');
	}
}
else {
	header('location: ../Intranet/connexion.php');
}

if (!isset($_GET['idEval'])) {
	header('location: ../Intranet/addEvaluation.php');
}
$evaluation = Evaluation::getById($_GET['idEval']);

// préparation du select du niveau de cpt
$selectNiveauCpt = "<option></option>";
$niveauCpt       = NiveauCpt::getAll();
foreach ($niveauCpt as $nv) {
	$selectNiveauCpt .= "<option value=" . $nv->getIdNiveauCpt() . ">" . $nv->getLibelleNiveauCpt() . "</option>";
}

?>
<!DOCTYPE html>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<title>EDEIP : Evaluation</title>
	<link rel="stylesheet" href="../Intranet/styleIntranet.css" type="text/css" media="screen"/>
开发者ID:roger-jb,项目名称:edeip,代码行数:31,代码来源:affectNote.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP Event类代码示例发布时间:2022-05-23
下一篇:
PHP Ethna_Util类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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