-
Notifications
You must be signed in to change notification settings - Fork 228
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
Issuing Digital Certificate #761
Open
WISE-ELITE-2K18
wants to merge
90
commits into
FOSSEE:master
Choose a base branch
from
WISE-ELITE-2K18:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
It sends the certificate to the user when the course is completed
Created get_certificateStatus and set_certificateStatus helps to know about the certificate status
Hello @WISE-ELITE-2K18! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found: There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻 Comment last updated at 2020-09-20 05:17:56 UTC |
adityacp
reviewed
Sep 14, 2020
adityacp
reviewed
Sep 14, 2020
adityacp
reviewed
Sep 14, 2020
adityacp
reviewed
Sep 14, 2020
adityacp
reviewed
Sep 14, 2020
adityacp
reviewed
Sep 14, 2020
adityacp
reviewed
Sep 14, 2020
adityacp
reviewed
Sep 14, 2020
adityacp
reviewed
Sep 14, 2020
|
deleted: certificate_bg.jpg deleted: fossee_logo.png Untracked files: certificate_images/
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Contributors List
Here is the list of the curators who have designed the Certificate and sent it to User's ground.
Contribution
Issuing Digital Certificates
Issue Introduction
As the name suggests, a certificate should be sent to the user through digital media as a token of completion of the course. Scholars, you can think "We already have that feature in YAKSH Platform" but this is different from that. We have jotted it down. You people get it, once if you skim through this.
Work Flow:
Why we have chosen this issue?
These days peeps are expecting the result even without completing their work. But we are not getting the result at the time and as googly we are asked to refill the details but we lazy programmers don't want to do it. We decided to fix this issue, We will be issuing a certificate so that the user can get the certificate the very next minute of the completion of the course. So to send the certificate we may have various ways for all those ways we need to get extra data or information but to make it user friendly or student-friendly we are not taking any bit of extra data. But the people who are reading this, a doubt might have already raised in your mind that how can the user get their certificate. Here is your answer we will be sending the certificate through the mail which the user gives to register into our platform.
How we fixed it??
1.Certificate Generation
We have decided to generate the certificate using LaTeX, we can generate it through HTML but to transcend we have used LaTeX.Before embarking into it, the initial step is the LaTeX installation.
Command to install LaTeX:
sudo apt-get install texlive
Certificate:
Following is the sample Certificate generated using Latex.
2.Integrating certificate with code
As the project is totally related to Django and Python the next step is all about how we integrated our TeX file(which we have used to generate certificate) and Python file. As every certificate contains the user name and course name to render those we have sent them as arguments using the Jinja template engine. We have used the jinja2 module to achieve this.And then we have coverted this file to pdf format using pdflatex.
3.Fetching Data from Yaksh Database:
The jinja2 module is just a means of transport to reach the destination but the source is Yaksh database. Course id and user id are taken from yaksh_coursestatus and their corresponding username and course name are fetched from auth_user and yaksh_course tables.
4.Sending Certificate via Mail:
Once the user is done with the entire course, a certificate has to be sent to his/her mail. And after sending a certificate to the user, the information is updated in the Certificate column in the Course_status table.
Sending Email:
Email ids of users are fetched from auth_user using user_id.Finally, An email is sent to user's mail with a message of course completion and with an attachment of a certificate.
Code Modifications
1.In online_test/online_test/settings.py/
In this file we have changed the values of variables as:
EMAIL_USE_TLS = True
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_PORT = '587'
EMAIL_HOST_USER = '[email protected]'
EMAIL_HOST_PASSWORD = 'elite2019'
EMAIL_USE_SSL = False
2. In online_test/yaksh/send_emails.py/
Inorder to send mail to the user, in this file we mentioned the content of the body of email, subject and attachment(of Certificate) which has to be sent.
3. In online_test/yaksh/models.py/
In this file in the class CourseStatus, we have added a single line of code inorder to add a column to the Course_status table in YAKSH Database.
And in the same class we have created two functions named get_certificateStatus() and set_certificateStatus() to know if the user received his/her certificate or not.
4.In online_test/yaksh/views.py/
Here, we imported mail_certificate from send_emails.
In Views Module, we have included a piece of code to generate a Certificate with his/her details upon Completion of a Course.
5.In online_test/yaksh/templates/yaksh/course_modules.html
In this HTML file, we have included code to provide a button to get Certificate.