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

Added quiz section #341

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

Muskan-creator
Copy link
Contributor

@Muskan-creator Muskan-creator commented Apr 4, 2021

Description

Please include a summary of the change and which issue is fixed.
Added a fullly dynamic quiz page of data structure and algorithms in html ,css and javascript when clicking on quizzes section in features tab.

Fixes #328

List any dependencies that are required for this change

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

How Has This Been Tested?

UI /UX changes

Attach gif or screenshot for changes.

  • Before :
    image

  • After :
    image

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@Muskan-creator
Copy link
Contributor Author

@harikesh409 please review

Quiz.html Show resolved Hide resolved

body{
font-size: 20px;
background-color: #000;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Don't use black as background color use something which matches our color scheme.




.container{
Copy link
Collaborator

Choose a reason for hiding this comment

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

You can include bootstrap and use those styles as in our website we are using bootstrap.

css/quiz.css Outdated
button:hover{
background-color: #3cae3c;
}

Copy link
Collaborator

Choose a reason for hiding this comment

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

Remove unnecessary lines.

css/quiz.css Outdated
width:500px;
background-color: #f1f1f1;
box-shadow: 0 8px 6px -6px black;

Copy link
Collaborator

Choose a reason for hiding this comment

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

remove empty lines.

" HashMap",
"List","D"]
];
function $(arg) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Include jquery and use it.

Quiz.html Outdated
</div>
</div>
<div class="container">
<div class="row well">
Copy link
Collaborator

Choose a reason for hiding this comment

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

well is a bootstrap 3 class use card which is a bootstrap 4 class.

option = options[i].value;
}
}
if (option == questions[pos][5]) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Declare the variable option in the checkAnswer() or else the option is declared in global scope and if the user didn't give an option and click submit then the previous answer will be store here.


function checkAnswer() {
options = document.getElementsByName("options");
for (var i = 0; i < options.length; i++) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

The whole loop can be simplified using jquery.

Ref: https://api.jquery.com/checked-selector/

css/quiz.css Outdated
@@ -0,0 +1,77 @@
@import url(https://fonts.googleapis.com/css?family=Work+Sans:300,600);
Copy link
Collaborator

@harikesh409 harikesh409 Apr 5, 2021

Choose a reason for hiding this comment

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

If possible remove this files and use the fonts that are already present in css/style.css

@harikesh409
Copy link
Collaborator

@Muskan-creator what is the progress and also resolve the merge conflicts.

@Muskan-creator
Copy link
Contributor Author

@harikesh409 please review

@harikesh409
Copy link
Collaborator

@harikesh409 please review

Few comments are not yet addressed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Adding quizzes related to ds and algo in quizzes section
2 participants