本文整理匯總了PHP中Utilities::get_all_directories方法的典型用法代碼示例。如果您正苦於以下問題:PHP Utilities::get_all_directories方法的具體用法?PHP Utilities::get_all_directories怎麽用?PHP Utilities::get_all_directories使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Utilities
的用法示例。
在下文中一共展示了Utilities::get_all_directories方法的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");
}
示例2: get
public function get($qid, $class, $assn)
{
Permissions::TA_GATE($qid, $class, USERNAME);
$assn_dir = Utilities::get_assn_base($qid, $class, $assn);
$students = Utilities::get_all_directories($assn_dir);
$this->smarty->assign("class", $class);
$this->smarty->assign("assn", $assn);
$this->smarty->assign("students", $students);
$this->smarty->display("assignment.html");
}
示例3: 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");
}