Learning Nodejs & Unity
This commit is contained in:
parent
263b065ff6
commit
49b90ba9b1
|
|
@ -18,7 +18,7 @@ class FileResultController extends Controller
|
|||
$topic = \App\Topic::find($id);
|
||||
$files = \App\TopicFiles::where('topic','=',$id)->get();
|
||||
|
||||
return view('student/fluttercourse/lfiles/create')
|
||||
return view('student/lfiles/create')
|
||||
->with(compact('files'))
|
||||
->with(compact('topic'));
|
||||
}
|
||||
|
|
@ -38,7 +38,7 @@ class FileResultController extends Controller
|
|||
|
||||
//jika data ada yang kosong
|
||||
if ($validator->fails()) {
|
||||
return Redirect::to('student/fluttercourse/lfiles/create/'.$request->get('topic'))
|
||||
return Redirect::to('student/lfiles/create/'.$request->get('topic'))
|
||||
->withErrors($validator);
|
||||
} else {
|
||||
$file = $request->file('rscfile');
|
||||
|
|
@ -46,14 +46,14 @@ class FileResultController extends Controller
|
|||
|
||||
$fileinfo = \App\TopicFiles::find($request->get('fileid'));
|
||||
if ($fileinfo['fileName']!=$filename) {
|
||||
return Redirect::to('student/fluttercourse/lfiles/create/'.$request->get('topic'))
|
||||
return Redirect::to('student/lfiles/create/'.$request->get('topic'))
|
||||
->withErrors("File name should be ".$fileinfo['fileName']);
|
||||
} else {
|
||||
$result = \App\FileResult::where('userid','=',Auth::user()->id)
|
||||
->where('fileid','=',$request->get('fileid'))
|
||||
->get();
|
||||
if (count($result)>0) {
|
||||
return Redirect::to('student/fluttercourse/lfiles/create/'.$request->get('topic'))
|
||||
return Redirect::to('student/lfiles/create/'.$request->get('topic'))
|
||||
->withErrors('File '.$fileinfo['fileName'].' was already submitted');
|
||||
} else {
|
||||
$rsc=$file->store('resource','public');
|
||||
|
|
@ -67,7 +67,7 @@ class FileResultController extends Controller
|
|||
Session::flash('message','A New File Result Stored');
|
||||
|
||||
//return "Add new topic is success";
|
||||
return Redirect::to('student/fluttercourse/?topicList='.$fileinfo['topic'])->with( [ 'topic' => $request->get('topic') ] );
|
||||
return Redirect::to('student/?topicList='.$fileinfo['topic'])->with( [ 'topic' => $request->get('topic') ] );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -86,7 +86,7 @@ class FileResultController extends Controller
|
|||
|
||||
$entity->delete();
|
||||
Session::flash('File Result with Id='.$id.' is deleted');
|
||||
return Redirect::to('student/fluttercourse/?topicList='.$request->get('topic'));
|
||||
return Redirect::to('student/?topicList='.$request->get('topic'));
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -103,7 +103,7 @@ class FileResultController extends Controller
|
|||
|
||||
$entity->delete();
|
||||
Session::flash('File Result with Id='.$id.' is deleted');
|
||||
return Redirect::to('student/fluttercourse/?topicList='.$topic.'&option=files');
|
||||
return Redirect::to('student/?topicList='.$topic.'&option=files');
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -120,7 +120,7 @@ class FileResultController extends Controller
|
|||
Session::flash('message','Topic '.$topic['name'].' Validation is Success');
|
||||
|
||||
//return "Add new topic is success";
|
||||
return Redirect::to('student/fluttercourse/?topicList='.$id);
|
||||
return Redirect::to('student/?topicList='.$id);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -15,8 +15,8 @@ class FlutterFileResultController extends Controller
|
|||
|
||||
public function create($id) {
|
||||
//
|
||||
$topic = \App\Topic::find($id);
|
||||
$files = \App\TopicFiles::where('topic','=',$id)->get();
|
||||
$topic = \App\FlutterTopic::find($id);
|
||||
$files = \App\FlutterTopicFiles::where('topic','=',$id)->get();
|
||||
|
||||
return view('student/fluttercourse/lfiles/create')
|
||||
->with(compact('files'))
|
||||
|
|
@ -44,7 +44,7 @@ class FlutterFileResultController extends Controller
|
|||
$file = $request->file('rscfile');
|
||||
$filename = $file->getClientOriginalName();
|
||||
|
||||
$fileinfo = \App\TopicFiles::find($request->get('fileid'));
|
||||
$fileinfo = \App\FlutterTopicFiles::find($request->get('fileid'));
|
||||
if ($fileinfo['fileName']!=$filename) {
|
||||
return Redirect::to('student/fluttercourse/lfiles/create/'.$request->get('topic'))
|
||||
->withErrors("File name should be ".$fileinfo['fileName']);
|
||||
|
|
|
|||
|
|
@ -15,8 +15,8 @@ class NodejsFileResultController extends Controller
|
|||
|
||||
public function create($id) {
|
||||
//
|
||||
$topic = \App\Topic::find($id);
|
||||
$files = \App\TopicFiles::where('topic','=',$id)->get();
|
||||
$topic = \App\NodejsTopic::find($id);
|
||||
$files = \App\NodejsTopicFiles::where('topic','=',$id)->get();
|
||||
|
||||
return view('student/nodejscourse/lfiles/create')
|
||||
->with(compact('files'))
|
||||
|
|
@ -44,7 +44,7 @@ class NodejsFileResultController extends Controller
|
|||
$file = $request->file('rscfile');
|
||||
$filename = $file->getClientOriginalName();
|
||||
|
||||
$fileinfo = \App\TopicFiles::find($request->get('fileid'));
|
||||
$fileinfo = \App\NodejsTopicFiles::find($request->get('fileid'));
|
||||
if ($fileinfo['fileName']!=$filename) {
|
||||
return Redirect::to('student/nodejscourse/lfiles/create/'.$request->get('topic'))
|
||||
->withErrors("File name should be ".$fileinfo['fileName']);
|
||||
|
|
|
|||
|
|
@ -1,17 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class StudentResultViewController extends Controller
|
||||
{
|
||||
//
|
||||
public function index()
|
||||
{
|
||||
//
|
||||
$entities=\App\Topic::all();
|
||||
$data=['entities'=>$entities];
|
||||
return view('admin/topics/index')->with($data);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,139 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
|
||||
use Redirect;
|
||||
use Session;
|
||||
|
||||
class StudentValidController extends Controller
|
||||
{
|
||||
private function getListStudent($teacher) {
|
||||
/*
|
||||
return \App\StudentTeacher::where('teacher','=',$teacher)
|
||||
->select('users.id','users.name','users.email')
|
||||
->join('users','users.id','=','student_teachers.student')
|
||||
->orderBy('users.name','asc')
|
||||
->get();
|
||||
*/
|
||||
private function getListStudent($teacher) {
|
||||
return \App\User::where('uplink','=',$teacher)
|
||||
->orderBy('name','asc')
|
||||
->get();
|
||||
}
|
||||
}
|
||||
public function index(Request $request)
|
||||
{
|
||||
if (Auth::user()->roleid=='student') {
|
||||
$check=\App\User::find(Auth::user()->id);
|
||||
if ($check->status!='active') return view('student/home')->with(['status'=>$check->status]);
|
||||
$filter = Auth::user()->id;
|
||||
} else {
|
||||
$student = $this->getListStudent(Auth::user()->id);
|
||||
$filter = $request->input('stdList',($student->count()>0)?$student[0]['id']:'');
|
||||
}
|
||||
|
||||
$entities=\App\StudentSubmit::where('student_submits.userid','=',$filter)
|
||||
->select('topics.id', 'topics.name', 'task_results_group_student.passed',
|
||||
'task_results_group_student.failed', 'task_results_group_student.avg_duration',
|
||||
'task_results_group_student.tot_duration', 'student_submits.checkstat','student_submits.checkresult',
|
||||
'student_validations_pertopic.failed as vfailed', 'student_validations_pertopic.passed as vpassed')
|
||||
->leftJoin('task_results_group_student', function($join)
|
||||
{
|
||||
$join->on('task_results_group_student.userid','=','student_submits.userid');
|
||||
$join->on('task_results_group_student.topic','=','student_submits.topic');
|
||||
}
|
||||
)
|
||||
->leftJoin('student_validations_pertopic', function($join2)
|
||||
{
|
||||
$join2->on('student_validations_pertopic.userid','=','student_submits.userid');
|
||||
$join2->on('student_validations_pertopic.topic','=','student_submits.topic');
|
||||
}
|
||||
)
|
||||
->join('topics','topics.id','=','student_submits.topic')
|
||||
->orderBy('topics.name','asc')
|
||||
->get();
|
||||
|
||||
|
||||
|
||||
if (Auth::user()->roleid=='student') {
|
||||
$data=['entities'=>$entities];
|
||||
return view('student/valid/index')->with($data);
|
||||
} else {
|
||||
/*
|
||||
$student = \App\StudentTeacher::where('teacher','=',Auth::user()->id)
|
||||
->select('users.id','users.name','users.email')
|
||||
->join('users','users.id','=','student_teachers.student')
|
||||
->orderBy('users.name','asc')
|
||||
->get();
|
||||
*/
|
||||
$data=['entities'=>$entities, 'items'=>$student, 'filter'=>$filter];
|
||||
return view('teacher/studentres/index')->with($data);
|
||||
}
|
||||
}
|
||||
|
||||
private function getDataShow($student, $id) {
|
||||
$entities=\App\StudentValidation::where('student_validations.userid','=',$student)
|
||||
->select('tasks.taskno','tasks.desc', 'test_files.fileName', 'student_validations.status',
|
||||
'student_validations.report', 'student_validations.created_at', 'student_validations.duration')
|
||||
->join('test_files', function($join)
|
||||
{
|
||||
$join->on('student_validations.testid','=','test_files.id');
|
||||
}
|
||||
)
|
||||
->join('tasks', function($join)
|
||||
{
|
||||
$join->on('tasks.id','=','test_files.taskid');
|
||||
}
|
||||
)
|
||||
->where('tasks.topic','=',$id)
|
||||
->orderBy('tasks.taskno','asc')
|
||||
->orderBy('test_files.fileName','asc')
|
||||
->get();
|
||||
|
||||
$topic =\App\Topic::find($id);
|
||||
$user = \App\User::find($student);
|
||||
$data=['entities'=>$entities, 'topic'=>$topic, 'student'=>$user];
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
public function show($id)
|
||||
{
|
||||
//
|
||||
/*
|
||||
$entities=\App\StudentValidation::where('student_validations.userid','=',Auth::user()->id)
|
||||
->select('tasks.taskno','tasks.desc', 'test_files.fileName', 'student_validations.status',
|
||||
'student_validations.report', 'student_validations.created_at')
|
||||
->join('test_files', function($join)
|
||||
{
|
||||
$join->on('student_validations.testid','=','test_files.id');
|
||||
}
|
||||
)
|
||||
->join('tasks', function($join)
|
||||
{
|
||||
$join->on('tasks.id','=','test_files.taskid');
|
||||
}
|
||||
)
|
||||
->where('tasks.topic','=',$id)
|
||||
->orderBy('tasks.taskno','asc')
|
||||
->orderBy('test_files.fileName','asc')
|
||||
->get();
|
||||
|
||||
$topic =\App\Topic::find($id);
|
||||
*/
|
||||
$data=$this->getDataShow(Auth::user()->id,$id);
|
||||
|
||||
return view('student/valid/show')->with($data);
|
||||
}
|
||||
|
||||
public function showteacher($student,$id)
|
||||
{
|
||||
//
|
||||
$data=$this->getDataShow($student,$id);
|
||||
|
||||
return view('teacher/studentres/show')->with($data);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,187 +0,0 @@
|
|||
]<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
|
||||
use Redirect;
|
||||
use Session;
|
||||
|
||||
class StudentValidController extends Controller
|
||||
{
|
||||
private function getListStudent($teacher) {
|
||||
return \App\User::where('users.uplink','=',$teacher)
|
||||
->join('user_submits','user_submits.userid','=','users.id')
|
||||
->join('class_members','class_members.student','=','users.id')
|
||||
->join('classrooms','classrooms.id','=','class_members.classid')
|
||||
->join('users as x','x.id','=','users.uplink')
|
||||
->select('users.id','users.name','users.email','users.roleid','classrooms.name as classname','x.name as teacher')
|
||||
->orderBy('users.uplink','asc')
|
||||
->orderBy('class_members.classid','asc')
|
||||
->orderBy('users.name','asc')
|
||||
->get();
|
||||
/*
|
||||
return \App\StudentSubmit::where('users.uplink','=',$teacher)
|
||||
->join('users','student_submits.userid','=','users.id')
|
||||
->select('users.id','users.name','users.email','users.roleid')
|
||||
->orderBy('users.name','asc')
|
||||
->get();
|
||||
*/
|
||||
}
|
||||
|
||||
private function getListStudentAll() {
|
||||
/*
|
||||
return \App\StudentSubmit::where('student_submits.validstat','=','valid')
|
||||
->join('users','student_submits.userid','=','users.id')
|
||||
->select('users.id','users.name','users.email','users.roleid')
|
||||
->orderBy('users.name','asc')
|
||||
->get();
|
||||
*/
|
||||
return \App\User::where('users.status','=','active')
|
||||
|
||||
->join('user_submits','user_submits.userid','=','users.id')
|
||||
->join('class_members','class_members.student','=','users.id')
|
||||
->join('classrooms','classrooms.id','=','class_members.classid')
|
||||
->join('users as x','x.id','=','users.uplink')
|
||||
->select('users.id','users.name','users.email','users.roleid','classrooms.name as classname','x.name as teacher')
|
||||
->orderBy('users.uplink','asc')
|
||||
->orderBy('class_members.classid','asc')
|
||||
->orderBy('users.name','asc')
|
||||
->get();
|
||||
|
||||
}
|
||||
|
||||
public function index(Request $request)
|
||||
{
|
||||
/*
|
||||
if (Auth::user()->roleid=='student') {
|
||||
$check=\App\User::find(Auth::user()->id);
|
||||
if ($check->status!='active') return view('student/home')->with(['status'=>$check->status]);
|
||||
$filter = Auth::user()->id;
|
||||
} else {
|
||||
$student = $this->getListStudent(Auth::user()->id);
|
||||
$filter = $request->input('stdList',($student->count()>0)?$student[0]['id']:'');
|
||||
}
|
||||
*/
|
||||
|
||||
if (Auth::user()->roleid=='admin') {
|
||||
$student = $this->getListStudentAll();
|
||||
$filter = $request->input('stdList',($student->count()>0)?$student[0]['id']:'');
|
||||
} else if (Auth::user()->roleid=='teacher') {
|
||||
$student = $this->getListStudent(Auth::user()->id);
|
||||
$filter = $request->input('stdList',($student->count()>0)?$student[0]['id']:'');
|
||||
} else { //student
|
||||
$check=\App\User::find(Auth::user()->id);
|
||||
if ($check->status!='active') return view('student/home')->with(['status'=>$check->status]);
|
||||
$filter = Auth::user()->id;
|
||||
}
|
||||
|
||||
$entities=\App\StudentSubmit::where('student_submits.userid','=',$filter)
|
||||
->select('topics.id', 'topics.name', 'task_results_group_student.passed',
|
||||
'task_results_group_student.failed', 'task_results_group_student.avg_duration',
|
||||
'task_results_group_student.tot_duration', 'student_submits.checkstat','student_submits.checkresult',
|
||||
'student_validations_pertopic.failed as vfailed', 'student_validations_pertopic.passed as vpassed')
|
||||
->leftJoin('task_results_group_student', function($join)
|
||||
{
|
||||
$join->on('task_results_group_student.userid','=','student_submits.userid');
|
||||
$join->on('task_results_group_student.topic','=','student_submits.topic');
|
||||
}
|
||||
)
|
||||
->leftJoin('student_validations_pertopic', function($join2)
|
||||
{
|
||||
$join2->on('student_validations_pertopic.userid','=','student_submits.userid');
|
||||
$join2->on('student_validations_pertopic.topic','=','student_submits.topic');
|
||||
}
|
||||
)
|
||||
->join('topics','topics.id','=','student_submits.topic')
|
||||
->orderBy('topics.name','asc')
|
||||
->get();
|
||||
|
||||
|
||||
|
||||
if (Auth::user()->roleid=='admin') {
|
||||
$data=['entities'=>$entities, 'items'=>$student, 'filter'=>$filter];
|
||||
return view('admin/studentres/index')->with($data);
|
||||
} else if (Auth::user()->roleid=='teacher') {
|
||||
$data=['entities'=>$entities, 'items'=>$student, 'filter'=>$filter];
|
||||
return view('teacher/studentres/index')->with($data);
|
||||
} else { //as student
|
||||
$data=['entities'=>$entities];
|
||||
return view('student/valid/index')->with($data);
|
||||
}
|
||||
}
|
||||
|
||||
private function getDataShow($student, $id) {
|
||||
$entities=\App\StudentValidation::where('student_validations.userid','=',$student)
|
||||
->select('tasks.taskno','tasks.desc', 'test_files.fileName', 'student_validations.status',
|
||||
'student_validations.report', 'student_validations.created_at', 'student_validations.duration')
|
||||
->join('test_files', function($join)
|
||||
{
|
||||
$join->on('student_validations.testid','=','test_files.id');
|
||||
}
|
||||
)
|
||||
->join('tasks', function($join)
|
||||
{
|
||||
$join->on('tasks.id','=','test_files.taskid');
|
||||
}
|
||||
)
|
||||
->where('tasks.topic','=',$id)
|
||||
->orderBy('tasks.taskno','asc')
|
||||
->orderBy('test_files.fileName','asc')
|
||||
->get();
|
||||
|
||||
$topic =\App\Topic::find($id);
|
||||
$user = \App\User::find($student);
|
||||
$data=['entities'=>$entities, 'topic'=>$topic, 'student'=>$user];
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
public function show($id)
|
||||
{
|
||||
//
|
||||
/*
|
||||
$entities=\App\StudentValidation::where('student_validations.userid','=',Auth::user()->id)
|
||||
->select('tasks.taskno','tasks.desc', 'test_files.fileName', 'student_validations.status',
|
||||
'student_validations.report', 'student_validations.created_at')
|
||||
->join('test_files', function($join)
|
||||
{
|
||||
$join->on('student_validations.testid','=','test_files.id');
|
||||
}
|
||||
)
|
||||
->join('tasks', function($join)
|
||||
{
|
||||
$join->on('tasks.id','=','test_files.taskid');
|
||||
}
|
||||
)
|
||||
->where('tasks.topic','=',$id)
|
||||
->orderBy('tasks.taskno','asc')
|
||||
->orderBy('test_files.fileName','asc')
|
||||
->get();
|
||||
|
||||
$topic =\App\Topic::find($id);
|
||||
*/
|
||||
$data=$this->getDataShow(Auth::user()->id,$id);
|
||||
|
||||
return view('student/valid/show')->with($data);
|
||||
}
|
||||
|
||||
public function showteacher($student,$id)
|
||||
{
|
||||
//
|
||||
$data=$this->getDataShow($student,$id);
|
||||
|
||||
if (Auth::user()->roleid=='admin') {
|
||||
//$data=['entities'=>$entities, 'items'=>$student, 'filter'=>$filter];
|
||||
return view('admin/studentres/show')->with($data);
|
||||
} else if (Auth::user()->roleid=='teacher') {
|
||||
//$data=['entities'=>$entities, 'items'=>$student, 'filter'=>$filter];
|
||||
return view('teacher/studentres/show')->with($data);
|
||||
} else { //as student
|
||||
//$data=['entities'=>$entities];
|
||||
return view('student/valid/show')->with($data);
|
||||
}
|
||||
//return view('teacher/studentres/show')->with($data);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,222 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
|
||||
use Redirect;
|
||||
use Session;
|
||||
|
||||
class TaskResultController extends Controller
|
||||
{
|
||||
public function index(Request $request) {
|
||||
//$check=\App\StudentTeacher::where('student','=',Auth::user()->id);
|
||||
//if ($check->count()==0) return view('student/home')->with(['count'=>$check->count()]);
|
||||
$check=\App\User::find(Auth::user()->id);
|
||||
if ($check-> if ($check->status!='active') return view('student/home')->with(['status'=>$check->status]);
|
||||
) return view('student/home')->with(['status'=>$check->status]);
|
||||
|
||||
$filter = $request->input('topicList','1');
|
||||
if ($filter=='0') {
|
||||
$entities=\App\TaskResult::where('userid','=',Auth::user()->id);
|
||||
} else {
|
||||
$entities = \App\Task::where('tasks.topic','=',$filter)
|
||||
->select(
|
||||
'task_results.id',
|
||||
'task_results.taskid',
|
||||
'task_results.userid',
|
||||
'task_results.status',
|
||||
'task_results.duration',
|
||||
'task_results.comment',
|
||||
'task_results.imgFile',
|
||||
'tasks.taskno',
|
||||
'tasks.desc',
|
||||
'tasks.topic'
|
||||
)
|
||||
->leftJoin('task_results', function($join)
|
||||
{
|
||||
$join->on('tasks.id','=','task_results.taskid')
|
||||
->where('task_results.userid', '=', Auth::user()->id);
|
||||
}
|
||||
)
|
||||
->orderBy('tasks.taskno', 'asc')
|
||||
->get();
|
||||
}
|
||||
|
||||
$lfiles = \App\TopicFiles::where('topic_files.topic','=',$filter)
|
||||
->select(
|
||||
'file_results.id',
|
||||
'file_results.userid',
|
||||
'file_results.rscfile',
|
||||
'file_results.fileid',
|
||||
'topic_files.fileName',
|
||||
'topic_files.path',
|
||||
'topic_files.desc'
|
||||
)
|
||||
->leftJoin('file_results', function($join)
|
||||
{
|
||||
$join->on('topic_files.id','=','file_results.fileid')
|
||||
->where('file_results.userid', '=', Auth::user()->id);
|
||||
}
|
||||
)
|
||||
->orderBy('topic_files.fileName', 'asc')
|
||||
->get();
|
||||
|
||||
$items = \App\Topic::pluck('name', 'id');
|
||||
$valid = \App\StudentSubmit::where('userid','=',Auth::user()->id)
|
||||
->where('topic','=',$filter)
|
||||
->get()->count();
|
||||
|
||||
return view('student/results/index')
|
||||
->with(compact('entities'))
|
||||
->with(compact('lfiles'))
|
||||
->with(compact('items'))
|
||||
->with(compact('filter'))
|
||||
->with(compact('valid'));
|
||||
|
||||
}
|
||||
|
||||
public function getTaskData($topic) {
|
||||
$items = \App\Task::where('tasks.topic','=',$topic)
|
||||
->select(
|
||||
'tasks.id',
|
||||
'tasks.taskno',
|
||||
'tasks.desc',
|
||||
'topics.name'
|
||||
)
|
||||
->join(
|
||||
'topics',
|
||||
'topics.id','=','tasks.topic'
|
||||
)
|
||||
->orderBy('topics.name', 'asc')
|
||||
->orderBy('tasks.taskno', 'asc')
|
||||
->get();
|
||||
|
||||
return $items;
|
||||
}
|
||||
public function create($id)
|
||||
{
|
||||
$items = \App\Task::where('topic','=',$id)
|
||||
->orderBy('taskno', 'asc')
|
||||
->get();
|
||||
$topic = \App\Topic::find($id);
|
||||
return view('student/results/create')
|
||||
->with(compact('topic'))
|
||||
->with(compact('items'));
|
||||
}
|
||||
|
||||
public function store(Request $request)
|
||||
{
|
||||
//
|
||||
$rules =[
|
||||
'duration'=>'required',
|
||||
'image'=>'required'
|
||||
];
|
||||
|
||||
$msg=[
|
||||
'duration.required'=>'Duration time must not empty',
|
||||
'image.required'=>'Evidence image file must not empty'
|
||||
];
|
||||
|
||||
$validator=Validator::make($request->all(),$rules,$msg);
|
||||
|
||||
//jika data ada yang kosong
|
||||
if ($validator->fails()) {
|
||||
|
||||
//refresh halaman
|
||||
return Redirect::to('student/results/create')
|
||||
->withErrors($validator);
|
||||
|
||||
} else {
|
||||
$check = \App\TaskResult::where('userid','=',Auth::user()->id)
|
||||
->where('taskid','=',$request->get('taskid'))
|
||||
->get();
|
||||
|
||||
if (sizeof($check)>0) {
|
||||
$task = \App\Task::find($request->get('taskid'));
|
||||
$message = 'Result of Task '.$task['desc'].' is already submitted!!';
|
||||
//Session::flash('message',);
|
||||
return Redirect::to('student/results/create')->withErrors($message);
|
||||
|
||||
} else {
|
||||
$file = $request->file('image');
|
||||
$imgFile=$file->store('results','public');
|
||||
|
||||
$entity=new \App\TaskResult;
|
||||
|
||||
$entity->userid=Auth::user()->id;
|
||||
$entity->taskid=$request->get('taskid');
|
||||
$entity->status=$request->get('status');
|
||||
$entity->duration=$request->get('duration');
|
||||
$entity->comment=$request->get('comment');
|
||||
$entity->imgFile=$imgFile;
|
||||
$entity->save();
|
||||
|
||||
Session::flash('message','A New Task Result Stored');
|
||||
|
||||
//return "Add new topic is success";
|
||||
return Redirect::to('student/results?topicList='.$request->get('topic'))->with( [ 'topic' => $request->get('topic') ] );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function destroy(Request $request, $id)
|
||||
{
|
||||
//
|
||||
$entity = \App\TaskResult::find($id);
|
||||
$entity->delete();
|
||||
Session::flash('message','Task Result with Id='.$id.' is deleted');
|
||||
return Redirect::to('student/results?topicList='.$request->get('topic'));
|
||||
}
|
||||
|
||||
public function edit($id)
|
||||
{
|
||||
//
|
||||
$entity = \App\TaskResult::where('id','=',$id)->first();
|
||||
$task = \App\Task::where('id','=',$entity['taskid'])->first();
|
||||
return view('student/results/edit')->with(compact('entity'))
|
||||
->with(compact('task'));
|
||||
}
|
||||
|
||||
public function update(Request $request, $id) {
|
||||
//
|
||||
$rules =[
|
||||
'duration'=>'required',
|
||||
];
|
||||
|
||||
$msg=[
|
||||
'duration.required'=>'Duration time must not empty',
|
||||
];
|
||||
|
||||
|
||||
$validator=Validator::make($request->all(),$rules,$msg);
|
||||
|
||||
if ($validator->fails()) {
|
||||
return Redirect::to('student/results/'.$id.'/edit')
|
||||
->withErrors($validator);
|
||||
|
||||
}else{
|
||||
$file = $request->file('image');
|
||||
|
||||
$entity=\App\TaskResult::find($id);
|
||||
|
||||
$entity->taskid=$request->get('taskid');
|
||||
$entity->status=$request->get('status');
|
||||
$entity->duration=$request->get('duration');
|
||||
$entity->comment=$request->get('comment');
|
||||
|
||||
if ($file!='') {
|
||||
$imgFile=$file->store('results','public');
|
||||
$entity->imgFile=$imgFile;
|
||||
}
|
||||
$entity->save();
|
||||
|
||||
Session::flash('message','Task Result with Id='.$id.' is changed');
|
||||
|
||||
$task = \App\Task::find($request->get('taskid'));
|
||||
return Redirect::to('student/results?topicList='.$task['topic']);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,290 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
|
||||
use Redirect;
|
||||
use Session;
|
||||
|
||||
class TaskResultController extends Controller
|
||||
{
|
||||
public function index(Request $request) {
|
||||
//$check=\App\StudentTeacher::where('student','=',Auth::user()->id);
|
||||
//if ($check->count()==0) return view('student/home')->with(['count'=>$check->count()]);
|
||||
$check=\App\User::find(Auth::user()->id);
|
||||
if ($check->status!='active') return view('student/home')->with(['status'=>$check->status]);
|
||||
|
||||
$filter = $request->input('topicList','1');
|
||||
if ($filter=='0') {
|
||||
$entities=\App\TaskResult::where('userid','=',Auth::user()->id);
|
||||
} else {
|
||||
$entities = \App\Task::where('tasks.topic','=',$filter)
|
||||
->select(
|
||||
'task_results.id',
|
||||
'task_results.taskid',
|
||||
'task_results.userid',
|
||||
'task_results.status',
|
||||
'task_results.duration',
|
||||
'task_results.comment',
|
||||
'task_results.imgFile',
|
||||
'tasks.taskno',
|
||||
'tasks.desc',
|
||||
'tasks.topic'
|
||||
)
|
||||
->leftJoin('task_results', function($join)
|
||||
{
|
||||
$join->on('tasks.id','=','task_results.taskid')
|
||||
->where('task_results.userid', '=', Auth::user()->id);
|
||||
}
|
||||
)
|
||||
->orderBy('tasks.taskno', 'asc')
|
||||
->get();
|
||||
}
|
||||
|
||||
$lfiles = \App\TopicFiles::where('topic_files.topic','=',$filter)
|
||||
->select(
|
||||
'file_results.id',
|
||||
'file_results.userid',
|
||||
'file_results.rscfile',
|
||||
'file_results.fileid',
|
||||
'topic_files.fileName',
|
||||
'topic_files.path',
|
||||
'topic_files.desc'
|
||||
)
|
||||
->leftJoin('file_results', function($join)
|
||||
{
|
||||
$join->on('topic_files.id','=','file_results.fileid')
|
||||
->where('file_results.userid', '=', Auth::user()->id);
|
||||
}
|
||||
)
|
||||
->orderBy('topic_files.fileName', 'asc')
|
||||
->get();
|
||||
|
||||
$items = \App\Topic::where('status','>=','0')
|
||||
->where('androidclass','=','AndroidX')
|
||||
->orderBy('level','asc')
|
||||
->orderBy('name','asc')
|
||||
->pluck('name', 'id');
|
||||
|
||||
$valid = \App\StudentSubmit::where('userid','=',Auth::user()->id)
|
||||
->where('topic','=',$filter)
|
||||
->get()->count();
|
||||
|
||||
$option = $request->input('option','files');
|
||||
|
||||
|
||||
return view('student/results/index')
|
||||
->with(compact('entities'))
|
||||
->with(compact('lfiles'))
|
||||
->with(compact('items'))
|
||||
->with(compact('filter'))
|
||||
->with(compact('option'))
|
||||
->with(compact('valid'));
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
public function getTaskData($topic) {
|
||||
$items = \App\Task::where('tasks.topic','=',$topic)
|
||||
->select(
|
||||
'tasks.id',
|
||||
'tasks.taskno',
|
||||
'tasks.desc',
|
||||
'topics.name'
|
||||
)
|
||||
->join(
|
||||
'topics',
|
||||
'topics.id','=','tasks.topic'
|
||||
)
|
||||
->orderBy('topics.name', 'asc')
|
||||
->orderBy('tasks.taskno', 'asc')
|
||||
->get();
|
||||
|
||||
return $items;
|
||||
}
|
||||
public function create($id)
|
||||
{
|
||||
$items = \App\Task::where('topic','=',$id)
|
||||
->orderBy('taskno', 'asc')
|
||||
->get();
|
||||
$topic = \App\Topic::find($id);
|
||||
return view('student/results/create')
|
||||
->with(compact('topic'))
|
||||
->with(compact('items'));
|
||||
}
|
||||
|
||||
public function validateByFiles($userid, $topic) {
|
||||
//
|
||||
$entity=new \App\StudentSubmit;
|
||||
|
||||
$entity->userid=$userid;
|
||||
$entity->topic=$topic;
|
||||
$entity->validstat="valid";
|
||||
$entity->save();
|
||||
|
||||
$data = \App\Topic::find($topic);
|
||||
Session::flash('message','Topic '.$data['name'].' Validation is Success');
|
||||
|
||||
//return "Add new topic is success";
|
||||
return Redirect::to('student/results?topicList='.$topic);
|
||||
}
|
||||
|
||||
|
||||
public function store(Request $request)
|
||||
{
|
||||
if ($request->get('action')=='validate') {
|
||||
if (length($request->submitbutton)>5) { //validation
|
||||
if ($request->get('option')=='files') {
|
||||
validateByFiles(Auth::user()->id, $request->get('topic'));
|
||||
} else if ($request->get('option')=='zipfile') {
|
||||
validateByFiles(Auth::user()->id, $request->get('topic'));
|
||||
} else {
|
||||
return Redirect::to('student/results?topicList='.$request->get('topic').'&option='.$request->get('option').
|
||||
'&submit='.$request->submitbutton);
|
||||
}
|
||||
} else { //clicking radio button
|
||||
return Redirect::to('student/results?topicList='.$request->get('topic').'&option='.$request->get('option'));
|
||||
//'&submit='.$request->submitbutton);
|
||||
}
|
||||
|
||||
} else {//echo $request;
|
||||
saveTaskResult($request);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public function saveTaskResult(Request $request)
|
||||
{
|
||||
//
|
||||
$rules =[
|
||||
'duration'=>'required',
|
||||
'image'=>'required',
|
||||
'comment'=>'required'
|
||||
];
|
||||
|
||||
$msg=[
|
||||
'duration.required'=>'Duration time must not empty',
|
||||
'image.required'=>'Evidence image file must not empty',
|
||||
'comment.required'=>'Comment must not empty'
|
||||
];
|
||||
|
||||
$validator=Validator::make($request->all(),$rules,$msg);
|
||||
|
||||
//jika data ada yang kosong
|
||||
if ($validator->fails()) {
|
||||
|
||||
//refresh halaman
|
||||
return Redirect::to('student/results/create/'.$request->get('topic'))
|
||||
->withErrors($validator);
|
||||
|
||||
} else {
|
||||
$check = \App\TaskResult::where('userid','=',Auth::user()->id)
|
||||
->where('taskid','=',$request->get('taskid'))
|
||||
->get();
|
||||
|
||||
if (sizeof($check)>0) {
|
||||
$task = \App\Task::find($request->get('taskid'));
|
||||
$message = 'Result of Task '.$task['desc'].' is already submitted!!';
|
||||
//Session::flash('message',);
|
||||
return Redirect::to('student/results/create'.$request->get('topic'))->withErrors($message);
|
||||
|
||||
} else {
|
||||
$file = $request->file('image');
|
||||
$imgFile=$file->store('results','public');
|
||||
|
||||
$entity=new \App\TaskResult;
|
||||
|
||||
$comment = ($request->get('comment')==null)?'-':$request->get('comment');
|
||||
|
||||
$entity->userid=Auth::user()->id;
|
||||
$entity->taskid=$request->get('taskid');
|
||||
$entity->status=$request->get('status');
|
||||
$entity->duration=$request->get('duration');
|
||||
$entity->comment=$comment;
|
||||
$entity->imgFile=$imgFile;
|
||||
$entity->save();
|
||||
|
||||
Session::flash('message','A New Task Result Stored');
|
||||
|
||||
//return "Add new topic is success";
|
||||
return Redirect::to('student/results?topicList='.$request->get('topic'))->with( [ 'topic' => $request->get('topic') ] );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function destroy(Request $request, $id)
|
||||
{
|
||||
//
|
||||
$entity = \App\TaskResult::find($id);
|
||||
$entity->delete();
|
||||
Session::flash('message','Task Result with Id='.$id.' is deleted');
|
||||
return Redirect::to('student/results?topicList='.$request->get('topic'));
|
||||
}
|
||||
|
||||
public function edit($id)
|
||||
{
|
||||
//
|
||||
$entity = \App\TaskResult::where('id','=',$id)->first();
|
||||
$task = \App\Task::where('id','=',$entity['taskid'])->first();
|
||||
return view('student/results/edit')->with(compact('entity'))
|
||||
->with(compact('task'));
|
||||
}
|
||||
|
||||
public function valsub(Request $request)
|
||||
{
|
||||
$items = \App\Task::where('topic','=',$id)
|
||||
->orderBy('taskno', 'asc')
|
||||
->get();
|
||||
$topic = \App\Topic::find($id);
|
||||
return view('student/results/create')
|
||||
->with(compact('topic'))
|
||||
->with(compact('items'));
|
||||
}
|
||||
|
||||
|
||||
public function update(Request $request, $id) {
|
||||
//
|
||||
$rules =[
|
||||
'duration'=>'required',
|
||||
];
|
||||
|
||||
$msg=[
|
||||
'duration.required'=>'Duration time must not empty',
|
||||
];
|
||||
|
||||
|
||||
$validator=Validator::make($request->all(),$rules,$msg);
|
||||
|
||||
if ($validator->fails()) {
|
||||
return Redirect::to('student/results/'.$id.'/edit')
|
||||
->withErrors($validator);
|
||||
|
||||
}else{
|
||||
$file = $request->file('image');
|
||||
|
||||
$entity=\App\TaskResult::find($id);
|
||||
|
||||
$entity->taskid=$request->get('taskid');
|
||||
$entity->status=$request->get('status');
|
||||
$entity->duration=$request->get('duration');
|
||||
$entity->comment=$request->get('comment');
|
||||
|
||||
if ($file!='') {
|
||||
$imgFile=$file->store('results','public');
|
||||
$entity->imgFile=$imgFile;
|
||||
}
|
||||
$entity->save();
|
||||
|
||||
Session::flash('message','Task Result with Id='.$id.' is changed');
|
||||
|
||||
$task = \App\Task::find($request->get('taskid'));
|
||||
return Redirect::to('student/results?topicList='.$task['topic']);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
249
app/Http/Controllers/UnityController.php
Normal file
249
app/Http/Controllers/UnityController.php
Normal file
|
|
@ -0,0 +1,249 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
|
||||
use Redirect;
|
||||
use Session;
|
||||
|
||||
class UnityController extends Controller
|
||||
{
|
||||
//
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
*
|
||||
* @return Response
|
||||
*/
|
||||
public function index(Request $request) {
|
||||
if (Auth::user()->roleid=='student/unitycourse') {
|
||||
$check=\App\User::find(Auth::user()->id);
|
||||
if ($check->status!='active') return view('student/unitycourse/home')->with(['status'=>$check->status]);
|
||||
}
|
||||
$topiclist=\App\UnityTopic::where('status','=','1')
|
||||
->orderBy('name','asc')->get();
|
||||
|
||||
$items = \App\UnityTopic::where('status','=','1')
|
||||
->orderBy('status','desc')
|
||||
->orderBy('name','asc')
|
||||
->pluck('name', 'id');
|
||||
|
||||
$itemslearning = \App\UnityTopic::where('status','=','1')
|
||||
->orderBy('status','desc')
|
||||
->orderBy('name','asc')
|
||||
->where('level','=','1')
|
||||
->pluck('name', 'id');
|
||||
|
||||
$filter = $request->input('topicList',$topiclist[0]['id']);
|
||||
|
||||
if ($filter=='0') {
|
||||
$entities=\App\UnityTask::all();
|
||||
} else {
|
||||
|
||||
$entities = \App\UnityTask::where('topic','=',$filter)
|
||||
->select(
|
||||
'tasks.id',
|
||||
'tasks.taskno',
|
||||
'tasks.desc',
|
||||
'tasks.topic',
|
||||
'topics.name'
|
||||
)
|
||||
->join(
|
||||
'topics',
|
||||
'topics.id','=','tasks.topic'
|
||||
)
|
||||
->orderBy('tasks.taskno','asc')
|
||||
->get();
|
||||
}
|
||||
|
||||
if (Auth::user()->roleid=='admin') {
|
||||
return view('admin/tasks/index')
|
||||
->with(compact('entities'))
|
||||
->with(compact('items'))
|
||||
->with(compact('filter'));
|
||||
} else {
|
||||
$topic = \App\UnityTopic::where('topics.id','=',$filter)
|
||||
->select(
|
||||
'topics.id',
|
||||
'topics.name',
|
||||
'topics.desc',
|
||||
'learning_files.guide',
|
||||
'learning_files.testfile',
|
||||
'learning_files.supplement',
|
||||
'learning_files.other'
|
||||
)
|
||||
->leftJoin('learning_files', 'learning_files.topic', '=', 'topics.id')
|
||||
->first();
|
||||
return view('student/unitycourse/tasks/index')
|
||||
->with(compact('entities'))
|
||||
->with(compact('items'))
|
||||
->with(compact('itemslearning'))
|
||||
->with(compact('filter'))
|
||||
->with(compact('topic'));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public function getTopic($id){
|
||||
$items = \App\UnityTopic::find($id);
|
||||
|
||||
return $items['name'];
|
||||
}
|
||||
|
||||
|
||||
public function filterTask() {
|
||||
$filters = \App\UnityTopic::get();
|
||||
$filter = \App\UnityTopic::findOrFail(Input::get('filter_id'));
|
||||
|
||||
$data= \App\UnityTask::with('topic')->where('topic', '=' , $filter->id )->latest()->get();
|
||||
|
||||
return View::make('admin.tasks.index',compact('filters'))->withProfiles($data)->with('title', 'filter');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for creating a new resource.
|
||||
*
|
||||
* @return Response
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
//
|
||||
$items = \App\UnityTopic::pluck('name', 'id');
|
||||
//echo "kljasd;lkasdl";
|
||||
return view('admin/tasks/create')->with(compact('items'));
|
||||
}
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
*
|
||||
* @return Response
|
||||
*/
|
||||
public function store(Request $request)
|
||||
{
|
||||
//echo "YAAANNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN";
|
||||
//
|
||||
$rules =[
|
||||
'taskno'=>'required',
|
||||
'desc'=>'required'
|
||||
];
|
||||
|
||||
$msg=[
|
||||
'taskno.required'=>'Task number must not empty',
|
||||
'desc.required'=>'Description must not empty'
|
||||
];
|
||||
|
||||
$validator=Validator::make($request->all(),$rules,$msg);
|
||||
|
||||
//jika data ada yang kosong
|
||||
if ($validator->fails()) {
|
||||
|
||||
//refresh halaman
|
||||
return Redirect::to('admin/tasks/create')
|
||||
->withErrors($validator);
|
||||
|
||||
}else{
|
||||
|
||||
$entity=new \App\UnityTask;
|
||||
|
||||
$entity->desc=$request->get('desc');
|
||||
$entity->taskno=$request->get('taskno');
|
||||
$entity->topic=$request->get('topic');
|
||||
$entity->save();
|
||||
|
||||
Session::flash('message','A New Task Stored');
|
||||
|
||||
//return "Add new topic is success";
|
||||
return Redirect::to('admin/tasks');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the specified resource.
|
||||
*
|
||||
* @param int $id
|
||||
* @return Response
|
||||
*/
|
||||
public function show(Request $request, $id)
|
||||
{
|
||||
$entity = \App\UnityTask::find($id);
|
||||
$topic = \App\UnityTopic::find($entity->topic);
|
||||
$x=['data'=>$entity, 'topic'=>$topic];
|
||||
|
||||
if ($request->is('admin/*')) {
|
||||
return view('admin/tasks/show')->with($x);
|
||||
} else {
|
||||
return view('student/unitycourse/tasks/show')->with($x);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for editing the specified resource.
|
||||
*
|
||||
* @param int $id
|
||||
* @return Response
|
||||
*/
|
||||
public function edit($id)
|
||||
{
|
||||
//
|
||||
$entity = \App\UnityTask::find($id);
|
||||
$x=['data'=>$entity];
|
||||
$items = \App\UnityTopic::pluck('name', 'id');
|
||||
return view('admin/tasks/edit')->with($x)->with(compact('items'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
*
|
||||
* @param int $id
|
||||
* @return Response
|
||||
*/
|
||||
public function update(Request $request, $id)
|
||||
{
|
||||
//
|
||||
$rules =[
|
||||
'taskno'=>'required',
|
||||
'desc'=>'required'
|
||||
];
|
||||
|
||||
$msg=[
|
||||
'taskno.required'=>'Task number must not empty',
|
||||
'desc.required'=>'Description must not empty'
|
||||
];
|
||||
|
||||
|
||||
$validator=Validator::make($request->all(),$rules,$msg);
|
||||
|
||||
if ($validator->fails()) {
|
||||
return Redirect::to('admin/topics/'.$id.'/edit')
|
||||
->withErrors($validator);
|
||||
|
||||
}else{
|
||||
$entity=\App\UnityTask::find($id);
|
||||
|
||||
$entity->desc=$request->get('desc');
|
||||
$entity->taskno=$request->get('taskno');
|
||||
$entity->topic=$request->get('topic');
|
||||
$entity->save();
|
||||
|
||||
Session::flash('message','Task with Id='.$id.' is changed');
|
||||
|
||||
return Redirect::to('admin/tasks');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
*
|
||||
* @param int $id
|
||||
* @return Response
|
||||
*/
|
||||
public function destroy($id)
|
||||
{
|
||||
//
|
||||
$entity = \App\UnityTask::find($id);
|
||||
$entity->delete();
|
||||
Session::flash('message','Task with Id='.$id.' is deleted');
|
||||
return Redirect::to('admin/tasks');
|
||||
}
|
||||
}
|
||||
131
app/Http/Controllers/UnityFileResultController.php
Normal file
131
app/Http/Controllers/UnityFileResultController.php
Normal file
|
|
@ -0,0 +1,131 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use Illuminate\Support\Facades\File;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
|
||||
use Redirect;
|
||||
use Session;
|
||||
|
||||
class UnityFileResultController extends Controller
|
||||
{
|
||||
|
||||
public function create($id) {
|
||||
//
|
||||
$topic = \App\UnityTopic::find($id);
|
||||
$files = \App\UnityTopicFiles::where('topic','=',$id)->get();
|
||||
|
||||
return view('student/unitycourse/lfiles/create')
|
||||
->with(compact('files'))
|
||||
->with(compact('topic'));
|
||||
}
|
||||
|
||||
public function store(Request $request)
|
||||
{
|
||||
//
|
||||
$rules =[
|
||||
'rscfile'=>'required'
|
||||
];
|
||||
|
||||
$msg=[
|
||||
'rscfile.required'=>'Resource File must not empty'
|
||||
];
|
||||
|
||||
$validator=Validator::make($request->all(),$rules,$msg);
|
||||
|
||||
//jika data ada yang kosong
|
||||
if ($validator->fails()) {
|
||||
return Redirect::to('student/unitycourse/lfiles/create/'.$request->get('topic'))
|
||||
->withErrors($validator);
|
||||
} else {
|
||||
$file = $request->file('rscfile');
|
||||
$filename = $file->getClientOriginalName();
|
||||
|
||||
$fileinfo = \App\UnityTopicFiles::find($request->get('fileid'));
|
||||
if ($fileinfo['fileName']!=$filename) {
|
||||
return Redirect::to('student/unitycourse/lfiles/create/'.$request->get('topic'))
|
||||
->withErrors("File name should be ".$fileinfo['fileName']);
|
||||
} else {
|
||||
$result = \App\FileResult::where('userid','=',Auth::user()->id)
|
||||
->where('fileid','=',$request->get('fileid'))
|
||||
->get();
|
||||
if (count($result)>0) {
|
||||
return Redirect::to('student/unitycourse/lfiles/create/'.$request->get('topic'))
|
||||
->withErrors('File '.$fileinfo['fileName'].' was already submitted');
|
||||
} else {
|
||||
$rsc=$file->store('resource','public');
|
||||
$entity=new \App\FileResult;
|
||||
|
||||
$entity->userid=Auth::user()->id;
|
||||
$entity->fileid=$request->get('fileid');
|
||||
$entity->rscfile=$rsc;
|
||||
$entity->save();
|
||||
|
||||
Session::flash('message','A New File Result Stored');
|
||||
|
||||
//return "Add new topic is success";
|
||||
return Redirect::to('student/unitycourse/results?topicList='.$fileinfo['topic'])->with( [ 'topic' => $request->get('topic') ] );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function destroy(Request $request,$id)
|
||||
{
|
||||
//
|
||||
$entity = \App\FileResult::find($id);
|
||||
|
||||
$path = storage_path('app\\public\\').$entity['rscfile'];
|
||||
//$path = str_replace('\\',DIRECTORY_SEPARATOR,$path);
|
||||
|
||||
//$dirpath = storage_path('app\public\\');
|
||||
File::delete(getPath($path));
|
||||
|
||||
$entity->delete();
|
||||
Session::flash('File Result with Id='.$id.' is deleted');
|
||||
return Redirect::to('student/unitycourse/results?topicList='.$request->get('topic'));
|
||||
}
|
||||
|
||||
|
||||
public function delete($id,$topic)
|
||||
{
|
||||
//
|
||||
$entity = \App\FileResult::find($id);
|
||||
|
||||
$path = storage_path('app\\public\\').$entity['rscfile'];
|
||||
//$path = str_replace('\\',DIRECTORY_SEPARATOR,$path);
|
||||
|
||||
//$dirpath = storage_path('app\public\\');
|
||||
File::delete($path);
|
||||
|
||||
$entity->delete();
|
||||
Session::flash('File Result with Id='.$id.' is deleted');
|
||||
return Redirect::to('student/unitycourse/results?topicList='.$topic.'&option=files');
|
||||
}
|
||||
|
||||
|
||||
public function submit($id) {
|
||||
//
|
||||
$entity=new \App\UnityStudentSubmit;
|
||||
|
||||
$entity->userid=Auth::user()->id;
|
||||
$entity->topic=$id;
|
||||
$entity->validstat="valid";
|
||||
$entity->save();
|
||||
|
||||
$topic = \App\UnityTopic::find($id);
|
||||
Session::flash('message','Topic '.$topic['name'].' Validation is Success');
|
||||
|
||||
//return "Add new topic is success";
|
||||
return Redirect::to('student/unitycourse/results?topicList='.$id);
|
||||
|
||||
}
|
||||
|
||||
public function getPath($path) {
|
||||
$res = str_replace('\\',DIRECTORY_SEPARATOR,$path);
|
||||
return str_replace('/',DIRECTORY_SEPARATOR,$res);
|
||||
}
|
||||
}
|
||||
|
|
@ -9,19 +9,19 @@ use Illuminate\Support\Facades\Auth;
|
|||
use Redirect;
|
||||
use Session;
|
||||
|
||||
class TaskResultController extends Controller
|
||||
class UnityResultController extends Controller
|
||||
{
|
||||
public function index(Request $request) {
|
||||
//$check=\App\StudentTeacher::where('student','=',Auth::user()->id);
|
||||
//if ($check->count()==0) return view('student/home')->with(['count'=>$check->count()]);
|
||||
$check=\App\User::find(Auth::user()->id);
|
||||
if ($check->status!='active') return view('student/home')->with(['status'=>$check->status]);
|
||||
if ($check->status!='active') return view('student/unitycourse/home')->with(['status'=>$check->status]);
|
||||
|
||||
$filter = $request->input('topicList','6');
|
||||
if ($filter=='0') {
|
||||
$entities=\App\TaskResult::where('userid','=',Auth::user()->id);
|
||||
$entities=\App\UnityTaskResult::where('userid','=',Auth::user()->id);
|
||||
} else {
|
||||
$entities = \App\Task::where('tasks.topic','=',$filter)
|
||||
$entities = \App\UnityTask::where('tasks.topic','=',$filter)
|
||||
->select(
|
||||
'task_results.id',
|
||||
'task_results.taskid',
|
||||
|
|
@ -44,7 +44,7 @@ if ($check->status!='active') return view('student/home')->with(['status'=>$chec
|
|||
->get();
|
||||
}
|
||||
|
||||
$lfiles = \App\TopicFiles::where('topic_files.topic','=',$filter)
|
||||
$lfiles = \App\UnityTopicFiles::where('topic_files.topic','=',$filter)
|
||||
->select(
|
||||
'file_results.id',
|
||||
'file_results.userid',
|
||||
|
|
@ -63,21 +63,22 @@ if ($check->status!='active') return view('student/home')->with(['status'=>$chec
|
|||
->orderBy('topic_files.fileName', 'asc')
|
||||
->get();
|
||||
|
||||
$items = \App\Topic::where('status','>=','0')
|
||||
$items = \App\UnityTopic::
|
||||
where('status','>=','0')
|
||||
->where('androidclass','=','AndroidX')
|
||||
->orderBy('level','asc')
|
||||
->orderBy('name','asc')
|
||||
->orderBy('level','asc')
|
||||
->pluck('name', 'id');
|
||||
|
||||
$valid = \App\StudentSubmit::where('userid','=',Auth::user()->id)
|
||||
$valid = \App\UnityStudentSubmit::where('userid','=',Auth::user()->id)
|
||||
->where('topic','=',$filter)
|
||||
->get()->count();
|
||||
|
||||
$option = $request->input('option','github');
|
||||
|
||||
$currtopic = \App\Topic::find($filter);
|
||||
$currtopic = \App\UnityTopic::find($filter);
|
||||
|
||||
return view('student/results/index')
|
||||
return view('student/unitycourse/results/index')
|
||||
->with(compact('entities'))
|
||||
->with(compact('lfiles'))
|
||||
->with(compact('items'))
|
||||
|
|
@ -91,7 +92,7 @@ if ($check->status!='active') return view('student/home')->with(['status'=>$chec
|
|||
|
||||
|
||||
public function getTaskData($topic) {
|
||||
$items = \App\Task::where('tasks.topic','=',$topic)
|
||||
$items = \App\UnityTask::where('tasks.topic','=',$topic)
|
||||
->select(
|
||||
'tasks.id',
|
||||
'tasks.taskno',
|
||||
|
|
@ -105,50 +106,48 @@ if ($check->status!='active') return view('student/home')->with(['status'=>$chec
|
|||
->orderBy('topics.name', 'asc')
|
||||
->orderBy('tasks.taskno', 'asc')
|
||||
->get();
|
||||
$filename = $file->getClientOriginalName();
|
||||
|
||||
return $items;
|
||||
}
|
||||
public function create($id)
|
||||
{
|
||||
$items = \App\Task::where('topic','=',$id)
|
||||
$items = \App\UnityTask::where('topic','=',$id)
|
||||
->orderBy('taskno', 'asc')
|
||||
->get();
|
||||
$topic = \App\Topic::find($id);
|
||||
return view('student/results/create')
|
||||
$topic = \App\UnityTopic::find($id);
|
||||
return view('student/unitycourse/results/create')
|
||||
->with(compact('topic'))
|
||||
->with(compact('items'));
|
||||
}
|
||||
|
||||
private function validateByFiles($userid, $topic) {
|
||||
//
|
||||
$entity=new \App\StudentSubmit;
|
||||
$entity=new \App\UnityStudentSubmit;
|
||||
|
||||
$entity->userid=$userid;
|
||||
$entity->topic=$topic;
|
||||
$entity->validstat="valid";
|
||||
$entity->save();
|
||||
|
||||
$data = \App\Topic::find($topic);
|
||||
$data = \App\UnityTopic::find($topic);
|
||||
Session::flash('message','Topic '.$data['name'].' Validation is Success');
|
||||
|
||||
//return "Add new topic is success";
|
||||
return Redirect::to('student/results?topicList='.$topic.'&option=files');
|
||||
return Redirect::to('student/unitycourse/results?topicList='.$topic.'&option=files');
|
||||
}
|
||||
|
||||
private function validateZipFile($userid, $topic, $file, $path) {
|
||||
//
|
||||
|
||||
//$file = $request->file('zipfile');
|
||||
if ($file!='' ) {
|
||||
if ($path!='' ) {
|
||||
//$array = explode('.', $path);
|
||||
//$ext = strtolower(end($array));
|
||||
$ext = strtolower(pathinfo($path, PATHINFO_EXTENSION));
|
||||
// if ($ext=="zip") {
|
||||
if ($ext=="zip") {
|
||||
$zipFile=$file->store('results','public');
|
||||
|
||||
if ($zipFile!='') {
|
||||
$entity=new \App\StudentSubmit;
|
||||
$entity=new \App\UnityStudentSubmit;
|
||||
|
||||
$entity->userid=$userid;
|
||||
$entity->topic=$topic;
|
||||
|
|
@ -157,21 +156,21 @@ private function validateZipFile($userid, $topic, $file, $path) {
|
|||
|
||||
$entity->save();
|
||||
|
||||
$data = \App\Topic::find($topic);
|
||||
$data = \App\UnityTopic::find($topic);
|
||||
Session::flash('message','Topic '.$data['name'].' Validation by Uploading Zip Project is Success');
|
||||
} else {
|
||||
Session::flash('message','Storing file '.$request->file('zipfile').' was FAILED');
|
||||
}
|
||||
//} else {
|
||||
// Session::flash('message','File extension is not zip -> '.$path.' -- '.$ext);
|
||||
// }
|
||||
} else {
|
||||
Session::flash('message','File extension is not zip -> '.$path.' is wrong .'.$ext);
|
||||
}
|
||||
} else {
|
||||
Session::flash('message','Zip File is empty');
|
||||
}
|
||||
|
||||
|
||||
//return "Add new topic is success";
|
||||
return Redirect::to('student/results?topicList='.$topic.'&option=zipfile');
|
||||
return Redirect::to('student/unitycourse/results?topicList='.$topic.'&option=zipfile');
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -179,26 +178,7 @@ private function validateGithubLink($userid, $topic, $link, $projname) {
|
|||
//
|
||||
$trimmedlink = trim($link);
|
||||
if ($this->validateUrl($trimmedlink,$projname)) {
|
||||
/*
|
||||
$zipFile=$file->store('results','public');
|
||||
|
||||
if ($zipFile!='') {
|
||||
$entity=new \App\StudentSubmit;
|
||||
|
||||
$entity->userid=$userid;
|
||||
$entity->topic=$topic;
|
||||
$entity->validstat="valid";
|
||||
$entity->projectfile=$zipFile;
|
||||
|
||||
$entity->save();
|
||||
|
||||
$data = \App\Topic::find($topic);
|
||||
Session::flash('message','Topic '.$data['name'].' Validation is Success');
|
||||
} else {
|
||||
Session::flash('message','Storing file '.$request->file('zipfile').' was FAILED');
|
||||
}
|
||||
*/
|
||||
$entity=new \App\StudentSubmit;
|
||||
$entity=new \App\UnityStudentSubmit;
|
||||
|
||||
$entity->userid=$userid;
|
||||
$entity->topic=$topic;
|
||||
|
|
@ -207,7 +187,7 @@ private function validateGithubLink($userid, $topic, $link, $projname) {
|
|||
|
||||
$entity->save();
|
||||
|
||||
$data = \App\Topic::find($topic);
|
||||
$data = \App\UnityTopic::find($topic);
|
||||
Session::flash('message','Topic '.$data['name'].' Validation by submitting GitHub link is Success');
|
||||
|
||||
//Session::flash('message','URL valid '.$link);
|
||||
|
|
@ -218,7 +198,7 @@ private function validateGithubLink($userid, $topic, $link, $projname) {
|
|||
|
||||
|
||||
//return "Add new topic is success";
|
||||
return Redirect::to('student/results?topicList='.$topic.'&option=github');
|
||||
return Redirect::to('student/unitycourse/results?topicList='.$topic.'&option=github');
|
||||
}
|
||||
|
||||
private function validateUrl($url,$projname) {
|
||||
|
|
@ -228,8 +208,8 @@ private function validateUrl($url,$projname) {
|
|||
|
||||
if (filter_var($url, FILTER_VALIDATE_URL)) {
|
||||
$result = parse_url($url);
|
||||
if (($result['scheme']=='https') && ($this->endsWith($result['host'],'github.com'))
|
||||
&& (strpos($result['path'],$projname))) {
|
||||
if ( ($result['scheme']=='https') && ($this->endsWith($result['host'],'github.com'))
|
||||
&& (strpos($result['path'],$projname)) ) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
|
|
@ -243,36 +223,6 @@ private function endsWith($haystack, $needle) {
|
|||
return substr_compare($haystack, $needle, -strlen($needle)) === 0;
|
||||
}
|
||||
|
||||
/*
|
||||
public function store(Request $request)
|
||||
{
|
||||
if (strlen($request->get('option'))>3) {
|
||||
if (($request->get('action')=='validate') && (strlen($request->submitbutton)>5)) {
|
||||
if ($request->get('option')=='files') {
|
||||
validateByFiles(Auth::user()->id, $request->get('topic'));
|
||||
} else if ($request->get('option')=='zipfile') {
|
||||
validateZipFile(Auth::user()->id, $request->get('topic'), $request->file('zipfile'));
|
||||
} else {
|
||||
return Redirect::to('student/results?topicList='.$request->get('topic').'&option='.$request->get('option').
|
||||
'&submit='.$request->submitbutton);
|
||||
}
|
||||
} else { //clicking radio button
|
||||
return Redirect::to('student/results?topicList='.$request->get('topic').'&option='.$request->get('option'));
|
||||
//'&submit='.$request->submitbutton);
|
||||
|
||||
}
|
||||
|
||||
} else { //echo $request;
|
||||
saveTaskResult($request);
|
||||
|
||||
}
|
||||
|
||||
//echo $request;
|
||||
//return Redirect::to('student/results?topicList='.$request->get('topic').'&action='.$request->get('action'))
|
||||
// ->withErrors("Haloowwww".$request->get('action'));
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
private function saveTaskResult(Request $request)
|
||||
{
|
||||
|
|
@ -295,25 +245,25 @@ private function endsWith($haystack, $needle) {
|
|||
if ($validator->fails()) {
|
||||
|
||||
//refresh halaman
|
||||
return Redirect::to('student/results/create/'.$request->get('topic'))
|
||||
return Redirect::to('student/unitycourse/results/create/'.$request->get('topic'))
|
||||
->withErrors($validator);
|
||||
|
||||
} else {
|
||||
$check = \App\TaskResult::where('userid','=',Auth::user()->id)
|
||||
$check = \App\UnityTaskResult::where('userid','=',Auth::user()->id)
|
||||
->where('taskid','=',$request->get('taskid'))
|
||||
->get();
|
||||
|
||||
if (sizeof($check)>0) {
|
||||
$task = \App\Task::find($request->get('taskid'));
|
||||
$task = \App\UnityTask::find($request->get('taskid'));
|
||||
$message = 'Result of Task '.$task['desc'].' is already submitted!!';
|
||||
//Session::flash('message',);
|
||||
return Redirect::to('student/results/create'.$request->get('topic'))->withErrors($message);
|
||||
return Redirect::to('student/unitycourse/results/create'.$request->get('topic'))->withErrors($message);
|
||||
|
||||
} else {
|
||||
$file = $request->file('image');
|
||||
$imgFile=$file->store('results','public');
|
||||
|
||||
$entity=new \App\TaskResult;
|
||||
$entity=new \App\UnityTaskResult;
|
||||
|
||||
$comment = ($request->get('comment')==null)?'-':$request->get('comment');
|
||||
|
||||
|
|
@ -328,7 +278,7 @@ private function endsWith($haystack, $needle) {
|
|||
Session::flash('message','A New Task Result Stored');
|
||||
|
||||
//return "Add new topic is success";
|
||||
return Redirect::to('student/results?topicList='.$request->get('topic'))->with( [ 'topic' => $request->get('topic') ] );
|
||||
return Redirect::to('student/unitycourse/results?topicList='.$request->get('topic'))->with( [ 'topic' => $request->get('topic') ] );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -341,16 +291,18 @@ private function endsWith($haystack, $needle) {
|
|||
if ($request->get('option')=='files') {
|
||||
return $this->validateByFiles(Auth::user()->id, $request->get('topic'));
|
||||
} else if ($request->get('option')=='zipfile') {
|
||||
return $this->validateZipFile(Auth::user()->id, $request->get('topic'), $request->file('zipfile'), $request->get('zipfile'));
|
||||
$file = $request->file('zipfile');
|
||||
$filename = $file->getClientOriginalName();
|
||||
return $this->validateZipFile(Auth::user()->id, $request->get('topic'), $file, $filename);
|
||||
} else if ($request->get('option')=='github') {
|
||||
return $this->validateGithubLink(Auth::user()->id, $request->get('topic'), $request->get('githublink'),
|
||||
$request->get('projname'));
|
||||
} else {
|
||||
return Redirect::to('student/results?topicList='.$request->get('topic').'&option='.$request->get('option').
|
||||
return Redirect::to('student/unitycourse/results?topicList='.$request->get('topic').'&option='.$request->get('option').
|
||||
'&submit='.$request->submitbutton);
|
||||
}
|
||||
} else { //clicking radio button
|
||||
return Redirect::to('student/results?topicList='.$request->get('topic').'&option='.$request->get('option'));
|
||||
return Redirect::to('student/unitycourse/results?topicList='.$request->get('topic').'&option='.$request->get('option'));
|
||||
//'&submit='.$request->submitbutton);
|
||||
}
|
||||
|
||||
|
|
@ -363,28 +315,28 @@ private function endsWith($haystack, $needle) {
|
|||
public function destroy(Request $request, $id)
|
||||
{
|
||||
//
|
||||
$entity = \App\TaskResult::find($id);
|
||||
$entity = \App\UnityTaskResult::find($id);
|
||||
$entity->delete();
|
||||
Session::flash('message','Task Result with Id='.$id.' is deleted');
|
||||
return Redirect::to('student/results?topicList='.$request->get('topic'));
|
||||
return Redirect::to('student/unitycourse/results?topicList='.$request->get('topic'));
|
||||
}
|
||||
|
||||
public function edit($id)
|
||||
{
|
||||
//
|
||||
$entity = \App\TaskResult::where('id','=',$id)->first();
|
||||
$task = \App\Task::where('id','=',$entity['taskid'])->first();
|
||||
return view('student/results/edit')->with(compact('entity'))
|
||||
$entity = \App\UnityTaskResult::where('id','=',$id)->first();
|
||||
$task = \App\UnityTask::where('id','=',$entity['taskid'])->first();
|
||||
return view('student/unitycourse/results/edit')->with(compact('entity'))
|
||||
->with(compact('task'));
|
||||
}
|
||||
|
||||
public function valsub(Request $request)
|
||||
{
|
||||
$items = \App\Task::where('topic','=',$id)
|
||||
$items = \App\UnityTask::where('topic','=',$id)
|
||||
->orderBy('taskno', 'asc')
|
||||
->get();
|
||||
$topic = \App\Topic::find($id);
|
||||
return view('student/results/create')
|
||||
$topic = \App\UnityTopic::find($id);
|
||||
return view('student/unitycourse/results/create')
|
||||
->with(compact('topic'))
|
||||
->with(compact('items'));
|
||||
}
|
||||
|
|
@ -404,13 +356,13 @@ private function endsWith($haystack, $needle) {
|
|||
$validator=Validator::make($request->all(),$rules,$msg);
|
||||
|
||||
if ($validator->fails()) {
|
||||
return Redirect::to('student/results/'.$id.'/edit')
|
||||
return Redirect::to('student/unitycourse/results/'.$id.'/edit')
|
||||
->withErrors($validator);
|
||||
|
||||
}else{
|
||||
$file = $request->file('image');
|
||||
|
||||
$entity=\App\TaskResult::find($id);
|
||||
$entity=\App\UnityTaskResult::find($id);
|
||||
|
||||
$entity->taskid=$request->get('taskid');
|
||||
$entity->status=$request->get('status');
|
||||
|
|
@ -425,8 +377,8 @@ private function endsWith($haystack, $needle) {
|
|||
|
||||
Session::flash('message','Task Result with Id='.$id.' is changed');
|
||||
|
||||
$task = \App\Task::find($request->get('taskid'));
|
||||
return Redirect::to('student/results?topicList='.$task['topic']);
|
||||
$task = \App\UnityTask::find($request->get('taskid'));
|
||||
return Redirect::to('student/unitycourse/results?topicList='.$task['topic']);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -9,19 +9,17 @@ use Illuminate\Support\Facades\Auth;
|
|||
use Redirect;
|
||||
use Session;
|
||||
|
||||
class TaskResultController extends Controller
|
||||
class UnityTaskResultController extends Controller
|
||||
{
|
||||
public function index(Request $request) {
|
||||
//$check=\App\StudentTeacher::where('student','=',Auth::user()->id);
|
||||
//if ($check->count()==0) return view('student/home')->with(['count'=>$check->count()]);
|
||||
$check=\App\User::find(Auth::user()->id);
|
||||
if ($check->status!='active') return view('student/home')->with(['status'=>$check->status]);
|
||||
$check=\App\UnityUser::find(Auth::user()->id);
|
||||
if ($check->status!='active') return view('student/unitycourse/home')->with(['status'=>$check->status]);
|
||||
|
||||
$filter = $request->input('topicList','6');
|
||||
if ($filter=='0') {
|
||||
$entities=\App\TaskResult::where('userid','=',Auth::user()->id);
|
||||
$entities=\App\UnityTaskResult::where('userid','=',Auth::user()->id);
|
||||
} else {
|
||||
$entities = \App\Task::where('tasks.topic','=',$filter)
|
||||
$entities = \App\UnityTask::where('tasks.topic','=',$filter)
|
||||
->select(
|
||||
'task_results.id',
|
||||
'task_results.taskid',
|
||||
|
|
@ -44,7 +42,7 @@ if ($check->status!='active') return view('student/home')->with(['status'=>$chec
|
|||
->get();
|
||||
}
|
||||
|
||||
$lfiles = \App\TopicFiles::where('topic_files.topic','=',$filter)
|
||||
$lfiles = \App\UnityTopicFiles::where('topic_files.topic','=',$filter)
|
||||
->select(
|
||||
'file_results.id',
|
||||
'file_results.userid',
|
||||
|
|
@ -63,21 +61,22 @@ if ($check->status!='active') return view('student/home')->with(['status'=>$chec
|
|||
->orderBy('topic_files.fileName', 'asc')
|
||||
->get();
|
||||
|
||||
$items = \App\Topic::where('status','>=','0')
|
||||
$items = \App\UnityTopic::
|
||||
where('status','>=','0')
|
||||
->where('androidclass','=','AndroidX')
|
||||
->orderBy('level','asc')
|
||||
->orderBy('name','asc')
|
||||
->orderBy('level','asc')
|
||||
->pluck('name', 'id');
|
||||
|
||||
$valid = \App\StudentSubmit::where('userid','=',Auth::user()->id)
|
||||
$valid = \App\UnityStudentSubmit::where('userid','=',Auth::user()->id)
|
||||
->where('topic','=',$filter)
|
||||
->get()->count();
|
||||
|
||||
$option = $request->input('option','github');
|
||||
|
||||
$currtopic = \App\Topic::find($filter);
|
||||
$currtopic = \App\UnityTopic::find($filter);
|
||||
|
||||
return view('student/results/index')
|
||||
return view('student/unitycourse/results/index')
|
||||
->with(compact('entities'))
|
||||
->with(compact('lfiles'))
|
||||
->with(compact('items'))
|
||||
|
|
@ -91,7 +90,7 @@ if ($check->status!='active') return view('student/home')->with(['status'=>$chec
|
|||
|
||||
|
||||
public function getTaskData($topic) {
|
||||
$items = \App\Task::where('tasks.topic','=',$topic)
|
||||
$items = \App\UnityTask::where('tasks.topic','=',$topic)
|
||||
->select(
|
||||
'tasks.id',
|
||||
'tasks.taskno',
|
||||
|
|
@ -110,45 +109,39 @@ if ($check->status!='active') return view('student/home')->with(['status'=>$chec
|
|||
}
|
||||
public function create($id)
|
||||
{
|
||||
$items = \App\Task::where('topic','=',$id)
|
||||
$items = \App\UnityTask::where('topic','=',$id)
|
||||
->orderBy('taskno', 'asc')
|
||||
->get();
|
||||
$topic = \App\Topic::find($id);
|
||||
return view('student/results/create')
|
||||
$topic = \App\UnityTopic::find($id);
|
||||
return view('student/unitycourse/results/create')
|
||||
->with(compact('topic'))
|
||||
->with(compact('items'));
|
||||
}
|
||||
|
||||
private function validateByFiles($userid, $topic) {
|
||||
//
|
||||
$entity=new \App\StudentSubmit;
|
||||
$entity=new \App\UnityStudentSubmit;
|
||||
|
||||
$entity->userid=$userid;
|
||||
$entity->topic=$topic;
|
||||
$entity->validstat="valid";
|
||||
$entity->save();
|
||||
|
||||
$data = \App\Topic::find($topic);
|
||||
$data = \App\UnityTopic::find($topic);
|
||||
Session::flash('message','Topic '.$data['name'].' Validation is Success');
|
||||
|
||||
//return "Add new topic is success";
|
||||
return Redirect::to('student/results?topicList='.$topic.'&option=files');
|
||||
return Redirect::to('student/unitycourse/results?topicList='.$topic.'&option=files');
|
||||
}
|
||||
|
||||
private function validateZipFile($userid, $topic, $file, $path) {
|
||||
//
|
||||
$filename = $file->getClientOriginalName();
|
||||
|
||||
//$file = $request->file('zipfile');
|
||||
if ($filename!='' ) {
|
||||
//$array = explode('.', $path);
|
||||
//$ext = strtolower(end($array));
|
||||
if ($path!='' ) {
|
||||
$ext = strtolower(pathinfo($path, PATHINFO_EXTENSION));
|
||||
// if ($ext=="zip") {
|
||||
if ($ext=="zip") {
|
||||
$zipFile=$file->store('results','public');
|
||||
|
||||
if ($zipFile!='') {
|
||||
$entity=new \App\StudentSubmit;
|
||||
$entity=new \App\UnityStudentSubmit;
|
||||
|
||||
$entity->userid=$userid;
|
||||
$entity->topic=$topic;
|
||||
|
|
@ -157,48 +150,29 @@ $filename = $file->getClientOriginalName();
|
|||
|
||||
$entity->save();
|
||||
|
||||
$data = \App\Topic::find($topic);
|
||||
$data = \App\UnityTopic::find($topic);
|
||||
Session::flash('message','Topic '.$data['name'].' Validation by Uploading Zip Project is Success');
|
||||
} else {
|
||||
Session::flash('message','Storing file '.$request->file('zipfile').' was FAILED');
|
||||
}
|
||||
//} else {
|
||||
// Session::flash('message','File extension is not zip -> '.$path.' -- '.$ext);
|
||||
// }
|
||||
} else {
|
||||
Session::flash('message','File extension is not zip -> '.$path.' is wrong .'.$ext);
|
||||
}
|
||||
} else {
|
||||
Session::flash('message','Zip File is empty');
|
||||
}
|
||||
|
||||
|
||||
//return "Add new topic is success";
|
||||
return Redirect::to('student/results?topicList='.$topic.'&option=zipfile');
|
||||
return Redirect::to('student/unitycourse/results?topicList='.$topic.'&option=zipfile');
|
||||
}
|
||||
|
||||
|
||||
private function validateGithubLink($userid, $topic, $link, $projname) {
|
||||
//
|
||||
$trimmedlink = trim($link);
|
||||
if ($this->validateUrl($trimmedlink,$projname)) {
|
||||
/*
|
||||
$zipFile=$file->store('results','public');
|
||||
|
||||
if ($zipFile!='') {
|
||||
$entity=new \App\StudentSubmit;
|
||||
|
||||
$entity->userid=$userid;
|
||||
$entity->topic=$topic;
|
||||
$entity->validstat="valid";
|
||||
$entity->projectfile=$zipFile;
|
||||
|
||||
$entity->save();
|
||||
|
||||
$data = \App\Topic::find($topic);
|
||||
Session::flash('message','Topic '.$data['name'].' Validation is Success');
|
||||
} else {
|
||||
Session::flash('message','Storing file '.$request->file('zipfile').' was FAILED');
|
||||
}
|
||||
*/
|
||||
$entity=new \App\StudentSubmit;
|
||||
$entity=new \App\UnityStudentSubmit;
|
||||
|
||||
$entity->userid=$userid;
|
||||
$entity->topic=$topic;
|
||||
|
|
@ -207,7 +181,7 @@ private function validateGithubLink($userid, $topic, $link, $projname) {
|
|||
|
||||
$entity->save();
|
||||
|
||||
$data = \App\Topic::find($topic);
|
||||
$data = \App\UnityTopic::find($topic);
|
||||
Session::flash('message','Topic '.$data['name'].' Validation by submitting GitHub link is Success');
|
||||
|
||||
//Session::flash('message','URL valid '.$link);
|
||||
|
|
@ -218,7 +192,7 @@ private function validateGithubLink($userid, $topic, $link, $projname) {
|
|||
|
||||
|
||||
//return "Add new topic is success";
|
||||
return Redirect::to('student/results?topicList='.$topic.'&option=github');
|
||||
return Redirect::to('student/unitycourse/results?topicList='.$topic.'&option=github');
|
||||
}
|
||||
|
||||
private function validateUrl($url,$projname) {
|
||||
|
|
@ -228,8 +202,8 @@ private function validateUrl($url,$projname) {
|
|||
|
||||
if (filter_var($url, FILTER_VALIDATE_URL)) {
|
||||
$result = parse_url($url);
|
||||
if (($result['scheme']=='https') && ($this->endsWith($result['host'],'github.com'))
|
||||
&& (strpos($result['path'],$projname))) {
|
||||
if ( ($result['scheme']=='https') && ($this->endsWith($result['host'],'github.com'))
|
||||
&& (strpos($result['path'],$projname)) ) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
|
|
@ -243,36 +217,6 @@ private function endsWith($haystack, $needle) {
|
|||
return substr_compare($haystack, $needle, -strlen($needle)) === 0;
|
||||
}
|
||||
|
||||
/*
|
||||
public function store(Request $request)
|
||||
{
|
||||
if (strlen($request->get('option'))>3) {
|
||||
if (($request->get('action')=='validate') && (strlen($request->submitbutton)>5)) {
|
||||
if ($request->get('option')=='files') {
|
||||
validateByFiles(Auth::user()->id, $request->get('topic'));
|
||||
} else if ($request->get('option')=='zipfile') {
|
||||
validateZipFile(Auth::user()->id, $request->get('topic'), $request->file('zipfile'));
|
||||
} else {
|
||||
return Redirect::to('student/results?topicList='.$request->get('topic').'&option='.$request->get('option').
|
||||
'&submit='.$request->submitbutton);
|
||||
}
|
||||
} else { //clicking radio button
|
||||
return Redirect::to('student/results?topicList='.$request->get('topic').'&option='.$request->get('option'));
|
||||
//'&submit='.$request->submitbutton);
|
||||
|
||||
}
|
||||
|
||||
} else { //echo $request;
|
||||
saveTaskResult($request);
|
||||
|
||||
}
|
||||
|
||||
//echo $request;
|
||||
//return Redirect::to('student/results?topicList='.$request->get('topic').'&action='.$request->get('action'))
|
||||
// ->withErrors("Haloowwww".$request->get('action'));
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
private function saveTaskResult(Request $request)
|
||||
{
|
||||
|
|
@ -295,25 +239,25 @@ private function endsWith($haystack, $needle) {
|
|||
if ($validator->fails()) {
|
||||
|
||||
//refresh halaman
|
||||
return Redirect::to('student/results/create/'.$request->get('topic'))
|
||||
return Redirect::to('student/unitycourse/results/create/'.$request->get('topic'))
|
||||
->withErrors($validator);
|
||||
|
||||
} else {
|
||||
$check = \App\TaskResult::where('userid','=',Auth::user()->id)
|
||||
$check = \App\UnityTaskResult::where('userid','=',Auth::user()->id)
|
||||
->where('taskid','=',$request->get('taskid'))
|
||||
->get();
|
||||
|
||||
if (sizeof($check)>0) {
|
||||
$task = \App\Task::find($request->get('taskid'));
|
||||
$task = \App\UnityTask::find($request->get('taskid'));
|
||||
$message = 'Result of Task '.$task['desc'].' is already submitted!!';
|
||||
//Session::flash('message',);
|
||||
return Redirect::to('student/results/create'.$request->get('topic'))->withErrors($message);
|
||||
return Redirect::to('student/unitycourse/results/create'.$request->get('topic'))->withErrors($message);
|
||||
|
||||
} else {
|
||||
$file = $request->file('image');
|
||||
$imgFile=$file->store('results','public');
|
||||
$imgFile=$file->store('result','public');
|
||||
|
||||
$entity=new \App\TaskResult;
|
||||
$entity=new \App\UnityTaskResult;
|
||||
|
||||
$comment = ($request->get('comment')==null)?'-':$request->get('comment');
|
||||
|
||||
|
|
@ -328,7 +272,7 @@ private function endsWith($haystack, $needle) {
|
|||
Session::flash('message','A New Task Result Stored');
|
||||
|
||||
//return "Add new topic is success";
|
||||
return Redirect::to('student/results?topicList='.$request->get('topic'))->with( [ 'topic' => $request->get('topic') ] );
|
||||
return Redirect::to('student/unitycourse/results?topicList='.$request->get('topic'))->with( [ 'topic' => $request->get('topic') ] );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -341,16 +285,18 @@ private function endsWith($haystack, $needle) {
|
|||
if ($request->get('option')=='files') {
|
||||
return $this->validateByFiles(Auth::user()->id, $request->get('topic'));
|
||||
} else if ($request->get('option')=='zipfile') {
|
||||
return $this->validateZipFile(Auth::user()->id, $request->get('topic'), $request->file('zipfile'), $request->get('zipfile'));
|
||||
$file = $request->file('zipfile');
|
||||
$filename = $file->getClientOriginalName();
|
||||
return $this->validateZipFile(Auth::user()->id, $request->get('topic'), $file, $filename);
|
||||
} else if ($request->get('option')=='github') {
|
||||
return $this->validateGithubLink(Auth::user()->id, $request->get('topic'), $request->get('githublink'),
|
||||
$request->get('projname'));
|
||||
} else {
|
||||
return Redirect::to('student/results?topicList='.$request->get('topic').'&option='.$request->get('option').
|
||||
return Redirect::to('student/unitycourse/results?topicList='.$request->get('topic').'&option='.$request->get('option').
|
||||
'&submit='.$request->submitbutton);
|
||||
}
|
||||
} else { //clicking radio button
|
||||
return Redirect::to('student/results?topicList='.$request->get('topic').'&option='.$request->get('option'));
|
||||
return Redirect::to('student/unitycourse/results?topicList='.$request->get('topic').'&option='.$request->get('option'));
|
||||
//'&submit='.$request->submitbutton);
|
||||
}
|
||||
|
||||
|
|
@ -363,28 +309,28 @@ private function endsWith($haystack, $needle) {
|
|||
public function destroy(Request $request, $id)
|
||||
{
|
||||
//
|
||||
$entity = \App\TaskResult::find($id);
|
||||
$entity = \App\UnityTaskResult::find($id);
|
||||
$entity->delete();
|
||||
Session::flash('message','Task Result with Id='.$id.' is deleted');
|
||||
return Redirect::to('student/results?topicList='.$request->get('topic'));
|
||||
return Redirect::to('student/unitycourse/results?topicList='.$request->get('topic'));
|
||||
}
|
||||
|
||||
public function edit($id)
|
||||
{
|
||||
//
|
||||
$entity = \App\TaskResult::where('id','=',$id)->first();
|
||||
$task = \App\Task::where('id','=',$entity['taskid'])->first();
|
||||
return view('student/results/edit')->with(compact('entity'))
|
||||
$entity = \App\UnityTaskResult::where('id','=',$id)->first();
|
||||
$task = \App\UnityTask::where('id','=',$entity['taskid'])->first();
|
||||
return view('student/unitycourse/results/edit')->with(compact('entity'))
|
||||
->with(compact('task'));
|
||||
}
|
||||
|
||||
public function valsub(Request $request)
|
||||
{
|
||||
$items = \App\Task::where('topic','=',$id)
|
||||
$items = \App\UnityTask::where('topic','=',$id)
|
||||
->orderBy('taskno', 'asc')
|
||||
->get();
|
||||
$topic = \App\Topic::find($id);
|
||||
return view('student/results/create')
|
||||
$topic = \App\UnityTopic::find($id);
|
||||
return view('student/unitycourse/results/create')
|
||||
->with(compact('topic'))
|
||||
->with(compact('items'));
|
||||
}
|
||||
|
|
@ -404,13 +350,13 @@ private function endsWith($haystack, $needle) {
|
|||
$validator=Validator::make($request->all(),$rules,$msg);
|
||||
|
||||
if ($validator->fails()) {
|
||||
return Redirect::to('student/results/'.$id.'/edit')
|
||||
return Redirect::to('student/unitycourse/results/'.$id.'/edit')
|
||||
->withErrors($validator);
|
||||
|
||||
}else{
|
||||
$file = $request->file('image');
|
||||
|
||||
$entity=\App\TaskResult::find($id);
|
||||
$entity=\App\UnityTaskResult::find($id);
|
||||
|
||||
$entity->taskid=$request->get('taskid');
|
||||
$entity->status=$request->get('status');
|
||||
|
|
@ -425,8 +371,8 @@ private function endsWith($haystack, $needle) {
|
|||
|
||||
Session::flash('message','Task Result with Id='.$id.' is changed');
|
||||
|
||||
$task = \App\Task::find($request->get('taskid'));
|
||||
return Redirect::to('student/results?topicList='.$task['topic']);
|
||||
$task = \App\UnityTask::find($request->get('taskid'));
|
||||
return Redirect::to('student/unitycourse/results?topicList='.$task['topic']);
|
||||
}
|
||||
}
|
||||
}
|
||||
12
app/UnityStudentSubmit.php
Normal file
12
app/UnityStudentSubmit.php
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
<?php
|
||||
|
||||
namespace App;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class UnityStudentSubmit extends Model
|
||||
{
|
||||
protected $table='student_submits';
|
||||
|
||||
public $primaryKey='id';
|
||||
}
|
||||
25
app/UnityTask.php
Normal file
25
app/UnityTask.php
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
<?php
|
||||
|
||||
namespace App;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class UnityTask extends Model
|
||||
{
|
||||
//
|
||||
protected $table='tasks';
|
||||
|
||||
public $primaryKey='id';
|
||||
|
||||
public function topic() {
|
||||
return $this->belongsTo(App\UnityTopic::class);
|
||||
}
|
||||
|
||||
public function getTopic($id) {
|
||||
return \App\UnityTopic::find($id)->name;
|
||||
}
|
||||
|
||||
public function getListTopic() {
|
||||
return \App\UnityTopic::pluck('name', 'id');
|
||||
}
|
||||
}
|
||||
11
app/UnityTaskResult.php
Normal file
11
app/UnityTaskResult.php
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<?php
|
||||
|
||||
namespace App;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class UnityTaskResult extends Model
|
||||
{
|
||||
protected $table='task_results';
|
||||
public $primaryKey='id';
|
||||
}
|
||||
10
app/UnityTestFiles.php
Normal file
10
app/UnityTestFiles.php
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
|
||||
namespace App;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class UnityTestFiles extends Model
|
||||
{
|
||||
//
|
||||
}
|
||||
22
app/UnityTopic.php
Normal file
22
app/UnityTopic.php
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
<?php
|
||||
|
||||
namespace App;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class UnityTopic extends Model
|
||||
{
|
||||
//
|
||||
protected $table='topics';
|
||||
public function tasks() {
|
||||
return $this->hasMany('App\UnityTask');
|
||||
}
|
||||
|
||||
public function topic_files() {
|
||||
return $this->hasMany('App\UnityTopicFiles');
|
||||
}
|
||||
|
||||
public function test_files() {
|
||||
return $this->hasMany('App\UnityTestFiles');
|
||||
}
|
||||
}
|
||||
15
app/UnityTopicFiles.php
Normal file
15
app/UnityTopicFiles.php
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
<?php
|
||||
|
||||
namespace App;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class UnityTopicFiles extends Model
|
||||
{
|
||||
//
|
||||
protected $table='topic_files';
|
||||
public $primaryKey='id';
|
||||
public function topic() {
|
||||
return $this->belongsTo(App\UnityTopic::class);
|
||||
}
|
||||
}
|
||||
52
app/UnityUser.php
Normal file
52
app/UnityUser.php
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
<?php
|
||||
|
||||
namespace App;
|
||||
|
||||
use Illuminate\Contracts\Auth\MustVerifyEmail;
|
||||
use Illuminate\Foundation\Auth\User as Authenticatable;
|
||||
use Illuminate\Notifications\Notifiable;
|
||||
|
||||
|
||||
class UnityUser extends Authenticatable
|
||||
{
|
||||
use Notifiable;
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $fillable = [
|
||||
'name', 'roleid', 'email', 'password','uplink','status'
|
||||
];
|
||||
|
||||
/**
|
||||
* The attributes that should be hidden for arrays.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $hidden = [
|
||||
'password', 'remember_token',
|
||||
];
|
||||
|
||||
/**
|
||||
* The attributes that should be cast to native types.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $casts = [
|
||||
'email_verified_at' => 'datetime',
|
||||
];
|
||||
|
||||
public function checkRoleId($roleid) {
|
||||
if ($roleid=='student') {
|
||||
return Redirect::to('student/Unitycourse/home');
|
||||
} elseif ($roleid=='teacher') {
|
||||
return Redirect::to('teacher/home');
|
||||
} elseif ($roleid=='admin') {
|
||||
return Redirect::to('admin/admin');
|
||||
} else {
|
||||
return Redirect::to('/home');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -4,7 +4,7 @@
|
|||
<div class="col-12">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title">
|
||||
Start Learning Android Programming with APLAS
|
||||
Start Learning Android Programming with iCLOP
|
||||
</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
<div class="col-12">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title">
|
||||
Start Learning Android Programming with APLAS
|
||||
Start Learning Android Programming with iCLOP
|
||||
</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
<div class="col-12">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title">
|
||||
Start Learning Android Programming with APLAS
|
||||
Start Learning Android Programming with iCLOP
|
||||
</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
<div class="col-12">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title">
|
||||
Start Learning Android Programming with APLAS
|
||||
Start Learning Android Programming with iCLOP
|
||||
</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title">Start Learning Android Programming with APLAS</h3>
|
||||
<h3 class="card-title">Start Learning Android Programming with iCLOP</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
@if (Session::has('message'))
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
<div class="col-12">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title">
|
||||
Start Learning Android Programming with APLAS
|
||||
Start Learning Android Programming with iCLOP
|
||||
</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
|
|
|
|||
|
|
@ -47,10 +47,15 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
<input type="hidden" name="topic" value="{{ $topic['id'] }}" />
|
||||
<input type="button" value="Back" onclick="history.back()" class="btn btn-outline-info">
|
||||
{{ Form::submit('Save', ['class' => 'btn btn-primary pull-right']) }}
|
||||
</div>
|
||||
<!-- <div class="card-footer">
|
||||
<input type="button" value="Back" onclick="history.back()" class="btn btn-outline-info">
|
||||
<input type="hidden" name="topic" value="{{ $topic['id'] }}" />
|
||||
{{ Form::submit('Save', ['class' => 'btn btn-primary pull-right']) }}
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
<!-- </form> -->
|
||||
{{ Form::close() }}
|
||||
|
|
|
|||
|
|
@ -16,15 +16,10 @@
|
|||
@endif
|
||||
{{ Form::open(['method' => 'GET']) }}
|
||||
<div class="form-group">
|
||||
{!! Form::label('topic', 'Topic:') !!}
|
||||
{!! Form::label('topic', 'Learning Topic:') !!}
|
||||
{!! Form::select('topicList', $items , $filter, ['class' => 'form-control', 'id' => 'topicList', 'onchange' => 'this.form.submit();']) !!}
|
||||
{{ Form::close() }}
|
||||
<!--
|
||||
{!! Form::label('topic', 'Topic:') !!}
|
||||
{!! Form::select('topic', $items , null, ['class' => 'form-control', 'onchange' => 'doSomething(this)']) !!}
|
||||
-->
|
||||
</div>
|
||||
|
||||
@php ($complete = true)
|
||||
<div class="row">
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title">Start Learning Android Programming with APLAS</h3>
|
||||
<h3 class="card-title">Start Learning Android Programming with iCLOP</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
@if (Session::has('message'))
|
||||
|
|
|
|||
|
|
@ -134,6 +134,16 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<!-- // postgree // -->
|
||||
|
||||
<div onclick="window.open('{{URL::to('/student/mysqlcourse/')}}','mysqlcourse-aplas');" class="col-md-6 col-lg-3 d-flex align-items-stretch mb-5">
|
||||
<div class="icon-box" data-aos="fade-up" data-aos-delay="100">
|
||||
<div class="icon"><i class='bx bxl-medium-old'></i></div>
|
||||
<h4 class="title"><a href="">MysqlCourse</a></h4>
|
||||
<p class="description">At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</section><!-- End Featured Services Section -->
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title">Start Learning Android Programming with APLAS</h3>
|
||||
<h3 class="card-title">Start Learning Android Programming with iCLOP</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
@if (Session::has('message'))
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title">Start Learning Android Programming with APLAS</h3>
|
||||
<h3 class="card-title">Start Learning Android Programming with iCLOP</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
@if (Session::has('message'))
|
||||
|
|
|
|||
|
|
@ -1,119 +0,0 @@
|
|||
<aside class="main-sidebar sidebar-dark-primary elevation-4">
|
||||
<!-- Brand Logo -->
|
||||
<a href="#" class="brand-link">
|
||||
<img src="{{asset('lte/dist/img/logo-aplas.png')}}" alt="APLAS logo" class="brand-image elevation-3"
|
||||
style="opacity: .8">
|
||||
<span class="brand-text font-weight-light">WebApps</span>
|
||||
</a>
|
||||
|
||||
<!-- Sidebar -->
|
||||
<div class="sidebar">
|
||||
<!-- Sidebar user panel (optional) -->
|
||||
<div class="user-panel mt-3 pb-3 mb-3 d-flex">
|
||||
<div class="image">
|
||||
<img src="{{asset('lte/dist/img/avatar3.png')}}" class="img-circle elevation-2" alt="User Image">
|
||||
</div>
|
||||
<div class="info">
|
||||
<a href="#" class="d-block">{{ Auth::user()->name }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Sidebar Menu -->
|
||||
<nav class="mt-2">
|
||||
<ul class="nav nav-pills nav-sidebar flex-column" data-widget="treeview" role="menu" data-accordion="false">
|
||||
<!-- Add icons to the links using the .nav-icon class
|
||||
with font-awesome or any other icon font library -->
|
||||
|
||||
|
||||
<li class="treeview">
|
||||
<a href="#" class="nav-link">
|
||||
<i class="nav-icon fas fa-space-shuttle"></i>
|
||||
<p>Learning APLAS</p>
|
||||
</a>
|
||||
<ul role="menu" class="nav nav-pills nav-sidebar flex-column">
|
||||
<li class="nav-item"> <a href="{{URL::to('student/tasks')}}" class="nav-link"><i class="nav-icon fas fa-circle-o"></i><p>Download Materials</p></a > </li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
<li class="nav-item">
|
||||
<a href="{{URL::to('student/tasks')}}" class="nav-link">
|
||||
<i class="nav-icon fas fa-space-shuttle"></i>
|
||||
<p>
|
||||
Start Learning
|
||||
</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="{{URL::to('student/results')}}" class="nav-link">
|
||||
<i class="nav-icon fas fa-object-ungroup"></i>
|
||||
<p>
|
||||
Submit Task Result
|
||||
</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="{{URL::to('student/valid')}}" class="nav-link">
|
||||
<i class="nav-icon fas fa-fire"></i>
|
||||
<p>
|
||||
Submission Result
|
||||
</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="{{URL::to('student/exercise')}}" class="nav-link">
|
||||
<i class="nav-icon fas fa-fire"></i>
|
||||
<p>
|
||||
Android Exercise <span class="right badge badge-danger">New</span>
|
||||
</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="{{URL::to('student/exercisesubmission')}}" class="nav-link">
|
||||
<i class="nav-icon fas fa-fire"></i>
|
||||
<p>
|
||||
Exercise Submission
|
||||
</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="{{URL::to('student/exerciseresults')}}" class="nav-link">
|
||||
<i class="nav-icon fas fa-fire"></i>
|
||||
<p>
|
||||
Exercise Result
|
||||
</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="{{URL::to('student/rankview')}}" class="nav-link">
|
||||
<i class="nav-icon fas fa-fire"></i>
|
||||
<p>
|
||||
Top 20 Rank
|
||||
</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="{{URL::to('student/jplasdown')}}" class="nav-link">
|
||||
<i class="nav-icon fas fa-fire"></i>
|
||||
<p>
|
||||
Learning JPLAS <span class="right badge badge-danger">New</span>
|
||||
</p>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a href="{{URL::to('student/uitasks')}}" class="nav-link">
|
||||
<i class="nav-icon fas fa-fire"></i>
|
||||
<p>
|
||||
Start UI Learning <span class="right badge badge-danger">New</span>
|
||||
</p>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
<!-- /.sidebar-menu -->
|
||||
</div>
|
||||
<!-- /.sidebar -->
|
||||
</aside>
|
||||
|
|
@ -1,140 +0,0 @@
|
|||
<aside class="main-sidebar sidebar-dark-primary elevation-4">
|
||||
<!-- Brand Logo -->
|
||||
<a href="#" class="brand-link">
|
||||
<img src="{{asset('lte/dist/img/logo-aplas.png')}}" alt="APLAS logo" class="brand-image elevation-3"
|
||||
style="opacity: .8">
|
||||
<span class="brand-text font-weight-light">WebApps</span>
|
||||
</a>
|
||||
|
||||
<!-- Sidebar -->
|
||||
<div class="sidebar">
|
||||
<!-- Sidebar user panel (optional) -->
|
||||
<div class="user-panel mt-3 pb-3 mb-3 d-flex">
|
||||
<div class="image">
|
||||
<img src="{{asset('lte/dist/img/avatar3.png')}}" class="img-circle elevation-2" alt="User Image">
|
||||
</div>
|
||||
<div class="info">
|
||||
<a href="#" class="d-block">{{ Auth::user()->name }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Sidebar Menu -->
|
||||
<nav class="mt-2">
|
||||
<ul class="nav nav-pills nav-sidebar flex-column" data-widget="treeview" role="menu" data-accordion="false">
|
||||
<!-- Add icons to the links using the .nav-icon class
|
||||
with font-awesome or any other icon font library -->
|
||||
|
||||
<li class="header"><b>JPLAS (Java)</b></li>
|
||||
<li class="treeview">
|
||||
<a href="#">
|
||||
<i class="fa fa-dashboard"></i> <span>Start Learning</span>
|
||||
<span class="pull-right-container">
|
||||
<i class="fa fa-angle-left pull-right"></i>
|
||||
</span>
|
||||
</a>
|
||||
<ul class="treeview-menu">
|
||||
<li class="active">
|
||||
<a href="/jplas/submitcwp"
|
||||
><i class="fa fa-circle-o text-aqua"></i> Submit CWP Answer</a
|
||||
>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="nav-item">
|
||||
</li> <a href="{{URL::to('student/tasks')}}" class="nav-link">
|
||||
<li class="active"> <i class="nav-icon fas fa-space-shuttle"></i>
|
||||
<a href="/jplas/cwpresults" <p>
|
||||
><i class="fa fa-circle-o text-aqua"></i> Check CWP Results</a Start Learning
|
||||
> </p>
|
||||
</li> </a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="{{URL::to('student/results')}}" class="nav-link">
|
||||
<i class="nav-icon fas fa-object-ungroup"></i>
|
||||
<p>
|
||||
Submit Task Result
|
||||
</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="{{URL::to('student/valid')}}" class="nav-link">
|
||||
<i class="nav-icon fas fa-fire"></i>
|
||||
<p>
|
||||
Submission Result
|
||||
</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="{{URL::to('student/exercise')}}" class="nav-link">
|
||||
<i class="nav-icon fas fa-fire"></i>
|
||||
<p>
|
||||
Android Exercise <span class="right badge badge-danger">New</span>
|
||||
</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="{{URL::to('student/exercisesubmission')}}" class="nav-link">
|
||||
<i class="nav-icon fas fa-fire"></i>
|
||||
<p>
|
||||
Exercise Submission
|
||||
</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="{{URL::to('student/exerciseresults')}}" class="nav-link">
|
||||
<i class="nav-icon fas fa-fire"></i>
|
||||
<p>
|
||||
Exercise Result
|
||||
</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="{{URL::to('student/rankview')}}" class="nav-link">
|
||||
<i class="nav-icon fas fa-fire"></i>
|
||||
<p>
|
||||
Top 20 Rank
|
||||
</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="{{URL::to('student/jplasdown')}}" class="nav-link">
|
||||
<i class="nav-icon fas fa-fire"></i>
|
||||
<p>
|
||||
Learning JPLAS <span class="right badge badge-danger">New</span>
|
||||
</p>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a href="{{URL::to('student/uitasks')}}" class="nav-link">
|
||||
<i class="nav-icon fas fa-fire"></i>
|
||||
<p>
|
||||
Start UI Learning <span class="right badge badge-danger">New</span>
|
||||
</p>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
<!-- /.sidebar-menu -->
|
||||
</div>
|
||||
<!-- /.sidebar -->
|
||||
</aside>
|
||||
|
|
@ -1,109 +0,0 @@
|
|||
<aside class="main-sidebar sidebar-dark-primary elevation-4">
|
||||
<!-- Brand Logo -->
|
||||
<a href="#" class="brand-link">
|
||||
<img src="{{asset('lte/dist/img/logo-aplas.png')}}" alt="APLAS logo" class="brand-image elevation-3"
|
||||
style="opacity: .8">
|
||||
<span class="brand-text font-weight-light">WebApps</span>
|
||||
</a>
|
||||
|
||||
<!-- Sidebar -->
|
||||
<div class="sidebar">
|
||||
<!-- Sidebar user panel (optional) -->
|
||||
<div class="user-panel mt-3 pb-3 mb-3 d-flex">
|
||||
<div class="image">
|
||||
<img src="{{asset('lte/dist/img/avatar3.png')}}" class="img-circle elevation-2" alt="User Image">
|
||||
</div>
|
||||
<div class="info">
|
||||
<a href="#" class="d-block">{{ Auth::user()->name }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Sidebar Menu -->
|
||||
<nav class="mt-2">
|
||||
<ul class="nav nav-pills nav-sidebar flex-column" data-widget="treeview" role="menu" data-accordion="false">
|
||||
<!-- Add icons to the links using the .nav-icon class
|
||||
with font-awesome or any other icon font library -->
|
||||
|
||||
<li class="header"><b>JPLAS (Java)</b></li>
|
||||
<li class="treeview">
|
||||
<a href="#"> <li class="nav-item">
|
||||
<i class="fa fa-dashboard"></i> <span>Start Learning</span> <a href="{{URL::to('student/tasks')}}" class="nav-link">
|
||||
<span class="pull-right-container"> <i class="nav-icon fas fa-space-shuttle"></i>
|
||||
<i class="fa fa-angle-left pull-right"></i> <p>
|
||||
</span> Start Learning
|
||||
</a> </p>
|
||||
<ul class="treeview-menu"> </a>
|
||||
<li class="active"> </li>
|
||||
<a href="/jplas/submitcwp" <li class="nav-item">
|
||||
><i class="fa fa-circle-o text-aqua"></i> Submit CWP Answer</a <a href="{{URL::to('student/results')}}" class="nav-link">
|
||||
> <i class="nav-icon fas fa-object-ungroup"></i>
|
||||
</li> <p>
|
||||
<li class="active"> Submit Task Result
|
||||
<a href="/jplas/cwpresults" </p>
|
||||
><i class="fa fa-circle-o text-aqua"></i> Check CWP Results</a </a>
|
||||
> </li>
|
||||
</li> <li class="nav-item">
|
||||
<li> <a href="{{URL::to('student/valid')}}" class="nav-link">
|
||||
<a href="dashboardv2" <i class="nav-icon fas fa-fire"></i>
|
||||
><i class="fa fa-circle-o text-aqua"></i> EFP</a <p>
|
||||
> Submission Result
|
||||
</li> </p>
|
||||
</ul> </a>
|
||||
</li> </li>
|
||||
<li class="nav-item">
|
||||
<li class="active"> <a href="{{URL::to('student/exercise')}}" class="nav-link">
|
||||
<a href="aboutjplas" <i class="nav-icon fas fa-fire"></i>
|
||||
><i class="fa fa-book"></i> <span>About JPLAS</span></a <p>
|
||||
> Android Exercise <span class="right badge badge-danger">New</span>
|
||||
</li>
|
||||
</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="{{URL::to('student/exercisesubmission')}}" class="nav-link">
|
||||
<i class="nav-icon fas fa-fire"></i>
|
||||
<p>
|
||||
Exercise Submission
|
||||
</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="{{URL::to('student/exerciseresults')}}" class="nav-link">
|
||||
<i class="nav-icon fas fa-fire"></i>
|
||||
<p>
|
||||
Exercise Result
|
||||
</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="{{URL::to('student/rankview')}}" class="nav-link">
|
||||
<i class="nav-icon fas fa-fire"></i>
|
||||
<p>
|
||||
Top 20 Rank
|
||||
</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="{{URL::to('student/jplasdown')}}" class="nav-link">
|
||||
<i class="nav-icon fas fa-fire"></i>
|
||||
<p>
|
||||
Learning JPLAS <span class="right badge badge-danger">New</span>
|
||||
</p>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a href="{{URL::to('student/uitasks')}}" class="nav-link">
|
||||
<i class="nav-icon fas fa-fire"></i>
|
||||
<p>
|
||||
Start UI Learning <span class="right badge badge-danger">New</span>
|
||||
</p>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
<!-- /.sidebar-menu -->
|
||||
</div>
|
||||
<!-- /.sidebar -->
|
||||
</aside>
|
||||
|
|
@ -1,112 +0,0 @@
|
|||
<aside class="main-sidebar sidebar-dark-primary elevation-4">
|
||||
<!-- Brand Logo -->
|
||||
<a href="#" class="brand-link">
|
||||
<img src="{{asset('lte/dist/img/logo-aplas.png')}}" alt="APLAS logo" class="brand-image elevation-3"
|
||||
style="opacity: .8">
|
||||
<span class="brand-text font-weight-light">WebApps</span>
|
||||
</a>
|
||||
|
||||
<!-- Sidebar -->
|
||||
<div class="sidebar">
|
||||
<!-- Sidebar user panel (optional) -->
|
||||
<div class="user-panel mt-3 pb-3 mb-3 d-flex">
|
||||
<div class="image">
|
||||
<img src="{{asset('lte/dist/img/avatar3.png')}}" class="img-circle elevation-2" alt="User Image">
|
||||
</div>
|
||||
<div class="info">
|
||||
<a href="#" class="d-block">{{ Auth::user()->name }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Sidebar Menu -->
|
||||
<nav class="mt-2">
|
||||
<ul class="nav nav-pills nav-sidebar flex-column" data-widget="treeview" role="menu" data-accordion="false">
|
||||
<!-- Add icons to the links using the .nav-icon class
|
||||
with font-awesome or any other icon font library -->
|
||||
|
||||
|
||||
<li class="header"><b>JPLAS (Java)</b></li>
|
||||
<li class="treeview">
|
||||
<a href="#">
|
||||
<i class="fa fa-dashboard"></i> <span>Start Learning</span>
|
||||
<span class="pull-right-container">
|
||||
<i class="fa fa-angle-left pull-right"></i> <li class="nav-item">
|
||||
</span> <a href="{{URL::to('student/tasks')}}" class="nav-link">
|
||||
</a> <i class="nav-icon fas fa-space-shuttle"></i>
|
||||
<ul class="treeview-menu"> <p>
|
||||
<li class="active"> Start Learning
|
||||
<a href="/jplas/submitcwp" </p>
|
||||
><i class="fa fa-circle-o text-aqua"></i> Submit CWP Answer</a </a>
|
||||
> </li>
|
||||
</li> <li class="nav-item">
|
||||
<li class="active"> <a href="{{URL::to('student/results')}}" class="nav-link">
|
||||
<a href="/jplas/cwpresults" <i class="nav-icon fas fa-object-ungroup"></i>
|
||||
><i class="fa fa-circle-o text-aqua"></i> Check CWP Results</a <p>
|
||||
> Submit Task Result
|
||||
</li> </p>
|
||||
<li> </a>
|
||||
<a href="dashboardv2" </li>
|
||||
><i class="fa fa-circle-o text-aqua"></i> EFP</a <li class="nav-item">
|
||||
> <a href="{{URL::to('student/valid')}}" class="nav-link">
|
||||
</li> <i class="nav-icon fas fa-fire"></i>
|
||||
</ul> <p>
|
||||
</li> Submission Result
|
||||
</p>
|
||||
<li class="active"> </a>
|
||||
<a href="aboutjplas" </li>
|
||||
><i class="fa fa-book"></i> <span>About JPLAS</span></a <li class="nav-item">
|
||||
> <a href="{{URL::to('student/exercise')}}" class="nav-link">
|
||||
</li> <i class="nav-icon fas fa-fire"></i>
|
||||
<p>
|
||||
Android Exercise <span class="right badge badge-danger">New</span>
|
||||
</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="{{URL::to('student/exercisesubmission')}}" class="nav-link">
|
||||
<i class="nav-icon fas fa-fire"></i>
|
||||
<p>
|
||||
Exercise Submission
|
||||
</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="{{URL::to('student/exerciseresults')}}" class="nav-link">
|
||||
<i class="nav-icon fas fa-fire"></i>
|
||||
<p>
|
||||
Exercise Result
|
||||
</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="{{URL::to('student/rankview')}}" class="nav-link">
|
||||
<i class="nav-icon fas fa-fire"></i>
|
||||
<p>
|
||||
Top 20 Rank
|
||||
</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="{{URL::to('student/jplasdown')}}" class="nav-link">
|
||||
<i class="nav-icon fas fa-fire"></i>
|
||||
<p>
|
||||
Learning JPLAS <span class="right badge badge-danger">New</span>
|
||||
</p>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a href="{{URL::to('student/uitasks')}}" class="nav-link">
|
||||
<i class="nav-icon fas fa-fire"></i>
|
||||
<p>
|
||||
Start UI Learning <span class="right badge badge-danger">New</span>
|
||||
</p>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
<!-- /.sidebar-menu -->
|
||||
</div>
|
||||
<!-- /.sidebar -->
|
||||
</aside>
|
||||
|
|
@ -1,124 +0,0 @@
|
|||
<aside class="main-sidebar sidebar-dark-primary elevation-4">
|
||||
<!-- Brand Logo -->
|
||||
<a href="#" class="brand-link">
|
||||
<img src="{{asset('lte/dist/img/logo-aplas.png')}}" alt="APLAS logo" class="brand-image elevation-3"
|
||||
style="opacity: .8">
|
||||
<span class="brand-text font-weight-light">WebApps</span>
|
||||
</a>
|
||||
|
||||
<!-- Sidebar -->
|
||||
<div class="sidebar">
|
||||
<!-- Sidebar user panel (optional) -->
|
||||
<div class="user-panel mt-3 pb-3 mb-3 d-flex">
|
||||
<div class="image">
|
||||
<img src="{{asset('lte/dist/img/avatar3.png')}}" class="img-circle elevation-2" alt="User Image">
|
||||
</div>
|
||||
<div class="info">
|
||||
<a href="#" class="d-block">{{ Auth::user()->name }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Sidebar Menu -->
|
||||
<nav class="mt-2">
|
||||
<ul class="nav nav-pills nav-sidebar flex-column" data-widget="treeview" role="menu" data-accordion="false">
|
||||
<!-- Add icons to the links using the .nav-icon class
|
||||
with font-awesome or any other icon font library -->
|
||||
|
||||
|
||||
<li class="header"><b>JPLAS (Java)</b></li>
|
||||
<li class="treeview">
|
||||
<a href="#">
|
||||
<i class="fa fa-dashboard"></i> <span>Start Learning</span>
|
||||
<span class="pull-right-container">
|
||||
<i class="fa fa-angle-left pull-right"></i>
|
||||
</span>
|
||||
</a>
|
||||
<ul class="treeview-menu">
|
||||
<li class="active">
|
||||
<a href="/jplas/submitcwp"
|
||||
><i class="fa fa-circle-o text-aqua"></i> Submit CWP Answer</a
|
||||
>
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="nav-item">
|
||||
</li> <a href="{{URL::to('student/tasks')}}" class="nav-link">
|
||||
<li class="active"> <i class="nav-icon fas fa-space-shuttle"></i>
|
||||
<a href="/jplas/cwpresults" <p>
|
||||
><i class="fa fa-circle-o text-aqua"></i> Check CWP Results</a Start Learning
|
||||
> </p>
|
||||
</li> </a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="{{URL::to('student/results')}}" class="nav-link">
|
||||
<i class="nav-icon fas fa-object-ungroup"></i>
|
||||
<p>
|
||||
Submit Task Result
|
||||
</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="{{URL::to('student/valid')}}" class="nav-link">
|
||||
<i class="nav-icon fas fa-fire"></i>
|
||||
<p>
|
||||
Submission Result
|
||||
</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="{{URL::to('student/exercise')}}" class="nav-link">
|
||||
<i class="nav-icon fas fa-fire"></i>
|
||||
<p>
|
||||
Android Exercise <span class="right badge badge-danger">New</span>
|
||||
</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="{{URL::to('student/exercisesubmission')}}" class="nav-link">
|
||||
<i class="nav-icon fas fa-fire"></i>
|
||||
<p>
|
||||
Exercise Submission
|
||||
</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="{{URL::to('student/exerciseresults')}}" class="nav-link">
|
||||
<i class="nav-icon fas fa-fire"></i>
|
||||
<p>
|
||||
Exercise Result
|
||||
</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="{{URL::to('student/rankview')}}" class="nav-link">
|
||||
<i class="nav-icon fas fa-fire"></i>
|
||||
<p>
|
||||
Top 20 Rank
|
||||
</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="{{URL::to('student/jplasdown')}}" class="nav-link">
|
||||
<i class="nav-icon fas fa-fire"></i>
|
||||
<p>
|
||||
Learning JPLAS <span class="right badge badge-danger">New</span>
|
||||
</p>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a href="{{URL::to('student/uitasks')}}" class="nav-link">
|
||||
<i class="nav-icon fas fa-fire"></i>
|
||||
<p>
|
||||
Start UI Learning <span class="right badge badge-danger">New</span>
|
||||
</p>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
<!-- /.sidebar-menu -->
|
||||
</div>
|
||||
<!-- /.sidebar -->
|
||||
</aside>
|
||||
|
|
@ -1,128 +0,0 @@
|
|||
<aside class="main-sidebar sidebar-dark-primary elevation-4">
|
||||
<!-- Brand Logo -->
|
||||
<a href="#" class="brand-link">
|
||||
<img src="{{asset('lte/dist/img/logo-aplas.png')}}" alt="APLAS logo" class="brand-image elevation-3"
|
||||
style="opacity: .8">
|
||||
<span class="brand-text font-weight-light">WebApps</span>
|
||||
</a>
|
||||
|
||||
<!-- Sidebar -->
|
||||
<div class="sidebar">
|
||||
<!-- Sidebar user panel (optional) -->
|
||||
<div class="user-panel mt-3 pb-3 mb-3 d-flex">
|
||||
<div class="image">
|
||||
<img src="{{asset('lte/dist/img/avatar3.png')}}" class="img-circle elevation-2" alt="User Image">
|
||||
</div>
|
||||
<div class="info">
|
||||
<a href="#" class="d-block">{{ Auth::user()->name }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Sidebar Menu -->
|
||||
<nav class="mt-2">
|
||||
<ul class="nav nav-pills nav-sidebar flex-column" data-widget="treeview" role="menu" data-accordion="false">
|
||||
<!-- Add icons to the links using the .nav-icon class
|
||||
with font-awesome or any other icon font library -->
|
||||
|
||||
|
||||
<li class="active">
|
||||
<a href="/jplas/submitcwp"
|
||||
><i class="fa fa-circle-o text-aqua"></i> Submit CWP Answer</a
|
||||
>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="nav-item">
|
||||
</li> <a href="{{URL::to('student/tasks')}}" class="nav-link">
|
||||
<i class="nav-icon fas fa-space-shuttle"></i>
|
||||
<p>
|
||||
Start Learning
|
||||
</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="{{URL::to('student/results')}}" class="nav-link">
|
||||
<i class="nav-icon fas fa-object-ungroup"></i>
|
||||
<p>
|
||||
Submit Task Result
|
||||
</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="{{URL::to('student/valid')}}" class="nav-link">
|
||||
<i class="nav-icon fas fa-fire"></i>
|
||||
<p>
|
||||
Submission Result
|
||||
</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="{{URL::to('student/exercise')}}" class="nav-link">
|
||||
<i class="nav-icon fas fa-fire"></i>
|
||||
<p>
|
||||
Android Exercise <span class="right badge badge-danger">New</span>
|
||||
</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="{{URL::to('student/exercisesubmission')}}" class="nav-link">
|
||||
<i class="nav-icon fas fa-fire"></i>
|
||||
<p>
|
||||
Exercise Submission
|
||||
</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="{{URL::to('student/exerciseresults')}}" class="nav-link">
|
||||
<i class="nav-icon fas fa-fire"></i>
|
||||
<p>
|
||||
Exercise Result
|
||||
</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="{{URL::to('student/rankview')}}" class="nav-link">
|
||||
<i class="nav-icon fas fa-fire"></i>
|
||||
<p>
|
||||
Top 20 Rank
|
||||
</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="{{URL::to('student/jplasdown')}}" class="nav-link">
|
||||
<i class="nav-icon fas fa-fire"></i>
|
||||
<p>
|
||||
Learning JPLAS <span class="right badge badge-danger">New</span>
|
||||
</p>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a href="{{URL::to('student/uitasks')}}" class="nav-link">
|
||||
<i class="nav-icon fas fa-fire"></i>
|
||||
<p>
|
||||
Start UI Learning <span class="right badge badge-danger">New</span>
|
||||
</p>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
<!-- /.sidebar-menu -->
|
||||
</div>
|
||||
<!-- /.sidebar -->
|
||||
</aside>
|
||||
|
|
@ -1,115 +0,0 @@
|
|||
<aside class="main-sidebar sidebar-dark-primary elevation-4">
|
||||
<!-- Brand Logo -->
|
||||
<a href="#" class="brand-link">
|
||||
<img src="{{asset('lte/dist/img/logo-aplas.png')}}" alt="APLAS logo" class="brand-image elevation-3"
|
||||
style="opacity: .8">
|
||||
<span class="brand-text font-weight-light">WebApps</span>
|
||||
</a>
|
||||
|
||||
<!-- Sidebar -->
|
||||
<div class="sidebar">
|
||||
<!-- Sidebar user panel (optional) -->
|
||||
<div class="user-panel mt-3 pb-3 mb-3 d-flex">
|
||||
<div class="image">
|
||||
<img src="{{asset('lte/dist/img/avatar3.png')}}" class="img-circle elevation-2" alt="User Image">
|
||||
</div>
|
||||
<div class="info">
|
||||
<a href="#" class="d-block">{{ Auth::user()->name }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Sidebar Menu -->
|
||||
<nav class="mt-2">
|
||||
<ul class="nav nav-pills nav-sidebar flex-column" data-widget="treeview" role="menu" data-accordion="false">
|
||||
<!-- Add icons to the links using the .nav-icon class
|
||||
with font-awesome or any other icon font library -->
|
||||
|
||||
<li class="active">
|
||||
<a href="/jplas/submitcwp"
|
||||
><i class="fa fa-circle-o text-aqua"></i> Submit CWP Answer</a
|
||||
>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="nav-item">
|
||||
</li> <a href="{{URL::to('student/tasks')}}" class="nav-link">
|
||||
<i class="nav-icon fas fa-space-shuttle"></i>
|
||||
<p>
|
||||
Start Learning
|
||||
</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="{{URL::to('student/results')}}" class="nav-link">
|
||||
<i class="nav-icon fas fa-object-ungroup"></i>
|
||||
<p>
|
||||
Submit Task Result
|
||||
</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="{{URL::to('student/valid')}}" class="nav-link">
|
||||
<i class="nav-icon fas fa-fire"></i>
|
||||
<p>
|
||||
Submission Result
|
||||
</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="{{URL::to('student/exercise')}}" class="nav-link">
|
||||
<i class="nav-icon fas fa-fire"></i>
|
||||
<p>
|
||||
Android Exercise <span class="right badge badge-danger">New</span>
|
||||
</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="{{URL::to('student/exercisesubmission')}}" class="nav-link">
|
||||
<i class="nav-icon fas fa-fire"></i>
|
||||
<p>
|
||||
Exercise Submission
|
||||
</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="{{URL::to('student/exerciseresults')}}" class="nav-link">
|
||||
<i class="nav-icon fas fa-fire"></i>
|
||||
<p>
|
||||
Exercise Result
|
||||
</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="{{URL::to('student/rankview')}}" class="nav-link">
|
||||
<i class="nav-icon fas fa-fire"></i>
|
||||
<p>
|
||||
Top 20 Rank
|
||||
</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="{{URL::to('student/jplasdown')}}" class="nav-link">
|
||||
<i class="nav-icon fas fa-fire"></i>
|
||||
<p>
|
||||
Learning JPLAS <span class="right badge badge-danger">New</span>
|
||||
</p>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a href="{{URL::to('student/uitasks')}}" class="nav-link">
|
||||
<i class="nav-icon fas fa-fire"></i>
|
||||
<p>
|
||||
Start UI Learning <span class="right badge badge-danger">New</span>
|
||||
</p>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
<!-- /.sidebar-menu -->
|
||||
</div>
|
||||
<!-- /.sidebar -->
|
||||
</aside>
|
||||
|
|
@ -3,7 +3,7 @@
|
|||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title">Start Learning Android Programming with APLAS</h3>
|
||||
<h3 class="card-title">Start Learning Android Programming with iCLOP</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
@if (Session::has('message'))
|
||||
|
|
|
|||
|
|
@ -1,117 +0,0 @@
|
|||
@extends('student/unitycourse/home')
|
||||
@section('content')
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title">Start Learning Unity Programming with ICLOP</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
|
||||
<form method="GET" action="http://127.0.0.1:8000/student/tasks" accept-charset="UTF-8">
|
||||
<div class="form-group">
|
||||
<label for="topic">Learning Topic:</label>
|
||||
<select class="form-control" id="topicList" onchange="this.form.submit();" name="topicList">
|
||||
<option value="6" selected="selected">Game bounty</option>
|
||||
</select>
|
||||
<div class="form-group">
|
||||
<label for="description">Description</label>
|
||||
<textarea id="desc" class="form-control" disabled="" rows="2">Pembelajaran topik Basic Interactive Web dengan membuat web Basic HTML</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<table class="table table-bordered table-hover">
|
||||
<thead>
|
||||
<tr class="text-center">
|
||||
<th></th>
|
||||
<th>Guide Documents</th>
|
||||
<th>Test Files</th>
|
||||
<th>Supplement Files</th>
|
||||
<th>Other Files</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
<tr>
|
||||
<td>Resource for <b>game bounty </b></td>
|
||||
<td class="text-center">
|
||||
<div class="btn-group">
|
||||
<a class="btn btn-success" href="{{asset('download/basicHTML/GUIDE.rar')}}"><i class="fa fa-download"></i> Download</a>
|
||||
</div>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<div class="btn-group">
|
||||
<a class="btn btn-warning" href="{{asset('download/basicHTML/ty-html2.rar')}}"><i class="fa fa-download"></i> Download</a>
|
||||
</div>
|
||||
</td>
|
||||
<!-- <td class="text-center">
|
||||
<div class="btn-group">
|
||||
<a class="btn btn-primary" href="{{asset('download/firebase/GUIDE_FIREBASE.rar')}}" disa><i class="fa fa-download"></i> Download</a>
|
||||
</div>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<div class="btn-group">
|
||||
<a class="btn btn-info" href="{{asset('download/firebase/GUIDE_FIREBASE.rar')}}"><i class="fa fa-download"></i> Download</a>
|
||||
</div>
|
||||
</td> -->
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<table class="table table-bordered table-hover">
|
||||
<thead>
|
||||
<tr class="text-center">
|
||||
<th>Task No.</th>
|
||||
<th>Description</th>
|
||||
<th>Topic Name</th>
|
||||
<th>Show</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="text-center">1</td>
|
||||
<td>Make Paragraph in Unity</td>
|
||||
<td>game bounty</td>
|
||||
<td class="text-center">
|
||||
<div class="btn-group">
|
||||
<a class="btn btn-info" href="http://127.0.0.1:8000/student/tasks/39"><i class="fa fa-eye"></i></a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-center">2</td>
|
||||
<td>Make Paragraph in Unity</td>
|
||||
<td>game bounty</td>
|
||||
<td class="text-center">
|
||||
<div class="btn-group">
|
||||
<a class="btn btn-info" href="http://127.0.0.1:8000/student/tasks/31"><i class="fa fa-eye"></i></a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-center">3</td>
|
||||
<td>Make Paragraph in Unity</td>
|
||||
<td>game bounty</td>
|
||||
<td class="text-center">
|
||||
<div class="btn-group">
|
||||
<a class="btn btn-info" href="http://127.0.0.1:8000/student/tasks/32"><i class="fa fa-eye"></i></a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
|
@ -4,5 +4,5 @@
|
|||
Login as {{ Auth::user()->roleid }}
|
||||
</div>
|
||||
<!-- Default to the left -->
|
||||
<strong>Copyright © 2022 <a href="/">iCLOP</a>.</strong> All rights reserved.
|
||||
<strong>Copyright © 2022 <a href="http://learning.aplas.online/iclop/">Intelligent Computer Assisted Programming Learning Platform(iCLOP)</a>.</strong> All rights reserved.
|
||||
</footer>
|
||||
|
|
|
|||
|
|
@ -1,18 +1,13 @@
|
|||
<nav class="main-header navbar navbar-expand navbar-white navbar-light" style="background-color: wheat;">
|
||||
<nav class="main-header navbar navbar-expand navbar-black navbar-white" style="background-color: dark;">
|
||||
<!-- Left navbar links -->
|
||||
|
||||
<ul class="navbar-nav">
|
||||
<ul class="navbar-nav" style="font-size:120%;">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" data-widget="pushmenu" href="#"><i class="fas fa-bars"></i></a>
|
||||
</li>
|
||||
<li class="nav-item d-none d-sm-inline-block">
|
||||
<a href="{{URL::to('student/unitycourse')}}" class="nav-link">Home</a>
|
||||
<a href="{{URL::to('home')}}" class="nav-link">Home</a>
|
||||
</li>
|
||||
<!--
|
||||
<li class="nav-item d-none d-sm-inline-block">
|
||||
<a href="#" class="nav-link">Contact</a>
|
||||
</li>
|
||||
-->
|
||||
<li class="nav-item">
|
||||
<a href="{{ route('logout')}}" class="nav-link"
|
||||
onclick="event.preventDefault(); document.getElementById('logout-form').submit();">
|
||||
|
|
@ -26,18 +21,4 @@
|
|||
</li>
|
||||
</ul>
|
||||
|
||||
<!-- SEARCH FORM
|
||||
<form class="form-inline ml-3">
|
||||
<div class="input-group input-group-sm">
|
||||
<input class="form-control form-control-navbar" type="search" placeholder="Search" aria-label="Search">
|
||||
<div class="input-group-append">
|
||||
<button class="btn btn-navbar" type="submit">
|
||||
<i class="fas fa-search"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
-->
|
||||
|
||||
|
||||
</nav>
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ scratch. This page gets rid of all links and provides the needed markup only.
|
|||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta http-equiv="x-ua-compatible" content="ie=edge">
|
||||
|
||||
<title>iCLOP - Unity</title>
|
||||
<title>iCLOP - Administrator Site</title>
|
||||
|
||||
<!-- Font Awesome Icons -->
|
||||
<link rel="stylesheet" href="{{asset('lte/plugins/fontawesome-free/css/all.min.css')}}">
|
||||
|
|
@ -82,3 +82,14 @@ scratch. This page gets rid of all links and provides the needed markup only.
|
|||
<script src="{{asset('lte/dist/js/adminlte.min.js')}}"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- -->
|
||||
<!-- -->
|
||||
|
||||
|
|
|
|||
47
resources/views/student/unitycourse/lfiles/create.blade.php
Normal file
47
resources/views/student/unitycourse/lfiles/create.blade.php
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
@extends('student/unitycourse/home')
|
||||
@section('content')
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
{{ Form::open(['route'=>'lfiles.store', 'files'=>true]) }}
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title">Submit a Learning Result File</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
@if(!empty($errors->all()))
|
||||
<div class="alert alert-danger">
|
||||
{{ Html::ul($errors->all())}}
|
||||
</div>
|
||||
@endif
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label for="data1">Topic</label>
|
||||
<input id="data1" type="text" value="{{ $topic['name'] }}" class="form-control" disabled />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
{!! Form::label('fileid', 'File Name:') !!}
|
||||
<select class="form-control" id="fileid" name="fileid">
|
||||
@foreach($files as $file)
|
||||
<option value="{{ $file->id }}" {{ $file->id == 0 ? 'selected' : '' }}>{{ $file->fileName.' >>> '.$file->path.'' }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
{{ Form::label('rscfile', 'File:') }}
|
||||
{{ Form::file('rscfile', ['class'=>'form-control']) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
<input type="hidden" name="topic" value="{{ $topic['id'] }}" />
|
||||
<input type="button" value="Back" onclick="history.back()" class="btn btn-outline-info">
|
||||
{{ Form::submit('Save', ['class' => 'btn btn-primary pull-right']) }}
|
||||
</div>
|
||||
</div>
|
||||
<!-- </form> -->
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
59
resources/views/student/unitycourse/lfiles/edit.blade.php
Normal file
59
resources/views/student/unitycourse/lfiles/edit.blade.php
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
@extends('student/unitycourse/home')
|
||||
@section('content')
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
{{ Form::model($data,['route'=>['results.update',$data['id']], 'files'=>true,'method'=>'PUT']) }}
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title">Change Data of Task Result</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
@if(!empty($errors->all()))
|
||||
<div class="alert alert-danger">
|
||||
{{ Html::ul($errors->all())}}
|
||||
</div>
|
||||
@endif
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
{!! Form::label('taskid', 'Learning Task:') !!}
|
||||
<select disabled class="form-control" id="taskid" name="taskid">
|
||||
@foreach($items as $item)
|
||||
<option value="{{ $item->id }}" {{ $item->id == $data['taskid'] ? 'selected' : '' }}>{{ '['.$item->name.'] '.$item->taskno.'. '.$item->desc }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
{{ Form::label('status', 'Status: ') }}
|
||||
<div>{{ Form::radio('status', 'Passed' , $data['status']=='Passed') }}
|
||||
Passed
|
||||
{{ Form::radio('status', 'Failed' , $data['status']=='Failed') }}
|
||||
Failed</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
{{ Form::label('duration', 'Duration') }}
|
||||
{{ Form::number('duration', $data['duration'], ['class'=>'form-control', 'placeholder'=>'Duration Time in Minutes']) }}
|
||||
</div>
|
||||
<div class="form-group">
|
||||
{{ Form::label('image', 'Captured Image of Evidence (jpg,png). Left it blank if does not change') }}
|
||||
{{ Form::file('image', ['class'=>'form-control']) }}
|
||||
</div>
|
||||
<div class="form-group">
|
||||
{{ Form::label('comment', 'Task Comment') }}
|
||||
{{ Form::textarea('comment', $data['comment'], ['class'=>'form-control', 'placeholder'=>'Task Comment', 'rows'=>5]) }}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
<input type="button" value="Back" onclick="history.back()" class="btn btn-outline-info">
|
||||
<input type="hidden" name="taskid" value="{{ $data['id'] }}" />
|
||||
{{ Form::submit('Save', ['class' => 'btn btn-primary pull-right']) }}
|
||||
</div>
|
||||
</div>
|
||||
<!-- </form> -->
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
|
@ -4,38 +4,78 @@
|
|||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title">Start to learn Unity Programming with APLAS</h3>
|
||||
<h3 class="card-title">Start to learn Android Programming with iCLOP</h3>
|
||||
<div class="card-tools">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<p>
|
||||
Student can start learning with preparing a PC to develop Web application.
|
||||
Student can start learning with preparing a PC to develop Android application.
|
||||
</p>
|
||||
</div>
|
||||
<div class="row">
|
||||
<p>
|
||||
<div>Requirements:</div>
|
||||
<div>Minimum Requirements :
|
||||
<ol>
|
||||
<li>
|
||||
A PC with minimum 4 GB RAM, 4 GB HDD, 1280 x 800 screen resolution, Microsoft Windows 7/8/10 (32- or 64-bit).
|
||||
CPU : Intel Core i3–350M dual-core processor (2.26 GHz, 3 MB Cache)
|
||||
</li>
|
||||
<li>
|
||||
Text Editor
|
||||
VGA : Integrated Intel HD graphics
|
||||
</li>
|
||||
<li>
|
||||
A web browser.
|
||||
RAM : 4GB DDR3 dual-channel RAM (2GB + 2GB)
|
||||
</li>
|
||||
<li>
|
||||
A PDF reader software.
|
||||
</li>
|
||||
<li>
|
||||
Internet Connection.
|
||||
</li>
|
||||
|
||||
<br>
|
||||
</ol>
|
||||
</p>
|
||||
<p1>
|
||||
<div>Recommendet Specs :
|
||||
<ol>
|
||||
<li>
|
||||
CPU : Intel Core i5-8400
|
||||
</li>
|
||||
<li>
|
||||
VGA : Integrated Intel UHD graphics
|
||||
</li>
|
||||
<li>
|
||||
RAM : 16 GB RAM
|
||||
</li>
|
||||
</ol>
|
||||
</p1>
|
||||
<br>
|
||||
<p2>
|
||||
<div>Software :
|
||||
<ol>
|
||||
<li>
|
||||
Windows 7 SP1 64-bit, Windows 8.1 64-bit, Windows 10 64-bit, Windows 11 64-bit
|
||||
</li>
|
||||
<li>
|
||||
Tools: Windows PowerShell 5.0+, Git 2.x
|
||||
</li>
|
||||
<li>
|
||||
Android Studio (Flutter Extension)
|
||||
</li>
|
||||
</ol>
|
||||
</p2>
|
||||
<br>
|
||||
<p3>
|
||||
<div>Documents :
|
||||
<ol>
|
||||
<li>
|
||||
Guide
|
||||
</li>
|
||||
<li>
|
||||
Supplement
|
||||
</li>
|
||||
<li>
|
||||
Test File
|
||||
</li>
|
||||
</ol>
|
||||
</p3>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,117 +0,0 @@
|
|||
@extends('student/unitycourse/home')
|
||||
@section('content')
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title">Start Learning Unity Programming with ICLOP</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
|
||||
<form method="GET" action="http://127.0.0.1:8000/student/tasks" accept-charset="UTF-8">
|
||||
<div class="form-group">
|
||||
<label for="topic">Learning Topic:</label>
|
||||
<select class="form-control" id="topicList" onchange="this.form.submit();" name="topicList">
|
||||
<option value="6" selected="selected">Make Game</option>
|
||||
</select>
|
||||
<div class="form-group">
|
||||
<label for="description">Description</label>
|
||||
<textarea id="desc" class="form-control" disabled="" rows="2">Pembelajaran topik Dynamic Content dengan membuat form dengan HTML</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<table class="table table-bordered table-hover">
|
||||
<thead>
|
||||
<tr class="text-center">
|
||||
<th></th>
|
||||
<th>Guide Documents</th>
|
||||
<th>Test Files</th>
|
||||
<th>Supplement Files</th>
|
||||
<th>Other Files</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
<tr>
|
||||
<td>Resource for <b>N2:NodeJS - Dynamic Content</b></td>
|
||||
<td class="text-center">
|
||||
<div class="btn-group">
|
||||
<a class="btn btn-success" href="{{asset('download/dynamic_content/Modul1.rar')}}"><i class="fa fa-download"></i> Download</a>
|
||||
</div>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<div class="btn-group">
|
||||
<a class="btn btn-warning" href="{{asset('download/dynamic_content/Modul1.rar')}}"><i class="fa fa-download"></i> Download</a>
|
||||
</div>
|
||||
</td>
|
||||
<!-- <td class="text-center">
|
||||
<div class="btn-group">
|
||||
<a class="btn btn-primary" href="{{asset('download/firebase/GUIDE_FIREBASE.rar')}}" disa><i class="fa fa-download"></i> Download</a>
|
||||
</div>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<div class="btn-group">
|
||||
<a class="btn btn-info" href="{{asset('download/firebase/GUIDE_FIREBASE.rar')}}"><i class="fa fa-download"></i> Download</a>
|
||||
</div>
|
||||
</td> -->
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<table class="table table-bordered table-hover">
|
||||
<thead>
|
||||
<tr class="text-center">
|
||||
<th>Task No.</th>
|
||||
<th>Description</th>
|
||||
<th>Topic Name</th>
|
||||
<th>Show</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="text-center">1</td>
|
||||
<td>Make Game</td>
|
||||
<td>Game slincer</td>
|
||||
<td class="text-center">
|
||||
<div class="btn-group">
|
||||
<a class="btn btn-info" href="http://127.0.0.1:8000/student/tasks/39"><i class="fa fa-eye"></i></a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-center">2</td>
|
||||
<td>Make Game</td>
|
||||
<td>Game slincer</td>
|
||||
<td class="text-center">
|
||||
<div class="btn-group">
|
||||
<a class="btn btn-info" href="http://127.0.0.1:8000/student/tasks/31"><i class="fa fa-eye"></i></a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-center">3</td>
|
||||
<td>Make Game</td>
|
||||
<td>Game slincer</td>
|
||||
<td class="text-center">
|
||||
<div class="btn-group">
|
||||
<a class="btn btn-info" href="http://127.0.0.1:8000/student/tasks/32"><i class="fa fa-eye"></i></a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
64
resources/views/student/unitycourse/results/create.blade.php
Normal file
64
resources/views/student/unitycourse/results/create.blade.php
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
@extends('student/unitycourse/home')
|
||||
@section('content')
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
{{ Form::open(['route'=>'results.store', 'files'=>true]) }}
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title">Submit a Task Result</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
@if(!empty($errors->all()))
|
||||
<div class="alert alert-danger">
|
||||
{{ Html::ul($errors->all())}}
|
||||
</div>
|
||||
@endif
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
{!! Form::label('taskid', 'Learning Task:') !!}
|
||||
<select class="form-control" id="taskid" name="taskid">
|
||||
@foreach($items as $item)
|
||||
<option value="{{ $item->id }}" {{ $item->id == 0 ? 'selected' : '' }}>{{ '['.$item->name.'] '.$item->taskno.'. '.$item->desc }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
{{ Form::label('status', 'Status: ') }}
|
||||
<div>{{ Form::radio('status', 'Passed' , true) }}
|
||||
Passed
|
||||
{{ Form::radio('status', 'Failed' , false) }}
|
||||
Failed</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
{{ Form::label('duration', 'Duration') }}
|
||||
{{ Form::number('duration', '0', ['class'=>'form-control', 'placeholder'=>'Duration Time in Minutes']) }}
|
||||
</div>
|
||||
<div class="form-group">
|
||||
{{ Form::label('image', 'Captured Image of Evidence (jpg,png)') }}
|
||||
{{ Form::file('image', ['class'=>'form-control']) }}
|
||||
</div>
|
||||
<div class="form-group">
|
||||
{{ Form::label('comment', 'Task Comment') }}
|
||||
{{ Form::textarea('comment', '', ['class'=>'form-control', 'placeholder'=>'Task Comment', 'rows'=>5]) }}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
<input type="hidden" name="topic" value="{{ $topic['id'] }}" />
|
||||
<input type="button" value="Back" onclick="history.back()" class="btn btn-outline-info">
|
||||
{{ Form::submit('Save', ['class' => 'btn btn-primary pull-right']) }}
|
||||
</div>
|
||||
<!-- <div class="card-footer">
|
||||
<input type="button" value="Back" onclick="history.back()" class="btn btn-outline-info">
|
||||
<input type="hidden" name="topic" value="{{ $topic['id'] }}" />
|
||||
{{ Form::submit('Save', ['class' => 'btn btn-primary pull-right']) }}
|
||||
</div> -->
|
||||
</div>
|
||||
<!-- </form> -->
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
57
resources/views/student/unitycourse/results/edit.blade.php
Normal file
57
resources/views/student/unitycourse/results/edit.blade.php
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
@extends('student/unitycourse/home')
|
||||
@section('content')
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
{{ Form::model($entity,['route'=>['results.update',$entity['id']], 'files'=>true,'method'=>'PUT']) }}
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title">Change Data of Task Result</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
@if(!empty($errors->all()))
|
||||
<div class="alert alert-danger">
|
||||
{{ Html::ul($errors->all())}}
|
||||
</div>
|
||||
@endif
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<div class="form-group">
|
||||
<label for="data1">Task</label>
|
||||
<input id="data1" type="text" value="{{ $task['taskno'].'. '.$task['desc'] }}" class="form-control" disabled />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
{{ Form::label('status', 'Status: ') }}
|
||||
<div>{{ Form::radio('status', 'Passed' , $entity['status']=='Passed') }}
|
||||
Passed
|
||||
{{ Form::radio('status', 'Failed' , $entity['status']=='Failed') }}
|
||||
Failed</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
{{ Form::label('duration', 'Duration') }}
|
||||
{{ Form::number('duration', $entity['duration'], ['class'=>'form-control', 'placeholder'=>'Duration Time in Minutes']) }}
|
||||
</div>
|
||||
<div class="form-group">
|
||||
{{ Form::label('image', 'Captured Image of Evidence (jpg,png). Left it blank if does not change') }}
|
||||
{{ Form::file('image', ['class'=>'form-control']) }}
|
||||
</div>
|
||||
<div class="form-group">
|
||||
{{ Form::label('comment', 'Task Comment') }}
|
||||
{{ Form::textarea('comment', $entity['comment'], ['class'=>'form-control', 'placeholder'=>'Task Comment', 'rows'=>5]) }}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
<input type="button" value="Back" onclick="history.back()" class="btn btn-outline-info">
|
||||
<input type="hidden" name="taskid" value="{{ $entity['taskid'] }}" />
|
||||
{{ Form::submit('Save', ['class' => 'btn btn-primary pull-right']) }}
|
||||
</div>
|
||||
</div>
|
||||
<!-- </form> -->
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
163
resources/views/student/unitycourse/results/index.blade.php
Normal file
163
resources/views/student/unitycourse/results/index.blade.php
Normal file
|
|
@ -0,0 +1,163 @@
|
|||
@extends('student/unitycourse/home')
|
||||
@section('content')
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title">Student's Task Results Submission</h3>
|
||||
|
||||
</div>
|
||||
<div class="card-body">
|
||||
@if (Session::has('message'))
|
||||
<div id="alert-msg" class="alert alert-success alert-dismissible">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true"><EFBFBD></button>
|
||||
{{ Session::get('message') }}
|
||||
</div>
|
||||
@endif
|
||||
{{ Form::open(['method' => 'GET']) }}
|
||||
<div class="form-group">
|
||||
{!! Form::label('topic', 'Learning Topic:') !!}
|
||||
{!! Form::select('topicList', $items , $filter, ['class' => 'form-control', 'id' => 'topicList', 'onchange' => 'this.form.submit();']) !!}
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
@php ($complete = true)
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-12">
|
||||
{!! Form::label('tit1', 'Result of Each Task:') !!}
|
||||
|
||||
@if ($valid=='0')
|
||||
<a class="btn btn-success" href="{{ URL::to('/student/unitycourse/results/create/'.$filter)}}"><i class="fa fa-plus"></i> Submit a Task Result</a>
|
||||
@endif
|
||||
<table class="table table-bordered table-hover">
|
||||
<thead>
|
||||
<tr class="text-center">
|
||||
<th>Task No.</th>
|
||||
<th>Description</th>
|
||||
<th>Status</th>
|
||||
<th>Duration</th>
|
||||
<th>Evidence</th>
|
||||
<th>Comment</th>
|
||||
<th>Action</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($entities as $entity)
|
||||
<tr>
|
||||
<td class="text-center">{{ $entity['taskno'] }}</td>
|
||||
<td>{{ $entity['desc'] }}</td>
|
||||
@if ($valid != '0')
|
||||
@php ($complete = false)
|
||||
<td colspan="5" color="red"><b><i>Task result was already validated</i></b></td>
|
||||
@elseif ($entity['status']=='')
|
||||
@php ($complete = false)
|
||||
<td colspan="5" color="red"><b><i>Not yet uploaded</i></b></td>
|
||||
@else
|
||||
<td>{{ $entity['status'] }}</td>
|
||||
<td>{{ $entity['duration'] }} minutes</td>
|
||||
<td class="text-center"><img src="{{ asset('storage/'.$entity['imgFile']) }}" width="120"/></td>
|
||||
<td>{{ $entity['comment'] }}</td>
|
||||
<td class="text-center">
|
||||
<form method="POST" action="{{ URL::to('/student/unitycourse/results/'.$entity['id']) }}">
|
||||
{{ csrf_field() }}
|
||||
<input type="hidden" name="_method" value="DELETE" />
|
||||
<input type="hidden" name="topic" value="{{ $filter }}" />
|
||||
<div class="btn-group">
|
||||
<a class="btn btn-success" href="{{ URL::to('/student/unitycourse/results/'.$entity['id'].'/edit') }}"><i class="fa fa-pencil-alt"></i></a>
|
||||
<button type="submit" class="btn btn-danger"><i class="fa fa-trash"></i></button>
|
||||
</div>
|
||||
</form>
|
||||
</td>
|
||||
@endif
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
</div>
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-12">
|
||||
{!! Form::label('tit2', 'Learning Files Submission:') !!}
|
||||
@if ($valid=='0')
|
||||
<a class="btn btn-info" href="{{ URL::to('/student/lfiles/create/'.$filter)}}"><i class="fa fa-plus"></i> Submit a Learning File</a>
|
||||
@endif
|
||||
<table class="table table-bordered table-hover">
|
||||
<thead>
|
||||
<tr class="text-center">
|
||||
<th>No.</th>
|
||||
<th>File Name</th>
|
||||
<th>Folder Path</th>
|
||||
<th>Description</th>
|
||||
<th>Status</th>
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($lfiles as $index => $lfile)
|
||||
<tr>
|
||||
<td class="text-center">{{ $index +1 }}</td>
|
||||
<td>{{ $lfile['fileName'] }}</td>
|
||||
<td>{{ $lfile['path'] }}</td>
|
||||
<td>{{ $lfile['desc'] }}</td>
|
||||
|
||||
@if ($valid!='0')
|
||||
@php ($complete = false)
|
||||
<td colspan="2" color="red"><b><i>Task result was already validated</i></b></td>
|
||||
@elseif ($lfile['rscfile']=='')
|
||||
@php ($complete = false)
|
||||
<td colspan="2" color="red"><b><i>Not yet submitted</i></b></td>
|
||||
@else
|
||||
<td class="text-center">
|
||||
<span class="btn btn-warning"><i class="fa fa-check-circle"></i></span>
|
||||
</td>
|
||||
|
||||
<td class="text-center">
|
||||
<form method="POST" action="{{ URL::to('/student/lfiles/'.$lfile['id']) }}">
|
||||
{{ csrf_field() }}
|
||||
<input type="hidden" name="_method" value="DELETE" />
|
||||
<input type="hidden" name="topic" value="{{ $filter }}" />
|
||||
<div class="btn-group">
|
||||
<!--<a class="btn btn-info" href="{{ URL::to('/student/unitycourse/results/'.$entity['id']) }}"><i class="fa fa-eye"></i></a>
|
||||
-->
|
||||
<!-- <a class="btn btn-success" href="{{ URL::to('/student/lfiles/'.$lfile['id'].'/edit') }}"><i class="fa fa-pencil-alt"></i></a> -->
|
||||
<button type="submit" class="btn btn-danger"><i class="fa fa-trash"></i></button>
|
||||
</div>
|
||||
</form>
|
||||
</td>
|
||||
@endif
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
@if ($valid=='0')
|
||||
@if ($complete)
|
||||
<a class="btn btn-danger" href="{{ URL::to('/student/lfiles/valid/'.$filter)}}"><i class="fa fa-check-square"></i> Validate This Learning</a>
|
||||
@else
|
||||
<span class="btn btn-block" ><i class="fa fa-frown"></i> Submission is Not Complete</a>
|
||||
@endif
|
||||
@else
|
||||
<span class="btn btn-block" ><i class="fa fa-smile"></i> Validation is Success</a>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
@endsection
|
||||
42
resources/views/student/unitycourse/results/show.blade.php
Normal file
42
resources/views/student/unitycourse/results/show.blade.php
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
@extends('admin/admin')
|
||||
@section('content')
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title">A Learning Task Detail</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label for="data1">Task Id</label>
|
||||
<input id="data1" type="text" value="{{ $data['id'] }}" class="form-control" disabled />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="data2">Task Number</label>
|
||||
<input id="data2" type="text" value="{{ $data['taskno'] }}" class="form-control" disabled />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="data3">Description</label>
|
||||
<input id="data3" type="text" value="{{ $data['desc'] }}" class="form-control" disabled />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="data4">Topic</label>
|
||||
<input id="data4" type="text" value="{{ $topic['name'] }}" class="form-control" disabled />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-footer">
|
||||
<input type="button" value="Back" onclick="history.back()" class="btn btn-outline-info">
|
||||
<!--
|
||||
<a href="{{ URL::to('admin/topic') }}" class="btn btn-outline-info">Back</a>
|
||||
-->
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
|
@ -1,8 +1,10 @@
|
|||
<aside class="main-sidebar sidebar-dark-primary elevation-4">
|
||||
<aside class="main-sidebar sidebar-dark-primary elevation-4">
|
||||
<!-- Brand Logo -->
|
||||
<a href="#" class="brand-link">
|
||||
<img src="{{asset('lte/dist/img/logo-aplas.png')}}" alt="APLAS logo" class="brand-image elevation-3" style="opacity: .8">
|
||||
<span class="brand-text font-weight-light">WebApps</span>
|
||||
<img src="{{asset('lte/dist/img/iclop-logo.png')}}" alt="iCLOP logo" class="brand-image elevation-3"
|
||||
style="width:120px;height:60px;">
|
||||
<br>
|
||||
<span class="brand-text font-weight-light" style="font-size:160%;"> Unity Course</span>
|
||||
</a>
|
||||
|
||||
<!-- Sidebar -->
|
||||
|
|
@ -20,20 +22,26 @@
|
|||
<!-- Sidebar Menu -->
|
||||
<nav class="mt-2">
|
||||
<ul class="nav nav-pills nav-sidebar flex-column" data-widget="treeview" role="menu" data-accordion="false">
|
||||
<li class="nav-item">
|
||||
<a href="{{URL::to('student/unitycourse/course')}}" class="nav-link">
|
||||
<i class="nav-icon fas fa-fire"></i>
|
||||
<p>
|
||||
course
|
||||
</p>
|
||||
<!-- Add icons to the links using the .nav-icon class
|
||||
with font-awesome or any other icon font library -->
|
||||
|
||||
|
||||
<li class="treeview">
|
||||
<a href="#" class="nav-link" style="background-color:powderblue;color:black;">
|
||||
<i class="nav-icon fas fa-space-shuttle"></i>
|
||||
<p><b>Start Learning</b></p>
|
||||
</a>
|
||||
</li>
|
||||
<ul role="menu" class="nav nav-pills nav-sidebar flex-column">
|
||||
<li class="nav-item">
|
||||
<a href="{{URL::to('student/unitycourse/page')}}" class="nav-link">
|
||||
<i class="nav-icon fas fa-fire"></i>
|
||||
<p>
|
||||
page jE em bte
|
||||
</p>
|
||||
<a href="{{URL::to('student/unitycourse/tasks')}}" class="nav-link"><i class="nav-icon fas fa-angle-right"></i>
|
||||
<p>Download Materials</p>
|
||||
</a >
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a href="{{URL::to('student/unitycourse/results')}}" class="nav-link">
|
||||
<i class="nav-icon fas fa-angle-right"></i>
|
||||
<p>Submit Your Project </p>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
|
|
|||
127
resources/views/student/unitycourse/tasks/index.blade.php
Normal file
127
resources/views/student/unitycourse/tasks/index.blade.php
Normal file
|
|
@ -0,0 +1,127 @@
|
|||
@extends('student/unitycourse/home')
|
||||
@section('content')
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title">Start Learning Android Programming with iCLOP</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
@if (Session::has('message'))
|
||||
<div id="alert-msg" class="alert alert-success alert-dismissible">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true"><EFBFBD></button>
|
||||
{{ Session::get('message') }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
{{ Form::open(['method' => 'GET']) }}
|
||||
<div class="form-group">
|
||||
{!! Form::label('topic', 'Learning Topic:') !!}
|
||||
{!! Form::select('topicList', $items , $filter, ['class' => 'form-control', 'id' => 'topicList', 'onchange' => 'this.form.submit();']) !!}
|
||||
<div class="form-group">
|
||||
<label for="description">Description</label>
|
||||
<textarea id="desc" class="form-control" disabled rows="2">{{ $topic['desc'] }}</textarea>
|
||||
</div>
|
||||
{{ Form::close() }}
|
||||
<!--
|
||||
{!! Form::label('topic', 'Topic:') !!}
|
||||
{!! Form::select('topic', $items , null, ['class' => 'form-control', 'onchange' => 'doSomething(this)']) !!}
|
||||
-->
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<table class="table table-bordered table-hover">
|
||||
<thead>
|
||||
<tr class="text-center">
|
||||
<th></th>
|
||||
<th>Guide Documents</th>
|
||||
<th>Test Files</th>
|
||||
<th>Supplement Files</th>
|
||||
<th>Other Files</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
<tr>
|
||||
<td>Resource for <b>{{ $topic['name'] }}</b></td>
|
||||
<td class="text-center">
|
||||
@if($topic['guide'] !='')
|
||||
<div class="btn-group">
|
||||
<a class="btn btn-success" href="{{ URL::to('/download/guide/'.str_replace('learning/','',$topic['guide']).'/'.str_replace(' ','',$topic['name'])) }}"><i class="fa fa-download"></i> Download</a>
|
||||
</div>
|
||||
@else
|
||||
Empty
|
||||
@endif
|
||||
</td>
|
||||
<td class="text-center">
|
||||
@if($topic['testfile'] !='')
|
||||
<div class="btn-group">
|
||||
<a class="btn btn-warning" href="{{ URL::to('/download/test/'.str_replace('learning/','',$topic['testfile']).'/'.str_replace(' ','',$topic['name'])) }}"><i class="fa fa-download"></i> Download</a>
|
||||
</div>
|
||||
@else
|
||||
Empty
|
||||
@endif
|
||||
</td>
|
||||
<td class="text-center">
|
||||
@if($topic['supplement'] !='')
|
||||
<div class="btn-group">
|
||||
<a class="btn btn-primary" href="{{ URL::to('/download/supp/'.str_replace('learning/','',$topic['supplement']).'/'.str_replace(' ','',$topic['name'])) }}"><i class="fa fa-download"></i> Download</a>
|
||||
</div>
|
||||
@else
|
||||
Empty
|
||||
@endif
|
||||
</td>
|
||||
<td class="text-center">
|
||||
@if($topic['other'] !='')
|
||||
<div class="btn-group">
|
||||
<a class="btn btn-info" href="{{ URL::to('/download/other/'.str_replace('learning/','',$topic['other']).'/'.str_replace(' ','',$topic['name'])) }}" ><i class="fa fa-download"></i> Download</a>
|
||||
</div>
|
||||
@else
|
||||
Empty
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<table class="table table-bordered table-hover">
|
||||
<thead>
|
||||
<tr class="text-center">
|
||||
<th>Task No.</th>
|
||||
<th>Description</th>
|
||||
<th>Topic Name</th>
|
||||
<th>Show</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($entities as $entity)
|
||||
<tr>
|
||||
<td class="text-center">{{ $entity['taskno'] }}</td>
|
||||
<td>{{ $entity['desc'] }}</td>
|
||||
<td>{{ $entity['name'] }}</td>
|
||||
<td class="text-center">
|
||||
<div class="btn-group">
|
||||
<a class="btn btn-info" href="{{ URL::to('/student/unitycourse/tasks/'.$entity['id']) }}"><i class="fa fa-eye"></i></a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
@endsection
|
||||
42
resources/views/student/unitycourse/tasks/show.blade.php
Normal file
42
resources/views/student/unitycourse/tasks/show.blade.php
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
@extends('student/unitycourse/home')
|
||||
@section('content')
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title">A Learning Task Detail</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label for="data1">Task Id</label>
|
||||
<input id="data1" type="text" value="{{ $data['id'] }}" class="form-control" disabled />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="data2">Task Number</label>
|
||||
<input id="data2" type="text" value="{{ $data['taskno'] }}" class="form-control" disabled />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="data3">Description</label>
|
||||
<input id="data3" type="text" value="{{ $data['desc'] }}" class="form-control" disabled />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="data4">Topic</label>
|
||||
<input id="data4" type="text" value="{{ $topic['name'] }}" class="form-control" disabled />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-footer">
|
||||
<input type="button" value="Back" onclick="history.back()" class="btn btn-outline-info">
|
||||
<!--
|
||||
<a href="{{ URL::to('admin/topic') }}" class="btn btn-outline-info">Back</a>
|
||||
-->
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
66
resources/views/student/unitycourse/valid/index.blade.php
Normal file
66
resources/views/student/unitycourse/valid/index.blade.php
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
@extends('student/home')
|
||||
@section('content')
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title">Validation Result of Learning Result</h3>
|
||||
<div class="card-tools">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
@if (Session::has('message'))
|
||||
<div id="alert-msg" class="alert alert-success alert-dismissible">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true"><EFBFBD></button>
|
||||
{{ Session::get('message') }}
|
||||
</div>
|
||||
@endif
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<table class="table table-bordered table-hover">
|
||||
<thead>
|
||||
<tr class="text-center">
|
||||
<th>Topic Name</th>
|
||||
<th>Submission Result</th>
|
||||
<th>Duration</th>
|
||||
<th>Validation Result</th>
|
||||
<th>Validation Detail</th>
|
||||
<th>Status</th>
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($entities as $entity)
|
||||
<tr>
|
||||
<td>{{ $entity['name'] }}</td>
|
||||
<td>{{ $entity['passed'] }} Task(s) Passed,<br/>{{ $entity['failed'] }} Task(s) Failed</td>
|
||||
<td>Total: {{ $entity['tot_duration'] }} minute(s),<br/>Average: {{ round($entity['avg_duration'],2) }} minute(s)/task</td>
|
||||
<td>
|
||||
@if ($entity['vpassed']=='')
|
||||
WAITING
|
||||
@else
|
||||
{{ $entity['vpassed'] }} Task(s) Passed,<br/>{{ $entity['vfailed'] }} Task(s) Failed
|
||||
@endif
|
||||
</td>
|
||||
<td>{!! nl2br($entity['checkresult']) !!}</td>
|
||||
<td>{{ $entity['checkstat'] }}</td>
|
||||
<td class="text-center">
|
||||
<div class="btn-group">
|
||||
<a class="btn btn-info" href="{{ URL::to('/student/valid/'.$entity['id']) }}"><i class="fa fa-eye"> Show Detail</i></a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
62
resources/views/student/unitycourse/valid/show.blade.php
Normal file
62
resources/views/student/unitycourse/valid/show.blade.php
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
@extends('student/home')
|
||||
@section('content')
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title">Validation Result Detail [Student name: {{ $student['name'] }}, Topic: {{ $topic['name'] }} ]</h3>
|
||||
<div class="card-tools">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
@if (Session::has('message'))
|
||||
<div id="alert-msg" class="alert alert-success alert-dismissible">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true"><EFBFBD></button>
|
||||
{{ Session::get('message') }}
|
||||
</div>
|
||||
@endif
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<table class="table table-bordered table-hover">
|
||||
<thead>
|
||||
<tr class="text-center">
|
||||
<th>No.</th>
|
||||
<th>Test File</th>
|
||||
<th>Taks Name</th>
|
||||
<th>Result</th>
|
||||
<th>Report</th>
|
||||
<th>Exec Time</th>
|
||||
<th>Duration</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($entities as $index => $entity)
|
||||
<tr>
|
||||
<td>{{ $index+1 }}</td>
|
||||
<td>{{ $entity['fileName'] }}</td>
|
||||
<td>{{ $entity['taskno'].'. '.$entity['desc'] }}</td>
|
||||
<td>{{ $entity['status'] }}</td>
|
||||
<td>{!! nl2br(e($entity['report'])) !!}</td>
|
||||
<td>{{ $entity['created_at'] }}</td>
|
||||
<td>{{ $entity['duration'] }} seconds</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
<input type="button" value="Back" onclick="history.back()" class="btn btn-outline-info">
|
||||
<!--
|
||||
<a href="{{ URL::to('admin/topic') }}" class="btn btn-outline-info">Back</a>
|
||||
-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
|
|
@ -115,7 +115,7 @@ Route::group(['middleware' => ['auth', 'student']], function() {
|
|||
Route::get('/student/androidcourse', 'StudentController@androidcourse');
|
||||
Route::resource('/student/androidcourse/tasks', 'TaskStdController');
|
||||
Route::resource('/student/androidcourse/results', 'TaskResultController');
|
||||
|
||||
// Flutter //
|
||||
Route::patch('/student/fluttercourse/results/valsub',['as' => 'results.valsub', 'uses' => 'FlutterTaskResultController@valsub']);
|
||||
Route::get('student/fluttercourse/results/create/{topic}', 'FlutterTaskResultController@create');
|
||||
Route::get('/student/fluttercourse', 'StudentController@fluttercourse');
|
||||
|
|
@ -126,7 +126,7 @@ Route::group(['middleware' => ['auth', 'student']], function() {
|
|||
Route::get('student/lfiles/fluttercourse/create/{topic}', 'FlutterFileResultController@create');
|
||||
Route::get('student/lfiles/fluttercourse/valid/{topic}', 'FlutterFileResultController@submit');
|
||||
Route::get('student/lfiles/fluttercourse/delete/{id}/{topic}', 'FlutterFileResultController@delete');
|
||||
|
||||
//NodeJs//
|
||||
Route::patch('/student/nodejscourse/results/valsub',['as' => 'results.valsub', 'uses' => 'NodejsTaskResultController@valsub']);
|
||||
Route::get('student/nodejscourse/results/create/{topic}', 'NodejsTaskResultController@create');
|
||||
Route::get('/student/nodejscourse', 'StudentController@Nodejscourse');
|
||||
|
|
@ -137,7 +137,17 @@ Route::group(['middleware' => ['auth', 'student']], function() {
|
|||
Route::get('student/lfiles/nodejscourse/create/{topic}', 'NodejsFileResultController@create');
|
||||
Route::get('student/lfiles/nodejscourse/valid/{topic}', 'NodejsFileResultController@submit');
|
||||
Route::get('student/lfiles/nodejscourse/delete/{id}/{topic}', 'NodejsFileResultController@delete');
|
||||
|
||||
//Unity//
|
||||
Route::patch('/student/unitycourse/results/valsub',['as' => 'results.valsub', 'uses' => 'UnityTaskResultController@valsub']);
|
||||
Route::get('student/unitycourse/results/create/{topic}', 'UnityTaskResultController@create');
|
||||
Route::get('/student/unitycourse', 'StudentController@unitycourse');
|
||||
Route::get('/student/unitycourse/topic', 'StudentController@unitycoursetopic');
|
||||
Route::resource('/student/unitycourse/tasks', 'UnityController');
|
||||
Route::resource('/student/unitycourse/results', 'UnityResultController');
|
||||
Route::resource('/student/unitycourse/lfiles', 'UnityFileResultController');
|
||||
Route::get('student/lfiles/unitycourse/create/{topic}', 'UnityFileResultController@create');
|
||||
Route::get('student/lfiles/unitycourse/valid/{topic}', 'UnityFileResultController@submit');
|
||||
Route::get('student/lfiles/unitycourse/delete/{id}/{topic}', 'UnityFileResultController@delete');
|
||||
|
||||
|
||||
/** Python */
|
||||
|
|
@ -163,17 +173,6 @@ Route::group(['middleware' => ['auth', 'student']], function() {
|
|||
|
||||
Route::get('/student/androidcourse/asynctask', 'StudentController@asynctask');
|
||||
Route::get('/student/androidcourse/firebase', 'StudentController@firebase');
|
||||
Route::get('/student/androidcourse/fluttercourse', 'StudentController@fluttercourse');
|
||||
|
||||
// unity route
|
||||
Route::get('/student/unitycourse', 'StudentController@unitycourse');
|
||||
Route::get('/student/unitycourse/course', 'StudentController@unitycoursetest');
|
||||
Route::get('/student/unitycourse/page', 'StudentController@unitycoursepage');
|
||||
//
|
||||
|
||||
// Route::get('/student/nodejs', 'StudentController@nodejscourse');
|
||||
// Route::get('/student/nodejscourse/basic-html', 'StudentController@nodejscourseBasicHTML');
|
||||
// Route::get('/student/nodejscourse/dynamic-content', 'StudentController@nodejscourseDynamicContent');
|
||||
|
||||
Route::get('/student', 'StudentController@index');
|
||||
Route::resource('/student/tasks', 'TaskStdController');
|
||||
|
|
@ -188,8 +187,7 @@ Route::group(['middleware' => ['auth', 'student']], function() {
|
|||
Route::resource('/student/androidcourse/rankview', 'StudentResultRankController');
|
||||
Route::resource('/student/androidcourse/valid', 'StudentValidController');
|
||||
Route::resource('/student/androidcourse/rankview', 'StudentResultRankController');
|
||||
// Route::get('/student/results/valsub', 'TaskResultController@valsub');
|
||||
Route::patch('/student/results/valsub',['as' => 'results.valsub', 'uses' => 'TaskResultController@valsub']);
|
||||
Route::patch('/student/results/valsub',['as' => 'results.valsub', 'uses' => 'TaskResultController@valsub']);
|
||||
Route::get('student/results/create/{topic}', 'TaskResultController@create');
|
||||
Route::resource('/student/lfiles', 'FileResultController');
|
||||
Route::get('student/lfiles/create/{topic}', 'FileResultController@create');
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user