From 99e604c5ac6666a3c912b9c4c3be7d208dfd8182 Mon Sep 17 00:00:00 2001 From: Akash Singh Date: Thu, 6 Apr 2023 16:31:03 +0530 Subject: [PATCH 1/7] modified migrations added single migrations file for online_cms --- .../migrations/0008_auto_20230406_1625.py | 18 ++++++ .../migrations/0002_auto_20230406_1625.py | 60 +++++++++++++++++++ 2 files changed, 78 insertions(+) create mode 100644 FusionIIIT/applications/globals/migrations/0008_auto_20230406_1625.py create mode 100644 FusionIIIT/applications/online_cms/migrations/0002_auto_20230406_1625.py diff --git a/FusionIIIT/applications/globals/migrations/0008_auto_20230406_1625.py b/FusionIIIT/applications/globals/migrations/0008_auto_20230406_1625.py new file mode 100644 index 000000000..445cf78c2 --- /dev/null +++ b/FusionIIIT/applications/globals/migrations/0008_auto_20230406_1625.py @@ -0,0 +1,18 @@ +# Generated by Django 3.1.5 on 2023-04-06 16:25 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('globals', '0007_merge_20230406_1624'), + ] + + operations = [ + migrations.AlterField( + model_name='extrainfo', + name='user_status', + field=models.CharField(choices=[('PRESENT', 'PRESENT'), ('NEW', 'NEW')], default='PRESENT', max_length=50), + ), + ] diff --git a/FusionIIIT/applications/online_cms/migrations/0002_auto_20230406_1625.py b/FusionIIIT/applications/online_cms/migrations/0002_auto_20230406_1625.py new file mode 100644 index 000000000..f6d607f0b --- /dev/null +++ b/FusionIIIT/applications/online_cms/migrations/0002_auto_20230406_1625.py @@ -0,0 +1,60 @@ +# Generated by Django 3.1.5 on 2023-04-06 16:25 + +import applications.online_cms.models +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('academic_information', '0002_student_hall_id'), + ('online_cms', '0001_initial'), + ] + + operations = [ + 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')), + ], + ), + 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='StudentAssignment1', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('upload_time', models.DateTimeField(auto_now=True)), + ('course_code', models.CharField(max_length=100)), + ('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.AlterField( + model_name='coursedocuments', + name='document_url', + field=models.CharField(blank=True, max_length=100, null=True), + ), + migrations.DeleteModel( + name='StudentAssignment', + ), + ] From bf3ca57ede8529315e28acdaecc7d6f6d6a4d95e Mon Sep 17 00:00:00 2001 From: Akash Singh Date: Sun, 9 Apr 2023 12:48:04 +0530 Subject: [PATCH 2/7] Changes from Previous PR --- .../migrations/0008_auto_20230406_1625.py | 18 ----- FusionIIIT/applications/online_cms/admin.py | 7 +- FusionIIIT/applications/online_cms/forms.py | 6 +- FusionIIIT/applications/online_cms/models.py | 35 +++++++-- FusionIIIT/applications/online_cms/urls.py | 4 +- FusionIIIT/applications/online_cms/views.py | 77 ++++++++++--------- .../coursemanagement/assessment.html | 74 ++++++------------ .../coursemanagement/viewcourse.html | 4 +- .../coursemanagement/viewperformance.html | 6 +- 9 files changed, 112 insertions(+), 119 deletions(-) delete mode 100644 FusionIIIT/applications/globals/migrations/0008_auto_20230406_1625.py diff --git a/FusionIIIT/applications/globals/migrations/0008_auto_20230406_1625.py b/FusionIIIT/applications/globals/migrations/0008_auto_20230406_1625.py deleted file mode 100644 index 445cf78c2..000000000 --- a/FusionIIIT/applications/globals/migrations/0008_auto_20230406_1625.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 3.1.5 on 2023-04-06 16:25 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('globals', '0007_merge_20230406_1624'), - ] - - operations = [ - migrations.AlterField( - model_name='extrainfo', - name='user_status', - field=models.CharField(choices=[('PRESENT', 'PRESENT'), ('NEW', 'NEW')], default='PRESENT', max_length=50), - ), - ] diff --git a/FusionIIIT/applications/online_cms/admin.py b/FusionIIIT/applications/online_cms/admin.py index 24679190f..8bf6cd720 100644 --- a/FusionIIIT/applications/online_cms/admin.py +++ b/FusionIIIT/applications/online_cms/admin.py @@ -2,7 +2,8 @@ from .models import (Assignment, CourseDocuments, CourseVideo, Forum, ForumReply, Quiz, QuizQuestion, QuizResult, StudentAnswer, - StudentAssignment, Topics,CourseSlide) + StudentAssignment1, Topics,CourseSlide,CourseAssignment + ) class QuizResultAdmin(admin.ModelAdmin): model = QuizResult @@ -11,7 +12,7 @@ class QuizResultAdmin(admin.ModelAdmin): admin.site.register(CourseDocuments) admin.site.register(CourseSlide) admin.site.register(CourseVideo) - +admin.site.register(CourseAssignment) admin.site.register(Quiz) admin.site.register(Topics) @@ -22,7 +23,7 @@ class QuizResultAdmin(admin.ModelAdmin): admin.site.register(Assignment) -admin.site.register(StudentAssignment) +admin.site.register(StudentAssignment1) admin.site.register(QuizResult, QuizResultAdmin) diff --git a/FusionIIIT/applications/online_cms/forms.py b/FusionIIIT/applications/online_cms/forms.py index 802de9dbe..61d4f1c84 100644 --- a/FusionIIIT/applications/online_cms/forms.py +++ b/FusionIIIT/applications/online_cms/forms.py @@ -124,4 +124,8 @@ class Meta: fields=['couse_id','doc'] # title = forms.CharField(max_length=50) - file = forms.FileField() \ No newline at end of file + file = forms.FileField() + +class AssignmentMarks(forms.Form): + marks=forms.IntegerField() + feedback=forms.CharField(max_length=255) \ No newline at end of file diff --git a/FusionIIIT/applications/online_cms/models.py b/FusionIIIT/applications/online_cms/models.py index fe8dce565..bfd3e15e6 100644 --- a/FusionIIIT/applications/online_cms/models.py +++ b/FusionIIIT/applications/online_cms/models.py @@ -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): @@ -186,16 +186,39 @@ class CourseAssignment(models.Model): 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): +# #details of the solution uploaded by the student +# class StudentAssignment(models.Model): +# student_id = models.ForeignKey(Student, on_delete=models.CASCADE) +# assignment_id = models.ForeignKey(Assignment, on_delete=models.CASCADE) +# upload_time = models.DateTimeField(auto_now=True) +# upload_url = models.TextField(max_length=200) +# 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) +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 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) - def __str__(self): return '{} - {} - {} - {} - {}'.format( self.pk, self.student_id, diff --git a/FusionIIIT/applications/online_cms/urls.py b/FusionIIIT/applications/online_cms/urls.py index a15cc3029..07e5d178c 100644 --- a/FusionIIIT/applications/online_cms/urls.py +++ b/FusionIIIT/applications/online_cms/urls.py @@ -70,6 +70,8 @@ url(r'^(?P[A-z]+[0-9]+[A-z]?)/edit_bank/(?P[0-9]+)$', views.edit_bank, name='edit_bank'), url(r'^(?P[A-z]+[0-9]+[A-z]?)/attendance$', views.submit_attendance, - name='submit_attendance'),] + name='submit_attendance'), + url(r'^(?P[A-z]+[0-9]+[A-z]?)/edit-assignment-marks$', views.edit_assignment_marks, + name='assignment_marks'), ] urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) diff --git a/FusionIIIT/applications/online_cms/views.py b/FusionIIIT/applications/online_cms/views.py index 7f60b9363..eeaadf12c 100644 --- a/FusionIIIT/applications/online_cms/views.py +++ b/FusionIIIT/applications/online_cms/views.py @@ -25,6 +25,8 @@ # from .helpers import create_thumbnail, semester from .models import * from .helpers import create_thumbnail, semester +from django.shortcuts import HttpResponseRedirect +from django.urls import reverse @login_required @@ -174,12 +176,12 @@ def course(request, course_code): # videos.append(video_data) # print(videos) - slides = CourseDocuments.objects.select_related().filter(course_id=course) + slides = CourseSlide.objects.select_related().filter(course_id=course) quiz = Quiz.objects.select_related().filter(course_id=course) - assignment = Assignment.objects.select_related().filter(course_id=course) + assignment = CourseAssignment.objects.select_related().filter(course_id=course) student_assignment = [] for assi in assignment: - sa = StudentAssignment.objects.select_related().filter(assignment_id=assi, student_id=student) + sa = StudentAssignment1.objects.select_related().filter(assignment_id=assi, student_id=student) student_assignment.append(sa) ''' marks to store the marks of quizes of student @@ -309,16 +311,17 @@ def course(request, course_code): # tempform.course_id=course # tempform.save() videos=[] - slides1=CourseSlide.objects.select_related().filter(course_id=course) - slides = CourseDocuments.objects.select_related().filter(course_id=course) + slides1 = CourseSlide.objects.select_related().filter(course_id=course) + slides=None quiz = Quiz.objects.select_related().filter(course_id=course) marks = [] quizs = [] assignment = Assignment.objects.select_related().filter(course_id=course) assignment1 = CourseAssignment.objects.select_related().filter(course_id=course) student_assignment = [] - for assi in assignment: - sa = StudentAssignment.objects.select_related().filter(assignment_id=assi) + for assi in assignment1: + sa = StudentAssignment1.objects.select_related().filter(assignment_id=assi) + # print("hii",sa) student_assignment.append(sa) for q in quiz: qs = QuizResult.objects.select_related().filter(quiz_id=q) @@ -370,28 +373,24 @@ def upload_assignment(request, course_code): doc = request.FILES.get('img') #the images in the assignment assi_name = request.POST.get('assignment_topic') name = request.POST.get('name') - assign = Assignment.objects.get(pk=assi_name) + assign = CourseAssignment.objects.get(pk=assi_name) filename, file_extenstion = os.path.splitext(request.FILES.get('img').name) except: return HttpResponse("Please fill each and every field correctly!") filename = name - full_path = settings.MEDIA_ROOT + "/online_cms/" + course_code + "/assi/" #storing the media files - full_path = full_path + assign.assignment_name + "/" + student.id.id + "/" - url = settings.MEDIA_URL + filename - if not os.path.isdir(full_path): - cmd = "mkdir " + full_path - subprocess.call(cmd, shell=True) - fs = FileSystemStorage(full_path, url) - fs.save(name + file_extenstion, doc) #saving the media files - uploaded_file_url = full_path+ "/" + name + file_extenstion + # to save the solution of assignment the database - sa = StudentAssignment( - student_id=student, - assignment_id=assign, - upload_url=uploaded_file_url, - assign_name=name+file_extenstion + StudentAssignment1.objects.create( + student_id=student, + doc=doc, + assignment_id=assign, + course_code=course_code, + assign_name=name+file_extenstion + # upload_time=datetime.datetime.now(), + # description=description, + # document_name=name, + # doc=doc ) - sa.save() return HttpResponse("Upload successful.") else: return HttpResponse("not found") @@ -479,12 +478,12 @@ def delete(request, course_code): slide.delete() #to delete the submitted assignment elif data_type == 'stuassignment': - stu_assi = StudentAssignment.objects.select_related().get(pk=pk) + stu_assi = StudentAssignment1.objects.select_related().get(pk=pk) path = stu_assi.upload_url stu_assi.delete() #to delete the assignment uploaded by faculty elif data_type == 'lecassignment': - lec_assi = Assignment.objects.select_related().get(pk=pk) + lec_assi = CourseAssignment.objects.select_related().get(pk=pk) path = lec_assi.assignment_url lec_assi.delete() cmd = "rm "+path @@ -670,16 +669,7 @@ def add_assignment(request, course_code): #from faculty side except: return HttpResponse("Please Enter The Form Properly") filename = name - full_path = settings.MEDIA_ROOT + "/online_cms/" + course_code + "/assi/" + name + "/" - print(full_path) - url = settings.MEDIA_URL + filename - if not os.path.isdir(full_path): - cmd = "mkdir " + full_path - subprocess.call(cmd, shell=True) - fs = FileSystemStorage(full_path, url) - fs.save(filename+file_extenstion, assi) - uploaded_file_url = full_path + filename + file_extenstion - print(uploaded_file_url) + CourseAssignment.objects.create( course_id=course, submit_date=request.POST.get('myDate'), @@ -697,6 +687,23 @@ def add_assignment(request, course_code): #from faculty side else: return HttpResponse("not found") +@login_required +def edit_assignment_marks(request,*args, **kwargs): + if request.method=='POST': + print("hiii") + form=AssignmentMarks(request.POST) + if form.is_valid(): + sa=StudentAssignment1.objects.get(pk=int(request.POST['assignmentid'][0])) + # print() + sa.score=form.cleaned_data['marks'] + sa.feedback=form.cleaned_data['feedback'] + sa.save() + # print(sa.course_code) + course_code = sa.course_code + # url = reverse('course', args=[course_code]) + return HttpResponse("Marks Updated!") + # return redirect(course,course_code='CS416e') + return HttpResponse("Error Occured!") @login_required def edit_bank(request, course_code, qb_code): diff --git a/FusionIIIT/templates/coursemanagement/assessment.html b/FusionIIIT/templates/coursemanagement/assessment.html index 41a7954e9..bdae9a6f1 100644 --- a/FusionIIIT/templates/coursemanagement/assessment.html +++ b/FusionIIIT/templates/coursemanagement/assessment.html @@ -11,11 +11,11 @@

