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

Main #196

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Main #196

wants to merge 1 commit into from

Conversation

snehas-05
Copy link

Issue number #185
This pull request introduces a Profile Badges and Achievements system to enhance student engagement and motivation on the Research-Nexas platform. The feature allows students to earn badges for significant accomplishments, such as submitting research papers, achieving high evaluation scores, and actively participating in peer reviews and collaborations.

Key Features
Badge Creation: Admins can create badges with specific criteria.
Awarding Badges: Badges can be awarded to students based on their achievements.
Viewing Badges: Students can view all badges available and those they have earned.
Database Integration: New tables for badges and student-badge relationships have been added to the MySQL database.

Instructions for Implementation-

  1. Database Setup: Execute the provided SQL statements to create the badges and student_badges tables in your MySQL database.
    Ensure that your database connection in config/db.js is properly configured to communicate with your MySQL server.

  2. Connect Routes: Import the badges route in your main application file (e.g., app.js)
    const badgesRouter =require('./routes/badges');
    app.use('/api/badges', badgesRouter);

  3. Testing the API: Use Postman or a similar tool to test the following endpoints:
    POST /api/badges/create: Create a new badge.
    GET /api/badges: Retrieve all badges.
    POST /api/badges/award: Award a badge to a student.
    GET /api/badges/:studentId: Retrieve badges for a specific student.

I know you’re already familiar with these instructions, but I’m including them here to ensure a smooth running of the feature. Please review the code changes thoroughly and let me know if you have any questions or need further modifications. Thankyou.

✅ Checklist

Before submitting the PR, please make sure you have completed the following:

  • [ ✓] I have followed all the guidlines mentioned in CONTRIBUTING.md.
  • [✓ ] 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 (if applicable).
  • [✓ ] I have tested it locally and it works fine.
  • [✓ ] Any dependent changes have been merged and published in downstream modules.

🏷️ Types of Changes

What type of changes does your code introduce? (Check all that apply)

  • Bug fix (non-breaking change which fixes an issue) 🐛
  • [✓ ] New feature (non-breaking change which adds functionality) ✨
  • UI enhancement (non-breaking change which enhances UI) 🎨
  • Documentation update 📚

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

🎉 Thank you @snehas-05 for your contribution! Your pull request has been submitted successfully. A maintainer will review it as soon as possible. We appreciate your support in making this project better

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.

1 participant