Skip to content

Implemented submit-feature - #341

Open
rohith1222004 wants to merge 1 commit into
wingkwong:developfrom
rohith1222004:submit-feature
Open

rohith1222004 wants to merge 1 commit into
wingkwong:developfrom
rohith1222004:submit-feature

Conversation

@rohith1222004

Copy link
Copy Markdown

Closes #56

@wingkwong wingkwong left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

  1. please update README.md as well
  2. make it configurable

Comment thread src/lib/Core.jsx
Submit
</button>
</div>
:null

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

simply use &&

Comment thread src/lib/Core.jsx
Comment on lines +463 to +466
<div style={{display:'flex', justifyContent: 'space-between'}}>
{
!endQuiz?
<div style={{ display: 'flex',marginRight:'auto'}}>

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

don't use inline styles

Comment thread src/lib/Core.jsx
<div style={{ display: 'flex',marginRight:'auto'}}>
<button
onClick={() => {submitQuiz()}}
style={{ display: 'flex', justifyContent: 'center', backgroundColor: 'green',color:'white' }}

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

don't use inline styles

Comment thread src/lib/Core.jsx
Comment on lines +371 to +375
const submitQuiz = () => {
setIsRunning(false);
setEndQuiz(true);
getUnansweredQuestions();
}

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

the code is same as handleTimeUp. don't duplicate it. revise the function and use for both case.

@Julix91

Julix91 commented Oct 26, 2024

Copy link
Copy Markdown

@rohith1222004 are you still interested in finishing this? Can you include a screenshot like #56 (comment) in the PR as well?

And if you could make the submit early button configurable: optional (off by default, set some kind of flag to turn it on) and so the caller can decide what to call the submit early button. "Quit" or "Exit" or whatever, depending on the context.

Also style wise it should probably look the same as the existing buttons, just copy the relevant classes I'm guessing.

Let me know if you need any help with the suggestions.

@obiora198

Copy link
Copy Markdown

@rohith1222004 I installed your branch and the submit button is not showing, apart from the Core.js file did you modify any other file?

This branch has not been deployed

No deployments
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.

Can i quit a quiz and still get result summary?

4 participants