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


PHP Utilities::get_class_base方法代码示例

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


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

示例1: get

 public function get($qid, $class, $student)
 {
     if ($student != USERNAME) {
         Permissions::TA_GATE($qid, $class, USERNAME);
     }
     $config = Utilities::get_configuration($qid, $class);
     $class_dir = Utilities::get_class_base($qid, $class);
     $assns = Utilities::get_all_directories($class_dir . "/" . $config->submissions_dir);
     $student_submissions = array();
     foreach ($assns as $assn) {
         $a_dir = $class_dir . "/" . $config->submissions_dir . "/" . $assn;
         $all_subs = Utilities::get_all_directories($a_dir);
         foreach ($all_subs as $sub) {
             $sunetid = Utilities::get_sunetid($sub);
             if ($sunetid == $student) {
                 $test = $a_dir . "/" . $sub;
                 if (is_dir($test)) {
                     $student_submissions[] = array("assn" => $assn, "dir" => $sub);
                 }
             }
         }
     }
     //print_r($student_submissions);
     $this->smarty->assign("student", $student);
     $this->smarty->assign("submissions", $student_submissions);
     $this->smarty->display("student.html");
 }
开发者ID:jadawebster,项目名称:paperless2,代码行数:27,代码来源:student.php

示例2: get

 public function get($qid, $class)
 {
     Permissions::TA_GATE($qid, $class, USERNAME);
     $config = Utilities::get_configuration($qid, $class);
     $class_dir = Utilities::get_class_base($qid, $class);
     $assns = Utilities::get_all_directories($class_dir . "/" . $config->submissions_dir);
     $this->smarty->assign("class", $class);
     $this->smarty->assign("assns", $assns);
     $this->smarty->display("ta.html");
 }
开发者ID:jadawebster,项目名称:paperless2,代码行数:10,代码来源:ta.php

示例3: get_assn_base

 public static function get_assn_base($qid, $class, $assn)
 {
     $class_base = Utilities::get_class_base($qid, $class);
     $config = Utilities::get_configuration($qid, $class);
     return $class_base . "/" . $config->submissions_dir . "/" . $assn;
 }
开发者ID:jadawebster,项目名称:paperless2,代码行数:6,代码来源:utils.php


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