forked from FusionIIIT/Fusion
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
31 changed files
with
3,119 additions
and
1,098 deletions.
There are no files selected for viewing
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
4 changes: 4 additions & 0 deletions
4
FusionIIIT/applications/globals/static/globals/js/jquery-3.0.0.min.js
Large diffs are not rendered by default.
Oops, something went wrong.
69 changes: 69 additions & 0 deletions
69
FusionIIIT/applications/globals/static/semantic/dist/components/semantic-ui-alerts.css
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
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 */ | ||
} |
93 changes: 93 additions & 0 deletions
93
FusionIIIT/applications/globals/static/semantic/dist/components/semantic-ui-alerts.js
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
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)); | ||
} | ||
}; |
1 change: 1 addition & 0 deletions
1
FusionIIIT/applications/globals/static/semantic/dist/components/semantic-ui-alerts.min.css
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
FusionIIIT/applications/globals/static/semantic/dist/components/semantic-ui-alerts.min.js
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,72 +1,86 @@ | ||
from django.conf import settings | ||
from django.conf.urls.static import static | ||
from django.conf.urls import url | ||
|
||
from . import views | ||
app_name = 'online_cms' | ||
app_name = 'online_cms' | ||
|
||
urlpatterns = [ | ||
|
||
url(r'^$', views.viewcourses, name='viewcourses'), | ||
url(r'^(?P<course_code>[A-z]+[0-9]+[A-z]?)/$', views.course, name='course'), | ||
# url(r'^(?P<course_code>[A-z]+[0-9]+[A-z]?)/edit_marks$', views.edit_marks, name='edit_marks'), | ||
url(r'^(?P<course_code>[A-z]+[0-9]+[A-z]?)/get_exam_data$', views.get_exam_data, name='get_exam_data'), | ||
url(r'^(?P<course_code>[A-z]+[0-9]+[A-z]?)/forum$', views.forum, | ||
url(r'^(?P<course_code>[A-Z0-9]+)/(?P<version>[\d.]+)/$', views.course, name='course'), | ||
# url(r'^(?P<course_code>[A-Z0-9]+)/edit_marks$', views.edit_marks, name='edit_marks'), | ||
url(r'^(?P<course_code>[A-Z0-9]+)/(?P<version>[\d.]+)/get_exam_data$', views.get_exam_data, name='get_exam_data'), | ||
url(r'^(?P<course_code>[A-Z0-9]+)/(?P<version>[\d.]+)/forum$', views.forum, | ||
name='forum'), | ||
url(r'^(?P<course_code>[A-z]+[0-9]+[A-z]?)/ajax_reply$', views.ajax_reply, | ||
url(r'^(?P<course_code>[A-Z0-9]+)/(?P<version>[\d.]+)/ajax_reply$', views.ajax_reply, | ||
name='ajax_reply'), | ||
url(r'^(?P<course_code>[A-z]+[0-9]+[A-z]?)/ajax_new$', views.ajax_new, | ||
url(r'^(?P<course_code>[A-Z0-9]+)/(?P<version>[\d.]+)/ajax_new$', views.ajax_new, | ||
name='ajax_new'), | ||
url(r'^(?P<course_code>[A-z]+[0-9]+[A-z]?)/ajax_remove$', views.ajax_remove, | ||
url(r'^(?P<course_code>[A-Z0-9]+)/(?P<version>[\d.]+)/ajax_remove$', views.ajax_remove, | ||
name='ajax_remove'), | ||
url(r'^(?P<course_code>[A-z]+[0-9]+[A-z]?)/upload_assignment$', views.upload_assignment, | ||
url(r'^(?P<course_code>[A-Z0-9]+)/(?P<version>[\d.]+)/upload_assignment$', views.upload_assignment, | ||
name='upload_assignment'), | ||
url(r'^(?P<course_code>[A-z]+[0-9]+[A-z]?)/add_documents$', views.add_document, | ||
url(r'^(?P<course_code>[A-Z0-9]+)/(?P<version>[\d.]+)/add_modules$', views.add_modules, | ||
name='add_modules'), | ||
url(r'^(?P<course_code>[A-Z0-9]+)/(?P<version>[\d.]+)/add_documents$', views.add_document, | ||
name='add_document'), | ||
url(r'^(?P<course_code>[A-z]+[0-9]+[A-z]?)/add_assignment$', | ||
url(r'^(?P<course_code>[A-Z0-9]+)/(?P<version>[\d.]+)/add_assignment$', | ||
views.add_assignment, name='add_assignment'), | ||
# url(r'^(?P<course_code>[A-z]+[0-9]+[A-z]?)/add_video$', views.add_videos, | ||
# url(r'^(?P<course_code>[A-Z0-9]+)/add_video$', views.add_videos, | ||
# name='add_videos'), | ||
url(r'^(?P<course_code>[A-z]+[0-9]+[A-z]?)/delete/$', views.delete, | ||
url(r'^(?P<course_code>[A-Z0-9]+)/(?P<version>[\d.]+)/delete/$', views.delete, | ||
name='delete'), | ||
url(r'^(?P<course_code>[A-z]+[0-9]+[A-z]?)/ajax_assess$', views.ajax_assess, | ||
url(r'^(?P<course_code>[A-Z0-9]+)/(?P<version>[\d.]+)/ajax_assess$', views.ajax_assess, | ||
name='ajax_assess'), | ||
url(r'^(?P<course_code>[A-z]+[0-9]+[A-z]?)/ajax_feedback$', views.ajax_feedback, | ||
url(r'^(?P<course_code>[A-Z0-9]+)/(?P<version>[\d.]+)/ajax_feedback$', views.ajax_feedback, | ||
name='ajax_feedback'), | ||
url(r'^quiz/(?P<quiz_id>[0-9]+)/$', views.quiz, name='quiz'), | ||
url(r'^(?P<course_code>[A-z]+[0-9]+[A-z]?)/create_quiz/$', views.create_quiz, name='create_quiz'), | ||
url(r'^(?P<course_code>[A-z]+[0-9]+[A-z]?)/edit_quiz/(?P<quiz_code>[0-9]+)/$', | ||
url(r'^(?P<course_code>[A-Z0-9]+)/create_quiz/$', views.create_quiz, name='create_quiz'), | ||
url(r'^(?P<course_code>[A-Z0-9]+)/edit_quiz/(?P<quiz_code>[0-9]+)/$', | ||
views.edit_quiz, name='edit_quiz'), | ||
url(r'^(?P<course_code>[A-z]+[0-9]+[A-z]?)/edit_quiz/(?P<quiz_code>[0-9]+)/(?P<topic_id>[0-9]+)$', | ||
url(r'^(?P<course_code>[A-Z0-9]+)/edit_quiz/(?P<quiz_code>[0-9]+)/(?P<topic_id>[0-9]+)$', | ||
views.edit_quiz_topic, name='edit_quiz_topic'), | ||
url(r'^(?P<course_code>[A-z]+[0-9]+[A-z]?)/(?P<quiz_id>[0-9]+)/add_question_topic$', | ||
url(r'^(?P<course_code>[A-Z0-9]+)/(?P<quiz_id>[0-9]+)/add_question_topic$', | ||
views.add_question_topicwise, name='add_question_topicwise'), | ||
url(r'^(?P<course_id>[0-9]+?)/(?P<quiz_id>[0-9]+)/add_questions_to_quiz$', | ||
views.add_questions_to_quiz, name='add_questions_to_quiz'), | ||
url( | ||
r'^(?P<course_code>[A-z]+[0-9]+[A-z]?)/(?P<quiz_code>[0-9]+)/(?P<topic_id>[0-9]+)/remove_quiz_question$', | ||
r'^(?P<course_code>[A-Z0-9]+)/(?P<quiz_code>[0-9]+)/(?P<topic_id>[0-9]+)/remove_quiz_question$', | ||
views.remove_quiz_question, name='remove_quiz_question'), | ||
url(r'^(?P<course_code>[A-z]+[0-9]+[A-z]?)/preview_quiz/(?P<quiz_code>[0-9]+)/$', views.preview_quiz, | ||
url(r'^(?P<course_code>[A-Z0-9]+)/preview_quiz/(?P<quiz_code>[0-9]+)/$', views.preview_quiz, | ||
name='preview_quiz'), | ||
url(r'^(?P<course_code>[A-z]+[0-9]+[A-z]?)/edit_quiz_details/(?P<quiz_code>[0-9]+)/$', | ||
url(r'^(?P<course_code>[A-Z0-9]+)/edit_quiz_details/(?P<quiz_code>[0-9]+)/$', | ||
views.edit_quiz_details, name='edit_quiz_details'), | ||
url(r'^(?P<quiz_code>[0-9]+)/ajax$', views.ajax_q, name='ajax_q'), | ||
url(r'^(?P<quiz_code>[0-9]+)/submit$', views.submit, name='submit'), | ||
url(r'^(?P<course_code>[A-z]+[0-9]+[A-z]?)/remove_quiz$', views.remove_quiz, | ||
url(r'^(?P<course_code>[A-Z0-9]+)/remove_quiz$', views.remove_quiz, | ||
name='remove_quiz'), | ||
url(r'^(?P<course_code>[A-z]+[0-9]+[A-z]?)/remove_bank$', views.remove_bank, | ||
url(r'^(?P<course_code>[A-Z0-9]+)/remove_bank$', views.remove_bank, | ||
name='remove_bank'), | ||
url(r'^(?P<course_code>[A-z]+[0-9]+[A-z]?)/remove_topic$', views.remove_topic, | ||
url(r'^(?P<course_code>[A-Z0-9]+)/remove_topic$', views.remove_topic, | ||
name='remove_topic'), | ||
url(r'^(?P<course_code>[A-z]+[0-9]+[A-z]?)/create_bank$', views.create_bank, | ||
url(r'^(?P<course_code>[A-Z0-9]+)/create_bank$', views.create_bank, | ||
name='create_bank'), | ||
url(r'^(?P<course_code>[A-z]+[0-9]+[A-z]?)/create_topic$', views.create_topic, | ||
url(r'^(?P<course_code>[A-Z0-9]+)/create_topic$', views.create_topic, | ||
name='create_topic'), | ||
url(r'^(?P<course_code>[A-z]+[0-9]+[A-z]?)/(?P<qb_code>[0-9]+)/(?P<topic_id>[0-9]+)$', | ||
url(r'^(?P<course_code>[A-Z0-9]+)/(?P<qb_code>[0-9]+)/(?P<topic_id>[0-9]+)$', | ||
views.edit_qb_topics, name='edit_qb_topics'), | ||
url(r'^(?P<course_id>[0-9]+?)/(?P<qb_code>[0-9]+)/(?P<topic_id>[0-9]+)/add_question$', | ||
views.add_question, name='add_question'), | ||
url(r'^(?P<course_code>[A-z]+[0-9]+[A-z]?)/(?P<qb_code>[0-9]+)/(?P<topic_id>[0-9]+)/remove_question$', | ||
url(r'^(?P<course_code>[A-Z0-9]+)/(?P<qb_code>[0-9]+)/(?P<topic_id>[0-9]+)/remove_question$', | ||
views.remove_question, name='remove_question'), | ||
url(r'^(?P<course_code>[A-z]+[0-9]+[A-z]?)/edit_bank/(?P<qb_code>[0-9]+)$', | ||
url(r'^(?P<course_code>[A-Z0-9]+)/edit_bank/(?P<qb_code>[0-9]+)$', | ||
views.edit_bank, name='edit_bank'), | ||
url(r'^(?P<course_code>[A-z]+[0-9]+[A-z]?)/attendance$', views.submit_attendance, | ||
name='submit_attendance'),] | ||
url(r'^(?P<course_code>[A-Z0-9]+)/(?P<version>[\d.]+)/attendance$', views.submit_attendance, | ||
name='submit_attendance'), | ||
url(r'^(?P<course_code>[A-Z0-9]+)/(?P<version>[\d.]+)/add_attendance$', views.add_attendance, | ||
name='add_attendance'), | ||
url(r'^(?P<course_code>[A-Z0-9]+)/(?P<version>[\d.]+)/create_grading_scheme$', | ||
views.create_grading_scheme, name='Create_grading_scheme'), | ||
url(r'^admin/add_academic_calendar', views.add_academic_calendar, name='Add Calendar'), | ||
url(r'^admin/update_calendar', views.update_calendar, name='Add Calendar'), | ||
url(r'^admin/add_timetable', views.add_timetable, name="add_timetable"), | ||
url(r'^admin/delete_timetable', views.delete_timetable, name='delete_timetable'), | ||
url(r'^(?P<course_code>[A-z0-9]+)/(?P<version>[\d.]+)/submit_marks$',views.submit_marks, name='submit_marks'), | ||
] | ||
|
Oops, something went wrong.