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


PHP Survey::getVariableDescriptiveByName方法代码示例

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


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

示例1: watch

    function watch()
    {
        $returnStr = $this->showHeader(Language::messageSMSTitle());
        $returnStr .= $this->displayComboBox();
        $returnStr .= "<form method='post'>";
        $params = getSessionParams();
        //$params['reportpage'] = 'reportRes';
        $returnStr .= setSessionParamsPost($params);
        $returnStr .= '<div id="wrap">';
        $returnStr .= '<div class="container"><p>';
        $returnStr .= '<div class="panel panel-default">
                <div class="panel-heading">';
        $returnStr .= '<h4>' . Language::linkWatch() . '</h4>';
        $returnStr .= '                </div>
                <div class="panel-body">';
        require_once 'data.php';
        require_once 'display.php';
        $data = new Data();
        $values = $data->getRespondentData(getFromSessionParams('watchsuid'), getFromSessionParams('watchprimkey'));
        $returnStr .= '</div>
    <div role="panel" class="panel">';
        if (sizeof($values) == 0) {
            $returnStr .= "<br/>" . '<div class="alert alert-warning">' . Language::labelWatchNoData() . '</div>';
        } else {
            $returnStr .= $this->displayDataTablesScripts(array("colvis", "rowreorder"));
            $returnStr .= "<script type='text/javascript'>\n                        \$(document).ready(function(){\n                            \$('#issuetable').dataTable(\n                                {\n                                    \"iDisplayLength\": 5,\n                                    dom: 'C<\"clear\">lfrtip',\n                                    searching: false,\n                                    paging: true\n                                    }    \n                                );\n                                         \n                       });</script>\n\n                        ";
            //
            $returnStr .= "<br/><table id='issuetable' class='table table-bordered table-striped'><thead>";
            $returnStr .= "<th>" . Language::labelWatchVariable() . "</th><th>" . Language::labelWatchValue() . "</th><th>" . Language::labelWatchClean() . "</th><th>" . Language::labelWatchMode() . "</th><th>" . Language::labelWatchLanguage() . "</th><th>" . Language::labelWatchTime() . "</th></tr>";
            $returnStr .= "</thead><tbody>";
            $modes = Common::surveyModes();
            $languages = Language::getLanguagesArray();
            $sesid = session_id();
            require_once 'object.php';
            require_once 'component.php';
            require_once 'setting.php';
            require_once 'type.php';
            require_once 'variabledescriptive.php';
            $survey = new Survey(getFromSessionParams('watchsuid'));
            foreach ($values as $is) {
                $returnStr .= "<tr>";
                $returnStr .= "<td>" . $is["variablename"] . "</td>";
                $returnStr .= "<td>" . $this->getDisplayValue($survey->getVariableDescriptiveByName($is["variablename"]), $is["answer_dec"]) . "</td>";
                $returnStr .= "<td>" . $this->displayDirty([$is["dirty"]]) . "</td>";
                $returnStr .= "<td>" . $modes[$is["mode"]] . "</td>";
                $returnStr .= "<td>" . $languages[str_replace("_", "", getSurveyLanguagePostFix($is["language"]))]['name'] . "</td>";
                $returnStr .= "<td>" . $is["ts"] . "</td>";
                $returnStr .= "</tr>";
            }
            $returnStr .= "</tbody></table>";
        }
        $returnStr .= '</div>
  </div>
</div>';
        $returnStr .= '                </div></div>';
        $returnStr .= '</p></div>    </div>';
        //container and wrap
        $returnStr .= $this->showFooter(false);
        echo $returnStr;
    }
开发者ID:nubissurveying,项目名称:nubis,代码行数:60,代码来源:watchwindow.php

