Unify icon indicating copy to clipboard operation
Unify copied to clipboard

Main

Open snehas-05 opened this issue 2 years ago • 10 comments

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 📚

snehas-05 avatar Oct 18 '24 07:10 snehas-05

@Harshdev098 kindly have a look on this pr once.

snehas-05 avatar Oct 28 '24 09:10 snehas-05

Hey @Harshdev098 I have made all the necessary changes you asked me to do, committed them and synced also. Now do I need to create a new pr? Or is this pr sufficient?

snehas-05 avatar Oct 28 '24 17:10 snehas-05

It's sufficient

Harshdev098 avatar Oct 28 '24 17:10 Harshdev098

Also remove the modules folder as I said the db connection is build using the config folder @snehas-05

Harshdev098 avatar Oct 29 '24 04:10 Harshdev098

@snehas-05 Please! Before opening a PR make sure that your fork is synced and clone is up to date with the main branch of the repo

Harshdev098 avatar Oct 29 '24 04:10 Harshdev098

@snehas-05 The changes are not satisfactory, many changes are required to accomplish this feature. Many of the requested changes not being done

Harshdev098 avatar Nov 10 '24 09:11 Harshdev098

From my side all the changes you requested I have made.

snehas-05 avatar Nov 10 '24 09:11 snehas-05

I have just mentioned this-

image

but you have written all the queries Also you have not changed this ,

image

Harshdev098 avatar Nov 10 '24 09:11 Harshdev098

@Harshdev098 I'm so sorry for all the mess I have removed the unnecessary queries syntax. And for this db code I think this file is not mine.(The code in this is not written by me)

snehas-05 avatar Nov 10 '24 10:11 snehas-05

@Harshdev098 ?.

snehas-05 avatar Nov 10 '24 11:11 snehas-05