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


PHP Survey::getVariableDescriptives方法代码示例

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


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

示例1: showSection

 function showSection($seid, $message = '')
 {
     $user = new User($_SESSION['URID']);
     $survey = new Survey($_SESSION['SUID']);
     $section = $survey->getSection($seid);
     $returnStr = $this->showTranslatorHeader(Language::messageSMSTitle());
     $returnStr .= '<div id="wrap">';
     $returnStr .= $this->showNavBar();
     $returnStr .= '<div class="container">';
     $returnStr .= '<ol class="breadcrumb">';
     $returnStr .= '<li>' . setSessionParamsHref(array('page' => 'translator.surveys'), Language::headerSurveys()) . '</li>';
     $returnStr .= '<li>' . setSessionParamsHref(array('page' => 'translator.survey'), $survey->getName()) . '</li>';
     $returnStr .= '<li>' . setSessionParamsHref(array('page' => 'translator.survey.section', 'seid' => $seid), $section->getName()) . '</li>';
     //if (!$user->hasNavigationInBreadCrumbs()) {
     if ($_SESSION['VRFILTERMODE_SECTION'] == 0) {
         $returnStr .= '<li class="active">' . Language::labelVariables() . '</li>';
     } elseif ($_SESSION['VRFILTERMODE_SECTION'] == 3) {
         $returnStr .= '<li class="active">' . Language::labelGroups() . '</li>';
     } else {
         $returnStr .= '<li class="active">' . Language::labelVariables() . '</li>';
     }
     //}
     $returnStr .= '</ol>';
     $returnStr .= $message;
     $returnStr .= '<div class="row row-offcanvas row-offcanvas-right">';
     $returnStr .= '<div style="" class="col-xs-12 col-sm-9">';
     if ($user->hasNavigationInBreadCrumbs()) {
         $active = array_fill(0, 16, 'label-primary');
         $active[$_SESSION['VRFILTERMODE_SECTION']] = 'label-default';
         $show = false;
         if (getSurveyLanguage() != $survey->getDefaultLanguage(getSurveyMode())) {
             $show = true;
         }
         $span = "";
         if ($show) {
             $status = "glyphicon glyphicon-remove";
             $statustext = Language::messageTranslationStatusIncomplete();
             if ($section->isTranslatedVariables()) {
                 $status = "glyphicon glyphicon-ok";
                 $statustext = Language::messageTranslationStatusComplete();
             }
             $span = '<span style="padding-right: 5px;" title="' . $statustext . '" class="' . $status . '"></span>';
         }
         if ($_SESSION['VRFILTERMODE_SECTION'] == 0) {
             $returnStr .= ' <span class="label ' . $active[0] . '">' . $span . Language::labelVariables() . '</span>';
         } else {
             $returnStr .= ' <a onclick="$(\'#vrfiltermode_section\').val(0);$(\'#sectionsidebar\').submit(); return false;" style="text-decoration:none;"><span class="label ' . $active[0] . '">' . $span . Language::labelVariables() . '</span></a>';
         }
     }
     $returnStr .= '<div class="well" style="background-color:white;">';
     if ($_SESSION['VRFILTERMODE_SECTION'] == 0) {
         //show variables
         $returnStr .= $this->showVariables($survey->getVariableDescriptives($seid, "position", "asc"));
     } else {
         $returnStr .= $this->showVariables($survey->getVariableDescriptives($seid, "position", "asc"));
     }
     $returnStr .= '</div>';
     //end well
     //END CONTENT
     $returnStr .= '</div>';
     $returnStr .= $this->showSurveySideBar($survey, $_SESSION['VRFILTERMODE_SURVEY']);
     $returnStr .= $this->showSectionSideBar($survey, $_SESSION['VRFILTERMODE_SECTION']);
     $returnStr .= '</div>';
     $returnStr .= '</div></div>';
     //container and wrap
     $returnStr .= $this->showBottomBar();
     $returnStr .= $this->showFooter(false);
     return $returnStr;
 }
开发者ID:nubissurveying,项目名称:nubis,代码行数:69,代码来源:displaytranslator.php

示例2: showOutputStatisticsParadataSection

 function showOutputStatisticsParadataSection($seid)
 {
     $survey = new Survey($_SESSION['SUID']);
     $section = $survey->getSection($seid);
     $headers[] = array('link' => setSessionParamsHref(array('page' => 'sysadmin.output'), Language::headerOutput()), 'label' => Language::headerOutputData());
     $headers[] = array('link' => setSessionParamsHref(array('page' => 'sysadmin.output.statistics'), Language::headerOutputStatistics()), 'label' => Language::headerOutputStatistics());
     $headers[] = array('link' => setSessionParamsHref(array('page' => 'sysadmin.output.statistics.paradata'), Language::headerOutputStatisticsParadata()), 'label' => Language::headerOutputStatisticsParadata());
     $headers[] = array('link' => setSessionParamsHref(array('page' => 'sysadmin.output.statistics.paradata', 'suid' => $suid), $survey->getName()), 'label' => $survey->getName());
     $headers[] = array('link' => '', 'label' => $section->getName());
     $returnStr = $this->showOutputHeader($headers);
     $returnStr .= $content;
     $variables = $survey->getVariableDescriptives($seid);
     foreach ($variables as $variable) {
         if (!inArray($variable->getAnswerType(), array(ANSWER_TYPE_NONE, ANSWER_TYPE_SECTION))) {
             $returnStr .= '<a href="index.php?r=' . setSessionsParamString(array('page' => 'sysadmin.output.statistics.paradata.variable', 'seid' => $seid, 'vsid' => $variable->getVsid())) . '" class="list-group-item">' . $variable->getName() . ' ' . $variable->getDescription() . '</a>';
         }
     }
     $returnStr .= '</p></div>    </div>';
     //container and wrap
     $returnStr .= $this->showBottomBar();
     $returnStr .= $this->showFooter(false);
     return $returnStr;
 }