{{course.course_name}}

- {% for assi in assignment %} + {% for assi in assignment1 %}
@@ -45,18 +45,31 @@

- - {% endfor %} @@ -352,7 +352,7 @@

{{course.course_name}}

diff --git a/FusionIIIT/templates/coursemanagement/viewperformance.html b/FusionIIIT/templates/coursemanagement/viewperformance.html index 386b6a9af..489c12d8e 100644 --- a/FusionIIIT/templates/coursemanagement/viewperformance.html +++ b/FusionIIIT/templates/coursemanagement/viewperformance.html @@ -59,13 +59,13 @@

You didn't submit any assignment

{% endif %} {% else %}

Results

- {% if assignment|length %} + {% if assignment1|length %} - {% for assi in assignment %} + {% for assi in assignment1 %}
+
+ {%csrf_token%}
- + {% comment %} {% endcomment %} + +
+
+
+
+ {% comment %} {% endcomment %} + +
- -
- + {{sa.pk}} +
-
-
- Download + + + + {% comment %}
+
{% endcomment %} + {% comment %}
+ +
{% endcomment %}
{% if sa.score %} @@ -85,46 +98,7 @@

-
- - {% csrf_token %} -
- - - - - - - - - - - {% for x in registered_students %} - - - - - {% endfor %} - -
Students
-
-

