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

AC-3 to AC-final #1512

Merged
merged 28 commits into from
Apr 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
8a63881
ac-3 : week-5 : Fixed Assignment and slide upload and download by Ins…
tech-akash Mar 14, 2023
e985383
Merge branch 'main' into ac-3
akshatnema Mar 14, 2023
182a220
Merge branch 'main' into ac-3
akshatnema Mar 15, 2023
1be8bba
Merge branch 'main' into ac-3
akshatnema Mar 18, 2023
3476583
Merge branch 'main' into ac-3
akshatnema Mar 19, 2023
6fedb87
Merge branch 'main' into ac-3
akshatnema Mar 23, 2023
081f35c
Merge branch 'main' into ac-3
akshatnema Mar 26, 2023
9d004eb
resolve errors and add apis
Daksh119 Feb 20, 2024
99a0645
add new apis
Daksh119 Apr 9, 2024
aed8561
ac-3 : resolve error, add api (#1299)
Daksh119 Apr 9, 2024
2525a9d
add migration files,notifications and some minor changes
Daksh119 Apr 15, 2024
09e3692
fixed UI error
Daksh119 Apr 16, 2024
774ff13
deleted migration files
Daksh119 Apr 17, 2024
6e0c0ee
Merge branch 'ac-3' into ac-3
Daksh119 Apr 17, 2024
a8f8069
Merge pull request #1465 from Daksh119/ac-3
ChaudharyRaman Apr 17, 2024
f209784
Merge branch 'ac-final' of github.com:FusionIIIT/Fusion into ac-3
prabhatsuman Apr 17, 2024
0dae131
errors resolved
prabhatsuman Apr 17, 2024
48a9887
minor designation change
Daksh119 Apr 18, 2024
65e47f2
minor designation change
Daksh119 Apr 18, 2024
0cfd743
Merge pull request #1493 from Daksh119/ac-3-f
ChaudharyRaman Apr 19, 2024
da3082a
fix errors related to grades for examination module
Daksh119 Apr 19, 2024
257b5bb
roll_no fixed
Daksh119 Apr 19, 2024
c86d036
Merge pull request #1495 from Daksh119/ac-3-f
prabhatsuman Apr 20, 2024
c59c836
Update common.py
prabhatsuman Apr 20, 2024
55d42ae
Merge branch 'ac-3' of github.com:FusionIIIT/Fusion into ac3-final
prabhatsuman Apr 20, 2024
7c6b6e7
added version field in urls and fixed course fetching errors
Daksh119 Apr 21, 2024
348f350
Merge pull request #1509 from Daksh119/ac-3-final
prabhatsuman Apr 21, 2024
22ae8c0
acad procedure error corrected
prabhatsuman Apr 21, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion FusionIIIT/Fusion/settings/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,4 +282,4 @@


CORS_ORIGIN_ALLOW_ALL = True
ALLOW_PASS_RESET = True
ALLOW_PASS_RESET = True
2 changes: 1 addition & 1 deletion FusionIIIT/applications/academic_procedures/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ def academic_procedures_student(request):
except Exception as e:
final_registered_courses = None
final_registered_course_show = None
# drop_courses_options = None
drop_courses_options = None
add_courses_options = None
replace_courses_options = None

Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
.ui-alerts {
position: fixed;
/* width: 360px; */
z-index: 2060;
padding: 23px;
}

.ui-alerts.center {
top: 50%;
left: 50%;
margin-top: -100px;
margin-left: -222px;
}

.ui-alerts.top-right{
top: 20px;
right: 20px;
}

.ui-alerts.top-center{
top: 20px;
margin-left: -222px;
left: 50%;
}

.ui-alerts.top-left{
top: 20px;
left: 20px;
}

.ui-alerts.bottom-right{
bottom: 0;
right: 20px;
}
.ui-alerts.bottom-center{
bottom: 0;
margin-left: -222px;
left: 50%;
}

.ui-alerts.bottom-left{
bottom: 0;
left: 20px;
}

.ui-alerts.ui-alerts > .message > .content > .header {
padding-right: 13px;
}

@media (min-width:320px) {
/* smartphones, portrait iPhone, portrait 480x320 phones (Android) */
.ui-alerts.top-center{
margin-left: -163px;
}
}
@media (min-width:480px) {
/* smartphones, Android phones, landscape iPhone */
}
@media (min-width:600px) {
/* portrait tablets, portrait iPad, e-readers (Nook/Kindle), landscape 800x480 phones (Android) */
}
@media (min-width:801px) {
/* tablet, landscape iPad, lo-res laptops ands desktops */ }
@media (min-width:1025px) {
/* big landscape tablets, laptops, and desktops */
}
@media (min-width:1281px) {
/* hi-res laptops and desktops */
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
$.suiAlert = function (permanents) {
var options = $.extend({
title: 'Semantic UI Alerts',
description: 'semantic ui alerts library',
// alert types 'info, success, error, warning'
type: "error",
time: 5,
position: "top-right",
icon: false,
}, permanents);

// set alert icon
if (options.icon === false) {
if (options.type == "info") {
// announcement
options.icon = "announcement";
} else if (options.type == "success") {
// checkmark, checkmark box
options.icon = "checkmark";
} else if (options.type == "error") {
// ban, remove, remove circle
options.icon = "remove";
} else if (options.type == "warning") {
// warning sign, warning circle
options.icon = "warning circle";
}
}

// set close animation
var close_anim = "drop";
if (options.position == "top-right") {
close_anim = "fly left";
} else if (options.position == "top-center") {
close_anim = "fly down";
} else if (options.position == "top-left") {
close_anim = "fly right";
} else if (options.position == "bottom-right") {
close_anim = "fly left";
} else if (options.position == "bottom-center") {
close_anim = "fly up";
} else if (options.position == "bottom-left") {
close_anim = "fly right";
}

// screen size check
var alert_size = '';
var screen_width = $(window).width();
if (screen_width < 425)
alert_size = 'mini';

var alerts_class = "ui-alerts." + options.position;
if (!$('body > .' + alerts_class).length) {
$('body').append('<div class="ui-alerts ' + options.position + '"></div>');
}

var _alert = $('<div class="ui icon floating ' + alert_size + ' message ' + options.type + '" id="alert"> <i class="' + options.icon + ' icon"></i> <i class="close icon" id="alertclose"></i> <div class="content"> <div class="header">' + options.title + '</div> <p>' + options.description + '</p> </div> </div>');
$('.' + alerts_class).prepend(_alert);

_alert.transition('pulse');

/**
* Close the alert
*/
$('#alertclose').on('click', function () {
$(this).closest('#alert').transition({
animation: close_anim,
onComplete: function () {
_alert.remove();
}
});
});

var timer = 0;
$(_alert).mouseenter(function () {
clearTimeout(timer);
}).mouseleave(function () {
alertHide();
});

alertHide();

function alertHide() {
timer = setTimeout(function () {
_alert.transition({
animation: close_anim,
duration: '2s',
onComplete: function () {
_alert.remove();
}
});
}, (options.time * 1000));
}
};

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions FusionIIIT/applications/notifications_extension/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,9 @@ def mark_as_read_and_redirect(request, slug=None):
if(notification.data['module'] == 'Complaint System'):
complaint_id=notification.description
return HttpResponseRedirect(reverse(notification.data['url'],kwargs={'detailcomp_id1':complaint_id}))
elif(notification.data['module'] == 'Course Management'):
course_code = notification.data['course_code']
print(course_code)
return HttpResponseRedirect(reverse(notification.data['url'],kwargs={'course_code': course_code}))
else:
return HttpResponseRedirect(reverse(notification.data['url']))
1 change: 0 additions & 1 deletion FusionIIIT/applications/online_cms/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ class QuizResultAdmin(admin.ModelAdmin):
raw_id_fields = ("student_id",)

admin.site.register(CourseDocuments)

admin.site.register(CourseVideo)

admin.site.register(Quiz)
Expand Down
30 changes: 28 additions & 2 deletions FusionIIIT/applications/online_cms/forms.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
# from django import forms
import datetime
from datetime import time, timedelta
#import information from the models
from django import forms
# from .models import StoreMarks
from applications.academic_information.models import Student_attendance
from applications.academic_information.models import (Student_attendance,Timetable)


from .models import *
#the types of exam whose marks can be stored from edit marks in assessment, related to StoreMarks table in models
EXAM_TYPES= [
('quiz1', 'Quiz 1'),
Expand Down Expand Up @@ -112,4 +115,27 @@ def clean(self):

examtype = self.cleaned_data.get("exam_type")
enteredmarks = self.cleaned_data.get("entered_marks")
return self.cleaned_data
return self.cleaned_data

class GradingSchemeForm(forms.Form):
quiz_weightage = forms.DecimalField(label='Quiz', max_digits=10, decimal_places=2)
midsem_weightage = forms.DecimalField(label='Mid Semester', max_digits=10, decimal_places=2)
assignment_weightage = forms.DecimalField(label='Assignment', max_digits=10, decimal_places=2)
endsem_weightage = forms.DecimalField(label='End Semester', max_digits=10, decimal_places=2)
project_weightage = forms.DecimalField(label='Project', max_digits=10, decimal_places=2)


class AcademicTimetableForm(forms.ModelForm):
"""
the form to add a new academic timetable to the database.
It consist of year, programme and the timetable file upload

@attrubutes:
model - the model used is the Timetable class
fields - the fields shown in the form for the user to fill up is year, programme and timetable file upload
widgets - defining the id, required and placeholder of the filed in the form

"""
class Meta:
model = Timetable
fields = ('programme', 'batch', 'branch', 'time_table')
27 changes: 20 additions & 7 deletions FusionIIIT/applications/online_cms/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,25 @@


def semester(roll):
month = datetime.now().month
sem = 0
if month >= 8 and month <= 12:
sem = 1
semester = (datetime.now().year-int(roll))*2+sem
return semester
if not roll.isnumeric():
s=''
s+='2'
s+='0'
s+=roll[0]
s+=roll[1]
month = datetime.now().month
sem = 0
if month >= 8 and month <= 12:
sem = 1
semester = (datetime.now().year-int(s))*2+sem
return semester
else:
month = datetime.now().month
sem = 0
if month >= 8 and month <= 12:
sem = 1
semester = (datetime.now().year-int(roll))*2+sem
return semester

#storing media files like images, videos and assignments
def create_thumbnail(course_code,course, row, name, ext, attach_str, thumb_time, thumb_size):
Expand All @@ -19,4 +32,4 @@ def create_thumbnail(course_code,course, row, name, ext, attach_str, thumb_time,
filename = filename + name.replace(' ', '-') + '-' + attach_str + '.png'
process = 'ffmpeg -y -i ' + filepath + ' -vframes ' + str(1) + ' -an -s '
process = process + thumb_size + ' -ss ' + str(thumb_time) + ' ' + filename
subprocess.call(process, shell=True)
subprocess.call(process, shell=True)
Loading
Loading