开发者ID:nubissurveying,项目名称:nubis,代码行数:23,代码来源:displayoutput.php

示例3: showRemoveSectionRes

 function showRemoveSectionRes()
 {
     $_SESSION['LASTPAGE'] = 'sysadmin.survey';
     $displaySysAdmin = new DisplaySysAdmin();
     $survey = new Survey($_SESSION['SUID']);
     $seid = getFromSessionParams('seid');
     if ($seid != '') {
         //edit
         $section = $survey->getSection($seid);
         $section->remove();
         $variables = $survey->getVariableDescriptives($seid);
         foreach ($variables as $variable) {
             $variable->remove();
         }
         /* compile */
         $compiler = new Compiler($_SESSION['SUID'], getSurveyVersion($survey));
         $mess = $compiler->generateVariableDescriptives($variables, true);
         $mess = $compiler->generateSections(array($section), true);
         return $displaySysAdmin->showSurvey($displaySysAdmin->displaySuccess(Language::messageSectionRemoved($section->getName())));
     } else {
         return $displaySysAdmin->showSurvey();
     }
 }
开发者ID:nubissurveying,项目名称:nubis,代码行数:23,代码来源:sysadmin.php

示例4: showRouting


//.........这里部分代码省略.........
                          }
                          var sel = cm.getSelection().toLowerCase();
                          if ($.inArray(sel, keywords) == -1) { 
                            $("#action").val(sel);
                            $("#hiddenform").submit();                                        
                          }
                       }
                    });                    

                    editor.on("change", function(from, to, text, removed, origin) {
                        $("#routing").dirtyForms("setDirty");
                        mirrorchanged = true;
                    });

                    function format() {
                        var totalLines = editor.lineCount();  
                        editor.autoFormatRange({line:0, ch:0}, {line:totalLines});
                    }
                    
                    var historyeditor = CodeMirror.fromTextArea(document.getElementById("historycontent"), {mode: "text/x-nubis", lineNumbers: true});
                    $("#historyModal").on("show.bs.modal", function (event) {
                        event.stopImmediatePropagation();
                        var element = $(event.relatedTarget); // element that triggered the modal
                        var recipient = element.data("trackid"); // Extract info from data-* attributes
                        $.get("index.php?' . POST_PARAM_SMS_AJAX . '=' . SMS_AJAX_CALL . '&p=sysadmin.history.getentry&trid=" + recipient, null, function (data) {
                              historyeditor.setValue(data.trim());
                        }, "text"); 
                        });
                        
                     // jump to line
                     ' . $extra . '
                });
            </script>';
        }
        $returnStr .= '<div class="modal fade" id="compiledModal" 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" aria-hidden="true">&times;</button>
        <h4 class="modal-title">' . Language::labelRoutingCompiledCode() . '\'' . $section->getName() . '\'</h4>
      </div>
      <div class="modal-body">
        <div class="form-group">
           <textarea style="width: 100%; height: 100%;" rows=30 class="form-control">' . $section->getCompiledCode() . '</textarea>
         </div>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
      </div>
    </div><!-- /.modal-content -->
  </div><!-- /.modal-dialog -->
</div><!-- /.modal -->
';
        // history modal
        if (sizeof($history) > 0) {
            $returnStr .= '<div class="modal fade" id="historyModal" 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" aria-hidden="true">&times;</button>
                    <h4 class="modal-title">' . Language::labelRoutingHistory() . $section->getName() . '</h4>
                  </div>
                  <div class="modal-body">
                    <div class="form-group">
                       <textarea id=historycontent style="width: 100%; height: 100%;"></textarea>
                     </div>
                  </div>
                  <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
                  </div>
                </div><!-- /.modal-content -->
              </div><!-- /.modal-dialog -->
            </div><!-- /.modal -->';
        }
        $returnStr .= '<div class="modal fade" id="listModal" 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" aria-hidden="true">&times;</button>
        <h4 class="modal-title">Variables in \'' . $section->getName() . '\'</h4>
      </div>
      <div class="modal-body">
        <div class="form-group">
           <textarea style="width: 100%; height: 400px;" rows=30 class="form-control">';
        $vars = $survey->getVariableDescriptives($section->getSeid());
        foreach ($vars as $v) {
            $returnStr .= $v->getName() . "\r\n";
        }
        $returnStr .= '</textarea>
         </div>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
      </div>
    </div><!-- /.modal-content -->
  </div><!-- /.modal-dialog -->