{{x.student_id}}

-
-
- - - -
-
- - -
+
{% endblock %} diff --git a/FusionIIIT/templates/coursemanagement/viewcourse.html b/FusionIIIT/templates/coursemanagement/viewcourse.html index 44f1d9fb8..0f287bfc7 100644 --- a/FusionIIIT/templates/coursemanagement/viewcourse.html +++ b/FusionIIIT/templates/coursemanagement/viewcourse.html @@ -312,7 +312,7 @@

Submitable Assignments

{{forloop.counter}} {{assi.assignment_name}} {{assi.submit_date}}
+

From 77aacd3704ca2ef60a2bdb27144b420e2b3bfe5c Mon Sep 17 00:00:00 2001 From: Akash Singh Date: Mon, 10 Apr 2023 14:26:31 +0530 Subject: [PATCH 3/7] minor fixes on upload marks and removed comments --- FusionIIIT/applications/online_cms/models.py | 16 +---------- FusionIIIT/applications/online_cms/views.py | 28 +++++-------------- .../coursemanagement/assessment.html | 1 - .../coursemanagement/viewcourse.html | 18 ++++++++++++ 4 files changed, 26 insertions(+), 37 deletions(-) diff --git a/FusionIIIT/applications/online_cms/models.py b/FusionIIIT/applications/online_cms/models.py index bfd3e15e6..828d9f785 100644 --- a/FusionIIIT/applications/online_cms/models.py +++ b/FusionIIIT/applications/online_cms/models.py @@ -186,21 +186,7 @@ class CourseAssignment(models.Model): 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): -# student_id = models.ForeignKey(Student, on_delete=models.CASCADE) -# assignment_id = models.ForeignKey(Assignment, on_delete=models.CASCADE) -# upload_time = models.DateTimeField(auto_now=True) -# upload_url = models.TextField(max_length=200) -# 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) + def assignment_submit_name(instance, filename): name, ext = filename.split('.') # obj=Curriculum.objects.get(course_id=instance.course_id) diff --git a/FusionIIIT/applications/online_cms/views.py b/FusionIIIT/applications/online_cms/views.py index eeaadf12c..7140ecfff 100644 --- a/FusionIIIT/applications/online_cms/views.py +++ b/FusionIIIT/applications/online_cms/views.py @@ -14,6 +14,7 @@ from django.http import HttpResponse, HttpResponseBadRequest from django.shortcuts import redirect, render from django.utils import timezone +from django.contrib import messages from applications.academic_information.models import (Course, Curriculum_Instructor,Curriculum, Student,Student_attendance) @@ -386,10 +387,7 @@ def upload_assignment(request, course_code): assignment_id=assign, course_code=course_code, assign_name=name+file_extenstion - # upload_time=datetime.datetime.now(), - # description=description, - # document_name=name, - # doc=doc + ) return HttpResponse("Upload successful.") else: @@ -434,13 +432,7 @@ def add_document(request, course_code): document_name=name, doc=doc ) - # CourseDocuments.objects.create( - # course_id=course, - # upload_time=datetime.datetime.now(), - # description=description, - # document_url=uploaded_file_url, - # document_name=name+file_extenstion - # ) + return HttpResponse("Upload successful.") else: @@ -606,8 +598,7 @@ def ajax_new(request, course_code): roll = student.id.id[:4] #course = Course.objects.get(course_id=course_code, sem=semester(roll)) curriculum_details = Curriculum.objects.select_related('course_id').filter(course_code=course_code) #curriculum id - #print(curriculum_details[0].course_id) - #print(Curriculum.objects.values_list('curriculum_id')) + course = curriculum_details[0].course_id else: @@ -676,13 +667,7 @@ def add_assignment(request, course_code): #from faculty side doc=assi, assignment_name=name ) - # assign = Assignment( - # course_id=course, - # submit_date=request.POST.get('myDate'), - # assignment_url=uploaded_file_url, - # assignment_name=name - # ) - # assign.save() + return HttpResponse("Upload successful.") else: return HttpResponse("not found") @@ -701,7 +686,8 @@ def edit_assignment_marks(request,*args, **kwargs): # print(sa.course_code) course_code = sa.course_code # url = reverse('course', args=[course_code]) - return HttpResponse("Marks Updated!") + messages.success(request, 'Marks updated successfullt') + return HttpResponseRedirect('/ocms/'+course_code) # return redirect(course,course_code='CS416e') return HttpResponse("Error Occured!") diff --git a/FusionIIIT/templates/coursemanagement/assessment.html b/FusionIIIT/templates/coursemanagement/assessment.html index bdae9a6f1..b4de45abc 100644 --- a/FusionIIIT/templates/coursemanagement/assessment.html +++ b/FusionIIIT/templates/coursemanagement/assessment.html @@ -59,7 +59,6 @@

