fixed bug where tests page in moderator view wouldn't load
This commit is contained in:
parent
6f78428814
commit
6b8526971b
2 changed files with 2 additions and 2 deletions
|
@ -26,7 +26,7 @@ class ModeratorController extends Controller
|
|||
|
||||
public function showTests()
|
||||
{
|
||||
$tests = Auth::user()->getTests();
|
||||
$tests = Auth::user()->group->getGroupTests();
|
||||
return view('tests.showall', compact('tests'));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
<tr>
|
||||
<td>{{ $test->id }}</td>
|
||||
<td>{{ $test->title }}</td>
|
||||
@if (Auth::user()->access_level == 2 AND !$test->group_id == 0 OR Auth::user()->access_level == 3)
|
||||
@if (Auth::user()->access_level == 2 AND $test->group_id == Auth::user()->group_id OR Auth::user()->access_level == 3)
|
||||
<td>
|
||||
<form method="get" class="pull-right">
|
||||
<button class="btn btn-sm btn-default pull-left" formaction="/{{ Auth::user()->getAdminPath() }}/tests/{{ $test->id }}">Edit</button>
|
||||
|
|
Reference in a new issue