-
Notifications
You must be signed in to change notification settings - Fork 1.2k
ac-3: week-8: Prof can submit Marks to assignment and made site responsive #1156
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
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
89cf10c
Fixed bug related to fetching semester and issues in template
cf8401c
Added Online CMS module to dashboard and minor fixes at teacher side …
44a3121
Fixed File Upload and viewing in both assignment and Slides for Instu…
8c8d5c3
Revert in changes in requirements.txt
dbdf182
Now Prof can give marks to Students Assignment and Made site responsive
6d5c360
Migration file added
432992b
changed coursedocument url max length
tech-akash 9ea5bda
merge with test
98ff8cb
Merge branch 'AC-3-Week-08' of github.com:tech-akash/Fusion into AC-3…
e25d545
Minor Fixes
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
18 changes: 18 additions & 0 deletions
18
FusionIIIT/applications/globals/migrations/0002_auto_20230312_0952.py
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Generated by Django 3.1.5 on 2023-03-12 09:52 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('globals', '0001_initial'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='extrainfo', | ||
name='user_status', | ||
field=models.CharField(choices=[('NEW', 'NEW'), ('PRESENT', 'PRESENT')], default='PRESENT', max_length=50), | ||
), | ||
] |
18 changes: 18 additions & 0 deletions
18
FusionIIIT/applications/globals/migrations/0003_auto_20230313_1725.py
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Generated by Django 3.1.5 on 2023-03-13 17:25 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('globals', '0002_auto_20230312_0952'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='extrainfo', | ||
name='user_status', | ||
field=models.CharField(choices=[('PRESENT', 'PRESENT'), ('NEW', 'NEW')], default='PRESENT', max_length=50), | ||
), | ||
] |
18 changes: 18 additions & 0 deletions
18
FusionIIIT/applications/globals/migrations/0004_auto_20230313_1733.py
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Generated by Django 3.1.5 on 2023-03-13 17:33 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('globals', '0003_auto_20230313_1725'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='extrainfo', | ||
name='user_status', | ||
field=models.CharField(choices=[('NEW', 'NEW'), ('PRESENT', 'PRESENT')], default='PRESENT', max_length=50), | ||
), | ||
] |
This file contains hidden or 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
This file contains hidden or 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
38 changes: 38 additions & 0 deletions
38
FusionIIIT/applications/online_cms/migrations/0002_courseassignment_courseslide.py
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# Generated by Django 3.1.5 on 2023-03-12 09:52 | ||
|
||
import applications.online_cms.models | ||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('academic_information', '0001_initial'), | ||
('online_cms', '0001_initial'), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='CourseSlide', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('upload_time', models.DateTimeField(auto_now=True)), | ||
('document_name', models.CharField(max_length=40)), | ||
('description', models.CharField(max_length=100)), | ||
('doc', models.FileField(blank=True, null=True, upload_to=applications.online_cms.models.content_file_name)), | ||
('course_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='academic_information.course')), | ||
], | ||
), | ||
migrations.CreateModel( | ||
name='CourseAssignment', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('upload_time', models.DateTimeField(auto_now=True)), | ||
('submit_date', models.DateTimeField()), | ||
('assignment_name', models.CharField(max_length=100)), | ||
('doc', models.FileField(blank=True, null=True, upload_to=applications.online_cms.models.assignment_file_name)), | ||
('course_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='academic_information.course')), | ||
], | ||
), | ||
] |
29 changes: 29 additions & 0 deletions
29
FusionIIIT/applications/online_cms/migrations/0003_auto_20230313_1635.py
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Generated by Django 3.1.5 on 2023-03-13 16:35 | ||
|
||
import applications.online_cms.models | ||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('online_cms', '0002_courseassignment_courseslide'), | ||
] | ||
|
||
operations = [ | ||
migrations.RemoveField( | ||
model_name='studentassignment', | ||
name='upload_url', | ||
), | ||
migrations.AddField( | ||
model_name='studentassignment', | ||
name='doc', | ||
field=models.FileField(blank=True, null=True, upload_to=applications.online_cms.models.assignment_submit_name), | ||
), | ||
migrations.AlterField( | ||
model_name='studentassignment', | ||
name='assignment_id', | ||
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='online_cms.courseassignment'), | ||
), | ||
] |
32 changes: 32 additions & 0 deletions
32
FusionIIIT/applications/online_cms/migrations/0004_auto_20230313_1639.py
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Generated by Django 3.1.5 on 2023-03-13 16:39 | ||
|
||
import applications.online_cms.models | ||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('academic_information', '0001_initial'), | ||
('online_cms', '0003_auto_20230313_1635'), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='StudentAssignment1', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('upload_time', models.DateTimeField(auto_now=True)), | ||
('doc', models.FileField(blank=True, null=True, upload_to=applications.online_cms.models.assignment_submit_name)), | ||
('score', models.IntegerField(null=True)), | ||
('feedback', models.CharField(max_length=100, null=True)), | ||
('assign_name', models.CharField(max_length=100)), | ||
('assignment_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='online_cms.courseassignment')), | ||
('student_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='academic_information.student')), | ||
], | ||
), | ||
migrations.DeleteModel( | ||
name='StudentAssignment', | ||
), | ||
] |
19 changes: 19 additions & 0 deletions
19
FusionIIIT/applications/online_cms/migrations/0005_studentassignment1_course_code.py
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Generated by Django 3.1.5 on 2023-03-13 17:33 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('online_cms', '0004_auto_20230313_1639'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='studentassignment1', | ||
name='course_code', | ||
field=models.CharField(default='CS416e', max_length=100), | ||
preserve_default=False, | ||
), | ||
] |
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ def content_file_name(instance, filename): | |
file_path = 'online_cms/{course_id}/doc/{fileName}.{ext}'.format( | ||
course_id=course_code, fileName=instance.document_name, ext=ext) | ||
return file_path | ||
#the documents in the course (slides , ppt) added by the faculty and can be downloaded by the students | ||
# the documents in the course (slides , ppt) added by the faculty and can be downloaded by the students | ||
class CourseSlide(models.Model): | ||
course_id = models.ForeignKey(Course, on_delete=models.CASCADE) | ||
upload_time = models.DateTimeField(auto_now=True) | ||
|
@@ -29,7 +29,7 @@ class CourseDocuments(models.Model): | |
upload_time = models.DateTimeField(auto_now=True) | ||
description = models.CharField(max_length=100) | ||
document_name = models.CharField(max_length=40) | ||
document_url = models.CharField(max_length=500, null=True,blank=True) | ||
document_url = models.CharField(max_length=100, null=True,blank=True) | ||
# media = models.FileField(upload_to=content_file_name, null=True, blank=True) | ||
|
||
def __str__(self): | ||
|
@@ -187,11 +187,37 @@ def __str__(self): | |
return '{} - {} - {}'.format(self.pk, self.course_id, self.assignment_name) | ||
|
||
#details of the solution uploaded by the student | ||
class StudentAssignment(models.Model): | ||
def assignment_submit_name(instance, filename): | ||
name, ext = filename.split('.') | ||
# obj=Curriculum.objects.get(course_id=instance.course_id) | ||
course_code=instance.course_code | ||
assignmentName=instance.assignment_id.assignment_name | ||
file_path = 'online_cms/{course_id}/assi/{assignmentName}/{fileName}.{ext}'.format( | ||
course_id=course_code,assignmentName=assignmentName, fileName=name, ext=ext) | ||
return file_path | ||
# class StudentAssignment(models.Model): | ||
# student_id = models.ForeignKey(Student, on_delete=models.CASCADE) | ||
# assignment_id = models.ForeignKey(CourseAssignment, on_delete=models.CASCADE) | ||
# upload_time = models.DateTimeField(auto_now=True) | ||
# # upload_url = models.TextField(max_length=200) | ||
# doc = models.FileField(upload_to=assignment_submit_name, null=True, blank=True) | ||
# score = models.IntegerField(null=True) #score is submitted by faculty | ||
# feedback = models.CharField(max_length=100, null=True) #feedback by the faculty for the solution of the assignment submitted | ||
# assign_name = models.CharField(max_length=100) | ||
|
||
# def __str__(self): | ||
# return '{} - {} - {} - {} - {}'.format( | ||
# self.pk, self.student_id, | ||
# self.assignment_id, self.score, | ||
# self.feedback) | ||
Comment on lines
+198
to
+212
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Kindly remove the comment which is not needed. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Will remove it after i am sure that any other module isn't using it |
||
|
||
class StudentAssignment1(models.Model): | ||
student_id = models.ForeignKey(Student, on_delete=models.CASCADE) | ||
assignment_id = models.ForeignKey(Assignment, on_delete=models.CASCADE) | ||
assignment_id = models.ForeignKey(CourseAssignment, on_delete=models.CASCADE) | ||
upload_time = models.DateTimeField(auto_now=True) | ||
upload_url = models.TextField(max_length=200) | ||
# upload_url = models.TextField(max_length=200) | ||
course_code=models.CharField(max_length=100) | ||
doc = models.FileField(upload_to=assignment_submit_name, null=True, blank=True) | ||
score = models.IntegerField(null=True) #score is submitted by faculty | ||
feedback = models.CharField(max_length=100, null=True) #feedback by the faculty for the solution of the assignment submitted | ||
assign_name = models.CharField(max_length=100) | ||
|
This file contains hidden or 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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use URLField instead of charfield for document_url . For charfields use max_length=255