mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-23 19:37:23 +08:00
show-exam
This commit is contained in:
@@ -17,6 +17,7 @@ if (!file_exists($rootpath . '.env')) {
|
||||
require $rootpath . 'vendor/autoload.php';
|
||||
require $rootpath . 'nexus/Database/helpers.php';
|
||||
require $rootpath . 'classes/class_cache_redis.php';
|
||||
require $rootpath . 'include/eloquent.php';
|
||||
require $rootpath . 'include/config.php';
|
||||
|
||||
ini_set('date.timezone', nexus_config('nexus.timezone'));
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
use \Illuminate\Database\Capsule\Manager as Capsule;
|
||||
|
||||
$config = require ROOT_PATH . 'config/nexus.php';
|
||||
$connectionMysql = $config['mysql'];
|
||||
$connectionMysql['driver'] = 'mysql';
|
||||
$connectionMysql['charset'] = 'utf8mb4';
|
||||
$connectionMysql['collation'] = 'utf8mb4_unicode_ci';
|
||||
$capsule = new Capsule;
|
||||
$capsule->addConnection($connectionMysql, 'default');
|
||||
$capsule->setAsGlobal();
|
||||
$capsule->bootEloquent();
|
||||
|
||||
|
||||
@@ -2598,12 +2598,11 @@ if ($msgalert)
|
||||
}
|
||||
|
||||
//show the exam info
|
||||
$examRepository = new \App\Repositories\ExamRepository();
|
||||
$matchExams = $examRepository->listMatchExam($CURUSER['id']);
|
||||
// if ($matchExams->isNotEmpty()) {
|
||||
// dd($matchExams);
|
||||
// }
|
||||
|
||||
$exam = new \Nexus\Exam\Exam();
|
||||
$examHtml = $exam->render($CURUSER['id']);
|
||||
if (!empty($examHtml)) {
|
||||
msgalert("messages.php", $examHtml, "green");
|
||||
}
|
||||
}
|
||||
if ($offlinemsg)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user