示例2: getRespondentActionButtons

    function getRespondentActionButtons($respondentOrHousehold, $refpage)
    {
        $content = '';
        if ($respondentOrHousehold->hasFinalCode() && $respondentOrHousehold->isCompleted()) {
            //if not completed: can still be assigned to different iwer
            $content = $this->displayInfo(Language::labelSupervisorFinalCodeAssigned());
        } else {
            if ($respondentOrHousehold instanceof Household) {
                //          $content .= '<form method="post">';
                //            $content .= setSessionParamsPost(array('page' => 'supervisor.interviewer.respondent.reassign', 'primkey' => $respondentOrHousehold->getPrimkey()));
                $users = new Users();
                $users = $users->getUsersBySupervisor($_SESSION['URID']);
                // $content .= $this->displayUsers($users, $respondentOrHousehold->getUrid());
                // $content .= '<br/>';
                // $content .= '<input type="submit" class="btn btn-default" value="Reassign"/>';
                // $content .= '</form>';
                $content .= $this->showActionBar(Language::labelSupervisorAssignToInterviewer(), $this->displayUsers($users, $respondentOrHousehold->getUrid(), 'uridsel', false, true), 'Reassign', setSessionParamsPost(array('page' => 'supervisor.interviewer.household.reassign', 'primkey' => $respondentOrHousehold->getPrimkey())), confirmAction('Are you sure you want to reassign this household? Make sure the intervier data for this household has been uploaded, otherwise data wil be lost! Type YES to continue.', 'YES'));
                if (!$respondentOrHousehold->hasFinalCode()) {
                    $content .= $this->showActionBar(Language::labelSupervisorAssignFinalStatus(), $this->displayFinalStatusCodesSelect($respondentOrHousehold->getUrid()), 'Set status', setSessionParamsPost(array('page' => 'supervisor.interviewer.household.contact.setstatus', 'primkey' => $respondentOrHousehold->getPrimkey())), confirmAction('Are you sure you want to reassign this household? Type YES to continue.', 'YES'));
                }
            } else {
                if (!$respondentOrHousehold->hasFinalCode()) {
                    $content .= $this->showActionBar(Language::labelSupervisorAssignFinalStatus(), $this->displayFinalStatusCodesSelect($users, $respondentOrHousehold->getUrid()), 'Set status', setSessionParamsPost(array('page' => 'supervisor.interviewer.household.respondent.contact.setstatus', 'primkey' => $respondentOrHousehold->getPrimkey())), confirmAction('Are you sure you want to assign a final status code to this respondent? Type YES to continue.', 'YES'));
                } else {
                    $content = $this->displayInfo(Language::labelSupervisorFinalCodeAssigned());
                }
            }
        }
        //NEEDS VALIDATION?
        if ($respondentOrHousehold instanceof Respondent) {
            if ($respondentOrHousehold->needsValidation()) {
                $beforeText = '<button type="button" class="btn btn-warning" data-toggle="modal" data-target="#myModal">' . Language::labelSupervisorCheckAnswers() . '</button>';
                $content .= '  
<!-- Modal -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
        <h4 class="modal-title" id="myModalLabel">' . Language::labelSupervisorCheckRespondentAnswers() . '</h4>
      </div>
      <div class="modal-body">
        <table>
        <thead><tr><th>' . Language::labelSupervisorCheckRespondentQuestion() . '</th><th>' . Language::labelSupervisorCheckRespondentAnswer() . '</th></tr></thead>
	<tbody>';
                $validationQuestions = Language::validationQuestions();
                $survey = new Survey(2);
                foreach ($validationQuestions as $question) {
                    $var = $survey->getVariableDescriptiveByName(getBasicName($question));
                    $content .= '<tr><td>' . $question . ': ' . $var->getDescription() . '</td><td>';
                    $content .= '</td></tr>';
                }
                $content .= '</tbody></table>';
                //         $content .= json_encode($survey);
                $content .= '
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">' . Language::buttonClose() . '</button>
      </div>
    </div>
  </div>
</div> 
';
                $content .= $this->showActionBar(Language::labelSupervisorCheckRespondentValidate(), $this->displayValidationStatus(Language::optionsSupervisorValidation(), $respondentOrHousehold->getUrid(), 'validationsel', false, $beforeText), 'Set validation status', setSessionParamsPost(array('page' => 'supervisor.interviewer.household.respondent.setvalidation', 'primkey' => $respondentOrHousehold->getPrimkey())));
            }
        }
        return $content;
    }
开发者ID:nubissurveying,项目名称:nubis,代码行数:68,代码来源:displaysupervisor.php

示例3: showClickRouting

 function showClickRouting()
 {
     $action = loadvar("action");
     $survey = new Survey($_SESSION['SUID']);
     $var = $survey->getVariableDescriptiveByName($action);
     if ($var->getVsid() != "") {
         $_SESSION['LASTPAGE'] = 'sysadmin.survey.variable';
         return $this->showEditVariable($var->getVsid());
     }
     $section = $survey->getSectionByName($action);
     if ($section->getSeid() != "") {
         $_SESSION['LASTPAGE'] = 'sysadmin.survey.section';
         return $this->showSection("", $section->getSeid());
     }
     $group = $survey->getGroupByName($action);
     if ($group->getGid() != "") {
         $_SESSION['LASTPAGE'] = 'sysadmin.survey.group';
         return $this->showEditGroup($group->getGid());
     }
     /* nothing to click through */
     $displaySysAdmin = new DisplaySysAdmin();
     $content = $displaySysAdmin->displayWarning(Language::messageRoutingClickError($action));
     return $this->showSection($content);
 }
开发者ID:nubissurveying,项目名称:nubis,代码行数:24,代码来源:sysadmin.php

示例4: updateRes

 function updateRes()
 {
     global $survey, $engine;
     $engine = $this->engine;
     $survey = new Survey(getFromSessionParams('watchsuid'));
     $var = $survey->getVariableDescriptiveByName($is["variablename"]);
     $cnt = loadvar("cnt");
     //echo $cnt;
     //echo '----' . loadvar("updatevariable" . $cnt) . '----' . loadvar("answer" . $cnt);
     //echo $this->engine->getDirty(loadvar("updatevariable" . $cnt));
     $r = $this->engine->getAnswer(loadvar("updatevariable" . $cnt));
     //echo '-----' . $r;
     //echo loadvar("answer" . $cnt) . '-----';
     $this->engine->setAnswer(loadvar("updatevariable" . $cnt), loadvar("answer" . $cnt), $this->engine->getDirty(loadvar("updatevariable" . $cnt)));
     $this->update();
 }
开发者ID:nubissurveying,项目名称:nubis,代码行数:16,代码来源:updater.php


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