public function actionCheckall($course = null) { $solutions = Solutions::model()->with("Task")->FindAllByAttributes(array("status" => "check")); $this->render('check', array('solutions' => $solutions)); }
<span class=" btn btn-primary pull-right">Всего проверено: <?php echo Solutions::model()->countByAttributes(array("status" => "complete")); ?> </span> <h2>Все <?php echo count($solutions); ?> заданий на проверку</h2> <br> <table class="table"> <?php foreach ($solutions as $solution) { ?> <?php if (!isset($solution->Task)) { continue; } ?> <tr> <td> <?php if (isset($solution->Task->title)) { ?> <?php
static function checkTotal() { return Solutions::model()->CountByAttributes(array("status" => "check")); }
?> </li> <?php if (Yii::app()->my->access("check")) { ?> <li> <b>Выполнено заданий: <span class="badge badge-success"><?php echo Solutions::model()->countByAttributes(array("status" => "complete", "student" => $student->id)); ?> </span></b> <b>Проверено заданий: <span class="badge badge-info"><?php echo Solutions::model()->countByAttributes(array("status" => "complete", "checked" => $student->id)); ?> </span></b> <b>Комментариев: <span class="badge badge-primary"><?php echo Comments::model()->countByAttributes(array("student" => $student->id)); ?> </span></b> </li> <?php } ?>
public function getHasPortfolio() { $solutions_count = Solutions::model()->countByAttributes(array("student" => $this->id, "publish" => true)); $buckets_count = Buckets::model()->countByAttributes(array("student" => $this->id, "portfolio" => true)); return $solutions_count + $buckets_count; }
</a> </li> --> <!-- <li> <a href="ui-panels.html"> <i class="entypo-newspaper"></i> <span>Инструменты</span> </a> </li> <li> <a href="mailbox.html"> <i class="entypo-mail"></i> <span>Оповещения</span> <span class="badge badge-secondary"> <?php echo Solutions::model()->countByAttributes(array("student" => Yii::app()->my->id, "status" => "finishhim")); ?> </span> </a> </li> --> <li> <a href="/groups"> <i class="entypo-users"></i> <span>Группы</span> </a> </li> <li>