- {{sa.pk}}
diff --git a/FusionIIIT/templates/coursemanagement/viewcourse.html b/FusionIIIT/templates/coursemanagement/viewcourse.html index 0f287bfc7..a35078e4b 100644 --- a/FusionIIIT/templates/coursemanagement/viewcourse.html +++ b/FusionIIIT/templates/coursemanagement/viewcourse.html @@ -416,6 +416,24 @@

Quiz Time Table

{% block comments %} {% include 'coursemanagement/comments.html' %} {% endblock %} +
+
+ + {% if messages %} +
+
+ +
+ {% for message in messages %} + {{ message }} + {% endfor %} +
+
+
+ {% endif %} + +
+
From 570d0c620f7b55e6562e876a91b0a88dc7c87dff Mon Sep 17 00:00:00 2001 From: Akshat Nema <76521428+akshatnema@users.noreply.github.com> Date: Mon, 10 Apr 2023 14:28:36 +0530 Subject: [PATCH 4/7] Update FusionIIIT/applications/online_cms/models.py --- FusionIIIT/applications/online_cms/models.py | 1 - 1 file changed, 1 deletion(-) diff --git a/FusionIIIT/applications/online_cms/models.py b/FusionIIIT/applications/online_cms/models.py index 828d9f785..6cde0de12 100644 --- a/FusionIIIT/applications/online_cms/models.py +++ b/FusionIIIT/applications/online_cms/models.py @@ -30,7 +30,6 @@ class CourseDocuments(models.Model): description = models.CharField(max_length=100) document_name = models.CharField(max_length=40) 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): return '{} - {}'.format(self.course_id, self.document_name) From 4afea43dbd6f2cfc6ed698198ab26584c0808fd7 Mon Sep 17 00:00:00 2001 From: Akshat Nema <76521428+akshatnema@users.noreply.github.com> Date: Mon, 10 Apr 2023 14:28:43 +0530 Subject: [PATCH 5/7] Update FusionIIIT/applications/online_cms/models.py --- FusionIIIT/applications/online_cms/models.py | 1 - 1 file changed, 1 deletion(-) diff --git a/FusionIIIT/applications/online_cms/models.py b/FusionIIIT/applications/online_cms/models.py index 6cde0de12..fa890d2d3 100644 --- a/FusionIIIT/applications/online_cms/models.py +++ b/FusionIIIT/applications/online_cms/models.py @@ -188,7 +188,6 @@ def __str__(self): 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( From d990afabb239583e8d9690a6223602a737b11b5f Mon Sep 17 00:00:00 2001 From: Akshat Nema <76521428+akshatnema@users.noreply.github.com> Date: Mon, 10 Apr 2023 14:28:52 +0530 Subject: [PATCH 6/7] Update FusionIIIT/applications/online_cms/views.py --- FusionIIIT/applications/online_cms/views.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/FusionIIIT/applications/online_cms/views.py b/FusionIIIT/applications/online_cms/views.py index 7140ecfff..c006d948a 100644 --- a/FusionIIIT/applications/online_cms/views.py +++ b/FusionIIIT/applications/online_cms/views.py @@ -174,8 +174,6 @@ def course(request, course_code): # 'title': res['snippet']['title'], # } - # videos.append(video_data) - # print(videos) slides = CourseSlide.objects.select_related().filter(course_id=course) quiz = Quiz.objects.select_related().filter(course_id=course) From d03c9f4d06e59d62b7942a70eb6ae5dda020fb1e Mon Sep 17 00:00:00 2001 From: Akshat Nema <76521428+akshatnema@users.noreply.github.com> Date: Mon, 10 Apr 2023 14:29:01 +0530 Subject: [PATCH 7/7] Update FusionIIIT/applications/online_cms/views.py --- FusionIIIT/applications/online_cms/views.py | 1 - 1 file changed, 1 deletion(-) diff --git a/FusionIIIT/applications/online_cms/views.py b/FusionIIIT/applications/online_cms/views.py index c006d948a..e1a5fa9e5 100644 --- a/FusionIIIT/applications/online_cms/views.py +++ b/FusionIIIT/applications/online_cms/views.py @@ -320,7 +320,6 @@ def course(request, course_code): student_assignment = [] for assi in assignment1: sa = StudentAssignment1.objects.select_related().filter(assignment_id=assi) - # print("hii",sa) student_assignment.append(sa) for q in quiz: qs = QuizResult.objects.select_related().filter(quiz_id=q)