本文整理汇总了PHP中Course::getList方法的典型用法代码示例。如果您正苦于以下问题:PHP Course::getList方法的具体用法?PHP Course::getList怎么用?PHP Course::getList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Course
的用法示例。
在下文中一共展示了Course::getList方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: json_encode
" method="post" ng-submit="add($event)">
<div class="panel col-md-6" style="margin-top: 20px;">
<div class="panel-heading">
<div class="panel-title">Create Course</div>
</div>
<div class="panel-body">
<div class="control-group">
<label for="name">Name of course</label>
<input ng-model="name" class="form-control" type="text" required="required" name="name" id="name" placeholder="Name of Course" />
</div>
<div class="control-group">
<button type="submit" class="btn btn-primary" style="margin-top: 20px;">Create</button>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
<div class = "course-data hidden">
<?php
$obj = new Course();
echo json_encode($obj->getList(array('id', 'course_name')));
?>
</div>
<script>
$(document).ready(function(){
$("[data-toggle='tooltip'").tooltip();
});
</script>
示例2: getListAdmin
function getListAdmin(Course $obj)
{
return $obj->getList(array('id', 'course_name'));
}
示例3: showCourse
function showCourse()
{
global $connector;
$page = "course.php";
$course = new Course();
$course->setConnector($connector);
if ($_POST['operation']) {
list($operation, $params) = explode("#", $_POST['operation']);
switch ($operation) {
case 'saveChanges':
$course->storeFormValues($_POST);
$error_msg = $course->insert();
if ($error_msg) {
$result['edit'] = $course;
}
break;
case 'delete':
$error_msg = $course->delete($params);
break;
case 'edit':
$result['edit'] = $course->getById($params);
break;
case 'editChanges':
$course->storeFormValues($_POST);
$error_msg = $course->update();
break;
default:
$error_msg = "Operazione non valida";
}
if ($error_msg != "") {
$result["errorMessage"] = $error_msg;
} elseif ($operation != 'edit') {
$result["statusMessage"] = "Operazione completata!";
}
}
if (isset($_POST['search'])) {
$result["courses"] = $course->search($_POST['search']);
} else {
$result["courses"] = $course->getList();
}
$page = "course.php";
include_once BASE_PATH . "template.php";
}
示例4: QuestionBank
<?php
$obj = new QuestionBank();
$course = new Course();
$course_list = $course->getList(array('id', 'course_name'));
?>
<div class="container" ng-element-ready = "createTable()">
<div class="row">
<a href="manage-question" ng-hide="create" ng-click="create = true" class="btn btn-primary btn-lg fx-fade-up fx-dur-0">Create Question Bank</a>
<a href="manage-question" ng-show="create" ng-click="create = false" class="btn btn-primary btn-lg fx-fade-up fx-dur-0">Back</a>
</div>
<div class="row">
<div ng-hide="create">
<table class="table table-bordered table-bordered" id="qb_table">
<thead>
<tr>
<th>#</th><th>Name</th><th>Course</th><th></th>
</tr>
</thead>
<tbody>
<tr ng-repeat="qb in qbs">
<td>{{$index+1}}</td>
<td>{{qb.name}}</td>
<td>{{qb.course_name}}</td>
<td>
<a href="add-question/{{qb.id}}" class="btn btn-primary" data-toggle="tooltip" title="Add questions"><span class="fa fa-plus"></span></a>
<a href="#" class="btn btn-info" data-toggle="tooltip" title="Edit exam info"><span class="fa fa-edit"></span></a>
<a href="manage-question" class="btn btn-danger delete" data-toggle="tooltip" title="Delete Question Bank" ng-click="delete($event, qb.id)"><span class="fa fa-times"></span></a>
</td>
</tr>
</tbody>