</div><!-- /.modal -->
';
        return $returnStr;
    }
开发者ID:nubissurveying,项目名称:nubis,代码行数:101,代码来源:displaysysadmin.php

示例5: showReportsParadataSection

 function showReportsParadataSection($seid)
 {
     $survey = new Survey($_SESSION['SUID']);
     $section = $survey->getSection($seid);
     $headers[] = array('link' => setSessionParamsHref(array('page' => 'researcher.reports'), Language::headerOutput()), 'label' => Language::headerOutputData());
     $headers[] = array('link' => setSessionParamsHref(array('page' => 'researcher.reports.statistics'), Language::headerOutputStatistics()), 'label' => Language::headerOutputStatistics());
     $headers[] = array('link' => setSessionParamsHref(array('page' => 'researcher.reports.paradata'), Language::headerOutputStatisticsParadata()), 'label' => Language::headerOutputStatisticsParadata());
     $headers[] = array('link' => setSessionParamsHref(array('page' => 'researcher.reports.paradata', 'suid' => $suid), $survey->getName()), 'label' => $survey->getName());
     $headers[] = array('link' => '', 'label' => $section->getName());
     $returnStr = $this->showResearchHeader(Language::messageSMSTitle());
     $returnStr .= '<div id="wrap">';
     $returnStr .= $this->showNavBar();
     $returnStr .= '<div class="container"><p>';
     $returnStr .= '<ol class="breadcrumb">';
     $returnStr .= '<li>' . setSessionParamsHref(array('page' => 'researcher.reports'), Language::headerReports()) . '</li>';
     $returnStr .= '<li>' . setSessionParamsHref(array('page' => 'researcher.reports.paradata'), Language::headerReportsParadata()) . '</li>';
     $returnStr .= '<li>' . setSessionParamsHref(array('page' => 'researcher.reports.paradata', 'suid' => $suid), $survey->getName()) . '</li>';
     $returnStr .= '<li class="active">' . $section->getName() . '</li>';
     $returnStr .= '</ol>';
     $variables = $survey->getVariableDescriptives($seid);
     foreach ($variables as $variable) {
         if (!inArray($variable->getAnswerType(), array(ANSWER_TYPE_NONE, ANSWER_TYPE_SECTION))) {
             $returnStr .= '<a href="index.php?r=' . setSessionsParamString(array('page' => 'researcher.reports.paradata.variable', 'seid' => $seid, 'vsid' => $variable->getVsid())) . '" class="list-group-item">' . $variable->getName() . ' ' . $variable->getDescription() . '</a>';
         }
     }
     $returnStr .= '</p></div>    </div>';
     //container and wrap
     $returnStr .= $this->showBottomBar();
     $returnStr .= $this->showFooter(false);
     return $returnStr;
 }
开发者ID:nubissurveying,项目名称:nubis,代码行数:31,代码来源:displayresearcher.php

示例6: copy

 function copy($newsuid = "", $suffix = 2, $types = true)
 {
     /* copy section */
     global $db;
     $query = "select max(seid) as max from " . Config::dbSurvey() . "_sections";
     $r = $db->selectQuery($query);
     $row = $db->getRow($r);
     $seid = $row["max"] + 1;
     $oldseid = $this->getSeid();
     $oldsuid = $this->getSuid();
     $this->setObjectName($seid);
     $this->setSeid($seid);
     if ($suffix == 2) {
         $this->setName($this->getName() . "_cl");
     }
     if ($newsuid != "") {
         $this->setSuid($newsuid);
     }
     /* set position */
     $query = "select max(position) as max from " . Config::dbSurvey() . "_sections where suid=" . $this->getSuid();
     $r = $db->selectQuery($query);
     $row = $db->getRow($r);
     $pos = $row["max"] + 1;
     $this->setPosition($pos);
     $this->save();
     /* copy variables */
     $survey = new Survey($_SESSION['SUID']);
     $vars = $survey->getVariableDescriptives($oldseid);
     foreach ($vars as $var) {
         if ($suffix == 2) {
             $var->copy($var->getName() . "_cl", $newsuid, $this->getSeid(), $types);
         } else {
             $var->copy($var->getName(), $newsuid, $this->getSeid(), $types);
         }
     }
     /* copy routing */
     $query = "insert into " . Config::dbSurvey() . "_routing (suid, seid, rgid, rule, ts) select " . $this->getSuid() . "," . $this->getSeid() . ", rgid, rule, ts from  " . Config::dbSurvey() . "_routing where suid=" . $oldsuid . " and seid=" . $oldseid;
     $db->executeQuery($query);
 }
开发者ID:nubissurveying,项目名称:nubis,代码行数:39,代码来源:section.php


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