results
This commit is contained in:
parent
a30f446515
commit
c441f93268
11
app/FlutterFileresult.php
Normal file
11
app/FlutterFileresult.php
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<?php
|
||||
|
||||
namespace App;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class FlutterFileResult extends Model
|
||||
{
|
||||
protected $table='file_results';
|
||||
public $primaryKey='id';
|
||||
}
|
||||
234
app/Http/Controllers/FlutterExerciseStdController.php
Normal file
234
app/Http/Controllers/FlutterExerciseStdController.php
Normal file
|
|
@ -0,0 +1,234 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
|
||||
use Redirect;
|
||||
use Session;
|
||||
|
||||
class FlutterExerciseStdController extends Controller
|
||||
{
|
||||
//
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
*
|
||||
* @return Response
|
||||
*/
|
||||
public function index(Request $request)
|
||||
{
|
||||
if (Auth::user()->roleid == 'student') {
|
||||
$check = \App\User::find(Auth::user()->id);
|
||||
if ($check->status != 'active') return view('student/fluttercourse/home')->with(['status' => $check->status]);
|
||||
}
|
||||
|
||||
$stagelist = \App\ExerciseTopic::orderBy('stage', 'asc')->get();
|
||||
$topiclist = \App\ExerciseTopic::orderBy('name', 'asc')->get();
|
||||
|
||||
if ($topiclist->count() > 0) {
|
||||
$itemsstage = \App\ExerciseTopic::orderBy('stage', 'asc')
|
||||
->selectRaw('stage, min(id) as id')
|
||||
->groupBy('stage')
|
||||
->pluck('stage', 'id');
|
||||
|
||||
// $filter = $request->input('topicList', $topiclist[0]['id']);
|
||||
|
||||
$filter = $request->input('stageList', $topiclist[0]['id']);
|
||||
|
||||
$option = $request->input('option', 'github');
|
||||
|
||||
$stage = \App\ExerciseTopic::where('exercises.id', '=', $filter)
|
||||
->select(
|
||||
'exercises.id',
|
||||
'exercises.stage'
|
||||
)
|
||||
->get();
|
||||
|
||||
$topic = \App\ExerciseTopic::where('exercises.stage', '=', $stage[0]['stage'])
|
||||
->select(
|
||||
'exercises.id',
|
||||
'exercises.name',
|
||||
'exercises.desc',
|
||||
'exercise_files.guide',
|
||||
'exercise_files.testfile',
|
||||
'exercise_files.supplement',
|
||||
'exercise_files.other'
|
||||
)
|
||||
->leftJoin('exercise_files', 'exercise_files.exercise', '=', 'exercises.id')
|
||||
->get();
|
||||
return view('student/fluttercourse/exercise/index')
|
||||
->with(compact('itemsstage'))
|
||||
->with(compact('filter'))
|
||||
->with(compact('topic'))
|
||||
// ->with(compact('result'))
|
||||
->with(compact('option'));
|
||||
} else {
|
||||
return view('student/fluttercourse/exercise/index');
|
||||
}
|
||||
}
|
||||
|
||||
private function validateUrl($url)
|
||||
{
|
||||
$path = parse_url($url, PHP_URL_PATH);
|
||||
$encoded_path = array_map('urlencode', explode('/', $path));
|
||||
$url = str_replace($path, implode('/', $encoded_path), $url);
|
||||
|
||||
if (filter_var($url, FILTER_VALIDATE_URL)) {
|
||||
$result = parse_url($url);
|
||||
if (($result['scheme'] == 'https') && ($this->endsWith($result['host'], 'github.com'))) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private function validateZipFile(Request $request)
|
||||
{
|
||||
$rules = [
|
||||
'zipfile' => 'required',
|
||||
'comment' => 'required',
|
||||
'duration' => 'required',
|
||||
];
|
||||
|
||||
$msg = [
|
||||
'zipfile.required' => 'Zip file must not empty',
|
||||
'comment.required' => 'Exercise comment must not empty',
|
||||
'duration.required' => 'Duration time must not empty',
|
||||
];
|
||||
|
||||
$validator = Validator::make($request->all(), $rules, $msg);
|
||||
|
||||
if ($validator->fails()) {
|
||||
return Redirect::to('student/fluttercourse/exercise?topicList=' . $request->get('exercise'))
|
||||
->withErrors($validator);
|
||||
} else {
|
||||
$userid = Auth::user()->id;
|
||||
$exercise = $request->get('exercise');
|
||||
$file = $request->file('zipfile');
|
||||
$filename = $file->getClientOriginalName();
|
||||
//
|
||||
//$file = $request->file('zipfile');
|
||||
if ($filename != '') {
|
||||
//$array = explode('.', $path);
|
||||
//$ext = strtolower(end($array));
|
||||
$ext = strtolower(pathinfo($filename, PATHINFO_EXTENSION));
|
||||
if ($ext == "zip") {
|
||||
$zipFile = $file->store('exercise_results', 'public');
|
||||
|
||||
if ($zipFile != '') {
|
||||
$entity = new \App\ExerciseSubmit();
|
||||
|
||||
$entity->userid = $userid;
|
||||
$entity->exercise = $exercise;
|
||||
$entity->validstat = "valid";
|
||||
$entity->checkresult = "waiting";
|
||||
$entity->projectfile = $zipFile;
|
||||
$entity->comment = $request->get('comment');
|
||||
$entity->duration = $request->get('duration');
|
||||
|
||||
$entity->save();
|
||||
|
||||
$data = \App\ExerciseTopic::find($exercise);
|
||||
Session::flash('message', $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 -> ' . $filename . ' is wrong .' . $ext);
|
||||
}
|
||||
} else {
|
||||
Session::flash('message', 'Zip File is empty');
|
||||
}
|
||||
|
||||
|
||||
//return "Add new topic is success";
|
||||
return Redirect::to('student/fluttercourse/exercise?topicList=' . $exercise);
|
||||
}
|
||||
}
|
||||
|
||||
private function validateGithubLink(Request $request)
|
||||
{
|
||||
$rules = [
|
||||
'githublink' => 'required',
|
||||
'comment' => 'required',
|
||||
'duration' => 'required',
|
||||
];
|
||||
|
||||
$msg = [
|
||||
'githublink.required' => 'Github link must not empty',
|
||||
'comment.required' => 'Exercise comment must not empty',
|
||||
'duration.required' => 'Duration time must not empty',
|
||||
];
|
||||
|
||||
$validator = Validator::make($request->all(), $rules, $msg);
|
||||
|
||||
if ($validator->fails()) {
|
||||
return Redirect::to('student/fluttercourse/exercise?topicList=' . $request->get('exercise'))
|
||||
->withErrors($validator);
|
||||
} else {
|
||||
$userid = Auth::user()->id;
|
||||
$exercise = $request->get('exercise');
|
||||
$link = $request->get('githublink');
|
||||
//
|
||||
$trimmedlink = trim($link);
|
||||
if ($this->validateUrl($trimmedlink)) {
|
||||
$entity = new \App\ExerciseSubmit;
|
||||
|
||||
$entity->userid = $userid;
|
||||
$entity->exercise = $exercise;
|
||||
$entity->validstat = "valid";
|
||||
$entity->checkresult = "waiting";
|
||||
$entity->validator = "";
|
||||
$entity->comment = $request->get('comment');;
|
||||
$entity->duration = $request->get('duration');;
|
||||
$entity->githublink = $trimmedlink;
|
||||
|
||||
$entity->save();
|
||||
|
||||
$data = \App\ExerciseTopic::find($exercise);
|
||||
Session::flash('message', $data['name'] . ' Validation by submitting GitHub link is Success');
|
||||
|
||||
//Session::flash('message','URL valid '.$link);
|
||||
|
||||
} else {
|
||||
Session::flash('message', 'URL is not VALID ' . $link);
|
||||
}
|
||||
|
||||
//return "Add new topic is success";
|
||||
return Redirect::to('student/fluttercourse/exercise?topicList=' . $exercise);
|
||||
}
|
||||
}
|
||||
|
||||
private function endsWith($haystack, $needle)
|
||||
{
|
||||
return substr_compare($haystack, $needle, -strlen($needle)) === 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
*
|
||||
* @return Response
|
||||
*/
|
||||
public function store(Request $request)
|
||||
{
|
||||
if (($request->get('action') == 'validate') && (strlen($request->submitbutton) > 5)) {
|
||||
if ($request->get('option') == 'zipfile') {
|
||||
return $this->validateZipFile($request);
|
||||
} else if ($request->get('option') == 'github') {
|
||||
return $this->validateGithubLink($request);
|
||||
} else {
|
||||
return Redirect::to('student/fluttercourse/exercise?topicList=' . $request->get('exercise') . '&option=' . $request->get('option') .
|
||||
'&submit=' . $request->submitbutton);
|
||||
}
|
||||
} else { //clicking radio button
|
||||
return Redirect::to('student/fluttercourse/exercise?topicList=' . $request->get('exercise') . '&option=' . $request->get('option'));
|
||||
//'&submit='.$request->submitbutton);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
57
app/Http/Controllers/FlutterExerciseStdValidController.php
Normal file
57
app/Http/Controllers/FlutterExerciseStdValidController.php
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
|
||||
class FlutterExerciseStdValidController extends Controller
|
||||
{
|
||||
public function index(Request $request)
|
||||
{
|
||||
if (Auth::user()->roleid == 'student') {
|
||||
$check = \App\User::find(Auth::user()->id);
|
||||
if ($check->status != 'active') return view('student/fluttercourse/home')->with(['status' => $check->status]);
|
||||
}
|
||||
|
||||
$entities = \App\ExerciseSubmit::where('exercise_submits.userid', Auth::user()->id)
|
||||
->select(
|
||||
'exercise_submits.id',
|
||||
'exercises.name',
|
||||
'exercise_submits.checkstat',
|
||||
'exercise_validations.report',
|
||||
'exercise_submits.duration'
|
||||
)
|
||||
->leftJoin('exercise_validations', 'exercise_validations.exercisesubmitid', '=', 'exercise_submits.id')
|
||||
->leftJoin('exercises', 'exercise_submits.exercise', '=', 'exercises.id')
|
||||
->get();
|
||||
|
||||
return view('student/fluttercourse/exercisevalid/index')
|
||||
->with(compact('entities'));
|
||||
}
|
||||
|
||||
public function show($id)
|
||||
{
|
||||
$entities = \App\ExerciseSubmit::where('exercise_submits.userid', Auth::user()->id)
|
||||
->where('exercise_submits.id', $id)
|
||||
->select(
|
||||
'exercise_submits.id',
|
||||
'exercises.name',
|
||||
'exercises.singletestcode',
|
||||
'exercise_submits.checkstat',
|
||||
'exercise_validations.report',
|
||||
'exercise_validations.duration',
|
||||
'exercise_validations.created_at'
|
||||
)
|
||||
->leftJoin('exercise_validations', 'exercise_validations.exercisesubmitid', '=', 'exercise_submits.id')
|
||||
->leftJoin('exercises', 'exercise_submits.exercise', '=', 'exercises.id')
|
||||
->get();
|
||||
|
||||
$student = \App\User::find(Auth::user()->id);
|
||||
|
||||
return view('student/fluttercourse/exercisevalid/show')
|
||||
->with(compact('entities'))
|
||||
->with(compact('student'));
|
||||
}
|
||||
}
|
||||
|
||||
269
app/Http/Controllers/FlutterExerciseSubmissionController.php
Normal file
269
app/Http/Controllers/FlutterExerciseSubmissionController.php
Normal file
|
|
@ -0,0 +1,269 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
|
||||
use Redirect;
|
||||
use Session;
|
||||
|
||||
class FlutterExerciseSubmissionController extends Controller
|
||||
{
|
||||
public function index(Request $request)
|
||||
{
|
||||
if (Auth::user()->roleid == 'student') {
|
||||
$check = \App\User::find(Auth::user()->id);
|
||||
if ($check->status != 'active') return view('student/fluttercourse/home')->with(['status' => $check->status]);
|
||||
}
|
||||
$stagelist = \App\ExerciseTopic::orderBy('stage', 'asc')->get();
|
||||
$exerciselist = \App\ExerciseTopic::orderBy('name', 'asc')->get();
|
||||
|
||||
if ($exerciselist->count() > 0) {
|
||||
|
||||
// daftar stage untuk dropdown menu
|
||||
$itemsstage = \App\ExerciseTopic::orderBy('stage', 'asc')
|
||||
->selectRaw('stage, min(id) as id')
|
||||
->groupBy('stage')
|
||||
->pluck('stage', 'id');
|
||||
|
||||
// id stageList dari url
|
||||
$filter = $request->input('stageList', $stagelist[0]['id']);
|
||||
|
||||
// id exerciseList dari url
|
||||
$filterexercise = $request->input('exerciseList', $exerciselist[0]['id']);
|
||||
|
||||
// get nama stage dari $filter
|
||||
$stagename = \App\ExerciseTopic::orderBy('stage', 'asc')
|
||||
->where('id', $filter)
|
||||
->pluck('stage');
|
||||
|
||||
// daftar exercise untuk dropdown menu
|
||||
$itemsexercise = \App\ExerciseTopic::orderBy('id', 'asc')
|
||||
->where('stage', $stagename)
|
||||
->pluck('name', 'id');
|
||||
|
||||
if (!($this->checkstage($filter, $filterexercise))) {
|
||||
return Redirect::to('student/fluttercourse/exercisesubmission?stageList=' . $filter . '&exerciseList=' . $filter);
|
||||
}
|
||||
|
||||
$completed = \App\ExerciseSubmit::where('userid', '=', Auth::user()->id)
|
||||
->where('exercise', '=', $filterexercise)
|
||||
->get()->count();
|
||||
|
||||
$option = $request->input('option', 'github');
|
||||
|
||||
$stage = \App\ExerciseTopic::where('exercises.id', '=', $filter)
|
||||
->select(
|
||||
'exercises.id',
|
||||
'exercises.stage'
|
||||
)
|
||||
->get();
|
||||
|
||||
$topic = \App\ExerciseTopic::where('exercises.stage', '=', $stage[0]['stage'])
|
||||
->select(
|
||||
'exercises.name'
|
||||
)
|
||||
->get();
|
||||
|
||||
$result = \App\ExerciseValidation::where('exercise_validations.userid', Auth::user()->id)
|
||||
->where('exercise_submits.exercise', $filter)
|
||||
->select(
|
||||
'exercise_submits.checkstat',
|
||||
'exercise_submits.checkresult'
|
||||
)
|
||||
->leftJoin('exercise_submits', 'exercise_validations.exercisesubmitid', '=', 'exercise_submits.id')
|
||||
->first();
|
||||
|
||||
return view('student/fluttercourse/exercisesubmission/index')
|
||||
->with(compact('itemsstage'))
|
||||
->with(compact('itemsexercise'))
|
||||
->with(compact('filter'))
|
||||
->with(compact('filterexercise'))
|
||||
->with(compact('topic'))
|
||||
->with(compact('completed'))
|
||||
->with(compact('result'))
|
||||
->with(compact('option'));
|
||||
} else {
|
||||
return view('student/fluttercourse/exercisesubmission/index');
|
||||
}
|
||||
}
|
||||
|
||||
private function checkstage($stage, $exercise)
|
||||
{
|
||||
$stagename = \App\ExerciseTopic::orderBy('stage', 'asc')
|
||||
->where('id', $stage)
|
||||
->pluck('stage');
|
||||
$exercisestage = \App\ExerciseTopic::orderBy('stage', 'asc')
|
||||
->where('id', $exercise)
|
||||
->pluck('stage');
|
||||
|
||||
if ($stagename == $exercisestage) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private function validateUrl($url)
|
||||
{
|
||||
$path = parse_url($url, PHP_URL_PATH);
|
||||
$encoded_path = array_map('urlencode', explode('/', $path));
|
||||
$url = str_replace($path, implode('/', $encoded_path), $url);
|
||||
|
||||
if (filter_var($url, FILTER_VALIDATE_URL)) {
|
||||
$result = parse_url($url);
|
||||
if (($result['scheme'] == 'https') && ($this->endsWith($result['host'], 'github.com'))) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private function validateZipFile(Request $request)
|
||||
{
|
||||
$rules = [
|
||||
'zipfile' => 'required',
|
||||
'comment' => 'required',
|
||||
'duration' => 'required',
|
||||
];
|
||||
|
||||
$msg = [
|
||||
'zipfile.required' => 'Zip file must not empty',
|
||||
'comment.required' => 'Exercise comment must not empty',
|
||||
'duration.required' => 'Duration time must not empty',
|
||||
];
|
||||
|
||||
$validator = Validator::make($request->all(), $rules, $msg);
|
||||
|
||||
if ($validator->fails()) {
|
||||
return Redirect::to('student/fluttercourse/exercisesubmission?stageList=' . $request->get('stage') . '&exerciseList=' . $request->get('exercise'))
|
||||
->withErrors($validator);
|
||||
} else {
|
||||
$userid = Auth::user()->id;
|
||||
$exercise = $request->get('exercise');
|
||||
$file = $request->file('zipfile');
|
||||
$filename = $file->getClientOriginalName();
|
||||
//
|
||||
//$file = $request->file('zipfile');
|
||||
if ($filename != '') {
|
||||
//$array = explode('.', $path);
|
||||
//$ext = strtolower(end($array));
|
||||
$ext = strtolower(pathinfo($filename, PATHINFO_EXTENSION));
|
||||
if ($ext == "zip") {
|
||||
$zipFile = $file->store('exercise_results', 'public');
|
||||
|
||||
if ($zipFile != '') {
|
||||
$entity = new \App\ExerciseSubmit();
|
||||
|
||||
$entity->userid = $userid;
|
||||
$entity->exercise = $exercise;
|
||||
$entity->validstat = "valid";
|
||||
$entity->checkresult = "waiting";
|
||||
$entity->projectfile = $zipFile;
|
||||
$entity->comment = $request->get('comment');
|
||||
$entity->duration = $request->get('duration');
|
||||
|
||||
$entity->save();
|
||||
|
||||
$data = \App\ExerciseTopic::find($exercise);
|
||||
Session::flash('message', $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 -> ' . $filename . ' is wrong .' . $ext);
|
||||
}
|
||||
} else {
|
||||
Session::flash('message', 'Zip File is empty');
|
||||
}
|
||||
|
||||
|
||||
//return "Add new topic is success";
|
||||
return Redirect::to('student/fluttercourse/exercisesubmission?stageList=' . $request->get('stage') . '&exerciseList=' . $request->get('exercise'));
|
||||
}
|
||||
}
|
||||
|
||||
private function validateGithubLink(Request $request)
|
||||
{
|
||||
$rules = [
|
||||
'githublink' => 'required',
|
||||
'comment' => 'required',
|
||||
'duration' => 'required',
|
||||
];
|
||||
|
||||
$msg = [
|
||||
'githublink.required' => 'Github link must not empty',
|
||||
'comment.required' => 'Exercise comment must not empty',
|
||||
'duration.required' => 'Duration time must not empty',
|
||||
];
|
||||
|
||||
$validator = Validator::make($request->all(), $rules, $msg);
|
||||
|
||||
if ($validator->fails()) {
|
||||
return Redirect::to('student/fluttercourse/exercisesubmission?stageList=' . $request->get('stage') . '&exerciseList=' . $request->get('exercise'))
|
||||
->withErrors($validator);
|
||||
} else {
|
||||
$userid = Auth::user()->id;
|
||||
$exercise = $request->get('exercise');
|
||||
$link = $request->get('githublink');
|
||||
//
|
||||
$trimmedlink = trim($link);
|
||||
if ($this->validateUrl($trimmedlink)) {
|
||||
$entity = new \App\ExerciseSubmit;
|
||||
|
||||
$entity->userid = $userid;
|
||||
$entity->exercise = $exercise;
|
||||
$entity->validstat = "valid";
|
||||
$entity->checkresult = "waiting";
|
||||
$entity->comment = $request->get('comment');;
|
||||
$entity->duration = $request->get('duration');;
|
||||
$entity->githublink = $trimmedlink;
|
||||
|
||||
$entity->save();
|
||||
|
||||
$data = \App\ExerciseTopic::find($exercise);
|
||||
Session::flash('message', $data['name'] . ' Validation by submitting GitHub link is Success');
|
||||
|
||||
//Session::flash('message','URL valid '.$link);
|
||||
|
||||
} else {
|
||||
Session::flash('message', 'URL is not VALID ' . $link);
|
||||
}
|
||||
|
||||
//return "Add new topic is success";
|
||||
return Redirect::to('student/fluttercourse/exercisesubmission?stageList=' . $request->get('stage') . '&exerciseList=' . $request->get('exercise'));
|
||||
}
|
||||
}
|
||||
|
||||
private function endsWith($haystack, $needle)
|
||||
{
|
||||
return substr_compare($haystack, $needle, -strlen($needle)) === 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
*
|
||||
* @return Response
|
||||
*/
|
||||
public function store(Request $request)
|
||||
{
|
||||
if (($request->get('action') == 'validate') && (strlen($request->submitbutton) > 5)) {
|
||||
if ($request->get('option') == 'zipfile') {
|
||||
return $this->validateZipFile($request);
|
||||
} else if ($request->get('option') == 'github') {
|
||||
return $this->validateGithubLink($request);
|
||||
} else {
|
||||
return Redirect::to('student/fluttercourse/exercisesubmission');
|
||||
}
|
||||
} else { //clicking radio button
|
||||
return Redirect::to('student/fluttercourse/exercisesubmission?stageList=' . $request->get('stage') . '&exerciseList=' . $request->get('exercise') . '&option=' . $request->get('option'));
|
||||
//'&submit='.$request->submitbutton);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
180
app/Http/Controllers/FlutterExerciseValidController.php
Normal file
180
app/Http/Controllers/FlutterExerciseValidController.php
Normal file
|
|
@ -0,0 +1,180 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
|
||||
use Redirect;
|
||||
use Session;
|
||||
|
||||
class ExerciseValidController 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();
|
||||
}
|
||||
|
||||
private function getListStudentAll()
|
||||
{
|
||||
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 == '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\ExerciseStudentResultView::where('userid', $student)
|
||||
->where('id', $id)
|
||||
->get();
|
||||
$exercise = \App\ExerciseTopic::find($entities[0]['exerciseid']);
|
||||
$user = \App\User::find($student);
|
||||
$data = ['entities' => $entities, 'exercise' => $exercise, 'student' => $user];
|
||||
|
||||
// dd($uitestfile);
|
||||
return $data;
|
||||
}
|
||||
|
||||
public function show($id)
|
||||
{
|
||||
$data = $this->getDataShow(Auth::user()->id, $id);
|
||||
|
||||
return view('student/uistudentres/show')->with($data);
|
||||
}
|
||||
|
||||
public function showadmin($student, $id)
|
||||
{
|
||||
//
|
||||
$data = $this->getDataShow($student, $id);
|
||||
if (Auth::user()->roleid == 'admin') {
|
||||
//$data=['entities'=>$entities, 'items'=>$student, 'filter'=>$filter];
|
||||
return view('admin/exercisestudentres/show')->with($data);
|
||||
} else if (Auth::user()->roleid == 'teacher') {
|
||||
//$data=['entities'=>$entities, 'items'=>$student, 'filter'=>$filter];
|
||||
return view('teacher/uistudentres/show')->with($data);
|
||||
} else { //as student
|
||||
//$data=['entities'=>$entities];
|
||||
return view('student/uistudentres/show')->with($data);
|
||||
}
|
||||
//return view('teacher/studentres/show')->with($data);
|
||||
}
|
||||
|
||||
|
||||
|
||||
private function getFileSource($student, $topicid, $id)
|
||||
{
|
||||
$entities = \App\ExerciseFilesResult::where('exercise_file_results.userid', '=', $student)
|
||||
->select('exercise_file_results.rscfile', 'exercise_topic_files.filename')
|
||||
->join(
|
||||
'exercise_topic_files',
|
||||
function ($join) {
|
||||
$join->on('exercise_file_results.fileid', '=', 'exercise_topic_files.id');
|
||||
}
|
||||
)
|
||||
->where('exercise_topic_files.exercise', $topicid)
|
||||
->orderBy('exercise_topic_files.id', 'asc')
|
||||
->get();
|
||||
|
||||
$topic = \App\ExerciseTopic::find($topicid);
|
||||
$user = \App\User::find($student);
|
||||
$data = ['entities' => $entities, 'topic' => $topic, 'student' => $user];
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
|
||||
public function showsource($student, $topicid, $id)
|
||||
{
|
||||
//
|
||||
$data = $this->getFileSource($student, $topicid, $id);
|
||||
|
||||
if (Auth::user()->roleid == 'admin') {
|
||||
//$data=['entities'=>$entities, 'items'=>$student, 'filter'=>$filter];
|
||||
return view('admin/exerciseuploadsrc/index')->with($data);
|
||||
} else if (Auth::user()->roleid == 'teacher') {
|
||||
//$data=['entities'=>$entities, 'items'=>$student, 'filter'=>$filter];
|
||||
return view('teacher/uploadsrc/index')->with($data);
|
||||
} else { //as student
|
||||
//$data=['entities'=>$entities];
|
||||
return view('student/uiuploadsrc/index')->with($data);
|
||||
}
|
||||
//return view('teacher/studentres/show')->with($data);
|
||||
}
|
||||
}
|
||||
|
||||
101
resources/views/student/fluttercourse/exercise/index.blade.php
Normal file
101
resources/views/student/fluttercourse/exercise/index.blade.php
Normal file
|
|
@ -0,0 +1,101 @@
|
|||
@extends('student/fluttercourse/home')
|
||||
@section('content')
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title">Android Programming Excercise with APLAS</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
|
||||
@if(!empty($errors->all()))
|
||||
<div class="alert alert-danger">
|
||||
{{ Html::ul($errors->all())}}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if (!empty($itemsstage))
|
||||
{{ Form::open(['method' => 'GET']) }}
|
||||
<div class="form-group">
|
||||
{!! Form::label('stage', 'Select Stage:') !!}
|
||||
{!! Form::select('stageList', $itemsstage , $filter, ['class' => 'form-control', 'id' => 'stageList', 'onchange' => 'this.form.submit();']) !!}
|
||||
{{ Form::close() }}
|
||||
</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>
|
||||
@foreach($topic as $data)
|
||||
<tr>
|
||||
<td rowspan="2">Resource for <b>{{ $data['name'] }}</b></td>
|
||||
<td colspan="4">
|
||||
{{ $data['desc'] }}
|
||||
</td>
|
||||
</tr>
|
||||
<td class=" text-center">
|
||||
@if($data['guide'] !='')
|
||||
<div class="btn-group">
|
||||
<a class="btn btn-success" href="{{ URL::to('/download/exerciseguide/'.str_replace('exercise_files/','',$data['guide']).'/'.str_replace(' ','',$data['name'])) }}"><i class="fa fa-download"></i> Download</a>
|
||||
</div>
|
||||
@else
|
||||
Empty
|
||||
@endif
|
||||
</td>
|
||||
<td class="text-center">
|
||||
@if($data['testfile'] !='')
|
||||
<div class="btn-group">
|
||||
<a class="btn btn-warning" href="{{ URL::to('/download/exercisetest/'.str_replace('exercise_files/','',$data['testfile']).'/'.str_replace(' ','',$data['name'])) }}"><i class="fa fa-download"></i> Download</a>
|
||||
</div>
|
||||
@else
|
||||
Empty
|
||||
@endif
|
||||
</td>
|
||||
<td class="text-center">
|
||||
@if($data['supplement'] !='')
|
||||
<div class="btn-group">
|
||||
<a class="btn btn-primary" href="{{ URL::to('/download/exercisesupp/'.str_replace('exercise_files/','',$data['supplement']).'/'.str_replace(' ','',$data['name'])) }}"><i class="fa fa-download"></i> Download</a>
|
||||
</div>
|
||||
@else
|
||||
Empty
|
||||
@endif
|
||||
</td>
|
||||
<td class="text-center">
|
||||
@if($data['other'] !='')
|
||||
<div class="btn-group">
|
||||
<a class="btn btn-info" href="{{ URL::to('/download/exerciseother/'.str_replace('exercise_files/','',$data['other']).'/'.str_replace(' ','',$data['name'])) }}"><i class="fa fa-download"></i> Download</a>
|
||||
</div>
|
||||
@else
|
||||
Empty
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
@else
|
||||
<td><b>Exercise is not available at this time</b></td>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
|
|
@ -0,0 +1,55 @@
|
|||
@extends('student/fluttercourse/home')
|
||||
@section('content')
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title">Exercise Validation 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>Exercise Name</th>
|
||||
<th>Validation Detail</th>
|
||||
<th>Status</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@if(!empty($entities[0]['name']))
|
||||
|
||||
@foreach($entities as $entity)
|
||||
<tr>
|
||||
<td><b>{{ $entity['name'] }}</b></td>
|
||||
<td>{{ $entity['checkstat'] }}</td>
|
||||
<td><b>{{ $entity['checkresult'] }}</b></td>
|
||||
</tr>
|
||||
@endforeach
|
||||
|
||||
@else
|
||||
<tr>
|
||||
<td colspan="3" class="text-center">No validation data yet</td>
|
||||
</tr>
|
||||
@endif
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
|
|
@ -0,0 +1,132 @@
|
|||
@extends('student/fluttercourse/home')
|
||||
@section('content')
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title">Exercise 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
|
||||
|
||||
@if (!empty($itemsstage))
|
||||
{{ Form::open(['method' => 'GET']) }}
|
||||
<div class="form-group">
|
||||
{!! Form::label('stage', 'Select Exercise Stage:') !!}
|
||||
{!! Form::select('stageList', $itemsstage , $filter, ['class' => 'form-control', 'id' => 'stageList', 'onchange' => 'this.form.submit();']) !!}
|
||||
<p></p>
|
||||
|
||||
{!! Form::label('exercise', 'Select Exercise:') !!}
|
||||
{!! Form::select('exerciseList', $itemsexercise , $filterexercise, ['class' => 'form-control', 'id' => 'exerciseList', 'onchange' => 'this.form.submit();']) !!}
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
|
||||
{{ Form::open(['method' => 'GET']) }}
|
||||
<div class="form-group">
|
||||
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
|
||||
@php ($complete = true)
|
||||
{{ Form::open(['route'=>'flutterexercisesubmission.store', 'files'=>true]) }}
|
||||
<input type="hidden" name="action" value="validate" />
|
||||
<input type="hidden" name="stage" value="{{ $filter }}" />
|
||||
<input type="hidden" name="exercise" value="{{ $filterexercise }}" />
|
||||
|
||||
<p></p>
|
||||
|
||||
<div class="row">
|
||||
{!! Form::label('titw2', 'Assignment Answer Submission') !!}
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
{{ Form::radio('option', 'github' , $option=='github', ['onchange' => 'this.form.submit();']) }}
|
||||
{!! Form::label('tit55', "by GitHub Link: ") !!}
|
||||
<br />
|
||||
@if (($completed=='0') && ($option=='github'))
|
||||
<p><b>The link must be <font color='RED'>PUBLIC</font> access. Format : https://github.com/{{ '<username>' }}/project-name</b></p>
|
||||
{{ Form::text('githublink','https://github.com/', ['class'=>'form-control']) }}
|
||||
|
||||
<p></p>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('duration', 'Duration (Minutes)') }}
|
||||
{{ Form::number('duration', '0', ['class'=>'form-control', 'placeholder'=>'Duration Time in Minutes']) }}
|
||||
</div>
|
||||
|
||||
<p></p>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('comment', 'Exercise Comment') }}
|
||||
{{ Form::textarea('comment', '', ['class'=>'form-control', 'placeholder'=>'Task Comment', 'rows'=>5]) }}
|
||||
</div>
|
||||
@else
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p></p>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
{{ Form::radio('option', 'zipfile' , $option=='zipfile', ['onchange' => 'this.form.submit();']) }}
|
||||
{!! Form::label('tit55', "by Zip File of Android Project Folder: ") !!}
|
||||
<br />
|
||||
@if (($completed=='0') && ($option=='zipfile'))
|
||||
<p></p>
|
||||
<font color='RED'>File must have ZIP extension (*.zip), don't submit RAR file.</font>
|
||||
<p></p>
|
||||
{{ Form::file('zipfile', ['class'=>'form-control']) }}
|
||||
|
||||
<p></p>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('duration', 'Duration (Minutes)') }}
|
||||
{{ Form::number('duration', '0', ['class'=>'form-control', 'placeholder'=>'Duration Time in Minutes']) }}
|
||||
</div>
|
||||
|
||||
<p></p>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('comment', 'Exercise Comment') }}
|
||||
{{ Form::textarea('comment', '', ['class'=>'form-control', 'placeholder'=>'Task Comment', 'rows'=>5]) }}
|
||||
</div>
|
||||
@else
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p></p>
|
||||
|
||||
<div class="col-md-12">
|
||||
@if (!@$completed)
|
||||
{{ Form::submit('Submit this Exercise', ['class' => 'btn btn-danger', 'name' => 'submitbutton']) }}
|
||||
<span class="btn btn-block"><i class="fa fa-frown"></i> You haven't submitted an answer for <b>{{$topic[0]['name']}}</b></a>
|
||||
@else
|
||||
<span class="btn btn-block"><i class="fa fa-smile"></i> You have submitted an answer for <b>{{$topic[0]['name']}}</b></a>
|
||||
@endif
|
||||
</div>
|
||||
{{ Form::close() }}
|
||||
@else
|
||||
<td><b>Exercise is not available at this time</b></td>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="row"><br /></div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
@endsection
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
@extends('student/fluttercourse/home')
|
||||
@section('content')
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title">Exercise Validation 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>Exercise Name</th>
|
||||
<th>Duration</th>
|
||||
<th>Validation Detail</th>
|
||||
<th>Status</th>
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@if(!empty($entities[0]['name']))
|
||||
|
||||
@foreach($entities as $entity)
|
||||
<tr>
|
||||
<td>{{ $entity['name'] }}</td>
|
||||
<td>Total: {{ $entity['duration'] }} minute(s)</td>
|
||||
<td>{!! nl2br($entity['report']) !!}</td>
|
||||
<td>{{ $entity['checkstat'] }}</td>
|
||||
<td class="text-center">
|
||||
<div class="btn-group">
|
||||
<a class="btn btn-info" href="{{ URL::to('/student/exercisevalid/'.$entity['id']) }}"><i class="fa fa-eye"> Show Detail</i></a>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
@endforeach
|
||||
|
||||
@else
|
||||
<tr>
|
||||
<td colspan="6" class="text-center">No validation data yet</td>
|
||||
</tr>
|
||||
@endif
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
@extends('student/fluttercourse/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'] }}, Exercise name: {{ $entities[0]['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>Exercise 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['singletestcode'] }}</td>
|
||||
<td>{{ $entity['name'] }}</td>
|
||||
<td>{{ $entity['checkstat'] }}</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
|
||||
|
|
@ -1,286 +0,0 @@
|
|||
@extends('student/fluttercourse/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">
|
||||
<form
|
||||
method="GET"
|
||||
action="http://learning.aplas.online/aplas/public/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">
|
||||
A3:Android Java - Firebase - for Android Studio
|
||||
|
||||
</option>
|
||||
</select>
|
||||
<div class="form-group">
|
||||
<label for="description">Description</label>
|
||||
<textarea
|
||||
id="desc"
|
||||
class="form-control"
|
||||
disabled=""
|
||||
rows="2"
|
||||
>
|
||||
Java Edition for Android Studio
|
||||
This topic contains learning about Firebase
|
||||
</textarea
|
||||
>
|
||||
</div>
|
||||
|
||||
<!--
|
||||
<label for="topic">Topic:</label>
|
||||
<select class="form-control" onchange="doSomething(this)" id="topic" name="topic"><option value="6">A1:Java - Basic UI Java Edition - for Android Studio 3.x</option><option value="28">A1:Java - Basic UI Java Edition - for Android Studio 4.x</option><option value="15">A1:Kotlin - Basic UI Kotlin Edition</option><option value="7">B1:Java - Basic Activity Java Edition - for Android Studio 3.x</option><option value="30">B1:Java - Basic Activity Java Edition - for Android Studio 4.x</option><option value="16">B1:Kotlin - Basic Activity Kotlin Edition</option><option value="8">B2:Java - Advanced Widgets Java Edition - for Android Studio 3.x</option><option value="32">B2:Java - Advanced Widgets Java Edition - for Android Studio 4.x</option><option value="17">B2:Kotlin - Advanced Widgets Kotlin Edition</option><option value="4">B3:Java - Multiple Activities Java Edition - for Android Studio 3.x</option><option value="34">B3:Java - Multiple Activities Java Edition - for Android Studio 4.x</option><option value="21">B3:Kotlin - Multiple Activities Kotlin Edition</option><option value="5">B4:Java - Multimedia Resources Java Edition</option><option value="23">B4:Kotlin - Multimedia Resources Kotlin Edition</option><option value="26">C1:Java - Basic Data Storage Java Edition</option></select>
|
||||
-->
|
||||
</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
|
||||
>A3:Java - Firebase - for
|
||||
Android Studio </b
|
||||
>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<div class="btn-group">
|
||||
<div class="btn-group">
|
||||
<a class="btn btn-success" href="{{asset('download/firebase/GUIDE_FIREBASE.rar')}}"><i class="fa fa-download"></i> Download</a>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<div class="btn-group">
|
||||
<div class="btn-group">
|
||||
<a class="btn btn-warning" href="{{asset('download/firebase/test-file.rar')}}"><i class="fa fa-download"></i> Download</a>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<div class="btn-group">
|
||||
<div class="btn-group">
|
||||
<a class="btn btn-primary" href="{{asset('download/firebase/suplement-file.rar')}}"><i class="fa fa-download"></i> Download</a>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<div class="btn-group">
|
||||
<div class="btn-group">
|
||||
<a class="btn btn-info" href="{{asset('download/firebase/GUIDE ASYNCTASK.rar')}}"><i class="fa fa-download"></i> Download</a>
|
||||
</div>
|
||||
</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>Firebase Configuration</td>
|
||||
<td>
|
||||
C3:Java - Firebase Java Edition
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<div class="btn-group">
|
||||
<a
|
||||
class="btn btn-info"
|
||||
href="http://learning.aplas.online/aplas/public/student/tasks/39"
|
||||
><i class="fa fa-eye"></i
|
||||
></a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-center">2</td>
|
||||
<td>Create Register Activity</td>
|
||||
<td>
|
||||
C3:Java - Firebase Java Edition
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<div class="btn-group">
|
||||
<a
|
||||
class="btn btn-info"
|
||||
href="http://learning.aplas.online/aplas/public/student/tasks/31"
|
||||
><i class="fa fa-eye"></i
|
||||
></a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-center">3</td>
|
||||
<td>Create Login Activity</td>
|
||||
<td>
|
||||
C3:Java - CFirebase Java Edition
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<div class="btn-group">
|
||||
<a
|
||||
class="btn btn-info"
|
||||
href="http://learning.aplas.online/aplas/public/student/tasks/32"
|
||||
><i class="fa fa-eye"></i
|
||||
></a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-center">4</td>
|
||||
<td>Desain UI Seller Home and develope Seller Home Activity</td>
|
||||
<td>
|
||||
C3:Java - Firebase Java Edition
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<div class="btn-group">
|
||||
<a
|
||||
class="btn btn-info"
|
||||
href="http://learning.aplas.online/aplas/public/student/tasks/33"
|
||||
><i class="fa fa-eye"></i
|
||||
></a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-center">5</td>
|
||||
<td>Desain UI Seller Home AddProduct and Develope Seller Home</td>
|
||||
<td>
|
||||
C3:Java - Firebase Java Edition
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<div class="btn-group">
|
||||
<a
|
||||
class="btn btn-info"
|
||||
href="http://learning.aplas.online/aplas/public/student/tasks/34"
|
||||
><i class="fa fa-eye"></i
|
||||
></a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-center">6</td>
|
||||
<td>Desain UI Seller Home Detail Product dan Develop Seller Home Detail Product Activity</td>
|
||||
<td>
|
||||
C3:Java - Firebase Java Edition
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<div class="btn-group">
|
||||
<a
|
||||
class="btn btn-info"
|
||||
href="http://learning.aplas.online/aplas/public/student/tasks/34"
|
||||
><i class="fa fa-eye"></i
|
||||
></a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-center">7</td>
|
||||
<td>Desain UI Buyer Home dan Develop Buyer Home Activity</td>
|
||||
<td>
|
||||
C3:Java - Firebase Java Edition
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<div class="btn-group">
|
||||
<a
|
||||
class="btn btn-info"
|
||||
href="http://learning.aplas.online/aplas/public/student/tasks/34"
|
||||
><i class="fa fa-eye"></i
|
||||
></a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-center">8</td>
|
||||
<td>Desain UI Buyer Home Detail Productdan Develop Buyer Home Detail ProductActivity</td>
|
||||
<td>
|
||||
C3:Java - Firebase Java Edition
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<div class="btn-group">
|
||||
<a
|
||||
class="btn btn-info"
|
||||
href="http://learning.aplas.online/aplas/public/student/tasks/34"
|
||||
><i class="fa fa-eye"></i
|
||||
></a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-center">9</td>
|
||||
<td>Desain UI Cart dan Develop Cart Activity</td>
|
||||
<td>
|
||||
C3:Java - Firebase Java Edition
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<div class="btn-group">
|
||||
<a
|
||||
class="btn btn-info"
|
||||
href="http://learning.aplas.online/aplas/public/student/tasks/34"
|
||||
><i class="fa fa-eye"></i
|
||||
></a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-center">10</td>
|
||||
<td>Desain UI Detail Cart dan Develop Detail Cart Activity</td>
|
||||
<td>
|
||||
C3:Java - Firebase Java Edition
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<div class="btn-group">
|
||||
<a
|
||||
class="btn btn-info"
|
||||
href="http://learning.aplas.online/aplas/public/student/tasks/34"
|
||||
><i class="fa fa-eye"></i
|
||||
></a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
|
@ -126,6 +126,9 @@ 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');
|
||||
Route::resource('/student/flutterexercise', 'FlutterExerciseStdController');
|
||||
Route::resource('/student/flutterexercisesubmission', 'FlutterExerciseSubmissionController');
|
||||
Route::resource('/student/flutterexercisevalid', 'FlutterExerciseStdValidController');
|
||||
//NodeJs//
|
||||
Route::patch('/student/nodejscourse/results/valsub',['as' => 'results.valsub', 'uses' => 'NodejsTaskResultController@valsub']);
|
||||
Route::get('student/nodejscourse/results/create/{topic}', 'NodejsTaskResultController@create');
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user