Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

question answer basic system completed #4

Merged
merged 4 commits into from Nov 5, 2019

Conversation

vikashprajapati
Copy link
Collaborator

No description provided.


class PlayAreaController extends Controller
{
public function showQuestion()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rename method to just show. Keep things simple.

routes/web.php Outdated
@@ -19,4 +19,7 @@
Route::get('/google/callback', 'Auth\GoogleLoginController@handleProviderCallback')->middleware('guest');
Route::post('/logout', 'Auth\LoginController@logout')->middleware('guest');

Route::get('/playarea', 'PlayAreaController@showQuestion')->middleware('auth');
Route::post('/submitanswer', 'PlayAreaController@evaluateAnswer')->middleware('auth');
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change this uri to /playarea only and change the corresponding form.

return view('playarea', compact('question'));
}

public function evaluateAnswer(Request $request)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here, method name evaluateAnswer is very verbose and very specific about what this method does, this should be something generic.

We may not be just evaluating, we would be incrementing user's level, and award some score, and maybe something more in future.

So, for now, just rename it to postAnswer, this doesn't suggest we are essentially evaluating user's answer. This suggests a broader action i.e. posting answer, you maybe doing ten different things when someone postsAnswer.

@endif

@if (Session::has('status'))
{{ Session::get('status') }}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

enclose this in a <p> tag atleast.

@rumansaleem rumansaleem merged commit 51411ed into csdu:master Nov 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants