diff --git a/.gitignore b/.gitignore index 9c2341c5d..f7df0df5c 100644 --- a/.gitignore +++ b/.gitignore @@ -106,4 +106,16 @@ creation/hr-receipts/ static/spoken/embedding/ *.sql -env/ \ No newline at end of file +env/ + + +# Local Python builds +Python-3.6.15/ +Python-3.6.15.tgz + +# Static vendor files +static/ckeditor/ +static/debug_toolbar/ + +# Local management scripts +training/management/ diff --git a/certificate/views.py b/certificate/views.py index a56969b49..725f25f05 100644 --- a/certificate/views.py +++ b/certificate/views.py @@ -731,7 +731,7 @@ def koha_workshop_download(request): uniqueness = True else: num += 1 - qrcode = 'Verify at: https://spoken-tutorial.org/certificate/verify/{0} '.format(short_key) + qrcode = 'Verify at: https://spoken-tutorial.org/verify/{0} '.format(short_key) details = {'name': name, 'serial_key': short_key, 'college': college} certificate = create_koha_workshop_certificate(certificate_path, details, qrcode, type, paper, workshop, file_name) @@ -1172,7 +1172,7 @@ def create_koha_main_workshop9march_certificate(certificate_path, name, qrcode, # uniqueness = True # else: # num += 1 -# qrcode = 'Verify at: http://spoken-tutorial.org/certificate/verify/{0} '.format(short_key) +# qrcode = 'Verify at: http://spoken-tutorial.org/verify/{0} '.format(short_key) # details = {'name': name, 'serial_key': short_key, 'rcid': rcid, 'remote': remote} # certificate = create_koha_12oct_rc_certificate(certificate_path, details, # qrcode, type, paper, workshop, file_name) diff --git a/cms/cacheurls.py b/cms/cacheurls.py new file mode 100644 index 000000000..e0d633136 --- /dev/null +++ b/cms/cacheurls.py @@ -0,0 +1,6 @@ +from django.conf.urls import url +from cms import views + +urlpatterns = [ + url(r'^cache-tools/$', views.cache_tools, name='cache-tools'), +] diff --git a/cms/management/commands/notify_users.py b/cms/management/commands/notify_users.py new file mode 100644 index 000000000..7e648e63a --- /dev/null +++ b/cms/management/commands/notify_users.py @@ -0,0 +1,133 @@ +from django.core.management.base import BaseCommand +from django.core.mail import EmailMultiAlternatives +from django.conf import settings +from django.contrib.auth.models import User +from django.db import transaction +from datetime import datetime, timedelta +import smtplib +from cms.models import EmailLog + + +class Command(BaseCommand): + help = "Notify users inactive for more than X years or before a given cutoff date." + + def add_arguments(self, parser): + + parser.add_argument( + "--years", + type=int, + default=5, + help="Check inactivity older than this many years (default = 5). Ignored if --cutoff-date provided.", + ) + + parser.add_argument( + "--limit", + type=int, + default=None, + help="Limit number of users to notify", + ) + + parser.add_argument( + "--cutoff-date", + type=str, + default=None, + help="Custom cutoff date in YYYY-MM-DD format (overrides --years)", + ) + + @transaction.atomic + def handle(self, *args, **options): + + years = options.get("years") + limit = options.get("limit") + cutoff_input = options.get("cutoff_date") + + if cutoff_input: + try: + cutoff_date = datetime.strptime(cutoff_input, "%Y-%m-%d") + except ValueError: + self.stdout.write(self.style.ERROR( + "❌ Invalid cutoff date format! Use YYYY-MM-DD" + )) + return + else: + cutoff_date = datetime.now() - timedelta(days=years * 365) + + cutoff_str = cutoff_date.strftime("%Y-%m-%d") + self.stdout.write(self.style.WARNING( + f"\nπŸ“… Using cutoff date: {cutoff_str} (YYYY-MM-DD)\n" + )) + + users = User.objects.filter( + last_login__lt=cutoff_date, + is_active=True + ).order_by("id") + + if limit: + users = users[:limit] + + total_users = users.count() + self.stdout.write(self.style.NOTICE( + f"πŸ”Ž Users inactive since before {cutoff_str}: {total_users}\n" + )) + + subject = "Reminder: Your account has been inactive for a long time" + + sent_count = 0 + failed_count = 0 + for user in users: + + message = f""" +Dear {user.first_name} {user.last_name}, + +Our system indicates that your account has not been used for a long time. + +Your last login was on: {user.last_login.strftime("%Y-%m-%d")} + +This is a reminder to log in again and continue using our services. + +If you need help, simply reply to this email. + +Regards, +Support Team +""" + + email = EmailMultiAlternatives( + subject, + message, + settings.NO_REPLY_EMAIL, + to=[user.email], + ) + + try: + email.send(fail_silently=False) + + sent_count += 1 + + EmailLog.objects.create( + user=user, + email=user.email, + status=True, + reason=None + ) + + self.stdout.write(self.style.SUCCESS(f"[SENT] {user.email}")) + + except (smtplib.SMTPException, Exception) as e: + + failed_count += 1 + + EmailLog.objects.create( + user=user, + email=user.email, + status=False, + reason=str(e) + ) + + self.stdout.write(self.style.ERROR(f"[FAILED] {user.email} β†’ {e}")) + + self.stdout.write("\n---------------------------------------") + self.stdout.write(self.style.SUCCESS(f"Emails Sent: {sent_count}")) + self.stdout.write(self.style.ERROR(f"Failed: {failed_count}")) + self.stdout.write(self.style.WARNING(f"Total Processed: {total_users}")) + self.stdout.write(self.style.NOTICE(f"Cutoff Date Used: {cutoff_str}")) + self.stdout.write("---------------------------------------\n") diff --git a/cms/migrations/0006_emaillog.py b/cms/migrations/0006_emaillog.py new file mode 100644 index 000000000..3a9c5c35f --- /dev/null +++ b/cms/migrations/0006_emaillog.py @@ -0,0 +1,29 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.29 on 2025-11-19 09:04 +from __future__ import unicode_literals + +from django.conf import settings +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ('cms', '0005_auto_20230302_1152'), + ] + + operations = [ + migrations.CreateModel( + name='EmailLog', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('email', models.EmailField(max_length=254)), + ('sent_time', models.DateTimeField(auto_now_add=True)), + ('status', models.BooleanField(default=False)), + ('reason', models.TextField(blank=True, null=True)), + ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), + ], + ), + ] diff --git a/cms/models.py b/cms/models.py index 517b6b254..557d40f86 100644 --- a/cms/models.py +++ b/cms/models.py @@ -150,4 +150,16 @@ class UserType(models.Model): ilw = jsonfield.JSONField(null=True) status = models.CharField(choices=STATUS_CHOICES,max_length=25,default=1) created = models.DateTimeField(auto_now_add=True) - updated = models.DateTimeField(auto_now=True) \ No newline at end of file + updated = models.DateTimeField(auto_now=True) + + + +class EmailLog(models.Model): + user = models.ForeignKey(User, on_delete=models.CASCADE) + email = models.EmailField() + sent_time = models.DateTimeField(auto_now_add=True) + status = models.BooleanField(default=False) + reason = models.TextField(null=True, blank=True) + + def __str__(self): + return f"{self.email} - {'Success' if self.status else 'Failed'}" diff --git a/cms/templates/cms/cache_tools.html b/cms/templates/cms/cache_tools.html new file mode 100644 index 000000000..a8c0befdb --- /dev/null +++ b/cms/templates/cms/cache_tools.html @@ -0,0 +1,53 @@ +{% extends "base.html" %} + +{% block content %} +
+

Memcache Tools

+ + {% for message in messages %} +
{{ message }}
+ {% endfor %} + + +

Existing Cache Keys (via Memcached slabs)

+ +
+ +
+ {% csrf_token %} + + + +
+ + {% if value_output %} +
+ Key Value:
+ {{ value_output|safe }} +
+ {% endif %} +
+ + +
+ {% csrf_token %} + + + +
+
+ + +
+ {% csrf_token %} + +
+ +
+{% endblock %} diff --git a/cms/urls.py b/cms/urls.py index 8a0da1c8b..329130665 100644 --- a/cms/urls.py +++ b/cms/urls.py @@ -7,6 +7,7 @@ from spoken.sitemaps import SpokenStaticViewSitemap from donate.views import * + app_name = 'cms' spoken_sitemaps = { @@ -32,6 +33,6 @@ url(r'^sitemap\.xml/$', sitemap, {'sitemaps' : spoken_sitemaps } , name='spoken_sitemap'), url(r'^(?P.+)/$', dispatcher, name="dispatcher"), - + ] \ No newline at end of file diff --git a/cms/views.py b/cms/views.py index 029b1faa3..1ec34c7a4 100644 --- a/cms/views.py +++ b/cms/views.py @@ -34,8 +34,20 @@ from cms.cache_registry import unregister_cache_key,list_cache_keys from donate.models import Payee +from django.contrib.admin.views.decorators import staff_member_required +from django.core.cache import caches +from django.shortcuts import render, redirect + +from cms.cache_registry import list_cache_keys, unregister_cache_key +from django.utils.safestring import mark_safe +from django.forms.models import model_to_dict +from django.utils.html import escape from django.core.cache import cache + +cache = caches['default'] + + def dispatcher(request, permalink=''): if permalink == '': return HttpResponseRedirect('/') @@ -447,7 +459,7 @@ def change_password(request): if pcode and username: user = User.objects.get(username=username).first() if user: - profile = Profile.objects.filter(user=user,confirmation_code=pcode).first() + profile = Profile.objects.filter(user=user,confirmation_code=pcode).order_by('id').first() if profile: user.backend = 'django.contrib.auth.backends.ModelBackend' @@ -537,6 +549,68 @@ def verify_email(request): return render(request, "cms/templates/verify_email.html", context) +# @staff_member_required +# def cache_tools(request): + +# keys = list_cache_keys() +# value_output = None + +# if request.method == "POST": + +# # ---------- VIEW A CACHE KEY ---------- +# if "view_key" in request.POST: +# key = request.POST.get("cache_key").strip() +# val = cache.get(key) +# print("dfghjkdfghjk", val) + +# if val is None: +# value_output = f"No value stored for key: '{key}'" + +# else: +# try: +# # Convert QuerySet / list / tuple into list +# if hasattr(val, "__iter__") and not isinstance(val, (str, bytes, dict)): +# iterable = list(val) +# else: +# iterable = [val] + +# pretty_lines = [] + +# for item in iterable: +# # If model instance β†’ convert to dict +# if hasattr(item, "_meta"): +# d = model_to_dict(item) +# pretty_lines.append(str(d)) +# else: +# pretty_lines.append(repr(item)) + +# pretty = "
".join(escape(line) for line in pretty_lines) +# value_output = mark_safe(f"
{pretty}
") + +# except Exception as e: +# # Fallback print +# value_output = mark_safe(f"
{escape(repr(val))}
") + + +# # ---------- DELETE ONE KEY ---------- +# elif "clear_key" in request.POST: +# key = request.POST.get("cache_key").strip() +# cache.delete(key) +# unregister_cache_key(key) +# messages.success(request, f"Key '{key}' deleted.") +# return redirect("cache-tools") + +# # ---------- CLEAR ALL ---------- +# elif "clear_all" in request.POST: +# cache.clear() +# messages.success(request, "All cache cleared.") +# return redirect("cache-tools") + +# return render(request, "cms/cache_tools.html", { +# "keys": keys, +# "value_output": value_output +# }) + @login_required def manage_cache(request): @@ -599,4 +673,4 @@ def manage_cache(request): "An error occurred while clearing homepage cache: {}".format(e) ) - return render(request, status_template, context=context) # return to payment page site \ No newline at end of file + return render(request, status_template, context=context) # return to payment page site diff --git a/creation/templatetags/creationdata.py b/creation/templatetags/creationdata.py index 4e900ca37..9645f5da3 100644 --- a/creation/templatetags/creationdata.py +++ b/creation/templatetags/creationdata.py @@ -168,8 +168,24 @@ def brochure(foss, lang): return file_path return False +# def get_thumb_path(row, append_str): +# path = settings.MEDIA_URL + 'videos/' + str(row.foss_id) + '/' + str(row.id) + '/' + row.tutorial.replace(' ', '-') + '-' + append_str + '.png' +# return path + def get_thumb_path(row, append_str): - path = settings.MEDIA_URL + 'videos/' + str(row.foss_id) + '/' + str(row.id) + '/' + row.tutorial.replace(' ', '-') + '-' + append_str + '.png' + # Prevent crash if passed a string or wrong type + if not hasattr(row, "foss_id") or not hasattr(row, "tutorial"): + return "" + + tutorial_name = row.tutorial.replace(' ', '-') if hasattr(row, "tutorial") else "" + + path = ( + settings.MEDIA_URL + + 'videos/' + + str(row.foss_id) + '/' + + str(row.id) + '/' + + tutorial_name + '-' + append_str + '.png' + ) return path def get_srt_path(tr): diff --git a/donate/payment.py b/donate/payment.py index 303bb6d74..fc6b002f3 100644 --- a/donate/payment.py +++ b/donate/payment.py @@ -102,6 +102,43 @@ def make_hdfc_session_request(payee_obj_new, headers, payload): return None return None +# def make_hdfc_session_request(payee_obj_new, headers, payload): +# try: +# response = requests.post( +# settings.HDFC_API_URL, +# json=payload, +# headers=headers, +# timeout=15 +# ) +# try: +# response_data = response.json() +# except ValueError: +# return None # ← prevents JSONDecodeError + +# except requests.exceptions.RequestException: +# return None + +# if response.status_code == 200: +# payment_links = response_data.get("payment_links", {}) +# payment_link = payment_links.get("web") +# if not payment_link: +# return None +# transaction = save_ilw_hdfc_session_data(response_data) +# payee_obj_new.transaction = transaction +# payee_obj_new.save() +# return payment_link +# else: +# transaction = save_ilw_hdfc_session_data( +# response_data, +# payee_obj_new.amount +# ) +# payee_obj_new.transaction = transaction +# payee_obj_new.save() +# return None + + + + @csrf_exempt def check_ilw_payment_status(request, order_id): """ diff --git a/donate/views.py b/donate/views.py index f6fc6b83d..ec39b5f00 100644 --- a/donate/views.py +++ b/donate/views.py @@ -1,6 +1,6 @@ from config import TARGET, CHANNEL_ID, CHANNEL_KEY, EXPIRY_DAYS from .helpers import PURPOSE -from django.shortcuts import render +from django.shortcuts import render, redirect from django.conf import settings from creation.models import FossCategory, Language from cms.models import Profile @@ -8,7 +8,7 @@ from django.contrib.auth import authenticate, login, logout from django.core.exceptions import PermissionDenied from django.shortcuts import render, redirect -from django.http import HttpResponse, Http404 +from django.http import HttpResponse, Http404, JsonResponse from django.template.context_processors import csrf from donate.forms import PayeeForm, TransactionForm from donate.models import * @@ -40,6 +40,8 @@ from donate.payment import save_ilw_hdfc_success_data, save_ilw_hdfc_error_data, get_ilw_session_payload, make_hdfc_session_request from training.models import TrainingEvents from decimal import Decimal, InvalidOperation + + # @csrf_exempt # def donatehome(request): # form = PayeeForm(initial={'country': 'India'}) @@ -140,7 +142,6 @@ def form_valid(request, form, purpose): fosses = form.cleaned_data.get('foss_id').split(',') foss_languages = form.cleaned_data.get('language_id').split(',|') levels = form.cleaned_data.get('level_id').split(',') - foss_level = 0 for i in range(len(fosses)): @@ -192,45 +193,68 @@ def form_invalid(request, form): @csrf_exempt def controller(request, purpose): + + if request.method == 'GET': + if purpose == 'cdcontent': + return render(request, 'payment_status.html', {}, status=200) + return HttpResponse("OK", status=200) + form = PayeeForm(request.POST) - - if request.method == 'POST': - if form.is_valid(): - # form_valid function creates Payee & CdFossLanguages records. - # & returns Payee record - payee_obj_new = form_valid(request, form, purpose) - else: - form_invalid(request, form) - - if purpose != 'cdcontent': # purpose = event_id in case of ILW - participant_form = reg_success(request, 'general') + + if not form.is_valid(): + return JsonResponse({ + "status": "error", + "errors": form.errors + }, status=200) + + payee_obj_new = form_valid(request, form, purpose) + + if purpose != 'cdcontent': + participant_form = reg_success(request, 'general') participant_form.payment_status = payee_obj_new - try : + try: participant_form.save() - except : + except Exception: return redirect('training:list_events', status='myevents') + data = get_final_data(request, payee_obj_new, purpose) + if payee_obj_new.source == 'deet': callbackurl = request.POST.get('callbackurl') - json = {'id': f'p{payee_obj_new.id}', 'name': payee_obj_new.name, - 'email':payee_obj_new.email, 'paid college': False, - 'amount': payee_obj_new.amount, 'status': 0} - requests.post(callbackurl, json) + if callbackurl: + payload = { + 'id': 'p{}'.format(payee_obj_new.id), + 'name': payee_obj_new.name, + 'email': payee_obj_new.email, + 'paid_college': False, + 'amount': payee_obj_new.amount, + 'status': 0 + } + requests.post(callbackurl, json=payload) if purpose == 'cdcontent': - return render(request, 'payment_status.html', data) - else: - #instead of redirecting to payment_status and starting the payment process, start hdfc transaction steps - #hdfc session request - payee_email = payee_obj_new.email - headers = get_request_headers(payee_email) - payload = get_ilw_session_payload(request,payee_obj_new, participant_form) - payment_link = make_hdfc_session_request(payee_obj_new, headers, payload) - if payment_link is not None: - return redirect(payment_link) - else: - return redirect('training:list_events', status='myevents') - # return render(request, 'payment_status.html', data) + return render(request, 'payment_status.html', data, status=200) + + payee_email = payee_obj_new.email + headers = get_request_headers(payee_email) + payload = get_ilw_session_payload( + request, + payee_obj_new, + participant_form + ) + + payment_link = make_hdfc_session_request( + payee_obj_new, + headers, + payload + ) + + if payment_link: + return redirect(payment_link) + + return redirect('training:list_events', status='myevents') + + @csrf_exempt diff --git a/events/events/__init__.py b/events/events/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/events/events/admin.py b/events/events/admin.py new file mode 100644 index 000000000..5649e8af0 --- /dev/null +++ b/events/events/admin.py @@ -0,0 +1,85 @@ +from django.contrib import admin +from django.template.defaultfilters import slugify +# Register your models here. + +from events.models import * +from events.forms import RpForm +from events.formsv2 import MapCourseWithFossForm + +class UniversityAdmin(admin.ModelAdmin): + exclude = ('user',) + list_display = ('user', 'state', 'name') + list_filter = ('state',) + def save_model(self, request, obj, form, change): + obj.user_id = request.user.id + obj.save() + +class CourseAdmin(admin.ModelAdmin): + fields = ['name'] + +class InstituteTypeAdmin(admin.ModelAdmin): + fields = ['name'] + +class InstituteCategoryAdmin(admin.ModelAdmin): + fields = ['name'] + +class TestCategoryAdmin(admin.ModelAdmin): + fields = ['name'] + +class StateAdmin(admin.ModelAdmin): + fields = ['name', 'code'] + def save_model(self, request, obj, form, change): + obj.slug = slugify(request.POST['name']) + obj.save() + +class DistrictAdmin(admin.ModelAdmin): + fields = ['name', 'state'] + list_display = ('name', 'state', 'created') + list_filter = ('state',) + +class CityAdmin(admin.ModelAdmin): + list_display = ('name', 'state', 'created') + fields = ['name', 'state'] + list_filter = ('state',) + +class FossMdlCoursesAdmin(admin.ModelAdmin): + fields = ['foss', 'mdlcourse_id', 'mdlquiz_id', 'language', 'level'] + list_display = ('foss', 'mdlcourse_id', 'mdlquiz_id', 'language', 'level') + + +class RpRoleAdmin(admin.ModelAdmin): + form = RpForm + fields = ('user', 'state', 'status') + list_display = ('user', 'state', 'status') + + def save_model(self, request, obj, form, change): + obj.assigned_by = request.user.id + obj.save() + +class DepartmentAdmin(admin.ModelAdmin): + fields = ['name'] + +class PermissionTypeAdmin(admin.ModelAdmin): + fields = ['name'] + +admin.site.register(Course, CourseAdmin) +admin.site.register(University, UniversityAdmin) +admin.site.register(InstituteType, InstituteTypeAdmin) +admin.site.register(InstituteCategory, InstituteCategoryAdmin) +admin.site.register(TestCategory, TestCategoryAdmin) +admin.site.register(State, StateAdmin) +admin.site.register(ResourcePerson, RpRoleAdmin) +admin.site.register(Department, DepartmentAdmin) +admin.site.register(PermissionType, PermissionTypeAdmin) +admin.site.register(District, DistrictAdmin) +admin.site.register(City, CityAdmin) +admin.site.register(FossMdlCourses, FossMdlCoursesAdmin) + + +# EVENTS V2 + +class CourseMapAdmin(admin.ModelAdmin): + # Custom form to overwrite the default form field options + form = MapCourseWithFossForm + +admin.site.register(CourseMap, CourseMapAdmin) diff --git a/events/events/certificates.py b/events/events/certificates.py new file mode 100644 index 000000000..fc4a0d826 --- /dev/null +++ b/events/events/certificates.py @@ -0,0 +1,119 @@ +from django.conf import settings +from spoken.config import EDUPYRAMIDS_CERTIFICATE_DATE +import re +import os + +SCHOOL = 24 +FDP = 169 +CSC = 18 + +SPK = { + 'stp': 'Blank-Certificate.pdf', + 'fdp': 'fdptr-certificate.pdf', + 'csc': 'Certificate_CSC_blank.pdf', + 'fdp_test': 'fdp-test-certificate.pdf', +} +EDUPYRAMIDS = { + 'stp': 'Blank-Certificate_edupyramids.pdf', + 'fdp': 'fdptr-certificate_edupyramids.pdf', + 'csc': 'Certificate_CSC_blank_edupyramids.pdf', + 'fdp_test': 'fdp-test-certificate_edupyramids.pdf', +} + +def get_cert_template(event_date, cert_type): + if event_date < EDUPYRAMIDS_CERTIFICATE_DATE: + return os.path.join(settings.MEDIA_ROOT, SPK[cert_type]) + return os.path.join(settings.MEDIA_ROOT, EDUPYRAMIDS[cert_type]) + + +def get_training_certificate(ta): + """ + return training certificate template path + ta : TrainingAttend obj + """ + + if ta.training.department.id == FDP: + cert_type = 'fdp' + elif ta.training.training_planner.academic.institution_type_id == CSC: + cert_type = 'csc' + else: + cert_type = 'stp' + return get_cert_template(ta.training.training_start_date, cert_type) + + +def get_test_certificate(ta): + """ + return test certificate template path + ta : TestAttendance obj + """ + if ta.test.training.department.id == FDP: + cert_type = 'fdp_test' + elif ta.test.academic.institution_type_id == CSC: + cert_type = 'csc' + else: + cert_type = 'stp' + return get_cert_template(ta.test.tdate, cert_type) + + +def get_signature(event_date): + if event_date < EDUPYRAMIDS_CERTIFICATE_DATE: + return settings.MEDIA_ROOT +"sign.jpg" + return settings.MEDIA_ROOT +"sign_edupyramids.jpg" + +def get_organization(event_date): + if event_date < EDUPYRAMIDS_CERTIFICATE_DATE: + return "the Spoken Tutorial Project, IIT Bombay" + return "EduPyramids, SINE, IIT Bombay" + +def get_training_cert_text(ta): + """ + ta : TrainingAttend obj + """ + name = f"{ta.student.user.first_name} {ta.student.user.last_name}" + foss = ta.training.course.foss.foss + institution_name = ta.training.training_planner.academic.institution_name + organization = get_organization(ta.training.training_start_date) + + semsplit = re.split('-|, ',ta.training.training_planner.get_semester()) + sem_start = semsplit[0]+semsplit[2] + + text_end = f"A comprehensive set of topics pertaining to {foss} were covered in the training. This training is offered by {organization}" + + #paragraph + text = f"This is to certify that {name} participated in the {foss} training organized at {institution_name} in {sem_start} semester, with course material provided by {organization}.

{text_end}." + if ta.training.department.id == SCHOOL: + organiser_name = f"{ta.training.training_planner.organiser.user.first_name} {ta.training.training_planner.organiser.user.last_name}" + text = f"This is to certify that {name} participated in the {foss} training organized at {institution_name} by {organiser_name}, with course material provided by {organization}.

{text_end}." + elif ta.training.department.id == FDP: + formatted_start_date = ta.training.training_start_date.strftime("%d-%m-%Y") + formatted_end_date = ta.training.training_end_date.strftime("%d-%m-%Y") + text = f"This is to certify that {name} has participated in Faculty Development Programme from {formatted_start_date} to {formatted_end_date} on {foss} organized by {institution_name} with course material provided by {organization}.
{text_end}." + elif ta.training.training_planner.academic.institution_type_id == CSC: + sem = ta.training.training_planner.get_semester() + text = f"This is to certify that {name} participated in the {foss} training organized at {institution_name} in {sem} semester, with course material provided by {institution_name}.
{text_end}." + return text + + +def get_test_cert_text(test, mdluser, credits=''): + """ + mdluser : MdlUser obj + test : Test obj + """ + name = f"{mdluser.firstname} {mdluser.lastname}" + foss = test.foss.foss + test_date = test.tdate.strftime("%d-%m-%Y") + + institution = test.academic.institution_name + organization = get_organization(test.training.training_start_date) + organizer = f"{test.organiser.user.first_name} {test.organiser.user.last_name}" + invigilator = f"{test.invigilator.user.first_name} {test.invigilator.user.last_name}" + text_end = f"This training is offered by {organization}" + + #paragraphe + if test.training.department.id == FDP: + text = f"This is to certify that {name} has successfully completed {foss} test on {test_date} organized at {institution} by {organizer} with course material provided by {organization}. Passing an online exam, conducted remotely from IIT Bombay, is a pre-requisite for completing this Faculty Development Programme.

{invigilator} at {institution} invigilated this examination. {text_end}.



{credits}" + elif test.academic.institution_type_id == CSC: # CHECK #TODO + text = f"This is to certify that {name} has successfully completed {foss} test organized at {institution} by {organizer} with course material provided by {organization}. Passing an online exam, conducted remotely from IIT Bombay, is a pre-requisite for completing this training. {invigilator} at {institution} invigilated this examination.
This training is offered by the Spoken Tutorial Project, IIT Bombay, funded by National Mission on Education through ICT, Ministry of Education, Govt., of India." + else: + text = f"This is to certify that {name} has successfully completed {foss} test organized at {institution} by {organizer} with course material provided by {organization}. Passing an online exam, conducted remotely from IIT Bombay, is a pre-requisite for completing this training.

{invigilator} from {institution} invigilated this examination. {text_end}.



{credits}" + return text \ No newline at end of file diff --git a/events/events/decorators.py b/events/events/decorators.py new file mode 100644 index 000000000..eae6e3934 --- /dev/null +++ b/events/events/decorators.py @@ -0,0 +1,49 @@ +from functools import wraps +from django.conf import settings +from django.contrib import messages +from django.shortcuts import resolve_url +from django.utils.decorators import available_attrs +from django.contrib.auth import REDIRECT_FIELD_NAME +from django.utils.six.moves.urllib.parse import urlparse +from events.views import is_organiser + +default_message = "You don't have enough permission to view this page." + +def user_passes_test(test_func, login_url=None, \ + redirect_field_name=REDIRECT_FIELD_NAME): + + def decorator(view_func): + @wraps(view_func, assigned=available_attrs(view_func)) + def _wrapped_view(request, *args, **kwargs): + if test_func(request): + return view_func(request, *args, **kwargs) + path = request.build_absolute_uri() + resolved_login_url = resolve_url(login_url or settings.LOGIN_URL) + # If the login url is the same scheme and net location then just + # use the path as the "next" url. + login_scheme, login_netloc = urlparse(resolved_login_url)[:2] + current_scheme, current_netloc = urlparse(path)[:2] + if ((not login_scheme or login_scheme == current_scheme) and + (not login_netloc or login_netloc == current_netloc)): + path = request.get_full_path() + from django.contrib.auth.views import redirect_to_login + return redirect_to_login( + path, resolved_login_url, redirect_field_name) + return _wrapped_view + return decorator + +def group_required(*group_names): + def in_groups(request): + if request.user.is_authenticated(): + if 'Organiser' in group_names: + if bool(request.user.groups.filter(name__in=group_names)) and is_organiser(request.user): + return True + else: + messages.error(request, default_message) + else: + if bool(request.user.groups.filter(name__in=group_names)): + return True + else: + messages.error(request, default_message) + return False + return user_passes_test(in_groups) diff --git a/events/events/display.js b/events/events/display.js new file mode 100644 index 000000000..2bf0fdbb4 --- /dev/null +++ b/events/events/display.js @@ -0,0 +1,4 @@ +'use strict'; +var parent = require('../../stable/array/includes'); + +module.exports = parent; diff --git a/events/events/events_email.py b/events/events/events_email.py new file mode 100644 index 000000000..591579699 --- /dev/null +++ b/events/events/events_email.py @@ -0,0 +1,124 @@ + +from django.core.mail import EmailMultiAlternatives + +def send_email(status, to = None, instance = None, cc = None, bcc = None): + subject = None + ### Mail 1 + if status == 'Fix a date for your first training': + subject = 'Important : Fix a date for your first Training' + message = '''Dear Organiser, + + You have registered into the {2} website over 2 weeks back. Please arrange a batch of students, fix a date and time and make a training request in order to organise Trainings. Click on the link below for the instructions to request the Training: {0} + + If you have any questions, call or write to your Spoken Tutorial IIT Bombay, team person whose contact details you have. See the link for the contact details of person in-charge for your state {1} + + Note: PLEASE ENSURE THAT YOU FILL IN ONLY THE GENUINE EMAIL ID'S OF THE PARTICIPANTS / STUDENTS. IF THEY DON'T HAVE ANY, PLEASE HELP THEM CREATE ONE + +Regards, +Spoken Tutorial Team, +IIT Bombay. +'''.format('http://process.spoken-tutorial.org/images/1/1f/Training-Request-Sheet.pdf', 'http://process.spoken-tutorial.org/index.php/Software-Training#Contacts_For_Training', 'https://spoken-tutorial.org') + + ### Mail 2 + elif status == 'Instructions to be followed before conducting the training': + subject = 'Important : Instructions to be followed before conducting the training' + message = '''Dear Organiser, + +Thank you for making the Training request on {0} to be conducted at your Institute on {1}. The Training Manager at Spoken Tutorial Project Team, IIT Bombay will approve your request shortly. + +Please ensure that the students go through the instruction sheet and see the tutorials as directed in the instructions mentioned in it and also practice the commands and instruction as shown in the tutorial following the Side by Side method during the Training. + +Side by Side means that on the screen, we keep the terminal/console window open on the right hand side for the practice and the tutorial window open on the left hand side for the learning. + +If you have clicked YES for Skype support then you can send us a request on our Skype ID namely st-wshop and st-iitb. Any day before the Training please call us on Skype to have a Skype testing session and interact with Spoken Tutorial, IIT Bombay team. + +You also need to download the specified software, for that Click below. +{2} + +For getting the lab and systems ready for the workshop Click below +{3} + +Regards, +Spoken Tutorial Team, +IIT Bombay. +'''.format(instance.foss, instance.tdate, 'http://process.spoken-tutorial.org/images/c/c2/Participant_data.pdf', 'http://process.spoken-tutorial.org/images/1/1b/Download-Tutorials.pdf', 'http://process.spoken-tutorial.org/images/5/58/Machine-Readiness.pdf', instance.ttime, instance.training_code) + + ### Mail 3 + elif status == 'Future activities after conducting the Training': + subject = 'Important : Future activities after conducting the Training' + message = '''Dear Organiser, + + You have successfully completed the Training {3} on {4} at your institute. Please see the following instructions for the future activities. + +Bulk Trainings + +It is necessary for all students in the Institute to get the opportunity to take Spoken Tutorial based software training. For this please spread the awareness about the Trainings in other departments amongst the Faculty. You can also request the Principal to send out a circular to all. For your department prepare a calendar/time-table to organise Trainings for all the student batches in a systematic way. Send us the confirmed schedule soon for the upcoming Trainings. To view sample calenders Click here. To know which software is relevant for which department Click here + +Online Assessment test + +After the Training, the participants need to complete listening to all the tutorials and practice well including solving the assignment questions. This revision needs to be done at least 2 times so that the students are ready to take the online test. The organiser needs to keep a watch that proper revision is being done. Total time taken can be anywhere from 2 weeks to 1 month or even more. Fix the online test date after confirming that all students have practiced well. + + +Please note that an invigilator is required for the online test. For this, identify a faculty member who can invigilate the test and help him/her register on the {0} website before you make a test request. + +Click on the link below for the instructions for invigilator: +{1} + +To make an online Test Request please Click here. +{2} for the instructions on how to request the test + +Regards, +Spoken Tutorial Team, +IIT Bombay. +'''.format('https://spoken-tutorial.org', 'process.spoken-tutorial.org/images/0/09/Instructions_for_Invigilator.pdf','http://process.spoken-tutorial.org/images/a/aa/Test_Request.pdf', instance.training_code, instance.foss ) + + ### Email 4 + elif status == 'Instructions to be followed before conducting the test-organiser': + subject = 'Important : Instructions to be followed before conducting the test - Organiser' + message = '''Dear Organiser, + +Your {1} test on {2} {3} has been approved. The test code is {4}. This code is very important, please preserve it for your future reference and also share it with the students and invigilator on the test day. + +Inform all the participants to get the scan copy of their photographs on the test day. Get well versed with the online test before the test, see the link below for the instructions of online test for the participants {0} + +All the Best to you and all the participants. + +Regards, +Spoken Tutorial Team, +IIT Bombay. +'''.format('http://process.spoken-tutorial.org/images/9/95/Test_Instruction_for_Participants.pdf', instance.foss, instance.tdate, instance.ttime, instance.test_code) + + ### Email 5 + elif status == 'Instructions to be followed before conducting the test-invigilator': + subject = 'Important : Instructions to be followed before conducting the test - Invigilator' + message = '''Dear Invigilator, + +The organiser has requested for the {1} test on {2} {3}. Please confirm your presence by logging in our website with your username and password and Click on confirmation for the Assessment test. + +Please go through the instructions below to know what to do on the test day. Click on the link below. +{0} + +Do not forget to Close the test after the completion of the test. + +Regards, +Spoken Tutorial Team, +IIT Bombay. +'''.format('http://process.spoken-tutorial.org/images/0/09/Instructions_for_Invigilator.pdf', instance.foss, instance.tdate, instance.ttime, instance.test_code) + + # send email + email = EmailMultiAlternatives( + subject, message, 'no-reply@spoken-tutorial.org', + to = to, bcc = bcc, cc = cc, + headers = { + 'Reply-To' : 'no-reply@spoken-tutorial.org', + "Content-type" : "text/html;charset=iso-8859-1" + } + ) + + try: + result = email.send(fail_silently=True) + except Exception as e: + print("*******************************************************") + print(message) + print("*******************************************************") + pass diff --git a/events/events/filters.py b/events/events/filters.py new file mode 100644 index 000000000..c122f661a --- /dev/null +++ b/events/events/filters.py @@ -0,0 +1,439 @@ +from builtins import object +import django_filters +from events.models import * +from training.models import * +from donate.models import * +from django.core.exceptions import ObjectDoesNotExist + +class AcademicCenterFilter(django_filters.FilterSet): + state = django_filters.ChoiceFilter(choices=State.objects.none()) + resource_center = django_filters.ChoiceFilter(choices=[('', '---------'), (1, 'Resource Centers Only')]) + institution_name = django_filters.CharFilter(lookup_expr='icontains') + def __init__(self, *args, **kwargs): + user = None + if 'user' in kwargs: + user = kwargs['user'] + kwargs.pop('user') + + super(AcademicCenterFilter, self).__init__(*args, **kwargs) + choices = None + if user: + choices = list(State.objects.filter(resourceperson__user_id=user, resourceperson__status=1).values_list('id', 'name').order_by('name')) + else: + choices = list(State.objects.exclude(name = 'Uncategorised').values_list('id', 'name').order_by('name')) + choices.insert(0, ('', '---------'),) + self.filters['state'].extra.update({'choices' : choices}) + class Meta(object): + model = AcademicCenter + fields = ['state', 'institution_type', 'institute_category'] + +class ActivateAcademicCenterFilter(django_filters.FilterSet): + state = django_filters.ChoiceFilter(choices=State.objects.none()) + status = django_filters.ChoiceFilter(choices= [('', '---------'), (1, 'Active'), (3, 'Deactive')]) + institution_name = django_filters.CharFilter(lookup_expr='icontains') + def __init__(self, *args, **kwargs): + user = None + if 'user' in kwargs: + user = kwargs['user'] + kwargs.pop('user') + + super(ActivateAcademicCenterFilter, self).__init__(*args, **kwargs) + choices = None + choices = list(State.objects.values_list('id', 'name').order_by('name')) + choices.insert(0, ('', '---------'),) + self.filters['state'].extra.update({'choices' : choices}) + class Meta(object): + model = AcademicCenter + fields = ['state', 'institution_type', 'institute_category'] + +class OrganiserFilter(django_filters.FilterSet): + academic__state = django_filters.ChoiceFilter(choices=State.objects.none()) + academic__institution_name = django_filters.CharFilter(lookup_expr='icontains') + def __init__(self, *args, **kwargs): + user = kwargs['user'] + kwargs.pop('user') + super(OrganiserFilter, self).__init__(*args, **kwargs) + choices = list(State.objects.filter(resourceperson__user_id=user, resourceperson__status=1).values_list('id', 'name')) + choices.insert(0, ('', '---------'),) + self.filters['academic__state'].extra.update({'choices' : choices}) + class Meta(object): + model = Organiser + fields = ['academic__state', 'academic__institution_type', 'academic__institute_category'] + +class InvigilatorFilter(django_filters.FilterSet): + academic__state = django_filters.ChoiceFilter(choices=State.objects.none()) + academic__institution_name = django_filters.CharFilter(lookup_expr='icontains') + def __init__(self, *args, **kwargs): + user = kwargs['user'] + kwargs.pop('user') + super(InvigilatorFilter, self).__init__(*args, **kwargs) + choices = list(State.objects.filter(resourceperson__user_id=user, resourceperson__status=1).values_list('id', 'name')) + choices.insert(0, ('', '---------'),) + self.filters['academic__state'].extra.update({'choices' : choices}) + class Meta(object): + model = Invigilator + fields = ['academic__state', 'academic__institution_type', 'academic__institute_category'] + +class AccountexecutiveFilter(django_filters.FilterSet): + academic__state = django_filters.ChoiceFilter(choices=State.objects.none()) + academic__institution_name = django_filters.CharFilter(lookup_expr='icontains') + def __init__(self, *args, **kwargs): + user = kwargs['user'] + kwargs.pop('user') + super(AccountexecutiveFilter, self).__init__(*args, **kwargs) + choices = list(State.objects.filter(resourceperson__user_id=user, resourceperson__status=1).values_list('id', 'name')) + choices.insert(0, ('', '---------'),) + self.filters['academic__state'].extra.update({'choices' : choices}) + class Meta(object): + model = Accountexecutive + fields = ['academic__state', 'academic__institution_type', 'academic__institute_category'] + +class TrainingFilter(django_filters.FilterSet): + academic__state = django_filters.ChoiceFilter(choices=State.objects.none()) + foss = django_filters.ChoiceFilter(choices= [('', '---------')] + list(FossAvailableForWorkshop.objects.filter(status=1).order_by('foss__foss').values_list('foss__id', 'foss__foss').distinct())) + language = django_filters.ChoiceFilter(choices= [('', '---------')] + list(FossAvailableForWorkshop.objects.values_list('language__id', 'language__name').distinct().order_by('language__name'))) + training_type = django_filters.ChoiceFilter(choices= [('', '---------'), (0, 'Training'), (1, 'Workshop'), (2, 'Live Workshop'), (3, 'Pilot Workshop')]) + academic__institution_type = django_filters.ChoiceFilter(choices= [('', '---------')] + list(InstituteType.objects.values_list('id', 'name').distinct())) + academic__city = django_filters.ChoiceFilter(choices=State.objects.none()) + tdate = django_filters.DateFromToRangeFilter() + academic__institution_name = django_filters.CharFilter(lookup_expr='icontains') + def __init__(self, *args, **kwargs): + user=None + if 'user' in kwargs: + user = kwargs['user'] + kwargs.pop('user') + + state = None + if 'state' in kwargs: + state = kwargs['state'] + kwargs.pop('state') + super(TrainingFilter, self).__init__(*args, **kwargs) + if args and args[0] and 'academic__state' in args[0] and args[0]['academic__state']: + try: + state = State.objects.get(pk = args[0]['academic__state']) + except ObjectDoesNotExist: + pass + choices = None + if user: + choices = list(State.objects.filter(resourceperson__user_id=user, resourceperson__status=1).values_list('id', 'name')) + else: + choices = list(State.objects.exclude(name='Uncategorised').order_by('name').values_list('id', 'name')) + choices.insert(0, ('', '---------'),) + self.filters['academic__state'].extra.update({'choices' : choices}) + + choices = None + if state: + choices = list(City.objects.filter(state=state).order_by('name').values_list('id', 'name')) + [('189', 'Uncategorised')] + else: + choices = list(City.objects.none()) + choices.insert(0, ('', '---------'),) + self.filters['academic__city'].extra.update({'choices' : choices}) + + class Meta(object): + model = Training + fields = ['academic__state', 'foss'] + +class TestFilter(django_filters.FilterSet): + academic__state = django_filters.ChoiceFilter(choices=State.objects.none()) + foss = django_filters.ChoiceFilter(choices= [('', '---------')] + list(FossAvailableForTest.objects.filter(status=1).order_by('foss__foss').values_list('foss__id', 'foss__foss').distinct())) + test_category = django_filters.ChoiceFilter(choices= [('', '---------'), (1, 'Training'), (2, 'Workshop'), (3, 'Others'), (3, 'Pilot Workshop')]) + academic__institution_type = django_filters.ChoiceFilter(choices= [('', '---------')] + list(InstituteType.objects.values_list('id', 'name').distinct())) + academic__city = django_filters.ChoiceFilter(choices=State.objects.none()) + tdate = django_filters.DateFromToRangeFilter() + academic__institution_name = django_filters.CharFilter(lookup_expr='icontains') + def __init__(self, *args, **kwargs): + user=None + if 'user' in kwargs: + user = kwargs['user'] + kwargs.pop('user') + + state = None + if 'state' in kwargs: + state = kwargs['state'] + kwargs.pop('state') + super(TestFilter, self).__init__(*args, **kwargs) + if args and args[0] and 'academic__state' in args[0] and args[0]['academic__state']: + try: + state = State.objects.get(pk = args[0]['academic__state']) + except ObjectDoesNotExist: + pass + choices = None + if user: + choices = list(State.objects.filter(resourceperson__user_id=user, resourceperson__status=1).values_list('id', 'name')) + else: + choices = list(State.objects.exclude(name='Uncategorised').order_by('name').values_list('id', 'name')) + choices.insert(0, ('', '---------'),) + self.filters['academic__state'].extra.update({'choices' : choices}) + + choices = None + if state: + choices = list(City.objects.filter(state=state).order_by('name').values_list('id', 'name')) + [('189', 'Uncategorised')] + else: + choices = list(City.objects.order_by('name').values_list('id', 'name')) + choices.insert(0, ('', '---------'),) + self.filters['academic__city'].extra.update({'choices' : choices}) + + class Meta(object): + model = Test + fields = ['academic__state', 'foss'] + + +class TrainingRequestFilter(django_filters.FilterSet): + + training_planner__academic__state = django_filters.ChoiceFilter( + choices=State.objects.none() + ) + + course__foss = django_filters.ChoiceFilter( + choices= [('', '---------')] + list( + TrainingRequest.objects.filter( + status = 1 + ).order_by('course__foss__foss').values_list('course__foss__id', 'course__foss__foss').distinct() + ) + ) + + course_type = django_filters.ChoiceFilter( + choices= [ + ('', '---------'), + (0, 'Course outside lab hours'), + (1, 'Course mapped in lab hours'), + (2, 'Course unmapped in lab hours'), + (3, 'EduEasy Software') + ] + ) + + training_planner__academic__institution_type = django_filters.ChoiceFilter( + choices=[('', '---------')] + list( + InstituteType.objects.all().values_list('id', 'name').distinct() + ) + ) + + training_planner__academic__city = django_filters.ChoiceFilter( + choices=State.objects.none() + ) + + department = django_filters.ModelChoiceFilter( + queryset=Department.objects.all() + ) + + sem_start_date = django_filters.DateFromToRangeFilter() + + training_planner__academic__institution_name = \ + django_filters.CharFilter(lookup_expr='icontains') + + def __init__(self, *args, **kwargs): + user=None + if 'user' in kwargs: + user = kwargs['user'] + kwargs.pop('user') + rp_completed = None + if 'rp_completed' in kwargs: + rp_completed = kwargs['rp_completed'] + kwargs.pop('rp_completed') + rp_ongoing = None + if 'rp_ongoing' in kwargs: + rp_ongoing = kwargs['rp_ongoing'] + kwargs.pop('rp_ongoing') + rp_markcomplete = None + if 'rp_markcomplete' in kwargs: + rp_markcomplete = kwargs['rp_markcomplete'] + kwargs.pop('rp_markcomplete') + rp_pendingattendance = None + if 'rp_pendingattendance' in kwargs: + rp_pendingattendance = kwargs['rp_pendingattendance'] + kwargs.pop('rp_pendingattendance') + state = None + if 'state' in kwargs: + state = kwargs['state'] + kwargs.pop('state') + super(TrainingRequestFilter, self).__init__(*args, **kwargs) + if args and args[0] and 'training_planner__academic__state' in args[0] \ + and args[0]['training_planner__academic__state']: + try: + state = State.objects.get( + pk=args[0]['training_planner__academic__state'] + ) + except ObjectDoesNotExist: + pass + choices = None + if user: + states = set(ResourcePerson.objects.filter(user=user).values_list('state_id', flat=True)) + if rp_completed: + courses = TrainingRequest.objects.filter(status=1, training_planner__academic__state_id__in=states).values_list('course_id', flat=True).distinct() + elif rp_ongoing: + courses = TrainingRequest.objects.filter(status=0, training_planner__academic__state_id__in=states).values_list('course_id', flat=True).distinct() + elif rp_markcomplete: + courses = TrainingRequest.objects.filter(status=2, training_planner__academic__state_id__in=states).values_list('course_id', flat=True).distinct() + elif rp_pendingattendance: + courses = TrainingRequest.objects.filter(status=1, training_planner__academic__state_id__in=states).values_list('course_id', flat=True).distinct() + else: + courses = TrainingRequest.objects.filter(training_planner__academic__state_id__in=states).values_list('course_id', flat=True).distinct() + foss_list = CourseMap.objects.filter(id__in=list(courses)).values_list('foss_id', 'foss__foss').distinct().order_by('foss__foss') + + choices = [('', '---------')] + list(foss_list) + self.filters['course__foss'].extra.update( + {'choices' : choices} + ) + choices = list( + State.objects.filter( + resourceperson__user_id=user, + resourceperson__status=1 + ).values_list('id', 'name') + ) + else: + choices = list( + State.objects.exclude( + name='Uncategorised' + ).order_by('name').values_list('id', 'name') + ) + choices.insert(0, ('', '---------'),) + self.filters['training_planner__academic__state'].extra.update( + {'choices' : choices} + ) + + choices = None + if state: + choices = list( + City.objects.filter( + state=state + ).order_by('name').values_list('id', 'name') + ) + [('189', 'Uncategorised')] + else: + choices = list(City.objects.order_by('name').values_list('id', 'name')) + choices.insert(0, ('', '---------'),) + self.filters['training_planner__academic__city'].extra.update( + {'choices' : choices} + ) + + class Meta(object): + model = TrainingRequest + fields = ['training_planner__academic__state', 'course__foss'] + +class ViewEventFilter(django_filters.FilterSet): + state = django_filters.ChoiceFilter(choices=State.objects.none()) + host_college = django_filters.ChoiceFilter( + choices= [('', '---------')] + list( + TrainingEvents.objects.filter().order_by('host_college__institution_name').values_list('host_college__id', 'host_college__institution_name').distinct() + ) + ) + foss = django_filters.ModelMultipleChoiceFilter( + queryset=FossCategory.objects.filter(show_on_homepage=1).order_by('foss'), + field_name='course__foss', + conjoined=False, + label="Foss Category" + ) + event_start_date = django_filters.DateFromToRangeFilter() + event_end_date = django_filters.DateFromToRangeFilter() + event_type = django_filters.ChoiceFilter(choices=EVENT_TYPE_CHOICES[1:]) + + + def __init__(self, *args, **kwargs): + user = None + if 'user' in kwargs: + user = kwargs['user'] + kwargs.pop('user') + + super(ViewEventFilter, self).__init__(*args, **kwargs) + choices = None + choices = list(State.objects.values_list('id', 'name').order_by('name')) + choices.insert(0, ('', '---------'),) + self.filters['state'].extra.update({'choices' : choices}) + class Meta(object): + model = TrainingEvents + fields = ['state', 'foss', 'host_college'] + + + +class TrEventFilter(django_filters.FilterSet): + state = django_filters.ChoiceFilter(choices=State.objects.none()) + host_college = django_filters.ChoiceFilter() + foss = django_filters.ModelMultipleChoiceFilter( + queryset=FossCategory.objects.filter(show_on_homepage=1).order_by('foss'), + field_name='course__foss', + conjoined=False, + label="Foss Category" + ) + event_type = django_filters.ChoiceFilter(choices=EVENT_TYPE_CHOICES[1:]) + event_start_date = django_filters.DateFromToRangeFilter() + event_end_date = django_filters.DateFromToRangeFilter() + + def __init__(self, *args, **kwargs): + user = None + if 'user' in kwargs: + user = kwargs['user'] + kwargs.pop('user') + + super(TrEventFilter, self).__init__(*args, **kwargs) + choices = None + tr_states = State.objects.filter(resourceperson__user_id=user, resourceperson__status=1) + + choices = list(tr_states.filter().order_by('name').values_list('id', 'name')) + self.filters['state'].extra.update({'choices' : choices}) + + all_events = TrainingEvents.objects.filter(state__in=tr_states) + host_choices = list( + all_events.filter().order_by('host_college__institution_name').values_list('host_college__id', 'host_college__institution_name').distinct() + ) + self.filters['host_college'].extra.update({'choices' : host_choices}) + class Meta(object): + model = TrainingEvents + fields = ['state', 'foss', 'host_college', 'event_type'] + + +class PaymentTransFilter(django_filters.FilterSet): + paymentdetail__state = django_filters.ChoiceFilter(choices=State.objects.none()) + created = django_filters.DateFromToRangeFilter() + paymentdetail__purpose = django_filters.ChoiceFilter(choices= [('', 'Registration'), ('cdcontent', 'CD-Content')]) + paymentdetail__email = django_filters.CharFilter(lookup_expr='icontains') + requestType = django_filters.ChoiceFilter(choices= [('I', 'Ongoing'), ('R', 'Reconciled')]) + status = django_filters.ChoiceFilter(choices= [('S', 'Successful'), ('F', 'Failed'), ('X', 'Undefind')]) + + def __init__(self, *args, **kwargs): + user = None + if 'user' in kwargs: + user = kwargs['user'] + kwargs.pop('user') + + super(PaymentTransFilter, self).__init__(*args, **kwargs) + choices = None + choices = list(State.objects.filter(resourceperson__user_id=user, resourceperson__status=1).values_list('name', 'name').order_by('name')) + self.filters['paymentdetail__state'].extra.update({'choices' : choices}) + + + class Meta(object): + model = PaymentTransaction + fields = [] + + +class EventStatsFilter(django_filters.FilterSet): + state = django_filters.ChoiceFilter( + choices= [('', '---------')] + list( + TrainingEvents.objects.filter().order_by('state__name').values_list('state__id', 'state__name').distinct() + ) + ) + host_college = django_filters.ChoiceFilter() + foss = django_filters.ChoiceFilter( + choices= [('', '---------')] + list( + TrainingEvents.objects.filter().order_by('foss__foss').values_list('foss__id', 'foss__foss').distinct() + ) + ) + event_type = django_filters.ChoiceFilter(choices=EVENT_TYPE_CHOICES[1:]) + event_start_date = django_filters.DateFromToRangeFilter() + event_end_date = django_filters.DateFromToRangeFilter() + + def __init__(self, *args, **kwargs): + user = None + if 'user' in kwargs: + user = kwargs['user'] + kwargs.pop('user') + + super(EventStatsFilter, self).__init__(*args, **kwargs) + + all_events = TrainingEvents.objects.all() + host_choices = list( + all_events.filter().order_by('host_college__institution_name').values_list('host_college__id', 'host_college__institution_name').distinct() + ) + self.filters['host_college'].extra.update({'choices' : host_choices}) + class Meta(object): + model = TrainingEvents + fields = ['state', 'foss', 'host_college', 'event_type'] diff --git a/events/events/forms.py b/events/events/forms.py new file mode 100644 index 000000000..2e466b51b --- /dev/null +++ b/events/events/forms.py @@ -0,0 +1,567 @@ + +from builtins import str +from builtins import object +from django import forms +from django.contrib.auth.models import User + +from events.formsv2 import * +from events.models import * +import re +import string + +class RpForm(forms.ModelForm): + user = forms.ModelChoiceField(queryset = User.objects.filter(groups__name='Resource Person')) + state = forms.ModelChoiceField(queryset = State.objects.all()) + status = forms.BooleanField(required=False) + + class Meta(object): + model = ResourcePerson + exclude = ['assigned_by'] + +class AcademicForm(forms.ModelForm): + state = forms.ModelChoiceField(label='State', widget = forms.Select(attrs = {'class' : 'ac-state'}), queryset = State.objects.order_by('name'), empty_label = "--- None ---", help_text = "", error_messages = {'required':'State field required.'}) + + university = forms.ModelChoiceField(label='University', widget = forms.Select(attrs = {'class' : 'ac-university'}), queryset = University.objects.none(), empty_label = "--- None ---", help_text = "", error_messages = {'required':'University field required.'}) + + district = forms.ModelChoiceField(label='Dist', widget = forms.Select(attrs = {'class' : 'ac-district'}), queryset = District.objects.none(), empty_label = "--- None ---", help_text = "", error_messages = {'required':'Institute Type field required.'}) + + city = forms.ModelChoiceField(label='City', widget = forms.Select(attrs = {'class' : 'ac-city'}), queryset = City.objects.none(), empty_label = "--- None ---", help_text = "", error_messages = {'required':'City Type field required.'}) + + location = forms.ModelChoiceField(label='Location', widget = forms.Select(attrs = {'class' : 'ac-location'}), queryset = Location.objects.none(), empty_label = "--- None ---", help_text = "", error_messages = {'required':'City Type field required.'}, required = False) + + contact_person = forms.CharField(widget = forms.Textarea(attrs = {'rows' : '5'}), required = False) + remarks = forms.CharField(widget = forms.Textarea(attrs = {'rows' : '5'}), required = False) + rating = forms.ChoiceField(choices = (('1', 'Rating 1'), ('2', 'Rating 2'), ('3', 'Rating 3'), ('4', 'Rating 4'), ('5', 'Rating 5'))) + def __init__(self, user, *args, **kwargs): + initial = '' + if 'instance' in kwargs: + initial = kwargs["instance"] + + if 'user' in kwargs: + user = kwargs["user"] + del kwargs["user"] + + super(AcademicForm, self).__init__(*args, **kwargs) + #initial + self.fields["state"].queryset = State.objects.filter(resourceperson__user = user, resourceperson__status = 1) + #prevent ajax loaded data + if args: + #if 'district' in args[0]: + # if args[0]['district'] and args[0]['district'] != '' and args[0]['district'] != 'None': + # self.fields["location"].queryset = Location.objects.filter(district__id=args[0]['district']) + # + if 'state' in args[0]: + if args[0]['state'] != '' and args[0]['state'] != 'None': + self.fields["university"].queryset = University.objects.filter(state__id=args[0]['state']) + self.fields["district"].queryset = District.objects.filter(state__id=args[0]['state']) + self.fields["city"].queryset = City.objects.filter(state__id=args[0]['state']) + # for edit + if initial: + #self.fields["location"].queryset = Location.objects.filter(district__id=initial.district_id) + if args and 'state' in args[0]: + if args[0]['state'] != '' and args[0]['state'] != 'None': + self.fields["university"].queryset = University.objects.filter(state__id=args[0]['state']) + self.fields["district"].queryset = District.objects.filter(state__id=args[0]['state']) + self.fields["city"].queryset = City.objects.filter(state__id=args[0]['state']) + else: + self.fields["university"].queryset = University.objects.filter(state__id=initial.state_id) + self.fields["district"].queryset = District.objects.filter(state__id=initial.state_id) + self.fields["city"].queryset = City.objects.filter(state__id=initial.state_id) + + class Meta(object): + model = AcademicCenter + exclude = ['user', 'academic_code', 'institute_category'] + +class AccountexecutiveForm(forms.Form): + state = forms.ChoiceField(choices=[('', '-- None --'), ], widget=forms.Select(attrs = {}), required = True, error_messages = {'required':'State field is required.'}) + college = forms.ChoiceField(choices=[('', '-- None --'), ], widget=forms.Select(attrs = {}), required = True, error_messages = {'required':'College Name field is required.'}) + + def __init__(self, *args, **kwargs): + initial = '' + if 'instance' in kwargs: + initial = kwargs["instance"] + del kwargs["instance"] + + super(AccountexecutiveForm, self).__init__(*args, **kwargs) + + # load the choices + state_list = list(State.objects.exclude().order_by('name').values_list('id', 'name')) + state_list.insert(0, ('', '-- None --')) + self.fields['state'].choices = state_list + if args: + if 'state' in args[0]: + if args[0]['state'] and args[0]['state'] != '' and args[0]['state'] != 'None': + centre_qs = AcademicCenter.objects.filter(state_id=args[0]['state']) + centre_choices = [(x.id, '%s, %s' % (x.institution_name, x.academic_code)) for x in centre_qs] + self.fields['college'].choices = centre_choices + self.fields['college'].widget.attrs = {} + if initial: + self.fields['state'].initial = initial.academic.state_id + centre_qs = AcademicCenter.objects.filter(district_id=initial.academic.district_id) + centre_choices = [(x.id, '%s, %s' % (x.institution_name, x.academic_code)) for x in centre_qs] + self.fields['college'].choices = centre_choices + + # initial data + self.fields['college'].initial = initial.academic_id + +class OrganiserForm(forms.Form): + state = forms.ChoiceField(choices=[('', '-- None --'), ], widget=forms.Select(attrs = {}), required = True, error_messages = {'required':'State field is required.'}) + college = forms.ChoiceField(choices=[('', '-- None --'), ], widget=forms.Select(attrs = {}), required = True, error_messages = {'required':'College Name field is required.'}) + + def __init__(self, *args, **kwargs): + initial = '' + if 'instance' in kwargs: + initial = kwargs["instance"] + del kwargs["instance"] + + super(OrganiserForm, self).__init__(*args, **kwargs) + + # load the choices + state_list = list(State.objects.exclude().order_by('name').values_list('id', 'name')) + state_list.insert(0, ('', '-- None --')) + self.fields['state'].choices = state_list + if args: + if 'state' in args[0]: + if args[0]['state'] and args[0]['state'] != '' and args[0]['state'] != 'None': + centre_qs = AcademicCenter.objects.filter(state_id=args[0]['state']) + centre_choices = [(x.id, '%s, %s' % (x.institution_name, x.academic_code)) for x in centre_qs] + self.fields['college'].choices = centre_choices + self.fields['college'].widget.attrs = {} + if initial: + self.fields['state'].initial = initial.academic.state_id + centre_qs = AcademicCenter.objects.filter(district_id=initial.academic.district_id) + centre_choices = [(x.id, '%s, %s' % (x.institution_name, x.academic_code)) for x in centre_qs] + self.fields['college'].choices = centre_choices + + # initial data + self.fields['college'].initial = initial.academic_id + + +class InvigilatorForm(forms.Form): + state = forms.ChoiceField(choices = [('', '-- None --'),], widget=forms.Select(attrs = {}), required = True, error_messages = {'required':'State field is required.'}) + college = forms.ChoiceField(choices = [('', '-- None --'),], widget=forms.Select(attrs = {}), required = True, error_messages = {'required':'College Name field is required.'}) + def __init__(self, *args, **kwargs): + initial = '' + if 'instance' in kwargs: + initial = kwargs["instance"] + del kwargs["instance"] + + super(InvigilatorForm, self).__init__(*args, **kwargs) + #load the choices + state_list = list(State.objects.exclude().values_list('id', 'name')) + state_list.insert(0, ('', '-- None --')) + self.fields['state'].choices = state_list + if args: + if 'state' in args[0]: + if args[0]['state'] and args[0]['state'] != '' and args[0]['state'] != 'None': + choices = list(AcademicCenter.objects.filter(state_id = args[0]['state']).values_list('id', 'institution_name')) + choices.insert(0, ('', '-- None --')) + self.fields['college'].choices = choices + self.fields['college'].widget.attrs = {} + if initial: + self.fields['state'].initial = initial.academic.state_id + self.fields['college'].choices = AcademicCenter.objects.filter(district_id =initial.academic.district_id).values_list('id', 'institution_name') + #initial data + self.fields['college'].initial = initial.academic_id + +class DepartmentForm(forms.ModelForm): + class Meta(object): + model = Department + exclude = ['created', 'updated'] + +class TrainingForm(forms.ModelForm): + user = None + class Meta(object): + model = Training + exclude = ['status', 'participant_count', 'extra_fields', 'organiser', 'academic', 'training_code', 'ttime', 'appoved_by'] + + def clean_course_number(self): + super(TrainingForm, self).clean() + if 'training_type' in self.cleaned_data: + if self.cleaned_data['training_type'] == '0' and self.cleaned_data['course_number'] == '': + raise forms.ValidationError("Course Number field is required.") + # Organiser training count restrict + def clean_tdate(self): + super(TrainingForm, self).clean() + organiser = self.user.organiser + tdate = self.cleaned_data['tdate'] + training_count = Training.objects.filter(tdate = tdate, organiser = organiser).count() + if training_count >= 3: + raise ValidationError("Organiser cannot schedule more than 3 software training workshops per day. Kindly choose other dates for other training workshops") + return self.cleaned_data['tdate'] + + training_type = forms.ChoiceField(widget=forms.RadioSelect, choices = [(0, 'Training'),], required = True) + course_number = forms.CharField(required = True) + no_of_lab_session = forms.ChoiceField(widget=forms.Select, choices = [('', '---------'), ('1', 'Semester I'), ('2', 'Semester II'),('3', 'Semester III'),('4', 'Semester IV'),('5', 'Semester V'),('6', 'Semester VI'),('7', 'Semester VII'),('8', 'Semester VIII')], required = True) + + department = forms.ModelMultipleChoiceField(label='Department', widget = forms.SelectMultiple(attrs = {}), queryset = Department.objects.exclude(name='Uncategorised').order_by('name'), help_text = "", error_messages = {'required':'Department field required.'}) + + foss = forms.ModelChoiceField(label='Foss', widget = forms.Select(attrs = {}), queryset = FossCategory.objects.filter(status = 1, id__in = FossAvailableForWorkshop.objects.filter(status=1).values_list('foss').distinct()).order_by('foss') +, help_text = "", error_messages = {'required':'Foss field required.'}) + + language = forms.ModelChoiceField(label='Language', widget = forms.Select(attrs = {}), queryset = Language.objects.filter(id__in = FossAvailableForWorkshop.objects.all().values_list('language').distinct()).order_by('name'), help_text = "", error_messages = {'required':'Language field required.'}) + + tdate = forms.DateTimeField(required = True, error_messages = {'required':'Timing field is required.'}) + skype = forms.ChoiceField(widget=forms.RadioSelect, choices=[(0, 'No'),(1, 'Yes')], required = True) + xml_file = forms.FileField(required = True) + def __init__(self, *args, **kwargs): + tmp = 0 + if 'user' in kwargs: + self.user = kwargs["user"] + del kwargs["user"] + instance = '' + if 'instance' in kwargs: + instance = kwargs["instance"] + del kwargs["instance"] + super(TrainingForm, self).__init__(*args, **kwargs) + if self.user: + if instance: + self.fields['xml_file'].required = False + from events.views import is_resource_person + if is_resource_person(self.user): + self.fields['training_type'].choices = [(0, 'Training'),(2, 'Pilot Workshop'), (3, 'Live Workshop')] + self.fields['training_type'].initial = 0 + if instance: + self.fields['training_type'].initial = instance.training_type + self.fields['course'].initial = instance.course_id + self.fields['foss'].initial = instance.foss + self.fields['language'].initial = instance.language + self.fields['tdate'].initial = str(instance.tdate) + " " + str(instance.ttime)[0:5] + self.fields['department'].initial = instance.department.all().values_list('id', flat=True) + self.fields['skype'].initial = instance.skype + if instance.extra_fields: + self.fields['course_number'].initial = instance.extra_fields.paper_name + self.fields['no_of_lab_session'].initial = instance.extra_fields.no_of_lab_session + +class TrainingPermissionForm(forms.Form): + try: + permission_choices = list(PermissionType.objects.all().values_list('id', 'name')) + permission_choices.insert(0, ('', '-- None --')) + permissiontype = forms.ChoiceField(choices = permission_choices, widget=forms.Select(attrs = {}), required = True) + + user_list = list(User.objects.filter(groups__name='Workshop Permission').values_list('id', 'username')) + user_list.insert(0, ('', '-- None --')) + user = forms.ChoiceField(choices = user_list, widget=forms.Select(attrs = {}), required = True) + + state_list = list(State.objects.exclude(name='Uncategorised').values_list('id', 'name')) + state_list.insert(0, ('', '-- None --')) + state = forms.ChoiceField(choices = state_list, widget=forms.Select(attrs = {}), required = True) + + district = forms.ChoiceField(choices = [('', '-- None --'),], widget=forms.Select(attrs = {}), required = False, error_messages = {'required':'district field is required.'}) + + university = forms.ChoiceField(choices = [('', '-- None --'),], widget=forms.Select(attrs = {}), required = False) + + institution_type = list(InstituteType.objects.order_by('name').values_list('id', 'name')) + institution_type.insert(0, ('', '-- None --')) + institutiontype = forms.ChoiceField(choices = institution_type, widget=forms.Select(attrs = {}), required = False) + + institute = forms.ChoiceField(choices = [('', '-- None --'),], widget=forms.Select(attrs = {}), required = False) + + def __init__(self, *args, **kwargs): + super(TrainingPermissionForm, self).__init__(*args, **kwargs) + if args: + if 'state' in args[0] and 'district' in args[0]: + if args[0]['state'] and args[0]['state'] != '' and args[0]['state'] != 'None': + choices = list(District.objects.filter(state_id = args[0]['state']).values_list('id', 'name')) + choices.insert(0, ('', '-- None --')) + self.fields['district'].choices = choices + + if 'state' in args[0] and 'university' in args[0]: + if args[0]['state'] and args[0]['state'] != '' and args[0]['state'] != 'None': + choices = list(University.objects.filter(state_id = args[0]['state']).values_list('id', 'name')) + choices.insert(0, ('', '-- None --')) + self.fields['university'].choices = choices + + if 'district' in args[0] and 'institute' in args[0]: + if args[0]['district'] and args[0]['district'] != '' and args[0]['district'] != 'None': + choices = list(AcademicCenter.objects.filter(district_id = args[0]['district']).values_list('id', 'institution_name')) + choices.insert(0, ('', '-- None --')) + self.fields['institute'].choices = choices + except: + pass + +class TestForm(forms.ModelForm): + class Meta(object): + model = Test + exclude = ['status', 'participant_count', 'organiser', 'academic', 'test_code', 'ttime', 'training', 'workshop', 'appoved_by','department','foss'] + + def clean_workshop(self): + super(TestForm, self).clean() + if 'test_category' in self.cleaned_data: + if self.cleaned_data['test_category'].id == 1 and self.cleaned_data['workshop'] == '': + raise forms.ValidationError("Workshop field is required.") + + def clean_training(self): + super(TestForm, self).clean() + if 'test_category' in self.cleaned_data: + if self.cleaned_data['test_category'].id == 2 and self.cleaned_data['training'] == '': + raise forms.ValidationError("Training field is required.") + test_category = forms.ModelChoiceField(queryset = TestCategory.objects.filter(status=True), required = False) + tdate = forms.DateTimeField(required = True, error_messages = {'required':'Date field is required.'}) + #workshop = forms.ChoiceField(choices = [('', '-- None --'),], widget=forms.Select(attrs = {}), required = False, error_messages = {'required':'Workshop field is required.'}) + training = forms.ChoiceField(choices = [('', '-- None --'),], widget=forms.Select(attrs = {}), required = False, error_messages = {'required':'Training field is required.'}) + + def __init__(self, *args, **kwargs): + user = '' + if 'user' in kwargs: + user = kwargs["user"] + del kwargs["user"] + instance = '' + if 'instance' in kwargs: + instance = kwargs["instance"] + del kwargs["instance"] + super(TestForm, self).__init__(*args, **kwargs) + + def get_trainings_for_organiser(user) : + trainings = TrainingRequest.test_training.filter(training_planner__academic = user.organiser.academic, training_planner__organiser=user.organiser) + return trainings + + if user: + trainings = get_trainings_for_organiser(user) + trchoices = [('', '-------')] + for training in trainings: + if training.course.test: + trchoices.append((training.id, training.training_name())) + + self.fields['training'].choices = trchoices + self.fields['invigilator'].queryset = Invigilator.objects.filter(academic = user.organiser.academic, status=1).exclude(user_id = user.id) + + if instance: + self.fields['invigilator'].queryset = Invigilator.objects.filter(academic = instance.organiser.academic, status=1).exclude(user_id = user.id) + self.fields['invigilator'].initial = instance.invigilator + self.fields['test_category'].initial = instance.test_category + self.fields['tdate'].initial = str(instance.tdate) + " " + str(instance.ttime)[0:5] + if instance.test_category.id == 2: + self.fields['training'].initial = instance.training_id + +class TrainingScanCopyForm(forms.Form): + scan_copy = forms.FileField(label = 'Select a Scaned copy', required = True) + def clean(self): + super(TrainingScanCopyForm, self).clean() + file_type = ['application/pdf'] + if 'scan_copy' in self.cleaned_data: + if not component.content_type in file_type: + raise forms.ValidationError("You have forgotten about Fred!") + else: + raise forms.ValidationError("You have forgotten about Fred!") + +class ParticipantSearchForm(forms.Form): + email = forms.EmailField(required = False) + username = forms.CharField(required = False) + +class TrainingCompletionForm(forms.Form): + approximate_hour = forms.ChoiceField(choices=[('', '---------'), (0, '0 - 5'), (1, '6 - 10') , (2, '11 - 15'), (3, '16 - 20'), (4, ' > 20')]) + online_test = forms.ChoiceField(choices=[('', '---------'), (0, 'Will Request'), (1, 'Will not Request'), (2, 'Already Requested')]) + is_tutorial_useful = forms.ChoiceField(widget=forms.RadioSelect, choices=[(1, 'Yes'), (0, 'No')]) + future_training = forms.ChoiceField(widget=forms.RadioSelect, choices=[(1, 'Yes'), (0, 'No')]) + recommend_to_others = forms.ChoiceField(widget=forms.RadioSelect, choices=[(1, 'Yes'), (0, 'No')]) + def __init__(self, *args, **kwargs): + user = '' + if 'user' in kwargs: + user = kwargs["user"] + del kwargs["user"] + super(TrainingCompletionForm, self).__init__(*args, **kwargs) +# if user: +# if user.organiser.test_organiser.filter(status=4).count(): +# self.fields['online_test'].choices=[('', '---------'), (0, 'Will Request'), (1, 'Will not Request')] + +class LiveFeedbackForm(forms.ModelForm): + fiveChoice = (('1', '',), ('2', '',), ('3', '',), ('4', '',), ('5', '',)) + threeChoice = (('1', '',), ('2', '',), ('3', '',)) + + name = forms.CharField() + email = forms.EmailField() + branch = forms.CharField() + institution = forms.CharField() + + content = forms.ChoiceField(widget=forms.RadioSelect, choices = fiveChoice) + sequence = forms.ChoiceField(widget=forms.RadioSelect, choices = fiveChoice) + clarity = forms.ChoiceField(widget=forms.RadioSelect, choices = fiveChoice) + interesting = forms.ChoiceField(widget=forms.RadioSelect, choices = fiveChoice) + appropriate_example = forms.ChoiceField(widget=forms.RadioSelect, choices = fiveChoice) + instruction_sheet = forms.ChoiceField(widget=forms.RadioSelect, choices = fiveChoice) + assignment = forms.ChoiceField(widget=forms.RadioSelect, choices = fiveChoice) + + pace_of_tutorial = forms.ChoiceField(widget=forms.RadioSelect, choices = threeChoice ) + rate_workshop = forms.ChoiceField(widget=forms.RadioSelect, choices = fiveChoice) + workshop_learnt = forms.CharField(widget=forms.Textarea(attrs={'rows': 2})) + workshop_improved = forms.CharField(widget=forms.Textarea(attrs={'rows': 2})) + weakness_workshop = forms.BooleanField(label='Duration of the workshop is less', required=False, initial=False) + weakness_narration = forms.BooleanField(label='Pace of the narration in the tutorials was very fast', required=False, initial=False) + weakness_understand = forms.BooleanField(label='Had to listen more than two times to understand the commands', required=False, initial=False) + other_weakness = forms.CharField(widget=forms.Textarea(attrs={'rows': 2})) + tutorial_language = forms.ChoiceField(widget=forms.RadioSelect, choices = threeChoice ) + apply_information = forms.ChoiceField(widget=forms.RadioSelect, choices = fiveChoice) + if_apply_information_yes = forms.CharField(widget=forms.Textarea(attrs={'rows': 2})) + + setup_learning = forms.ChoiceField(widget=forms.RadioSelect, choices = fiveChoice) + computers_lab = forms.ChoiceField(widget=forms.RadioSelect, choices = fiveChoice) + audio_quality = forms.ChoiceField(widget=forms.RadioSelect, choices = fiveChoice) + video_quality = forms.ChoiceField(widget=forms.RadioSelect, choices = fiveChoice) + + workshop_orgainsation = forms.ChoiceField(widget=forms.RadioSelect, choices = fiveChoice) + faciliate_learning = forms.ChoiceField(widget=forms.RadioSelect, choices = fiveChoice) + motivate_learners = forms.ChoiceField(widget=forms.RadioSelect, choices = fiveChoice) + time_management = forms.ChoiceField(widget=forms.RadioSelect, choices = fiveChoice) + + knowledge_about_software = forms.ChoiceField(widget=forms.RadioSelect, choices = fiveChoice) + provide_clear_explanation = forms.ChoiceField(widget=forms.RadioSelect, choices = fiveChoice) + answered_questions = forms.ChoiceField(widget=forms.RadioSelect, choices = fiveChoice) + interested_helping = forms.ChoiceField(widget=forms.RadioSelect, choices = fiveChoice) + executed_workshop = forms.ChoiceField(widget=forms.RadioSelect, choices = fiveChoice) + + recommend_workshop = forms.ChoiceField(widget=forms.RadioSelect, choices = fiveChoice) + reason_why = forms.CharField(widget=forms.Textarea(attrs={'rows': 2})) + other_comments = forms.CharField(widget=forms.Textarea(attrs={'rows': 2})) + class Meta(object): + model = TrainingLiveFeedback + exclude = ['training', 'mdluser_id'] + + +class TrainingLanguageFeedbackForm(forms.ModelForm): + fiveChoice = ((1, ''), (2, ''), (3, ''), (4, ''), (5, '')) + #name = forms.CharField() + age = forms.CharField() + + medium_of_instruction = forms.ChoiceField(widget=forms.RadioSelect, choices = ((0, 'English'), (1, "Vernacular Medium")) ) + gender = forms.ChoiceField(widget=forms.RadioSelect, choices = ((0, 'Male'), (1, "Female")) ) + + language_prefered = forms.ModelChoiceField( widget = forms.Select(attrs = {}), queryset = Language.objects.order_by('name'), empty_label = "--- None ---", error_messages = {'required':'Language field required.'}) + + tutorial_was_useful = forms.ChoiceField(widget=forms.RadioSelect, choices = fiveChoice) + learning_experience = forms.ChoiceField(widget=forms.RadioSelect, choices = fiveChoice) + satisfied_with_learning_experience = forms.ChoiceField(widget=forms.RadioSelect, choices = fiveChoice) + concept_explain_clearity = forms.ChoiceField(widget=forms.RadioSelect, choices = fiveChoice) + overall_learning_experience = forms.ChoiceField(widget=forms.RadioSelect, choices = fiveChoice) + user_interface = forms.ChoiceField(widget=forms.RadioSelect, choices = fiveChoice) + understanding_difficult_concept = forms.ChoiceField(widget=forms.RadioSelect, choices = fiveChoice) + curious_and_motivated = forms.ChoiceField(widget=forms.RadioSelect, choices = fiveChoice) + similar_tutorial_with_other_content = forms.ChoiceField(widget=forms.RadioSelect, choices = fiveChoice) + foss_tutorial_was_mentally_demanding = forms.ChoiceField(widget=forms.RadioSelect, choices = fiveChoice) + side_by_side_method_is_understood = forms.ChoiceField(widget=forms.RadioSelect, choices = fiveChoice) + + compfortable_learning_in_language = forms.ChoiceField(widget=forms.RadioSelect, choices = ((1, 'Least comfortable'), (2, 'Less comfortable'), (3, 'Neither comfortable nor uncomfortable'), (4, 'Comfortable'), (5, 'Extremely comfortable'))) + confidence_level_in_language = forms.ChoiceField(widget=forms.RadioSelect, choices = ((1, 'Least confident'), (2, 'Less confident'), (3, 'Neither confident nor unconfident'), (4, 'Very confident'), (5, 'Extremely confident'))) + preferred_language = forms.ChoiceField(widget=forms.RadioSelect, choices = ((0, 'English'), (0, 'Indian Language'))) + preferred_language_reason = forms.CharField(widget=forms.Textarea(attrs={'rows': 2})) + prefer_translation_in_mother_tongue = forms.ChoiceField(widget=forms.RadioSelect, choices = ((1, 'Yes'), (0, 'No'))) + prefer_translation_in_mother_tongue_reason = forms.CharField(widget=forms.Textarea(attrs={'rows': 2})) + side_by_side_method_meant = forms.ChoiceField(widget=forms.RadioSelect, choices = ((1, 'Yes'), (0, 'No'))) + side_by_side_method_is_beneficial = forms.ChoiceField(widget=forms.RadioSelect, choices = ((1, 'Yes'), (0, 'No'))) + side_by_side_method_is_beneficial_reason = forms.CharField(widget=forms.Textarea(attrs={'rows': 2})) + side_by_side_method_is_effective = forms.ChoiceField(widget=forms.RadioSelect, choices = ((1, 'Yes'), (0, 'No'))) + side_by_side_method_is = forms.ChoiceField(widget=forms.RadioSelect, choices = ((1, 'Effective because it allows to see the video and practice the software simultaneously'), (0, 'Is not effective for me as I like to see one window at a time'))) + limitations_of_side_by_side_method = forms.CharField(widget=forms.Textarea(attrs={'rows': 2})) + + content_information_flow = forms.ChoiceField(widget=forms.RadioSelect, choices = fiveChoice) + content_appropriate_examples = forms.ChoiceField(widget=forms.RadioSelect, choices = fiveChoice) + content_ease_of_understanding = forms.ChoiceField(widget=forms.RadioSelect, choices = fiveChoice) + content_clarity_of_instruction_sheet = forms.ChoiceField(widget=forms.RadioSelect, choices = fiveChoice) + content_ease_of_performing_assignment = forms.ChoiceField(widget=forms.RadioSelect, choices = fiveChoice) + content_best_features = forms.CharField(widget=forms.Textarea(attrs={'rows': 2})) + content_areas_of_improvement = forms.CharField(widget=forms.Textarea(attrs={'rows': 2})) + + video_audio_video_synchronization = forms.ChoiceField(widget=forms.RadioSelect, choices = fiveChoice) + video_attractive_color_features = forms.ChoiceField(widget=forms.RadioSelect, choices = fiveChoice) + video_text_readable = forms.ChoiceField(widget=forms.RadioSelect, choices = fiveChoice) + video_best_features = forms.CharField(widget=forms.Textarea(attrs={'rows': 2})) + video_areas_of_improvement = forms.CharField(widget=forms.Textarea(attrs={'rows': 2})) + + audio_pleasant_speech_and_accent = forms.ChoiceField(widget=forms.RadioSelect, choices = fiveChoice) + audio_soothing_and_friendly_tone = forms.ChoiceField(widget=forms.RadioSelect, choices = fiveChoice) + audio_understandable_and_clear_speech = forms.ChoiceField(widget=forms.RadioSelect, choices = fiveChoice) + audio_best_features = forms.CharField(widget=forms.Textarea(attrs={'rows': 2})) + audio_areas_of_improvement = forms.CharField(widget=forms.Textarea(attrs={'rows': 2})) + + class Meta(object): + model = TrainingLanguageFeedback + exclude = ['name', 'training', 'mdluser_id'] + + def __init__(self, *args, **kwargs): + training = None + print(kwargs) + if 'training' in kwargs: + training = kwargs["training"] + del kwargs["training"] + super(TrainingLanguageFeedbackForm, self).__init__(*args, **kwargs) + #self.fields['language_prefered'].queryset = Language.objects.filter(id__in = FossAvailableForWorkshop.objects.filter(foss=training.foss).values_list('language_id')) + #if args and 'language_prefered' in args[0]: + # self.fields['language_prefered'].queryset = Language.objects.filter(id__in = FossAvailableForWorkshop.objects.filter(foss=training.foss).values_list('language_id')) + +class TrainingReUseForm(forms.Form): + user = None + foss = forms.ModelChoiceField(label='Foss', widget = forms.Select(attrs = {}), queryset = FossCategory.objects.filter(status = 1, id__in = FossAvailableForWorkshop.objects.filter(status=1).values_list('foss').distinct()).order_by('foss') +, help_text = "", error_messages = {'required':'Foss field required.'}) + + language = forms.ModelChoiceField(label='Language', widget = forms.Select(attrs = {}), queryset = Language.objects.filter(id__in = FossAvailableForWorkshop.objects.all().values_list('language').distinct()).order_by('name'), help_text = "", error_messages = {'required':'Language field required.'}) + + tdate = forms.DateTimeField(required = True, error_messages = {'required':'Timing field is required.'}) + + def clean_tdate(self): + super(TrainingReUseForm, self).clean() + organiser = self.user.organiser + tdate = self.cleaned_data['tdate'] + training_count = Training.objects.filter(tdate = tdate, organiser = organiser).count() + if training_count >= 3: + raise ValidationError("Organiser cannot schedule more than 3 software training workshops per day. Kindly choose other dates for other training workshops") + return self.cleaned_data['tdate'] + + def __init__(self, *args, **kwargs): + self.user = kwargs.pop('user', None) + super(TrainingReUseForm, self).__init__(*args, **kwargs) + +class StudentPasswordResetForm(forms.Form): + state = forms.ModelChoiceField(queryset=State.objects.all(), + empty_label="Select State",) + school = forms.ModelChoiceField(queryset=AcademicCenter.objects.none()) + batches = forms.ModelMultipleChoiceField(queryset=StudentBatch.objects.none()) + new_password = forms.CharField() + confirm_password = forms.CharField() + + def __init__(self, *args, **kwargs): + state_id = None + school_id = None + + # Extract data from args (when form is created with POST data) + if args and len(args) > 0 and hasattr(args[0], 'get'): + state_id = args[0].get('state') + school_id = args[0].get('school') + # Extract data from kwargs (when form has initial data) + elif 'initial' in kwargs: + state_id = kwargs['initial'].get('state') + school_id = kwargs['initial'].get('school') + + super().__init__(*args, **kwargs) + + # Set querysets based on the extracted data + if state_id: + self.fields['school'].queryset = AcademicCenter.objects.filter(state_id=state_id) + if school_id: + self.fields['batches'].queryset = StudentBatch.objects.filter(academic_id=school_id) + else: + self.fields['batches'].queryset = StudentBatch.objects.none() + + def clean(self): + cleaned_data = super().clean() + new_password = cleaned_data.get('new_password') + confirm_password = cleaned_data.get('confirm_password') + if new_password and confirm_password and new_password !=confirm_password: + self.add_error("confirm_password", "Passwords do not match") + raise ValidationError("Passwords do not match!") + return cleaned_data + + def clean_new_password(self): + SPECIAL_CHAR = string.punctuation + new_password = self.cleaned_data.get("new_password") + errors = [] + if not re.search(r'[a-z]', new_password): + errors.append("Password must contain at least one lowercase letter.") + if not re.search(r'[A-Z]', new_password): + errors.append("Password must contain at least one uppercase letter.") + if not re.search(r'\d', new_password): + errors.append("Password must contain at least one number.") + if not re.search(f"[{re.escape(SPECIAL_CHAR)}]", new_password): + errors.append(f"Password must contain at least one special character (e.g., @, $, !, %).") + if errors: + raise ValidationError(errors) + return new_password diff --git a/events/events/formsv2.py b/events/events/formsv2.py new file mode 100644 index 000000000..3c5da84ac --- /dev/null +++ b/events/events/formsv2.py @@ -0,0 +1,705 @@ + +from builtins import object +import datetime as dt + +from django import forms + +from events.models import * +from events.helpers import get_academic_years +from cms.validators import validate_csv_file + +from spoken.config import SUBSCRIPTION_CHOICES + +class StudentBatchForm(forms.ModelForm): + year = forms.ChoiceField(choices = get_academic_years()) + csv_file = forms.FileField(required = True) + department = forms.ModelChoiceField( + queryset = Department.objects.filter(~Q(name='others')) + ) + + class Meta(object): + model = StudentBatch + exclude = ['academic', 'stcount', 'organiser', 'batch_name'] + + def clean_csv_file(self): + data = self.cleaned_data["csv_file"] + file_data = validate_csv_file(data) + return file_data + +class NewStudentBatchForm(forms.ModelForm): + csv_file = forms.FileField(required = True) + + class Meta(object): + model = StudentBatch + exclude = ['academic', 'year', 'department', 'stcount', 'organiser', 'batch_name'] + + def clean_csv_file(self): + data = self.cleaned_data["csv_file"] + file_data = validate_csv_file(data) + return file_data + +class UpdateStudentBatchForm(forms.ModelForm): + year = forms.ChoiceField(choices = get_academic_years()) + department = forms.ModelChoiceField( + queryset = Department.objects.filter(~Q(name='others')) + ) + class Meta(object): + model = StudentBatch + exclude = ['academic', 'stcount', 'organiser','batch_name'] + +class UpdateStudentYearBatchForm(forms.ModelForm): + year = forms.ChoiceField(choices = get_academic_years()) + class Meta(object): + model = StudentBatch + exclude = ['academic', 'stcount', 'organiser','department','batch_name'] + +class TrainingRequestForm(forms.ModelForm): + department = forms.ModelChoiceField(empty_label='---------', queryset=CourseMap.objects.none()) + course_type = forms.ChoiceField(choices=[('', '---------'), (0, 'Software Course outside lab hours'), (1, 'Software Course mapped in lab hours'), (2, ' Software Course unmapped in lab hours')]) + foss_category = forms.ChoiceField(choices=[('', '---------'), (0, 'Foss available only for Training'), (1, 'Foss available for Training and Test')]) + course = forms.ModelChoiceField(empty_label='---------', queryset=CourseMap.objects.filter(category=0)) + batch = forms.ModelChoiceField(empty_label='---------', queryset=StudentBatch.objects.none()) + language = forms.ModelChoiceField( label="Language", queryset=Language.objects.all(), required=False, empty_label='---------',) + level = forms.ModelChoiceField( label="Level", queryset=Level.objects.all(), required=False, empty_label='---------',) + + training_planner = forms.CharField() + class Meta(object): + model = TrainingRequest + exclude = ['participants', 'status', 'training_planner', 'cert_status'] + + def clean(self): + if self.cleaned_data: + #48hrs, batch id fetched + tp = TrainingPlanner.objects.get(pk=self.cleaned_data['training_planner']) + # Date restriction + if self.cleaned_data and 'sem_start_date' in self.cleaned_data and self.cleaned_data['sem_start_date']: + start_date, end_date =tp.get_current_semester_date_duration_new() + print((start_date, end_date, self.cleaned_data['sem_start_date'])) + if not (self.cleaned_data['sem_start_date'] <= end_date and self.cleaned_data['sem_start_date'] >= start_date): + raise forms.ValidationError("Invalid semester start date") + + + if self.cleaned_data and 'training_start_date' in self.cleaned_data and self.cleaned_data['training_start_date']: + start_date, end_date =tp.get_current_semester_date_duration() + print((start_date, end_date, self.cleaned_data['sem_start_date'])) + if not (self.cleaned_data['training_start_date'] <= end_date and self.cleaned_data['training_start_date'] >= start_date): + raise forms.ValidationError("Invalid training start date") + + if self.cleaned_data and 'training_end_date' in self.cleaned_data and self.cleaned_data['training_end_date']: + start_date, end_date =tp.get_current_semester_date_duration() + print((start_date, end_date, self.cleaned_data['training_end_date'])) + if not (self.cleaned_data['training_end_date'] <= end_date and self.cleaned_data['training_end_date'] >= start_date): + raise forms.ValidationError("Invalid training end date") + + + return self.cleaned_data + + def __init__(self, *args, **kwargs): + user = kwargs.pop('user') + course_type = kwargs.pop('course_type') + super(TrainingRequestForm, self).__init__(*args, **kwargs) + self.fields['course_type'].choices = course_type + + try: + english = Language.objects.get(code__iexact='english') + self.fields['language'].initial = english.id + except Language.DoesNotExist: + # If English doesn't exist, use first available language + first_lang = Language.objects.first() + if first_lang: + self.fields['language'].initial = first_lang.id + + try: + advanced = Level.objects.get(code__iexact='advanced') + self.fields['level'].initial = advanced.id + except Level.DoesNotExist: + # If Advanced doesn't exist, use first available level + first_level = Level.objects.first() + if first_level: + self.fields['level'].initial = first_level.id + + # try: + # english = Language.objects.get(code__iexact='english') + # self.fields['language'].initial = english.id + # except Language.DoesNotExist: + # # If English doesn't exist, use first available language + # first_lang = Language.objects.first() + # if first_lang: + # self.fields['language'].initial = first_lang.id + + # try: + # advanced = Level.objects.get(code__iexact='advanced') + # self.fields['level'].initial = advanced.id + # except Level.DoesNotExist: + # # If Advanced doesn't exist, use first available level + # first_level = Level.objects.first() + # if first_level: + # self.fields['level'].initial = first_level.id + + if kwargs and 'data' in kwargs: + # Generating students batch list based on department + if kwargs['data']['department'] != '': + department = kwargs['data']['department'] + self.fields['batch'].queryset = StudentBatch.objects.filter(academic_id=user.organiser.academic.id, stcount__gt=0, department_id=department) + self.fields['batch'].initial = kwargs['data']['batch'] + # overwrite department choices + self.fields['department'].queryset = Department.objects.filter(id__in=StudentBatch.objects.filter(academic=user.organiser.academic, stcount__gt=0).values_list('department_id')) + +class TrainingRequestEditForm(forms.ModelForm): + course_type = forms.ChoiceField(choices=[('', '---------'), (0, 'Software Course outside lab hours'), (1, 'Software Course mapped in lab hours'), (2, ' Software Course unmapped in lab hours')]) + training_planner = forms.CharField() + department = forms.ModelChoiceField(empty_label='---------', queryset=CourseMap.objects.none()) + batch = forms.ModelChoiceField(empty_label='---------', queryset=StudentBatch.objects.none()) + foss_category = forms.ChoiceField(choices=[('', '---------'), (0, 'Foss available only for Training'), (1, 'Foss available for Training and Test')]) + course = forms.ModelChoiceField(empty_label='---------', queryset=CourseMap.objects.filter(category=0)) + + + + class Meta(object): + model = TrainingRequest + exclude = ['participants', 'status', 'training_planner', 'cert_status'] + + def clean(self): + # Date restriction + if self.cleaned_data and 'sem_start_date' in self.cleaned_data and self.cleaned_data['sem_start_date']: + tp = TrainingPlanner.objects.get(pk=self.cleaned_data['training_planner']) + start_date, end_date =tp.get_current_semester_date_duration_new() + if not (self.cleaned_data['sem_start_date'] <= end_date and self.cleaned_data['sem_start_date'] >= start_date): + raise forms.ValidationError("Invalid semester start date") + + if self.cleaned_data and 'training_start_date' in self.cleaned_data and self.cleaned_data['training_start_date']: + tp = TrainingPlanner.objects.get(pk=self.cleaned_data['training_planner']) + start_date, end_date =tp.get_current_semester_date_duration() + if not (self.cleaned_data['training_start_date'] <= end_date and self.cleaned_data['training_start_date'] >= start_date): + raise forms.ValidationError("Invalid training start date") + + if self.cleaned_data and 'training_end_date' in self.cleaned_data and self.cleaned_data['training_end_date']: + tp = TrainingPlanner.objects.get(pk=self.cleaned_data['training_planner']) + start_date, end_date =tp.get_current_semester_date_duration() + if not (self.cleaned_data['training_end_date'] <= end_date and self.cleaned_data['training_end_date'] >= start_date): + raise forms.ValidationError("Invalid training end date") + return self.cleaned_data + + def __init__(self, *args, **kwargs): + training = kwargs.pop('training', None) + user = kwargs.pop('user', None) + super(TrainingRequestEditForm, self).__init__(*args, **kwargs) + flag = True + data = kwargs.pop('data', None) + + if not flag and training: + self.fields['course_type'].initial = training.course_type + self.fields['course'].queryset = CourseMap.objects.filter(category=0) + self.fields['course'].initial = training.course_id + flag = True + if data and 'sem_start_date' in data: + if data['sem_start_date']: + self.fields['sem_start_date'].initial = data['sem_start_date'] + else: + flag = False + else: + flag = False + if not flag and training: + self.fields['sem_start_date'].initial = training.sem_start_date + self.fields['training_start_date'].initial = training.training_start_date + self.fields['training_end_date'].initial = training.training_end_date + + self.fields['course_type'].initial = training.course_type + self.fields['course'].initial = training.course_id + #department + self.fields['department'].queryset = Department.objects.filter(id__in=StudentBatch.objects.filter(academic=user.organiser.academic, stcount__gt=0).values_list('department_id')) + self.fields['department'].initial = training.department + + #overwrite choice + self.fields['batch'].queryset = StudentBatch.objects.filter( + academic_id=user.organiser.academic.id, + stcount__gt=0, + department_id=training.department.id + ) + self.fields['batch'].initial = training.batch + + # update form choice when check is_valid + if data and 'department' in data: + self.fields['batch'].queryset = StudentBatch.objects.filter( + academic_id=user.organiser.academic.id, + stcount__gt=0, + department_id=data['department'] + ) + +class CourseMapForm(forms.ModelForm): + category = forms.ChoiceField(choices=[('', '---------'), (1, 'Software Course mapped in lab hours'), (2, ' Software Course unmapped in lab hours')]) + course = forms.ModelChoiceField(queryset=LabCourse.objects.all()) + foss = forms.ModelChoiceField( + queryset = FossCategory.objects.filter( + id__in=FossAvailableForWorkshop.objects.filter(status=1).values('foss').distinct(), + status=True + ) + ) + + class Meta(object): + model = CourseMap + exclude = ['test'] + + def __init__(self, *args, **kwargs): + super(CourseMapForm, self).__init__(*args, **kwargs) + +class UserForm(forms.ModelForm): + gender = forms.ChoiceField(choices=[('Male', 'Male'),('Female','Female')]) + class Meta(object): + model = User + exclude = ['password','last_login','is_superuser','username','is_staff','is_active','date_joined','groups','user_permissions'] + + # def clean_email(self): + # email = self.cleaned_data['email'] + # try: + # if not validate_email(email): + # raise forms.ValidationError(u'%s is not valid email.' % email ) + # except: + # raise forms.ValidationError(u'%s is not valid email.' % email ) + + def __init__(self, *args, **kwargs): + super(UserForm, self).__init__(*args, **kwargs) + if 'instance' in kwargs: + self.fields['gender'].initial = kwargs['instance'].student.gender + + +class SingleTrainingForm(forms.ModelForm): + training_type = forms.ChoiceField(choices=[('', '---------'), (0, 'School'),(3,'Vocational'),(1,'Live workshop'),(2,'Pilot workshop')]) + csv_file = forms.FileField(required = True) + class Meta(object): + model = SingleTraining + exclude = ['organiser', 'status', 'participant_count', 'total_participant_count'] + + def __init__(self, *args, **kwargs): + super(SingleTrainingForm, self).__init__(*args, **kwargs) + self.fields['academic'].required = False + self.fields['state'].required = False + self.fields['institution_type'].required = False + + def clean(self): + #self.cleaned_data['csv_file'] + if self.cleaned_data['csv_file'].name.split('.')[-1] == 'csv': + pass + else: + raise forms.ValidationError("Invalid file format.") + return self.cleaned_data + + def clean_tdate(self): + today = dt.datetime.now() + tdate = self.cleaned_data['tdate'] + if today.date() > tdate: + raise forms.ValidationError("Invalid semester training date") + return tdate + +class SingleTrainingEditForm(forms.ModelForm): + training_type = forms.ChoiceField(choices=[('', '---------'), (0, 'School'),(3,'Vocational'),(1,'Live workshop'),(2,'Pilot workshop')]) + csv_file = forms.FileField(required = False) + class Meta(object): + model = SingleTraining + exclude = ['organiser', 'status', 'participant_count', 'total_participant_count'] + + def __init__(self, *args, **kwargs): + super(SingleTrainingEditForm, self).__init__(*args, **kwargs) + self.fields['academic'].required = False + self.fields['state'].required = False + self.fields['institution_type'].required = False + + def clean(self): + #self.cleaned_data['csv_file'] + if 'csv_file' in self.cleaned_data and self.cleaned_data['csv_file']: + if self.cleaned_data['csv_file'].name.split('.')[-1] == 'csv': + pass + else: + raise forms.ValidationError("Invalid file format.") + return self.cleaned_data + + def clean_tdate(self): + today = dt.datetime.now() + tdate = self.cleaned_data['tdate'] + if today.date() > tdate: + raise forms.ValidationError("Invalid semester training date") + return tdate + + +class OrganiserFeedbackForm(forms.ModelForm): + offered_training_foss = forms.ModelMultipleChoiceField( + # queryset=FossCategory.objects.filter(status=1), + queryset=FossCategory.objects.filter( + id__in=CourseMap.objects.filter( + category=0 #removed test condition + ).values_list( + 'foss_id' + ) + ), + widget=forms.CheckboxSelectMultiple) + trained_foss = forms.ModelMultipleChoiceField( + # queryset=FossCategory.objects.filter(status=1), + queryset=FossCategory.objects.filter( + id__in=CourseMap.objects.filter( + category=0 #removed test condition + ).values_list( + 'foss_id' + ) + ), + widget=forms.CheckboxSelectMultiple) + class Meta(object): + model = OrganiserFeedback + fields = '__all__' + widgets = {'student_stream': forms.CheckboxSelectMultiple, + 'language' : forms.CheckboxSelectMultiple, + 'trained_foss' : forms.CheckboxSelectMultiple, + 'helpful_for' : forms.CheckboxSelectMultiple , + 'is_comfortable_self_learning' : forms.RadioSelect , + 'is_classroom_better' : forms.RadioSelect , + 'is_student_expectations' : forms.RadioSelect , + 'is_help_get_interview' : forms.RadioSelect , + 'is_help_get_job' : forms.RadioSelect , + 'is_got_job' : forms.RadioSelect , + 'relevance' : forms.RadioSelect, + 'information_content' : forms.RadioSelect, + 'audio_video_quality' : forms.RadioSelect, + 'presentation_quality' : forms.RadioSelect , + 'overall_rating' : forms.RadioSelect , + 'testimonial' : forms.Textarea , + 'any_other_suggestions' : forms.Textarea} + +class LatexWorkshopFileUploadForm(forms.ModelForm): + class Meta(object): + model = LatexWorkshopFileUpload + fields = '__all__' + + +class MapCourseWithFossForm(forms.ModelForm): + # Loading only the foss which is AvailableForWorkshop + # To display new foss need to make one entry with default language english \ + # in FossAvailableForWorkshop. + foss = forms.ModelChoiceField( + queryset = FossCategory.objects.filter( + id__in=FossAvailableForWorkshop.objects.filter(status=1).values('foss').distinct(), + status = True + ) + ) + class Meta(object): + model = CourseMap + exclude = () + +class STWorkshopFeedbackForm(forms.ModelForm): + class Meta(object): + model = STWorkshopFeedback + fields = '__all__' + widgets = { + 'acquired_knowledge' : forms.RadioSelect , + 'suff_instruction' : forms.RadioSelect , + 'diff_instruction' : forms.RadioSelect , + 'method_easy' : forms.RadioSelect , + 'time_sufficient' : forms.RadioSelect , + 'desired_objective': forms.RadioSelect , + 'recommend' : forms.RadioSelect , + 'like_to_part' : forms.RadioSelect, + 'side_by_side_effective' : forms.RadioSelect, + 'dont_like_self_learning_method' : forms.RadioSelect, + + 'not_self_explanatory' : forms.RadioSelect, + 'logical_sequence' : forms.RadioSelect , + 'examples_help' : forms.RadioSelect , + 'instructions_easy_to_follow' : forms.RadioSelect , + 'difficult_instructions_in_tutorial' : forms.RadioSelect , + 'translate' : forms.RadioSelect , + + 'useful_learning' : forms.RadioSelect , + 'help_improve_performance' : forms.RadioSelect , + 'plan_to_use_future' : forms.RadioSelect , + 'confident_to_apply_knowledge' : forms.RadioSelect , + 'difficult_simultaneously' : forms.RadioSelect , + 'too_fast' : forms.RadioSelect , + 'too_slow' : forms.RadioSelect , + 'interface_comfortable' : forms.RadioSelect , + 'satisfied' : forms.RadioSelect , + 'self_learning_intrest' : forms.RadioSelect , + 'language_diff_to_understand' : forms.RadioSelect , + 'not_like_method_forums' : forms.RadioSelect , + 'forum_helpful' : forms.RadioSelect , + 'owing_to_forums' : forms.RadioSelect , + + 'ws_quality' : forms.RadioSelect , + 'overall_content_quality' : forms.RadioSelect , + 'clarity_of_explanation' : forms.RadioSelect , + 'flow' : forms.RadioSelect , + 'relevance' : forms.RadioSelect , + 'guidelines' : forms.RadioSelect , + 'overall_video_quality' : forms.RadioSelect , + 'text_readability' : forms.RadioSelect , + 'clarity_of_speech' : forms.RadioSelect , + 'visual_presentation' : forms.RadioSelect , + 'pace_of_tutorial' : forms.RadioSelect , + 'time_management' : forms.RadioSelect , + 'experience_of_learning' : forms.RadioSelect , + 'overall_arrangement' : forms.RadioSelect , + 'like_abt_ws' : forms.Textarea , + 'how_make_better' : forms.Textarea, + 'experience' : forms.Textarea , + 'suggestions' : forms.Textarea, + 'training_any_comment' : forms.Textarea, + 'content_any_comment' : forms.Textarea, + 'learning_any_comment': forms.Textarea, + } + def __init__(self, *args, **kwargs): + super(STWorkshopFeedbackForm, self).__init__(*args, **kwargs) + self.fields['like_abt_ws'].required = False + self.fields['how_make_better'].required = False + self.fields['experience'].required = False + self.fields['suggestions'].required = False + self.fields['name'].required = False + self.fields['email'].required = False + self.fields['training_any_comment'].required = False + self.fields['content_any_comment'].required = False + self.fields['learning_any_comment'].required = False + +class STWorkshopFeedbackFormPre(forms.ModelForm): + class Meta(object): + model = STWorkshopFeedbackPre + fields = '__all__' + exclude = ['user'] + widgets = { + 'content_management' : forms.RadioSelect , + 'configuration_management' : forms.RadioSelect , + 'creating_basic_content' : forms.RadioSelect , + 'edit_existing_content' : forms.RadioSelect , + 'create_new_content' : forms.RadioSelect , + 'grp_entity_ref' : forms.RadioSelect , + 'taxonomy' : forms.RadioSelect , + 'managing_content' : forms.RadioSelect , + 'creating_dummy_content' : forms.RadioSelect , + 'modify_display_content' : forms.RadioSelect , + 'contents_using_view' : forms.RadioSelect , + 'table_of_fields_with_views' : forms.RadioSelect , + 'control_display_images' : forms.RadioSelect , + 'adding_func' : forms.RadioSelect , + 'finding_modules' : forms.RadioSelect , + 'modifying_page_layout' : forms.RadioSelect , + 'menu_endpoints' : forms.RadioSelect , + 'styling_using_themes' : forms.RadioSelect , + 'installig_ad_themes' : forms.RadioSelect , + 'people_management' : forms.RadioSelect , + 'site_management' : forms.RadioSelect , + + } + + +class STWorkshopFeedbackFormPost(forms.ModelForm): + class Meta(object): + model = WorkshopFeedbackPost + fields = '__all__' + exclude = ['user'] + widgets = { + 'spfriendly' : forms.RadioSelect , + 'diff_watch_practice' : forms.RadioSelect , + 'satisfied_with_learning_experience' : forms.RadioSelect , + 'confident' : forms.RadioSelect , + 'side_by_side_hold_intrest' : forms.RadioSelect , + 'ws_not_useful' : forms.RadioSelect , + 'can_learn_other' : forms.RadioSelect , + 'wantto_conduct_incollege' : forms.RadioSelect , + 'esy_to_conduct_own' : forms.RadioSelect , + 'ask_student_to_use' : forms.RadioSelect , + 'possible_to_use_therotical' : forms.RadioSelect , + 'not_self_explanatory' : forms.RadioSelect , + 'logical_sequence' : forms.RadioSelect , + 'examples_help' : forms.RadioSelect , + 'other_language' : forms.RadioSelect , + 'instructions_easy_to_follow' : forms.RadioSelect , + 'language_complicated' : forms.RadioSelect , + 'acquired_knowledge' : forms.RadioSelect , + 'suff_instruction_by_prof' : forms.RadioSelect , + 'suff_instruction_by_staff' : forms.RadioSelect , + 'method_easy' : forms.RadioSelect , + 'desired_objective' : forms.RadioSelect , + 'recommend' : forms.RadioSelect , + 'like_to_part' : forms.RadioSelect , + 'learn_other_side_by_side' : forms.RadioSelect , + 'referred_forums' : forms.RadioSelect , + 'referred_forums_after' : forms.RadioSelect , + 'asked_ques_forums' : forms.RadioSelect , + 'not_answer_doubts' : forms.RadioSelect , + 'forum_helpful' : forms.RadioSelect , + 'doubts_solved_fast' : forms.RadioSelect , + 'need_not_post' : forms.RadioSelect , + 'faster_on_forums' : forms.RadioSelect , + 'not_have_to_wait' : forms.RadioSelect , + 'not_like_method_forums' : forms.RadioSelect , + 'helpful_pre_ans_ques' : forms.RadioSelect , + 'not_like_reveal_identity' : forms.RadioSelect , + 'forum_motivated' : forms.RadioSelect , + 'per_asked_ques_before_tuts' : forms.RadioSelect , + 'content_management' : forms.RadioSelect , + 'configuration_management' : forms.RadioSelect , + 'creating_basic_content' : forms.RadioSelect , + 'edit_existing_content' : forms.RadioSelect , + 'create_new_content' : forms.RadioSelect , + 'grp_entity_ref' : forms.RadioSelect , + 'taxonomy' : forms.RadioSelect , + 'managing_content' : forms.RadioSelect , + 'creating_dummy_content' : forms.RadioSelect , + 'modify_display_content' : forms.RadioSelect , + 'contents_using_view' : forms.RadioSelect , + 'table_of_fields_with_views' : forms.RadioSelect , + 'control_display_images' : forms.RadioSelect , + 'adding_func' : forms.RadioSelect , + 'finding_modules' : forms.RadioSelect , + 'modifying_page_layout' : forms.RadioSelect , + 'menu_endpoints' : forms.RadioSelect , + 'styling_using_themes' : forms.RadioSelect , + 'installig_ad_themes' : forms.RadioSelect , + 'people_management' : forms.RadioSelect , + 'site_management' : forms.RadioSelect , + 'ws_quality' : forms.RadioSelect , + 'relevance' : forms.RadioSelect , + 'guidelines' : forms.RadioSelect , + 'overall_video_quality' : forms.RadioSelect , + 'text_readability' : forms.RadioSelect , + 'clarity_of_speech' : forms.RadioSelect , + 'visual_presentation' : forms.RadioSelect , + 'pace_of_tutorial' : forms.RadioSelect , + 'arrangement' : forms.RadioSelect , + 'network' : forms.RadioSelect , + 'installation_help' : forms.RadioSelect , + 'time_for_handson' : forms.RadioSelect , + 'experience_of_learning' : forms.RadioSelect , + 'overall_arrangement' : forms.RadioSelect , + 'like_to_create_st_details' : forms.Textarea , + 'foss_where' : forms.Textarea , + 'explain' : forms.Textarea , + 'purpose_of_attending' : forms.Textarea , + 'like_abt_ws' : forms.Textarea , + 'how_make_better' : forms.Textarea, + 'experience' : forms.Textarea , + 'suggestions' : forms.Textarea, + } + +class LearnDrupalFeedbackForm(forms.ModelForm): + class Meta(object): + model = LearnDrupalFeedback + fields = '__all__' + widgets = { + 'feedback' : forms.Textarea, + } + + def __init__(self, *args, **kwargs): + super(LearnDrupalFeedbackForm, self).__init__(*args, **kwargs) + self.fields['name'].required = False + self.fields['phonemob'].required = False + self.fields['affiliation'].required = False + self.fields['place'].required = False + self.fields['agegroup'].required = False + self.fields['currentstatus_other'].required = False + self.fields['is_drupal_in_curriculum'].required = False + self.fields['need_help_in_organizing'].required = False + self.fields['when_plan_to_conduct'].required = False + self.fields['did_undergo_st_training'].required = False + self.fields['rate_spoken'].required = False + self.fields['useful_for_placement_for_students'].required = False + self.fields['useful_for_placement'].required = False + self.fields['like_to_learn_other_foss'].required = False + self.fields['mention_foss'].required = False + self.fields['like_to_give_testimonial'].required = False + self.fields['testimonial'].required = False + +class TrainingManagerForm(forms.Form): + state = forms.ChoiceField(choices=[('', '-- None --'), ], widget=forms.Select(attrs = {}), required = False) + college = forms.ChoiceField(choices=[('0', '-- None --'), ], widget=forms.Select(attrs = {}), required = False) + choices = forms.ChoiceField(choices=[('', '-- None --'), ('S', 'Successfull'), ('F', 'Failed'),('O','Ongoing'),('R','Reconciled')]) + fdate = forms.DateTimeField(required = False) + tdate = forms.DateTimeField(required = False) + + def __init__(self, user,*args, **kwargs): + initial = '' + if 'instance' in kwargs: + initial = kwargs["instance"] + del kwargs["instance"] + + if 'user' in kwargs: + user = kwargs["user"] + del kwargs["user"] + + super(TrainingManagerForm, self).__init__(*args, **kwargs) + + + rp_states = ResourcePerson.objects.filter(status=1,user=user) + # load the choices + state_list = list(State.objects.filter(id__in=rp_states.values('state')).order_by('name').values_list('id', 'name')) + state_list.insert(0, ('', '-- None --')) + self.fields['state'].choices = state_list + centre_choices =[] + centre_choices.insert(0,(0,'All Colleges')) + + if args: + if 'state' in args[0]: + if args[0]['state'] and args[0]['state'] != '' and args[0]['state'] != 'None': + centre_qs = AcademicCenter.objects.filter(state_id=args[0]['state']).order_by('institution_name') + centre_choices = [(x.id, '%s, %s' % (x.institution_name, x.academic_code)) for x in centre_qs] + centre_choices.insert(0,(0,'All Colleges')) + self.fields['college'].choices = centre_choices + self.fields['college'].widget.attrs = {} + # if initial: + # self.fields['state'].initial = initial.academic.state_id + # centre_qs = AcademicCenter.objects.filter(district_id=initial.academic.district_id) + # centre_choices = [(x.id, '%s, %s' % (x.institution_name, x.academic_code)) for x in centre_qs] + # centre_choices.insert(0,(0,'All Colleges')) + # self.fields['college'].choices = centre_choices + + # # initial data + # self.fields['college'].initial = initial.academic_id + +ACTIVATION_STATUS = ( + (None, "--------"), + (1, "Active"), + (3, "Deactive")) + +class DateInput(forms.DateInput): + input_type = 'date' + +class StudentGradeFilterForm(forms.Form): + foss = forms.ModelMultipleChoiceField(queryset=FossCategory.objects.filter(test__status__gt=3).distinct()) + state = forms.ModelMultipleChoiceField(queryset=State.objects.all(), required=False) + city = forms.ModelMultipleChoiceField(queryset=City.objects.all().order_by('name'), required=False) + grade = forms.IntegerField(min_value=0, max_value=100) + institution_type = forms.ModelMultipleChoiceField(queryset=InstituteType.objects.all(), required=False) + activation_status = forms.ChoiceField(choices = ACTIVATION_STATUS, required=False) + from_date = forms.DateField(widget=DateInput(), required=False) + to_date = forms.DateField(widget=DateInput(), required=False) + + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) + self.fields['foss'].widget.attrs.update({'class': 'form-control'}) + self.fields['state'].widget.attrs.update({'class': 'form-control'}) + self.fields['grade'].widget.attrs.update({'class': 'form-control'}) + self.fields['institution_type'].widget.attrs.update({'class': 'form-control'}) + self.fields['activation_status'].widget.attrs.update({'class': 'form-control'}) + self.fields['from_date'].widget.attrs.update({'class': 'form-control'}) + self.fields['to_date'].widget.attrs.update({'class': 'form-control'}) + + +class AcademicPaymentStatusForm(forms.ModelForm): + college_type = forms.CharField(required=False) + email = forms.CharField(required = False) + phone = forms.CharField(required = False) + transactionid = forms.CharField(required = False) + pan_number = forms.CharField(required = False) + gst_number = forms.CharField(required = False) + customer_id = forms.CharField(required = False) + invoice_no = forms.CharField(required = False) + remarks = forms.CharField(required = False) + class Meta(object): + model = AcademicPaymentStatus + exclude = ['entry_user'] + widgets = { + 'payment_date':DateInput(), + 'phone':forms.NumberInput(), + 'amount':forms.NumberInput() + } + + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) + self.fields['college_type'].widget.attrs.update({'class': 'form-control', 'readonly': 'readonly'}) + self.fields['payment_status'].widget.attrs.update({'class': 'form-control', 'readonly': 'readonly'}) + self.fields['subscription'].choices = SUBSCRIPTION_CHOICES \ No newline at end of file diff --git a/events/events/get_training_planner.py b/events/events/get_training_planner.py new file mode 100644 index 000000000..0a01ffc87 --- /dev/null +++ b/events/events/get_training_planner.py @@ -0,0 +1,43 @@ + +# Standard Library +from builtins import object +import datetime as dt + +# Third Party Stuff +from django.core.exceptions import ObjectDoesNotExist + +# Spoken Tutorial Stuff +from events.models import Semester, TrainingPlanner + + +class CurrentTrainingPlanner(object): + + def is_even_sem(self, month): + # 0 => odd sem, 1 => even sem + if month > 6 and month < 13: + return 0 + return 1 + + def get_year(self, sem, year): + if sem: + return year - 1 + return year + + def get_semester(self, sem): + return Semester.objects.get(even=sem) + + def get_current_planner(self, user, sem=None): + now = dt.datetime.now() + if sem is None: + sem = self.is_even_sem(now.month) + year = self.get_year(int(sem), now.year) + try: + return TrainingPlanner.objects.get(year=year, semester__even=sem, + academic=user.organiser.academic, organiser=user.organiser) + except ObjectDoesNotExist: + return TrainingPlanner.objects.create(year=year, + semester=self.get_semester(sem), academic=user.organiser.academic, + organiser=user.organiser) + except Exception as e: + print(e) + return False diff --git a/events/events/helpers.py b/events/events/helpers.py new file mode 100644 index 000000000..4201c18ba --- /dev/null +++ b/events/events/helpers.py @@ -0,0 +1,74 @@ +# Standard Library +from builtins import str +from builtins import range +import datetime as dt +from donate.forms import * +from donate.models import CdFossLanguages +from django.core.mail import send_mail +# Third Party Stuff +from django.conf import settings + +def get_academic_years(default=settings.ACADEMIC_DURATION): + current_year = dt.datetime.now().year + year_choice = [('', '-----')] + for i in range(current_year - default, current_year + 1): + year_choice.append((i, i)) + return year_choice + + +def get_prev_semester_duration(semester_type, year): + if semester_type.lower() == 'even': + start = dt.datetime.strptime(str(year) + '-01-01', '%Y-%m-%d').date() + end = dt.datetime.strptime(str(year) + '-06-30', '%Y-%m-%d').date() + return start, end + if semester_type.lower() == 'odd': + start = dt.datetime.strptime(str(year) + '-07-01', '%Y-%m-%d').date() + end = dt.datetime.strptime(str(year) + '-12-31', '%Y-%m-%d').date() + return start, end + raise Exception("Invalid semester type, it must be either odd or even") + +def get_updated_form(transaction, form_type): + if form_type == 'CD-Events': + form = TransactionForm() + form.fields['expiry'].initial = transaction.paymentdetail.expiry + if transaction.status == 'S': + form.fields[ 'selected_foss'].initial = transaction.paymentdetail.get_selected_foss() + if form_type == 'Donate': + form = DonationTransactionForm() + if form_type == 'Goodie': + form = GoodieTransactionForm() + form.fields['name'].initial = transaction.paymentdetail.name + form.fields['email'].initial = transaction.paymentdetail.email + form.fields['country'].initial = transaction.paymentdetail.country + form.fields['amount'].initial = transaction.amount + form.fields['reqId'].initial = transaction.reqId + form.fields['transId'].initial = transaction.transId + form.fields['refNo'].initial = transaction.refNo + form.fields['provId'].initial = transaction.provId + form.fields['msg'].initial = transaction.msg + form.fields['status'].initial = transaction.status + + return form + +def send_bulk_student_reset_mail(ac, batches, count, new_password, user): + batch_names = ", ".join([f"{x.id} - {x.batch_name}" for x in batches]) + subject = "Password Reset Notification" + message = f""" + Dear {user.first_name}, + + Please find below the details of the recent student password update: + Academic Center: {ac.institution_name} + Batches: {batch_names} + Total student count: {count} + New password: {new_password} + Changed by: {user.email} + + For security reasons, please inform students to change your password immediately after login. + + Regards, + Admin Team + """ + + from_email = settings.ADMINISTRATOR_EMAIL + recipient_list = [user.email, settings.DEVELOPER_EMAIL] + send_mail(subject, message, from_email, recipient_list, fail_silently=False) \ No newline at end of file diff --git a/events/events/management/__init__.py b/events/events/management/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/events/events/management/commands/__init__.py b/events/events/management/commands/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/events/events/management/commands/django2moodle.py b/events/events/management/commands/django2moodle.py new file mode 100644 index 000000000..fd64ed265 --- /dev/null +++ b/events/events/management/commands/django2moodle.py @@ -0,0 +1,199 @@ +from django.core.management.base import BaseCommand, CommandError +from django.contrib.auth.models import User +from django.core.mail import EmailMultiAlternatives +from mdldjango.models import MdlUser + +from hashlib import md5 +from string import digits, ascii_uppercase +from random import sample +from datetime import datetime + + +class Command(BaseCommand): + help = 'Migrates user from django to moodle.\n\ + Send user credentials via email.' + FROM = 'administrator@spoken-tutorial.org' + SUBJECT = "Spoken Tutorial Online Test password" + HEADERS = {'Reply-To': 'no-replay@spoken-tutorial.org', + "Content-type":"text/html;charset=iso-8859-1"} + + rmsg = 'Report {0}\n'.format(datetime.now()) + cmsg = 'Completed {0}\n'.format(datetime.now()) + imsg = 'Incomplete {0}\n'.format(datetime.now()) + + def handle(self, *args, **options): + users = self.get_spoken_user() + self.log('Total users: {0}'.format(users.count()), 'r') + count = 0 + ncount= 0 + + for user in users: + self.log('\n###############\n', 'i') + if self.is_student(user): + self.log('\n###############\n', 'c') + self.log(user, 'c') + if not self. is_moodle_user(user): + try: + self.log('email: {0} not in moodle'.format(user.email.encode('utf8')), 'c') + except: + print((user.email)) + pass + academy = self.get_academy(user) + if academy: + self.log('Academy {0}'.format(academy), 'c') + password = self.get_raw_password() + self.log('Password '+password, 'c') + mdluser = self.add_moodle_user(user, password, academy) + if mdluser: + self.log("Added to moodle", 'c') + ex, res = self.send_email(mdluser, password) + self.log(res, 'c') + self.log(res, 'i') + if ex: + self.log(ex, 'i') + ncount += 1 + break + count += 1 + else: + self.log("user not added" , 'i') + ncount += 1 + else: + self.log("no academy", 'i') + ncount += 1 + else: + self.log('Email: {0} in moodle'.format(user.email.encode('utf8')), 'i') + ncount += 1 + else: + self.log('{0} not student'.format(user), 'i') + ncount += 1 + + self.log('Added and Mailed:{0}'.format(count), 'r') + self.log('Not added: {0}'.format(ncount), 'r') + + self.create_log_file(self.cmsg, 'c') + self.create_log_file(self.imsg, 'i') + err_value = self.create_log_file(self.rmsg, 'r') + if err_value: + self.stdout.write(self.cmsg) + self.stdout.write(self.imsg) + self.stdout.write(self.rmsg) + + def get_spoken_user(self): + return User.objects.filter(id = 333224) + + + def is_student(self, user): + try: + if user.student: + return True + except Exception: + return False + + + def is_moodle_user(self, user): + try: + if MdlUser.objects.get(email=user.email): + return True + except MdlUser.DoesNotExist: + return False + except MdlUser.MultipleObjectsReturned: + return True + except Exception as e: + print(e) + return True + + + def get_academy(self, user): + try: + return user.student.studentmaster_set.all().first().batch.organiser.academic + except AttributeError: + return None + + + def add_moodle_user(self, user, password, academy): + ''' Creates moodle account and sends email''' + try: + mdluser = MdlUser() + mdluser.auth = 'manual' + mdluser.firstname = user.first_name + mdluser.lastname = user.last_name + mdluser.username = user.email + mdluser.password = self.encrypt_password(password) + mdluser.institution = academy + mdluser.email = user.email + mdluser.confirmed = 1 + mdluser.mnethostid = 1 + mdluser.save() + return mdluser + except Exception as e: + print(e) + return None + + + def get_raw_password(self): + return ''.join(sample(ascii_uppercase + digits, 8)) + + + def encrypt_password(self, password): + return md5(password+'VuilyKd*PmV?D~lO19jL(Hy4V/7T^G>p').hexdigest() + + + def send_email(self, user, password): + result = None + message = '''Hi {0}, + +Your account password at 'Spoken Tutorials Online Test as follows' + +Your current login information is now: +username: {1} +password: {2} + +Please go to this page to change your password: +http://onlinetest.spoken-tutorial.org/login/change_password.php + +In most mail programs, this should appear as a blue link +which you can just click on. If that doesn't work, +then cut and paste the address into the address +line at the top of your web browser window. + +Cheers from the 'Spoken Tutorials Online Test Center' administrator, + +Admin Spoken Tutorials +''' + message = message.format(user.firstname.encode('utf8'), user.username.encode('utf8'), password) + self.log(message, 'c') + email = EmailMultiAlternatives(self.SUBJECT, message, self.FROM, + to = [user.email], bcc = [], cc = [], headers=self.HEADERS) + self.log(email, 'c') + try: + result = email.send(fail_silently=False) + return None, result + except Exception as e: + return e, result + + + def log(self, data, _type): + try: + if _type == 'c': + self.cmsg = '{0} {1}\n'.format(self.cmsg,data) + if _type == 'i': + self.imsg = '{0} {1}\n'.format(self.imsg,data) + if _type == 'r': + self.rmsg = '{0} {1}\n'.format(self.rmsg,data) + except: + print(e) + + def create_log_file(self, data, _type): + try: + if _type == 'c': + _file = open('migrated.log', 'ab+') + if _type == 'i': + _file = open('not_migrated.log', 'ab+') + if _type == 'r': + _file = open('report.log', 'ab+') + + _file.write('\n{0}\n'.format(data)) + _file.close() + except Exception as e: + return e + diff --git a/events/events/management/commands/fetch_grades.py b/events/events/management/commands/fetch_grades.py new file mode 100644 index 000000000..d1cb84305 --- /dev/null +++ b/events/events/management/commands/fetch_grades.py @@ -0,0 +1,40 @@ +#fetch student grades from otc to testattendance table +from django.core.management.base import BaseCommand +from django.db import transaction as tx +from datetime import datetime,timedelta +from django.utils import timezone +from django.db.models import Q +from builtins import str +from django.contrib.auth.models import User +from mdldjango.models import MdlUser, MdlQuizGrades +from events.models import * + +class Command(BaseCommand): + + @tx.atomic + def handle(self, *args, **options): + print('>> adding student grades to testattendance') + count =0 + no_count=0 + _file = open('getstudentgrades.log', 'w') + + t_attendnces = TestAttendance.objects.filter(status__gte=3) + + for tea in t_attendnces: + try: + quiz_grade=MdlQuizGrades.objects.get(userid=tea.mdluser_id, quiz=tea.mdlquiz_id) + if not quiz_grade: + no_count=no_count+1 + _file.write(str(tea.id)+',quiz_grade not present\n') + tea.mdlgrade=quiz_grade.grade + tea.save() + count = count + 1 + except: + _file.write(str(tea.id)+',not updated\n') + no_count=no_count+1 + + _file.write('>> Script Completed. grades added, '+str(count)+'\n') + _file.write('>> Script Completed. grades not added, '+str(no_count)+'\n') + _file.close() + print(('>> Script Completed. grades added',count)) + print(('>> Script Completed. grades not added',no_count)) \ No newline at end of file diff --git a/events/events/management/commands/update_missing_studentids.py b/events/events/management/commands/update_missing_studentids.py new file mode 100644 index 000000000..827fbc724 --- /dev/null +++ b/events/events/management/commands/update_missing_studentids.py @@ -0,0 +1,41 @@ + +# Third Party Stuff +from django.core.management.base import BaseCommand +from django.db import transaction as tx +from datetime import datetime,timedelta +from django.utils import timezone +from django.db.models import Q +from builtins import str +from django.contrib.auth.models import User +from mdldjango.models import MdlUser +from events.models import * + +class Command(BaseCommand): + + @tx.atomic + def handle(self, *args, **options): + print('>> adding stuentid to testattendance') + count =0 + no_count=0 + _file = open('missingstudent.log', 'w') + t_attendnces = TestAttendance.objects.filter(student_id__isnull=True) + for tea in t_attendnces: + try: + mdluser=MdlUser.objects.get(id=tea.mdluser_id) + if not mdluser: + _file.write(str(tea.id)+',mdluser not present\n') + student=Student.objects.get(user__email=mdluser.email) + if not student: + _file.write(str(tea.id)+',student not present\n') + tea.student_id=student.id + tea.save() + count = count + 1 + except: + _file.write(str(tea.id)+',not updated\n') + no_count=no_count+1 + + _file.write('>> Script Completed. students added, '+str(count)+'\n') + _file.write('>> Script Completed. students not added, '+str(no_count)+'\n') + _file.close() + print(('>> Script Completed. students added',count)) + print(('>> Script Completed. students not added',no_count)) diff --git a/events/events/management/commands/update_trdate.py b/events/events/management/commands/update_trdate.py new file mode 100644 index 000000000..44fe9a008 --- /dev/null +++ b/events/events/management/commands/update_trdate.py @@ -0,0 +1,32 @@ + +# Third Party Stuff +from django.core.management.base import BaseCommand +from django.db import transaction as tx +from datetime import datetime,timedelta +from django.utils import timezone +from django.db.models import Q +from events.models import * + +class Command(BaseCommand): + + @tx.atomic + def handle(self, *args, **options): + print('>> adding tr dates in TrainingRequest') + count =0 + training_rqs = TrainingRequest.objects.all() + for trreq in training_rqs: + sem_date = trreq.sem_start_date.strftime('%Y-%m-%d') + date = datetime.strptime(sem_date, "%Y-%m-%d").date() + + semtype = trreq.training_planner.semester_id + + #odd - july to dec = 2 + #even - Jan to June = 1 + trreq.training_start_date = trreq.sem_start_date + if semtype == 1: + trreq.training_end_date = str(date.year)+'-06-30' + if semtype == 2: + trreq.training_end_date = str(date.year)+'-12-31' + trreq.save() + count = count + 1 + print(('>> Script Completed. date added',count)) diff --git a/events/events/migrations/0001_initial.py b/events/events/migrations/0001_initial.py new file mode 100644 index 000000000..37c598356 --- /dev/null +++ b/events/events/migrations/0001_initial.py @@ -0,0 +1,870 @@ +# -*- coding: utf-8 -*- + + +from django.db import models, migrations +from django.conf import settings + + +class Migration(migrations.Migration): + + dependencies = [ + ('creation', '__first__'), + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ] + + operations = [ + migrations.CreateModel( + name='AcademicCenter', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('academic_code', models.CharField(unique=True, max_length=100)), + ('institution_name', models.CharField(max_length=200)), + ('address', models.TextField()), + ('pincode', models.PositiveIntegerField()), + ('resource_center', models.BooleanField()), + ('rating', models.PositiveSmallIntegerField()), + ('contact_person', models.TextField()), + ('remarks', models.TextField()), + ('status', models.BooleanField()), + ('created', models.DateTimeField(auto_now_add=True)), + ('updated', models.DateTimeField(auto_now=True)), + ], + options={ + 'verbose_name': 'Academic Center', + }, + ), + migrations.CreateModel( + name='City', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('name', models.CharField(max_length=200)), + ('created', models.DateTimeField(auto_now_add=True, null=True)), + ('updated', models.DateTimeField(auto_now=True, null=True)), + ], + ), + migrations.CreateModel( + name='Course', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('name', models.CharField(max_length=200)), + ('created', models.DateTimeField(auto_now_add=True)), + ('updated', models.DateTimeField(auto_now=True)), + ], + ), + migrations.CreateModel( + name='CourseMap', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('test', models.BooleanField(default=False)), + ('category', models.PositiveIntegerField(default=0)), + ('created', models.DateTimeField(auto_now_add=True)), + ('updated', models.DateTimeField(auto_now=True)), + ], + options={ + 'ordering': ('foss',), + }, + ), + migrations.CreateModel( + name='Department', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('name', models.CharField(max_length=200)), + ('created', models.DateTimeField(auto_now_add=True)), + ('updated', models.DateTimeField(auto_now=True)), + ], + options={ + 'ordering': ['name'], + }, + ), + migrations.CreateModel( + name='District', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('code', models.CharField(max_length=3)), + ('name', models.CharField(max_length=200)), + ('created', models.DateTimeField(auto_now_add=True, null=True)), + ('updated', models.DateTimeField(auto_now=True, null=True)), + ], + ), + migrations.CreateModel( + name='EventsNotification', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('role', models.PositiveSmallIntegerField(default=0)), + ('category', models.PositiveSmallIntegerField(default=0)), + ('categoryid', models.PositiveIntegerField(default=0)), + ('status', models.PositiveSmallIntegerField(default=0)), + ('message', models.CharField(max_length=255)), + ('created', models.DateTimeField(auto_now_add=True)), + ('academic', models.ForeignKey(to='events.AcademicCenter')), + ('user', models.ForeignKey(to=settings.AUTH_USER_MODEL)), + ], + ), + migrations.CreateModel( + name='FossMdlCourses', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('mdlcourse_id', models.PositiveIntegerField()), + ('mdlquiz_id', models.PositiveIntegerField()), + ('foss', models.ForeignKey(to='creation.FossCategory')), + ], + ), + migrations.CreateModel( + name='InstituteCategory', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('name', models.CharField(max_length=200)), + ('created', models.DateTimeField(auto_now_add=True)), + ('updated', models.DateTimeField(auto_now=True)), + ], + options={ + 'verbose_name': 'Institute Categorie', + }, + ), + migrations.CreateModel( + name='InstituteType', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('name', models.CharField(max_length=200)), + ('created', models.DateTimeField(auto_now_add=True)), + ('updated', models.DateTimeField(auto_now=True)), + ], + ), + migrations.CreateModel( + name='Invigilator', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('status', models.PositiveSmallIntegerField(default=0)), + ('created', models.DateTimeField(auto_now_add=True)), + ('updated', models.DateTimeField(auto_now=True)), + ('academic', models.ForeignKey(to='events.AcademicCenter')), + ('appoved_by', models.ForeignKey(related_name='invigilator_approved_by', blank=True, to=settings.AUTH_USER_MODEL, null=True)), + ('user', models.OneToOneField(to=settings.AUTH_USER_MODEL)), + ], + ), + migrations.CreateModel( + name='LabCourse', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('name', models.CharField(max_length=200)), + ('created', models.DateTimeField(auto_now_add=True)), + ('updated', models.DateTimeField(auto_now=True)), + ], + ), + migrations.CreateModel( + name='Location', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('name', models.CharField(max_length=200)), + ('pincode', models.PositiveIntegerField()), + ('created', models.DateTimeField(auto_now_add=True, null=True)), + ('updated', models.DateTimeField(auto_now=True)), + ('district', models.ForeignKey(to='events.District')), + ], + ), + migrations.CreateModel( + name='Organiser', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('status', models.PositiveSmallIntegerField(default=0)), + ('created', models.DateTimeField(auto_now_add=True)), + ('updated', models.DateTimeField(auto_now=True)), + ('academic', models.ForeignKey(blank=True, to='events.AcademicCenter', null=True)), + ('appoved_by', models.ForeignKey(related_name='organiser_approved_by', blank=True, to=settings.AUTH_USER_MODEL, null=True)), + ('user', models.OneToOneField(related_name='organiser', to=settings.AUTH_USER_MODEL)), + ], + ), + migrations.CreateModel( + name='OrganiserNotification', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('user', models.ForeignKey(to=settings.AUTH_USER_MODEL)), + ], + ), + migrations.CreateModel( + name='Permission', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('created', models.DateTimeField(auto_now_add=True)), + ('updated', models.DateTimeField(auto_now=True)), + ('assigned_by', models.ForeignKey(related_name='permission_assigned_by', to=settings.AUTH_USER_MODEL)), + ('district', models.ForeignKey(related_name='permission_district', to='events.District', null=True)), + ('institute', models.ForeignKey(related_name='permission_district', to='events.AcademicCenter', null=True)), + ('institute_type', models.ForeignKey(related_name='permission_institution_type', to='events.InstituteType', null=True)), + ], + ), + migrations.CreateModel( + name='PermissionType', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('name', models.CharField(max_length=200)), + ('created', models.DateTimeField(auto_now_add=True)), + ('updated', models.DateTimeField(auto_now=True)), + ], + ), + migrations.CreateModel( + name='ResourcePerson', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('assigned_by', models.PositiveIntegerField()), + ('status', models.BooleanField()), + ('created', models.DateTimeField(auto_now_add=True)), + ('updated', models.DateTimeField(auto_now=True)), + ], + options={ + 'verbose_name': 'Resource Person', + }, + ), + migrations.CreateModel( + name='Semester', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('name', models.CharField(max_length=50)), + ('even', models.BooleanField(default=True)), + ], + ), + migrations.CreateModel( + name='SingleTraining', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('training_type', models.PositiveIntegerField(default=0)), + ('tdate', models.DateField()), + ('ttime', models.TimeField()), + ('status', models.PositiveSmallIntegerField(default=0)), + ('participant_count', models.PositiveIntegerField(default=0)), + ('created', models.DateTimeField()), + ('updated', models.DateTimeField()), + ('academic', models.ForeignKey(to='events.AcademicCenter')), + ('course', models.ForeignKey(to='events.CourseMap')), + ('language', models.ForeignKey(to='creation.Language')), + ('organiser', models.ForeignKey(to='events.Organiser')), + ], + ), + migrations.CreateModel( + name='SingleTrainingAttendance', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('firstname', models.CharField(max_length=100, null=True)), + ('lastname', models.CharField(max_length=100, null=True)), + ('gender', models.CharField(max_length=10, null=True)), + ('email', models.EmailField(max_length=254, null=True)), + ('password', models.CharField(max_length=100, null=True)), + ('count', models.PositiveSmallIntegerField(default=0)), + ('status', models.PositiveSmallIntegerField(default=0)), + ('created', models.DateTimeField()), + ('updated', models.DateTimeField()), + ('training', models.ForeignKey(to='events.SingleTraining')), + ], + ), + migrations.CreateModel( + name='State', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('code', models.CharField(max_length=3)), + ('name', models.CharField(max_length=50)), + ('slug', models.CharField(max_length=100)), + ('latitude', models.DecimalField(null=True, max_digits=10, decimal_places=4, blank=True)), + ('longtitude', models.DecimalField(null=True, max_digits=10, decimal_places=4, blank=True)), + ('img_map_area', models.TextField()), + ('created', models.DateTimeField(auto_now_add=True, null=True)), + ('updated', models.DateTimeField(auto_now=True, null=True)), + ('users', models.ManyToManyField(related_name='resource_person', through='events.ResourcePerson', to=settings.AUTH_USER_MODEL)), + ], + ), + migrations.CreateModel( + name='Student', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('gender', models.CharField(max_length=15)), + ('verified', models.BooleanField(default=False)), + ('error', models.BooleanField(default=False)), + ('created', models.DateTimeField(auto_now_add=True)), + ('updated', models.DateTimeField(auto_now=True)), + ('user', models.OneToOneField(to=settings.AUTH_USER_MODEL)), + ], + ), + migrations.CreateModel( + name='StudentBatch', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('year', models.PositiveIntegerField()), + ('stcount', models.PositiveIntegerField(default=0)), + ('academic', models.ForeignKey(to='events.AcademicCenter')), + ('department', models.ForeignKey(to='events.Department')), + ('organiser', models.ForeignKey(to='events.Organiser')), + ], + ), + migrations.CreateModel( + name='StudentMaster', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('moved', models.BooleanField(default=False)), + ('created', models.DateTimeField(auto_now_add=True)), + ('updated', models.DateTimeField(auto_now=True)), + ('batch', models.ForeignKey(to='events.StudentBatch')), + ('student', models.ForeignKey(to='events.Student')), + ], + ), + migrations.CreateModel( + name='Test', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('test_code', models.CharField(max_length=100)), + ('tdate', models.DateField()), + ('ttime', models.TimeField()), + ('status', models.PositiveSmallIntegerField(default=0)), + ('participant_count', models.PositiveIntegerField(default=0)), + ('created', models.DateTimeField(auto_now_add=True)), + ('updated', models.DateTimeField(auto_now=True)), + ('academic', models.ForeignKey(to='events.AcademicCenter')), + ('appoved_by', models.ForeignKey(related_name='test_approved_by', to=settings.AUTH_USER_MODEL, null=True)), + ('department', models.ManyToManyField(to='events.Department')), + ('foss', models.ForeignKey(to='creation.FossCategory')), + ('invigilator', models.ForeignKey(related_name='test_invigilator', to='events.Invigilator', null=True)), + ('organiser', models.ForeignKey(related_name='test_organiser', to='events.Organiser')), + ], + options={ + 'verbose_name': 'Test Categorie', + }, + ), + migrations.CreateModel( + name='TestAttendance', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('mdluser_firstname', models.CharField(max_length=100)), + ('mdluser_lastname', models.CharField(max_length=100)), + ('mdluser_id', models.PositiveIntegerField()), + ('mdlcourse_id', models.PositiveIntegerField(default=0)), + ('mdlquiz_id', models.PositiveIntegerField(default=0)), + ('mdlattempt_id', models.PositiveIntegerField(default=0)), + ('password', models.CharField(max_length=100, null=True)), + ('count', models.PositiveSmallIntegerField(default=0)), + ('status', models.PositiveSmallIntegerField(default=0)), + ('created', models.DateTimeField(auto_now_add=True)), + ('updated', models.DateTimeField(auto_now=True)), + ('test', models.ForeignKey(to='events.Test')), + ], + options={ + 'verbose_name': 'Test Attendance', + }, + ), + migrations.CreateModel( + name='TestCategory', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('name', models.CharField(max_length=200)), + ('status', models.BooleanField(default=0)), + ('created', models.DateTimeField(auto_now_add=True, null=True)), + ('updated', models.DateTimeField(auto_now=True, null=True)), + ], + ), + migrations.CreateModel( + name='Testimonials', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('user_name', models.CharField(max_length=200)), + ('actual_content', models.TextField()), + ('minified_content', models.TextField()), + ('short_description', models.TextField()), + ('source_title', models.CharField(max_length=200, null=True)), + ('source_link', models.URLField(null=True)), + ('status', models.PositiveSmallIntegerField(default=0)), + ('created', models.DateTimeField(auto_now_add=True, null=True)), + ('updated', models.DateTimeField(auto_now=True, null=True)), + ('approved_by', models.ForeignKey(related_name='testimonial_approved_by', to=settings.AUTH_USER_MODEL, null=True)), + ('user', models.ForeignKey(related_name='testimonial_created_by', to=settings.AUTH_USER_MODEL)), + ], + ), + migrations.CreateModel( + name='TestLog', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('role', models.PositiveSmallIntegerField(default=0)), + ('status', models.PositiveSmallIntegerField(default=0)), + ('created', models.DateTimeField(auto_now_add=True)), + ('academic', models.ForeignKey(to='events.AcademicCenter')), + ('test', models.ForeignKey(to='events.Test')), + ('user', models.ForeignKey(to=settings.AUTH_USER_MODEL)), + ], + ), + migrations.CreateModel( + name='Training', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('training_type', models.PositiveIntegerField(default=0)), + ('training_code', models.CharField(max_length=100, null=True)), + ('tdate', models.DateField()), + ('ttime', models.TimeField()), + ('skype', models.PositiveSmallIntegerField(default=0)), + ('status', models.PositiveSmallIntegerField(default=0)), + ('participant_count', models.PositiveIntegerField(default=0)), + ('trusted', models.BooleanField(default=1)), + ('created', models.DateTimeField(auto_now_add=True)), + ('updated', models.DateTimeField(auto_now=True)), + ('academic', models.ForeignKey(to='events.AcademicCenter')), + ('appoved_by', models.ForeignKey(related_name='training_approved_by', to=settings.AUTH_USER_MODEL, null=True)), + ('course', models.ForeignKey(to='events.Course')), + ('department', models.ManyToManyField(to='events.Department')), + ], + ), + migrations.CreateModel( + name='TrainingAttend', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('created', models.DateTimeField(auto_now_add=True)), + ('updated', models.DateTimeField(auto_now=True)), + ('language', models.ForeignKey(default=None, to='creation.Language')), + ('student', models.ForeignKey(to='events.Student')), + ], + ), + migrations.CreateModel( + name='TrainingAttendance', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('mdluser_id', models.PositiveIntegerField(null=True, blank=True)), + ('firstname', models.CharField(max_length=100, null=True)), + ('lastname', models.CharField(max_length=100, null=True)), + ('gender', models.CharField(max_length=10, null=True)), + ('email', models.EmailField(max_length=254, null=True)), + ('password', models.CharField(max_length=100, null=True)), + ('count', models.PositiveSmallIntegerField(default=0)), + ('status', models.PositiveSmallIntegerField(default=0)), + ('created', models.DateTimeField(auto_now_add=True)), + ('updated', models.DateTimeField(auto_now=True)), + ('training', models.ForeignKey(to='events.Training')), + ], + options={ + 'verbose_name': 'Training Attendance', + }, + ), + migrations.CreateModel( + name='TrainingCertificate', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('password', models.CharField(max_length=255, null=True)), + ('count', models.PositiveSmallIntegerField(default=0)), + ('updated', models.DateTimeField()), + ('student', models.ForeignKey(to='events.Student')), + ], + ), + migrations.CreateModel( + name='TrainingExtraFields', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('paper_name', models.CharField(max_length=200)), + ('approximate_hour', models.PositiveIntegerField(default=0)), + ('online_test', models.PositiveIntegerField(default=0)), + ('is_tutorial_useful', models.BooleanField(default=0)), + ('future_training', models.BooleanField(default=0)), + ('recommend_to_others', models.BooleanField(default=0)), + ('no_of_lab_session', models.CharField(max_length=30, null=True)), + ], + ), + migrations.CreateModel( + name='TrainingFeedback', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('mdluser_id', models.PositiveIntegerField()), + ('rate_workshop', models.PositiveSmallIntegerField()), + ('content', models.PositiveSmallIntegerField()), + ('sequence', models.PositiveSmallIntegerField()), + ('clarity', models.PositiveSmallIntegerField()), + ('interesting', models.PositiveSmallIntegerField()), + ('appropriate_example', models.PositiveSmallIntegerField()), + ('instruction_sheet', models.PositiveSmallIntegerField()), + ('assignment', models.PositiveSmallIntegerField()), + ('pace_of_tutorial', models.PositiveSmallIntegerField()), + ('workshop_learnt', models.TextField()), + ('weakness_workshop', models.BooleanField()), + ('weakness_narration', models.BooleanField()), + ('weakness_understand', models.BooleanField()), + ('other_weakness', models.TextField()), + ('tutorial_language', models.PositiveSmallIntegerField()), + ('apply_information', models.PositiveSmallIntegerField()), + ('if_apply_information_yes', models.TextField()), + ('setup_learning', models.PositiveSmallIntegerField()), + ('computers_lab', models.PositiveSmallIntegerField()), + ('audio_quality', models.PositiveSmallIntegerField()), + ('video_quality', models.PositiveSmallIntegerField()), + ('workshop_orgainsation', models.PositiveSmallIntegerField()), + ('faciliate_learning', models.PositiveSmallIntegerField()), + ('motivate_learners', models.PositiveSmallIntegerField()), + ('time_management', models.PositiveSmallIntegerField()), + ('knowledge_about_software', models.PositiveSmallIntegerField()), + ('provide_clear_explanation', models.PositiveSmallIntegerField()), + ('answered_questions', models.PositiveSmallIntegerField()), + ('interested_helping', models.PositiveSmallIntegerField()), + ('executed_workshop', models.PositiveSmallIntegerField()), + ('workshop_improved', models.TextField()), + ('recommend_workshop', models.PositiveSmallIntegerField()), + ('reason_why', models.TextField()), + ('other_comments', models.TextField()), + ('created', models.DateTimeField(auto_now_add=True)), + ('training', models.ForeignKey(to='events.Training')), + ], + ), + migrations.CreateModel( + name='TrainingLanguageFeedback', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('mdluser_id', models.PositiveIntegerField()), + ('name', models.CharField(max_length=100)), + ('age', models.PositiveIntegerField()), + ('medium_of_instruction', models.PositiveIntegerField()), + ('gender', models.BooleanField()), + ('tutorial_was_useful', models.PositiveIntegerField()), + ('learning_experience', models.PositiveIntegerField()), + ('satisfied_with_learning_experience', models.PositiveIntegerField()), + ('concept_explain_clearity', models.PositiveIntegerField()), + ('overall_learning_experience', models.PositiveIntegerField()), + ('user_interface', models.PositiveIntegerField()), + ('understanding_difficult_concept', models.PositiveIntegerField()), + ('curious_and_motivated', models.PositiveIntegerField()), + ('similar_tutorial_with_other_content', models.PositiveIntegerField()), + ('foss_tutorial_was_mentally_demanding', models.PositiveIntegerField()), + ('side_by_side_method_is_understood', models.PositiveIntegerField(default=0)), + ('compfortable_learning_in_language', models.PositiveIntegerField()), + ('confidence_level_in_language', models.PositiveIntegerField()), + ('preferred_language', models.PositiveIntegerField()), + ('preferred_language_reason', models.TextField()), + ('prefer_translation_in_mother_tongue', models.PositiveIntegerField()), + ('prefer_translation_in_mother_tongue_reason', models.TextField()), + ('side_by_side_method_meant', models.PositiveIntegerField()), + ('side_by_side_method_is_beneficial', models.PositiveIntegerField()), + ('side_by_side_method_is_beneficial_reason', models.TextField()), + ('limitations_of_side_by_side_method', models.TextField()), + ('content_information_flow', models.PositiveIntegerField()), + ('content_appropriate_examples', models.PositiveIntegerField()), + ('content_ease_of_understanding', models.PositiveIntegerField()), + ('content_clarity_of_instruction_sheet', models.PositiveIntegerField()), + ('content_ease_of_performing_assignment', models.PositiveIntegerField()), + ('content_best_features', models.TextField()), + ('content_areas_of_improvement', models.TextField()), + ('video_audio_video_synchronization', models.PositiveIntegerField()), + ('video_attractive_color_features', models.PositiveIntegerField()), + ('video_text_readable', models.PositiveIntegerField()), + ('video_best_features', models.TextField()), + ('video_areas_of_improvement', models.TextField()), + ('audio_pleasant_speech_and_accent', models.PositiveIntegerField()), + ('audio_soothing_and_friendly_tone', models.PositiveIntegerField()), + ('audio_understandable_and_clear_speech', models.PositiveIntegerField()), + ('audio_best_features', models.TextField()), + ('audio_areas_of_improvement', models.TextField()), + ('side_by_side_method_is_effective', models.PositiveIntegerField(default=0)), + ('side_by_side_method_is', models.PositiveIntegerField(default=0)), + ('created', models.DateTimeField(auto_now_add=True)), + ('language_prefered', models.ForeignKey(to='creation.Language', null=True)), + ('training', models.ForeignKey(to='events.Training')), + ], + ), + migrations.CreateModel( + name='TrainingLiveFeedback', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('rate_workshop', models.PositiveSmallIntegerField()), + ('name', models.CharField(max_length=100)), + ('email', models.EmailField(max_length=254)), + ('branch', models.CharField(max_length=100)), + ('institution', models.CharField(max_length=100)), + ('content', models.PositiveSmallIntegerField()), + ('sequence', models.PositiveSmallIntegerField()), + ('clarity', models.PositiveSmallIntegerField()), + ('interesting', models.PositiveSmallIntegerField()), + ('appropriate_example', models.PositiveSmallIntegerField()), + ('instruction_sheet', models.PositiveSmallIntegerField()), + ('assignment', models.PositiveSmallIntegerField()), + ('pace_of_tutorial', models.PositiveSmallIntegerField()), + ('workshop_learnt', models.TextField()), + ('weakness_workshop', models.BooleanField()), + ('weakness_narration', models.BooleanField()), + ('weakness_understand', models.BooleanField()), + ('other_weakness', models.TextField()), + ('tutorial_language', models.PositiveSmallIntegerField()), + ('apply_information', models.PositiveSmallIntegerField()), + ('if_apply_information_yes', models.TextField()), + ('setup_learning', models.PositiveSmallIntegerField()), + ('computers_lab', models.PositiveSmallIntegerField()), + ('audio_quality', models.PositiveSmallIntegerField()), + ('video_quality', models.PositiveSmallIntegerField()), + ('workshop_orgainsation', models.PositiveSmallIntegerField()), + ('faciliate_learning', models.PositiveSmallIntegerField()), + ('motivate_learners', models.PositiveSmallIntegerField()), + ('time_management', models.PositiveSmallIntegerField()), + ('knowledge_about_software', models.PositiveSmallIntegerField()), + ('provide_clear_explanation', models.PositiveSmallIntegerField()), + ('answered_questions', models.PositiveSmallIntegerField()), + ('interested_helping', models.PositiveSmallIntegerField()), + ('executed_workshop', models.PositiveSmallIntegerField()), + ('workshop_improved', models.TextField()), + ('recommend_workshop', models.PositiveSmallIntegerField()), + ('reason_why', models.TextField()), + ('other_comments', models.TextField()), + ('created', models.DateTimeField(auto_now_add=True)), + ('training', models.ForeignKey(to='events.Training')), + ], + ), + migrations.CreateModel( + name='TrainingLog', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('role', models.PositiveSmallIntegerField()), + ('status', models.PositiveSmallIntegerField()), + ('created', models.DateTimeField(auto_now_add=True)), + ('academic', models.ForeignKey(to='events.AcademicCenter')), + ('training', models.ForeignKey(to='events.Training')), + ('user', models.ForeignKey(to=settings.AUTH_USER_MODEL)), + ], + ), + migrations.CreateModel( + name='TrainingPlanner', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('year', models.CharField(max_length=50)), + ('created', models.DateTimeField(auto_now_add=True)), + ('updated', models.DateTimeField(auto_now=True)), + ('academic', models.ForeignKey(to='events.AcademicCenter')), + ('organiser', models.ForeignKey(to='events.Organiser')), + ('semester', models.ForeignKey(to='events.Semester')), + ], + ), + migrations.CreateModel( + name='TrainingRequest', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('sem_start_date', models.DateField()), + ('participants', models.PositiveIntegerField(default=0)), + ('status', models.BooleanField(default=0)), + ('created', models.DateTimeField(auto_now_add=True)), + ('updated', models.DateTimeField(auto_now=True)), + ('batch', models.ForeignKey(to='events.StudentBatch', null=True)), + ('course', models.ForeignKey(to='events.CourseMap')), + ('department', models.ForeignKey(to='events.Department')), + ('training_planner', models.ForeignKey(to='events.TrainingPlanner')), + ], + ), + migrations.CreateModel( + name='University', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('name', models.CharField(max_length=200)), + ('created', models.DateTimeField(auto_now_add=True)), + ('updated', models.DateTimeField(auto_now=True)), + ('state', models.ForeignKey(to='events.State')), + ('user', models.ForeignKey(to=settings.AUTH_USER_MODEL)), + ], + ), + migrations.AddField( + model_name='trainingcertificate', + name='training', + field=models.ForeignKey(to='events.TrainingRequest'), + ), + migrations.AddField( + model_name='trainingattend', + name='training', + field=models.ForeignKey(to='events.TrainingRequest'), + ), + migrations.AddField( + model_name='training', + name='extra_fields', + field=models.OneToOneField(null=True, to='events.TrainingExtraFields'), + ), + migrations.AddField( + model_name='training', + name='foss', + field=models.ForeignKey(to='creation.FossCategory'), + ), + migrations.AddField( + model_name='training', + name='language', + field=models.ForeignKey(to='creation.Language'), + ), + migrations.AddField( + model_name='training', + name='organiser', + field=models.ForeignKey(to='events.Organiser'), + ), + migrations.AddField( + model_name='test', + name='test_category', + field=models.ForeignKey(related_name='test_category', to='events.TestCategory'), + ), + migrations.AddField( + model_name='test', + name='training', + field=models.ForeignKey(to='events.Training', null=True), + ), + migrations.AddField( + model_name='resourceperson', + name='state', + field=models.ForeignKey(to='events.State'), + ), + migrations.AddField( + model_name='resourceperson', + name='user', + field=models.ForeignKey(to=settings.AUTH_USER_MODEL), + ), + migrations.AddField( + model_name='permission', + name='permissiontype', + field=models.ForeignKey(to='events.PermissionType'), + ), + migrations.AddField( + model_name='permission', + name='state', + field=models.ForeignKey(related_name='permission_state', to='events.State'), + ), + migrations.AddField( + model_name='permission', + name='university', + field=models.ForeignKey(related_name='permission_iniversity', to='events.University', null=True), + ), + migrations.AddField( + model_name='permission', + name='user', + field=models.ForeignKey(related_name='permission_user', to=settings.AUTH_USER_MODEL), + ), + migrations.AlterUniqueTogether( + name='institutetype', + unique_together=set([('name',)]), + ), + migrations.AddField( + model_name='district', + name='state', + field=models.ForeignKey(to='events.State'), + ), + migrations.AddField( + model_name='coursemap', + name='course', + field=models.ForeignKey(blank=True, to='events.LabCourse', null=True), + ), + migrations.AddField( + model_name='coursemap', + name='foss', + field=models.ForeignKey(to='creation.FossCategory'), + ), + migrations.AlterUniqueTogether( + name='course', + unique_together=set([('name',)]), + ), + migrations.AddField( + model_name='city', + name='state', + field=models.ForeignKey(to='events.State'), + ), + migrations.AddField( + model_name='academiccenter', + name='city', + field=models.ForeignKey(to='events.City'), + ), + migrations.AddField( + model_name='academiccenter', + name='district', + field=models.ForeignKey(to='events.District'), + ), + migrations.AddField( + model_name='academiccenter', + name='institute_category', + field=models.ForeignKey(to='events.InstituteCategory'), + ), + migrations.AddField( + model_name='academiccenter', + name='institution_type', + field=models.ForeignKey(to='events.InstituteType'), + ), + migrations.AddField( + model_name='academiccenter', + name='location', + field=models.ForeignKey(to='events.Location', null=True), + ), + migrations.AddField( + model_name='academiccenter', + name='state', + field=models.ForeignKey(to='events.State'), + ), + migrations.AddField( + model_name='academiccenter', + name='university', + field=models.ForeignKey(to='events.University'), + ), + migrations.AddField( + model_name='academiccenter', + name='user', + field=models.ForeignKey(to=settings.AUTH_USER_MODEL), + ), + migrations.AlterUniqueTogether( + name='university', + unique_together=set([('name', 'state')]), + ), + migrations.AlterUniqueTogether( + name='trainingplanner', + unique_together=set([('year', 'academic', 'organiser', 'semester')]), + ), + migrations.AlterUniqueTogether( + name='traininglivefeedback', + unique_together=set([('training', 'email')]), + ), + migrations.AlterUniqueTogether( + name='traininglanguagefeedback', + unique_together=set([('training', 'mdluser_id')]), + ), + migrations.AlterUniqueTogether( + name='trainingfeedback', + unique_together=set([('training', 'mdluser_id')]), + ), + migrations.AlterUniqueTogether( + name='trainingattend', + unique_together=set([('training', 'student')]), + ), + migrations.AlterUniqueTogether( + name='training', + unique_together=set([('organiser', 'academic', 'foss', 'tdate', 'ttime')]), + ), + migrations.AlterUniqueTogether( + name='testattendance', + unique_together=set([('test', 'mdluser_id')]), + ), + migrations.AlterUniqueTogether( + name='test', + unique_together=set([('organiser', 'academic', 'foss', 'tdate', 'ttime')]), + ), + migrations.AlterUniqueTogether( + name='studentmaster', + unique_together=set([('batch', 'student')]), + ), + migrations.AlterUniqueTogether( + name='studentbatch', + unique_together=set([('academic', 'year', 'department')]), + ), + migrations.AlterUniqueTogether( + name='state', + unique_together=set([('code', 'name')]), + ), + migrations.AlterUniqueTogether( + name='singletrainingattendance', + unique_together=set([('training', 'firstname', 'lastname', 'email')]), + ), + migrations.AlterUniqueTogether( + name='singletraining', + unique_together=set([('organiser', 'academic', 'course', 'tdate', 'ttime')]), + ), + migrations.AlterUniqueTogether( + name='resourceperson', + unique_together=set([('user', 'state')]), + ), + migrations.AlterUniqueTogether( + name='location', + unique_together=set([('name', 'district', 'pincode')]), + ), + migrations.AlterUniqueTogether( + name='district', + unique_together=set([('state', 'code', 'name')]), + ), + migrations.AlterUniqueTogether( + name='coursemap', + unique_together=set([('course', 'foss', 'category')]), + ), + migrations.AlterUniqueTogether( + name='city', + unique_together=set([('name', 'state')]), + ), + ] diff --git a/events/events/migrations/0002_auto_20150623_1627.py b/events/events/migrations/0002_auto_20150623_1627.py new file mode 100644 index 000000000..aa9fa9710 --- /dev/null +++ b/events/events/migrations/0002_auto_20150623_1627.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- + + +from django.db import models, migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('events', '0001_initial'), + ] + + operations = [ + migrations.AlterField( + model_name='test', + name='training', + field=models.ForeignKey(to='events.TrainingRequest', null=True), + ), + ] diff --git a/events/events/migrations/0003_testattendance_student.py b/events/events/migrations/0003_testattendance_student.py new file mode 100644 index 000000000..3cfc1a518 --- /dev/null +++ b/events/events/migrations/0003_testattendance_student.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- + + +from django.db import models, migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('events', '0002_auto_20150623_1627'), + ] + + operations = [ + migrations.AddField( + model_name='testattendance', + name='student', + field=models.ForeignKey(to='events.Student', null=True), + ), + ] diff --git a/events/events/migrations/0004_auto_20150727_1632.py b/events/events/migrations/0004_auto_20150727_1632.py new file mode 100644 index 000000000..a5c3bfa32 --- /dev/null +++ b/events/events/migrations/0004_auto_20150727_1632.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- + + +from django.db import models, migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('events', '0003_testattendance_student'), + ] + + operations = [ + migrations.AlterModelOptions( + name='studentmaster', + options={'ordering': ['student__user__first_name']}, + ), + migrations.AlterField( + model_name='singletraining', + name='created', + field=models.DateTimeField(auto_now_add=True), + ), + migrations.AlterField( + model_name='singletraining', + name='ttime', + field=models.TimeField(null=True, blank=True), + ), + migrations.AlterField( + model_name='singletraining', + name='updated', + field=models.DateTimeField(auto_now=True), + ), + migrations.AlterField( + model_name='singletrainingattendance', + name='created', + field=models.DateTimeField(auto_now_add=True), + ), + migrations.AlterField( + model_name='singletrainingattendance', + name='updated', + field=models.DateTimeField(auto_now=True), + ), + ] diff --git a/events/events/migrations/0005_auto_20150731_1230.py b/events/events/migrations/0005_auto_20150731_1230.py new file mode 100644 index 000000000..b9cb723cd --- /dev/null +++ b/events/events/migrations/0005_auto_20150731_1230.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- + + +from django.db import models, migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('events', '0004_auto_20150727_1632'), + ] + + operations = [ + migrations.AlterField( + model_name='trainingfeedback', + name='training', + field=models.ForeignKey(to='events.TrainingRequest'), + ), + ] diff --git a/events/events/migrations/0006_auto_20150731_1340.py b/events/events/migrations/0006_auto_20150731_1340.py new file mode 100644 index 000000000..9d478a278 --- /dev/null +++ b/events/events/migrations/0006_auto_20150731_1340.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- + + +from django.db import models, migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('events', '0005_auto_20150731_1230'), + ] + + operations = [ + migrations.AlterField( + model_name='traininglanguagefeedback', + name='training', + field=models.ForeignKey(to='events.TrainingRequest'), + ), + ] diff --git a/events/events/migrations/0007_auto_20150731_1404.py b/events/events/migrations/0007_auto_20150731_1404.py new file mode 100644 index 000000000..038efb0ed --- /dev/null +++ b/events/events/migrations/0007_auto_20150731_1404.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- + + +from django.db import models, migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('events', '0006_auto_20150731_1340'), + ] + + operations = [ + migrations.AlterField( + model_name='traininglanguagefeedback', + name='name', + field=models.CharField(default=None, max_length=100, null=True), + ), + ] diff --git a/events/events/migrations/0008_auto_20150731_1648.py b/events/events/migrations/0008_auto_20150731_1648.py new file mode 100644 index 000000000..54e1f9d38 --- /dev/null +++ b/events/events/migrations/0008_auto_20150731_1648.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- + + +from django.db import models, migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('events', '0007_auto_20150731_1404'), + ] + + operations = [ + migrations.AlterField( + model_name='traininglivefeedback', + name='training', + field=models.ForeignKey(to='events.SingleTraining'), + ), + ] diff --git a/events/events/migrations/0009_auto_20150806_1820.py b/events/events/migrations/0009_auto_20150806_1820.py new file mode 100644 index 000000000..580d618ac --- /dev/null +++ b/events/events/migrations/0009_auto_20150806_1820.py @@ -0,0 +1,85 @@ +# -*- coding: utf-8 -*- + + +from django.db import models, migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('creation', '__first__'), + ('events', '0008_auto_20150731_1648'), + ] + + operations = [ + migrations.CreateModel( + name='HelpfulFor', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('helpful_for', models.CharField(max_length=50, choices=[(b'0', b'Academic Performance'), (b'1', b'Project Assignments'), (b'2', b'To get job interviews'), (b'3', b'To get jobs'), (b'4', b'All of the above')])), + ], + ), + migrations.CreateModel( + name='OrganiserFeedback', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('name', models.CharField(max_length=100)), + ('email', models.EmailField(max_length=100)), + ('gender', models.CharField(max_length=10, choices=[(b'', b'-----'), (b'0', b'Male'), (b'1', b'Female')])), + ('age', models.CharField(max_length=20, choices=[(b'', b'-----'), (b'0', b'<25 years'), (b'1', b'25-35 years'), (b'2', b'35 years and above')])), + ('designation', models.CharField(max_length=20, choices=[(b'', b'-----'), (b'0', b'Student'), (b'1', b'Faculty'), (b'2', b'Staff'), (b'3', b'Admin')])), + ('medium_of_instruction', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'0', b'English'), (b'1', b'Vernacular'), (b'2', b'Mixed')])), + ('student_education_language', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'0', b'Mostly English'), (b'1', b'Mostly Vernacular'), (b'2', b'Mostly Mixed')])), + ('student_gender', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'0', b'Mostly Male'), (b'1', b'Mostly Female'), (b'2', b'Mixed')])), + ('student_location', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'0', b'Mainly urban'), (b'1', b'Mainly rural'), (b'2', b'Mixed'), (b'3', b'Not sure')])), + ('duration_of_tutorial', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'0', b'Less than 0.5 hour'), (b'1', b'0.5 - 2 hour'), (b'2', b'2-10 hours'), (b'3', b'Above 10 hours'), (b'4', b'Not applicable')])), + ('side_by_side_yes_no', models.CharField(max_length=10, choices=[(b'', b'-----'), (b'0', b'Yes'), (b'1', b'No')])), + ('side_by_side_method_is', models.CharField(max_length=10, choices=[(b'', b'-----'), (b'0', b'Explaining the video to a neighbor'), (b'1', b'Waiting for mentors explanation'), (b'2', b'Watching and practicing simultaneously'), (b'3', b'Dont know what this method is')])), + ('in_side_by_side_method', models.CharField(max_length=10, choices=[(b'', b'-----'), (b'0', b'The video has to be maximized'), (b'1', b'The software has to be maximized'), (b'2', b'Both software and video are maximized'), (b'3', b'None of the above are maximized')])), + ('good_investment', models.CharField(max_length=10, choices=[(b'', b'-----'), (b'0', b'Yes'), (b'1', b'No'), (b'2', b'Not Sure')])), + ('is_comfortable_self_learning', models.CharField(max_length=10, choices=[(b'', b'-----'), (b'0', b'Strongly Agree'), (b'1', b'Agree'), (b'2', b'Neutral'), (b'3', b'Disagree'), (b'4', b'Strongly Disagree'), (b'5', b'No idea')])), + ('is_classroom_better', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'0', b'Strongly Agree'), (b'1', b'Agree'), (b'2', b'Neutral'), (b'3', b'Disagree'), (b'4', b'Strongly Disagree'), (b'5', b'No idea')])), + ('is_student_expectations', models.CharField(max_length=10, choices=[(b'', b'-----'), (b'0', b'Strongly Agree'), (b'1', b'Agree'), (b'2', b'Neutral'), (b'3', b'Disagree'), (b'4', b'Strongly Disagree'), (b'5', b'No idea')])), + ('is_help_get_interview', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'0', b'Strongly Agree'), (b'1', b'Agree'), (b'2', b'Neutral'), (b'3', b'Disagree'), (b'4', b'Strongly Disagree'), (b'5', b'No idea')])), + ('is_help_get_job', models.CharField(max_length=10, choices=[(b'', b'-----'), (b'0', b'Strongly Agree'), (b'1', b'Agree'), (b'2', b'Neutral'), (b'3', b'Disagree'), (b'4', b'Strongly Disagree'), (b'5', b'No idea')])), + ('is_got_job', models.CharField(max_length=10, choices=[(b'', b'-----'), (b'0', b'Strongly Agree'), (b'1', b'Agree'), (b'2', b'Neutral'), (b'3', b'Disagree'), (b'4', b'Strongly Disagree'), (b'5', b'No idea')])), + ('relevance', models.CharField(max_length=10, choices=[(b'', b'-----'), (b'0', b'Excellent'), (b'1', b'Good'), (b'2', b'Fair'), (b'3', b'Bad'), (b'4', b'Very bad')])), + ('information_content', models.CharField(max_length=10, choices=[(b'', b'-----'), (b'0', b'Excellent'), (b'1', b'Good'), (b'2', b'Fair'), (b'3', b'Bad'), (b'4', b'Very bad')])), + ('audio_video_quality', models.CharField(max_length=10, choices=[(b'', b'-----'), (b'0', b'Excellent'), (b'1', b'Good'), (b'2', b'Fair'), (b'3', b'Bad'), (b'4', b'Very bad')])), + ('presentation_quality', models.CharField(max_length=10, choices=[(b'', b'-----'), (b'0', b'Excellent'), (b'1', b'Good'), (b'2', b'Fair'), (b'3', b'Bad'), (b'4', b'Very bad')])), + ('overall_rating', models.CharField(max_length=10, choices=[(b'', b'-----'), (b'0', b'Excellent'), (b'1', b'Good'), (b'2', b'Fair'), (b'3', b'Bad'), (b'4', b'Very bad')])), + ('is_training_benefited', models.CharField(max_length=10, choices=[(b'', b'-----'), (b'0', b'Yes'), (b'1', b'No')])), + ('testimonial', models.CharField(max_length=500)), + ('any_other_suggestions', models.CharField(max_length=500)), + ('can_contact', models.CharField(max_length=10, choices=[(b'', b'-----'), (b'0', b'Yes'), (b'1', b'No')])), + ('city', models.ForeignKey(to='events.City')), + ('district', models.ForeignKey(to='events.District')), + ('helpful_for', models.ManyToManyField(related_name='events_HelpfulFor_related', to='events.HelpfulFor')), + ('language', models.ManyToManyField(related_name='events_Language_related', to='creation.Language')), + ('offered_training_foss', models.ManyToManyField(related_name='events_FossCategory_related', to='creation.FossCategory')), + ('state', models.ForeignKey(to='events.State')), + ], + ), + migrations.CreateModel( + name='StudentStream', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('student_stream', models.CharField(max_length=50, choices=[(b'0', b'Engineering'), (b'1', b'Science'), (b'2', b'Arts and Humanities'), (b'3', b'Polytechnic/ Diploma programs'), (b'4', b'Commerce and Business Studies'), (b'5', b'ITI'), (b'6', b'Other')])), + ], + ), + migrations.AddField( + model_name='organiserfeedback', + name='student_stream', + field=models.ManyToManyField(related_name='events_StudentStream_related', to='events.StudentStream'), + ), + migrations.AddField( + model_name='organiserfeedback', + name='trained_foss', + field=models.ManyToManyField(to='creation.FossCategory'), + ), + migrations.AddField( + model_name='organiserfeedback', + name='university', + field=models.ForeignKey(to='events.AcademicCenter'), + ), + ] diff --git a/events/events/migrations/0010_auto_20150813_1354.py b/events/events/migrations/0010_auto_20150813_1354.py new file mode 100644 index 000000000..9c4ed34d9 --- /dev/null +++ b/events/events/migrations/0010_auto_20150813_1354.py @@ -0,0 +1,139 @@ +# -*- coding: utf-8 -*- + + +from django.db import models, migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('events', '0009_auto_20150806_1820'), + ] + + operations = [ + migrations.AlterField( + model_name='organiserfeedback', + name='age', + field=models.CharField(max_length=20, choices=[(b'', b'-----'), (b'<25', b'<25 years'), (b'25-35', b'25-35 years'), (b'35+', b'35 years and above')]), + ), + migrations.AlterField( + model_name='organiserfeedback', + name='audio_video_quality', + field=models.CharField(max_length=50, choices=[(b'', b'-----'), (b'Excellent', b'Excellent'), (b'Good', b'Good'), (b'Fair', b'Fair'), (b'Bad', b'Bad'), (b'Verybad', b'Very bad')]), + ), + migrations.AlterField( + model_name='organiserfeedback', + name='can_contact', + field=models.CharField(max_length=50, choices=[(b'', b'-----'), (b'Yes', b'Yes'), (b'No', b'No')]), + ), + migrations.AlterField( + model_name='organiserfeedback', + name='designation', + field=models.CharField(max_length=20, choices=[(b'', b'-----'), (b'Student', b'Student'), (b'Faculty', b'Faculty'), (b'Staff', b'Staff'), (b'Admin', b'Admin')]), + ), + migrations.AlterField( + model_name='organiserfeedback', + name='duration_of_tutorial', + field=models.CharField(max_length=50, choices=[(b'', b'-----'), (b'<0.5', b'Less than 0.5 hour'), (b'0.5-2', b'0.5 - 2 hour'), (b'2-10', b'2-10 hours'), (b'10+', b'Above 10 hours'), (b'NA', b'Not applicable')]), + ), + migrations.AlterField( + model_name='organiserfeedback', + name='gender', + field=models.CharField(max_length=10, choices=[(b'', b'-----'), (b'Male', b'Male'), (b'Female', b'Female')]), + ), + migrations.AlterField( + model_name='organiserfeedback', + name='good_investment', + field=models.CharField(max_length=50, choices=[(b'', b'-----'), (b'Yes', b'Yes'), (b'No', b'No'), (b'Notsure', b'Not sure')]), + ), + migrations.AlterField( + model_name='organiserfeedback', + name='in_side_by_side_method', + field=models.CharField(max_length=50, choices=[(b'', b'-----'), (b'0', b'The video has to be maximized'), (b'1', b'The software has to be maximized'), (b'2', b'Both software and video are maximized'), (b'3', b'None of the above are maximized')]), + ), + migrations.AlterField( + model_name='organiserfeedback', + name='information_content', + field=models.CharField(max_length=50, choices=[(b'', b'-----'), (b'Excellent', b'Excellent'), (b'Good', b'Good'), (b'Fair', b'Fair'), (b'Bad', b'Bad'), (b'Verybad', b'Very bad')]), + ), + migrations.AlterField( + model_name='organiserfeedback', + name='is_classroom_better', + field=models.CharField(max_length=50, choices=[(b'', b'-----'), (b'StronglyAgree', b'Strongly Agree'), (b'Agree', b'Agree'), (b'Neutral', b'Neutral'), (b'Disagree', b'Disagree'), (b'StronglyDisagree', b'Strongly Disagree'), (b'Noidea', b'No idea')]), + ), + migrations.AlterField( + model_name='organiserfeedback', + name='is_comfortable_self_learning', + field=models.CharField(max_length=50, choices=[(b'', b'-----'), (b'StronglyAgree', b'Strongly Agree'), (b'Agree', b'Agree'), (b'Neutral', b'Neutral'), (b'Disagree', b'Disagree'), (b'StronglyDisagree', b'Strongly Disagree'), (b'Noidea', b'No idea')]), + ), + migrations.AlterField( + model_name='organiserfeedback', + name='is_got_job', + field=models.CharField(max_length=50, choices=[(b'', b'-----'), (b'StronglyAgree', b'Strongly Agree'), (b'Agree', b'Agree'), (b'Neutral', b'Neutral'), (b'Disagree', b'Disagree'), (b'StronglyDisagree', b'Strongly Disagree'), (b'Noidea', b'No idea')]), + ), + migrations.AlterField( + model_name='organiserfeedback', + name='is_help_get_interview', + field=models.CharField(max_length=50, choices=[(b'', b'-----'), (b'StronglyAgree', b'Strongly Agree'), (b'Agree', b'Agree'), (b'Neutral', b'Neutral'), (b'Disagree', b'Disagree'), (b'StronglyDisagree', b'Strongly Disagree'), (b'Noidea', b'No idea')]), + ), + migrations.AlterField( + model_name='organiserfeedback', + name='is_help_get_job', + field=models.CharField(max_length=50, choices=[(b'', b'-----'), (b'StronglyAgree', b'Strongly Agree'), (b'Agree', b'Agree'), (b'Neutral', b'Neutral'), (b'Disagree', b'Disagree'), (b'StronglyDisagree', b'Strongly Disagree'), (b'Noidea', b'No idea')]), + ), + migrations.AlterField( + model_name='organiserfeedback', + name='is_student_expectations', + field=models.CharField(max_length=50, choices=[(b'', b'-----'), (b'StronglyAgree', b'Strongly Agree'), (b'Agree', b'Agree'), (b'Neutral', b'Neutral'), (b'Disagree', b'Disagree'), (b'StronglyDisagree', b'Strongly Disagree'), (b'Noidea', b'No idea')]), + ), + migrations.AlterField( + model_name='organiserfeedback', + name='is_training_benefited', + field=models.CharField(max_length=50, choices=[(b'', b'-----'), (b'Yes', b'Yes'), (b'No', b'No'), (b'Notsure', b'Not sure')]), + ), + migrations.AlterField( + model_name='organiserfeedback', + name='medium_of_instruction', + field=models.CharField(max_length=50, choices=[(b'', b'-----'), (b'English', b'English'), (b'Vernacular', b'Vernacular'), (b'Mixed', b'Mixed')]), + ), + migrations.AlterField( + model_name='organiserfeedback', + name='overall_rating', + field=models.CharField(max_length=50, choices=[(b'', b'-----'), (b'Excellent', b'Excellent'), (b'Good', b'Good'), (b'Fair', b'Fair'), (b'Bad', b'Bad'), (b'Verybad', b'Very bad')]), + ), + migrations.AlterField( + model_name='organiserfeedback', + name='presentation_quality', + field=models.CharField(max_length=50, choices=[(b'', b'-----'), (b'Excellent', b'Excellent'), (b'Good', b'Good'), (b'Fair', b'Fair'), (b'Bad', b'Bad'), (b'Verybad', b'Very bad')]), + ), + migrations.AlterField( + model_name='organiserfeedback', + name='relevance', + field=models.CharField(max_length=50, choices=[(b'', b'-----'), (b'Excellent', b'Excellent'), (b'Good', b'Good'), (b'Fair', b'Fair'), (b'Bad', b'Bad'), (b'Verybad', b'Very bad')]), + ), + migrations.AlterField( + model_name='organiserfeedback', + name='side_by_side_method_is', + field=models.CharField(max_length=50, choices=[(b'', b'-----'), (b'0', b'Explaining the video to a neighbor'), (b'1', b'Waiting for mentors explanation'), (b'2', b'Watching and practicing simultaneously'), (b'3', b'Dont know what this method is')]), + ), + migrations.AlterField( + model_name='organiserfeedback', + name='side_by_side_yes_no', + field=models.CharField(max_length=50, choices=[(b'', b'-----'), (b'Yes', b'Yes'), (b'No', b'No')]), + ), + migrations.AlterField( + model_name='organiserfeedback', + name='student_education_language', + field=models.CharField(max_length=50, choices=[(b'', b'-----'), (b'English', b'Mostly English'), (b'Vernacular', b'Mostly Vernacular'), (b'Mixed', b'Mostly Mixed')]), + ), + migrations.AlterField( + model_name='organiserfeedback', + name='student_gender', + field=models.CharField(max_length=50, choices=[(b'', b'-----'), (b'Male', b'Mostly Male'), (b'Female', b'Mostly Female'), (b'Mixed', b'Mixed')]), + ), + migrations.AlterField( + model_name='organiserfeedback', + name='student_location', + field=models.CharField(max_length=50, choices=[(b'', b'-----'), (b'Urban', b'Mainly Urban'), (b'Rural', b'Mainly Rural'), (b'Mixed', b'Mixed'), (b'Notsure', b'Not sure')]), + ), + ] diff --git a/events/events/migrations/0011_latexworkshopfileupload.py b/events/events/migrations/0011_latexworkshopfileupload.py new file mode 100644 index 000000000..bb9c7c54d --- /dev/null +++ b/events/events/migrations/0011_latexworkshopfileupload.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- + + +from django.db import models, migrations +import events.models + + +class Migration(migrations.Migration): + + dependencies = [ + ('events', '0010_auto_20150813_1354'), + ] + + operations = [ + migrations.CreateModel( + name='LatexWorkshopFileUpload', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('email', models.EmailField(max_length=254)), + ('file_upload', models.FileField(upload_to=events.models.get_email_dir)), + ], + ), + ] diff --git a/events/events/migrations/0012_auto_20150908_1722.py b/events/events/migrations/0012_auto_20150908_1722.py new file mode 100644 index 000000000..2968b3e19 --- /dev/null +++ b/events/events/migrations/0012_auto_20150908_1722.py @@ -0,0 +1,34 @@ +# -*- coding: utf-8 -*- + + +from django.db import models, migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('events', '0011_latexworkshopfileupload'), + ] + + operations = [ + migrations.AddField( + model_name='singletraining', + name='institution_type', + field=models.ForeignKey(to='events.InstituteType', null=True), + ), + migrations.AddField( + model_name='singletraining', + name='state', + field=models.ForeignKey(to='events.State', null=True), + ), + migrations.AddField( + model_name='singletraining', + name='total_participant_count', + field=models.PositiveIntegerField(default=0), + ), + migrations.AddField( + model_name='singletrainingattendance', + name='foss', + field=models.PositiveIntegerField(default=0), + ), + ] diff --git a/events/events/migrations/0013_auto_20151222_1218.py b/events/events/migrations/0013_auto_20151222_1218.py new file mode 100644 index 000000000..beca431c6 --- /dev/null +++ b/events/events/migrations/0013_auto_20151222_1218.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- + + +from django.db import models, migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('events', '0012_auto_20150908_1722'), + ] + + operations = [ + migrations.AlterField( + model_name='student', + name='verified', + field=models.PositiveSmallIntegerField(default=0), + ), + ] diff --git a/events/events/migrations/0014_auto_20160718_2121.py b/events/events/migrations/0014_auto_20160718_2121.py new file mode 100644 index 000000000..e9b5399eb --- /dev/null +++ b/events/events/migrations/0014_auto_20160718_2121.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- + + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('events', '0013_auto_20151222_1218'), + ] + + operations = [ + migrations.AddField( + model_name='state', + name='has_map', + field=models.BooleanField(default=1), + ), + migrations.AlterField( + model_name='trainingrequest', + name='status', + field=models.PositiveSmallIntegerField(default=0), + ), + ] diff --git a/events/events/migrations/0015_stworkshopfeedback_stworkshopfeedbackpost_stworkshopfeedbackpre.py b/events/events/migrations/0015_stworkshopfeedback_stworkshopfeedbackpost_stworkshopfeedbackpre.py new file mode 100644 index 000000000..8d8ed02df --- /dev/null +++ b/events/events/migrations/0015_stworkshopfeedback_stworkshopfeedbackpost_stworkshopfeedbackpre.py @@ -0,0 +1,205 @@ +# -*- coding: utf-8 -*- + + +from django.db import models, migrations +from django.conf import settings + + +class Migration(migrations.Migration): + + dependencies = [ + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ('events', '0014_auto_20160718_2121'), + ] + + operations = [ + migrations.CreateModel( + name='STWorkshopFeedback', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('name1', models.CharField(max_length=100)), + ('email', models.EmailField(max_length=100)), + ('gender', models.CharField(max_length=10, choices=[(b'', b'-----'), (b'Male', b'Male'), (b'Female', b'Female')])), + ('age', models.CharField(max_length=20)), + ('affiliation', models.CharField(max_length=100)), + ('total_tutorials1', models.CharField(max_length=20)), + ('installed', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'Yes', b'Yes'), (b'No', b'No')])), + ('installation_difficulties', models.CharField(max_length=300)), + ('acquired_knowledge', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'StronglyAgree', b'Strongly Agree'), (b'Agree', b'Agree'), (b'Neutral', b'Neutral'), (b'Disagree', b'Disagree'), (b'StronglyDisagree', b'Strongly Disagree'), (b'Noidea', b'No idea')])), + ('suff_instruction', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'StronglyAgree', b'Strongly Agree'), (b'Agree', b'Agree'), (b'Neutral', b'Neutral'), (b'Disagree', b'Disagree'), (b'StronglyDisagree', b'Strongly Disagree'), (b'Noidea', b'No idea')])), + ('diff_instruction', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'StronglyAgree', b'Strongly Agree'), (b'Agree', b'Agree'), (b'Neutral', b'Neutral'), (b'Disagree', b'Disagree'), (b'StronglyDisagree', b'Strongly Disagree'), (b'Noidea', b'No idea')])), + ('method_easy', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'StronglyAgree', b'Strongly Agree'), (b'Agree', b'Agree'), (b'Neutral', b'Neutral'), (b'Disagree', b'Disagree'), (b'StronglyDisagree', b'Strongly Disagree'), (b'Noidea', b'No idea')])), + ('time_sufficient', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'StronglyAgree', b'Strongly Agree'), (b'Agree', b'Agree'), (b'Neutral', b'Neutral'), (b'Disagree', b'Disagree'), (b'StronglyDisagree', b'Strongly Disagree'), (b'Noidea', b'No idea')])), + ('desired_objective', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'StronglyAgree', b'Strongly Agree'), (b'Agree', b'Agree'), (b'Neutral', b'Neutral'), (b'Disagree', b'Disagree'), (b'StronglyDisagree', b'Strongly Disagree'), (b'Noidea', b'No idea')])), + ('recommend', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'StronglyAgree', b'Strongly Agree'), (b'Agree', b'Agree'), (b'Neutral', b'Neutral'), (b'Disagree', b'Disagree'), (b'StronglyDisagree', b'Strongly Disagree'), (b'Noidea', b'No idea')])), + ('like_to_part', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'StronglyAgree', b'Strongly Agree'), (b'Agree', b'Agree'), (b'Neutral', b'Neutral'), (b'Disagree', b'Disagree'), (b'StronglyDisagree', b'Strongly Disagree'), (b'Noidea', b'No idea')])), + ('side_by_side_effective', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'StronglyAgree', b'Strongly Agree'), (b'Agree', b'Agree'), (b'Neutral', b'Neutral'), (b'Disagree', b'Disagree'), (b'StronglyDisagree', b'Strongly Disagree'), (b'Noidea', b'No idea')])), + ('not_self_explanatory', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'StronglyAgree', b'Strongly Agree'), (b'Agree', b'Agree'), (b'Neutral', b'Neutral'), (b'Disagree', b'Disagree'), (b'StronglyDisagree', b'Strongly Disagree'), (b'Noidea', b'No idea')])), + ('logical_sequence', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'StronglyAgree', b'Strongly Agree'), (b'Agree', b'Agree'), (b'Neutral', b'Neutral'), (b'Disagree', b'Disagree'), (b'StronglyDisagree', b'Strongly Disagree'), (b'Noidea', b'No idea')])), + ('examples_help', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'StronglyAgree', b'Strongly Agree'), (b'Agree', b'Agree'), (b'Neutral', b'Neutral'), (b'Disagree', b'Disagree'), (b'StronglyDisagree', b'Strongly Disagree'), (b'Noidea', b'No idea')])), + ('other_language', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'StronglyAgree', b'Strongly Agree'), (b'Agree', b'Agree'), (b'Neutral', b'Neutral'), (b'Disagree', b'Disagree'), (b'StronglyDisagree', b'Strongly Disagree'), (b'Noidea', b'No idea')])), + ('instructions_easy_to_follow', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'StronglyAgree', b'Strongly Agree'), (b'Agree', b'Agree'), (b'Neutral', b'Neutral'), (b'Disagree', b'Disagree'), (b'StronglyDisagree', b'Strongly Disagree'), (b'Noidea', b'No idea')])), + ('useful_learning', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'StronglyAgree', b'Strongly Agree'), (b'Agree', b'Agree'), (b'Neutral', b'Neutral'), (b'Disagree', b'Disagree'), (b'StronglyDisagree', b'Strongly Disagree'), (b'Noidea', b'No idea')])), + ('help_improve_performance', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'StronglyAgree', b'Strongly Agree'), (b'Agree', b'Agree'), (b'Neutral', b'Neutral'), (b'Disagree', b'Disagree'), (b'StronglyDisagree', b'Strongly Disagree'), (b'Noidea', b'No idea')])), + ('plan_to_use_future', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'StronglyAgree', b'Strongly Agree'), (b'Agree', b'Agree'), (b'Neutral', b'Neutral'), (b'Disagree', b'Disagree'), (b'StronglyDisagree', b'Strongly Disagree'), (b'Noidea', b'No idea')])), + ('confident', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'StronglyAgree', b'Strongly Agree'), (b'Agree', b'Agree'), (b'Neutral', b'Neutral'), (b'Disagree', b'Disagree'), (b'StronglyDisagree', b'Strongly Disagree'), (b'Noidea', b'No idea')])), + ('difficult_simultaneously', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'StronglyAgree', b'Strongly Agree'), (b'Agree', b'Agree'), (b'Neutral', b'Neutral'), (b'Disagree', b'Disagree'), (b'StronglyDisagree', b'Strongly Disagree'), (b'Noidea', b'No idea')])), + ('interface_comfortable', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'StronglyAgree', b'Strongly Agree'), (b'Agree', b'Agree'), (b'Neutral', b'Neutral'), (b'Disagree', b'Disagree'), (b'StronglyDisagree', b'Strongly Disagree'), (b'Noidea', b'No idea')])), + ('satisfied', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'StronglyAgree', b'Strongly Agree'), (b'Agree', b'Agree'), (b'Neutral', b'Neutral'), (b'Disagree', b'Disagree'), (b'StronglyDisagree', b'Strongly Disagree'), (b'Noidea', b'No idea')])), + ('self_learning_intrest', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'StronglyAgree', b'Strongly Agree'), (b'Agree', b'Agree'), (b'Neutral', b'Neutral'), (b'Disagree', b'Disagree'), (b'StronglyDisagree', b'Strongly Disagree'), (b'Noidea', b'No idea')])), + ('ws_quality', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'Excellent', b'Excellent'), (b'Good', b'Good'), (b'Fair', b'Fair'), (b'Bad', b'Bad'), (b'Extremelybad', b'Extremely bad')])), + ('overall_content_quality', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'Excellent', b'Excellent'), (b'Good', b'Good'), (b'Fair', b'Fair'), (b'Bad', b'Bad'), (b'Extremelybad', b'Extremely bad')])), + ('clarity_of_explanation', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'Excellent', b'Excellent'), (b'Good', b'Good'), (b'Fair', b'Fair'), (b'Bad', b'Bad'), (b'Extremelybad', b'Extremely bad')])), + ('flow', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'Excellent', b'Excellent'), (b'Good', b'Good'), (b'Fair', b'Fair'), (b'Bad', b'Bad'), (b'Extremelybad', b'Extremely bad')])), + ('relevance', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'Excellent', b'Excellent'), (b'Good', b'Good'), (b'Fair', b'Fair'), (b'Bad', b'Bad'), (b'Extremelybad', b'Extremely bad')])), + ('guidelines', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'Excellent', b'Excellent'), (b'Good', b'Good'), (b'Fair', b'Fair'), (b'Bad', b'Bad'), (b'Extremelybad', b'Extremely bad')])), + ('overall_video_quality', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'Excellent', b'Excellent'), (b'Good', b'Good'), (b'Fair', b'Fair'), (b'Bad', b'Bad'), (b'Extremelybad', b'Extremely bad')])), + ('text_readability', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'Excellent', b'Excellent'), (b'Good', b'Good'), (b'Fair', b'Fair'), (b'Bad', b'Bad'), (b'Extremelybad', b'Extremely bad')])), + ('clarity_of_speech', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'Excellent', b'Excellent'), (b'Good', b'Good'), (b'Fair', b'Fair'), (b'Bad', b'Bad'), (b'Extremelybad', b'Extremely bad')])), + ('visual_presentation', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'Excellent', b'Excellent'), (b'Good', b'Good'), (b'Fair', b'Fair'), (b'Bad', b'Bad'), (b'Extremelybad', b'Extremely bad')])), + ('pace_of_tutorial', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'Excellent', b'Excellent'), (b'Good', b'Good'), (b'Fair', b'Fair'), (b'Bad', b'Bad'), (b'Extremelybad', b'Extremely bad')])), + ('arrangement', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'Excellent', b'Excellent'), (b'Good', b'Good'), (b'Fair', b'Fair'), (b'Bad', b'Bad'), (b'Extremelybad', b'Extremely bad')])), + ('network', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'Excellent', b'Excellent'), (b'Good', b'Good'), (b'Fair', b'Fair'), (b'Bad', b'Bad'), (b'Extremelybad', b'Extremely bad')])), + ('installation_help', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'Excellent', b'Excellent'), (b'Good', b'Good'), (b'Fair', b'Fair'), (b'Bad', b'Bad'), (b'Extremelybad', b'Extremely bad')])), + ('time_management', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'Excellent', b'Excellent'), (b'Good', b'Good'), (b'Fair', b'Fair'), (b'Bad', b'Bad'), (b'Extremelybad', b'Extremely bad')])), + ('experience_of_learning', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'Excellent', b'Excellent'), (b'Good', b'Good'), (b'Fair', b'Fair'), (b'Bad', b'Bad'), (b'Extremelybad', b'Extremely bad')])), + ('overall_arrangement', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'Excellent', b'Excellent'), (b'Good', b'Good'), (b'Fair', b'Fair'), (b'Bad', b'Bad'), (b'Extremelybad', b'Extremely bad')])), + ('interaction_using_forum', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'Excellent', b'Excellent'), (b'Good', b'Good'), (b'Fair', b'Fair'), (b'Bad', b'Bad'), (b'Extremelybad', b'Extremely bad')])), + ('like_abt_ws', models.CharField(max_length=500)), + ('how_make_better', models.CharField(max_length=500)), + ('experience', models.CharField(max_length=500)), + ('suggestions', models.CharField(max_length=500)), + ], + ), + migrations.CreateModel( + name='STWorkshopFeedbackPost', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('email', models.EmailField(max_length=100)), + ('gender', models.CharField(max_length=10, choices=[(b'', b'-----'), (b'Male', b'Male'), (b'Female', b'Female')])), + ('age', models.CharField(max_length=20)), + ('participated_before', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'Yes', b'Yes'), (b'No', b'No')])), + ('foss_where', models.CharField(max_length=200)), + ('install_own', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'Yes', b'Yes'), (b'No', b'No')])), + ('explain', models.CharField(max_length=300)), + ('used_sw_before', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'Yes', b'Yes'), (b'No', b'No')])), + ('sim_framework_before', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'Yes', b'Yes'), (b'No', b'No')])), + ('total_tutorials1', models.CharField(max_length=20)), + ('purpose_of_attending', models.CharField(max_length=300)), + ('spfriendly', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'StronglyAgree', b'Strongly Agree'), (b'Agree', b'Agree'), (b'Neutral', b'Neutral'), (b'Disagree', b'Disagree'), (b'StronglyDisagree', b'Strongly Disagree'), (b'Noidea', b'No idea')])), + ('diff_watch_practice', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'StronglyAgree', b'Strongly Agree'), (b'Agree', b'Agree'), (b'Neutral', b'Neutral'), (b'Disagree', b'Disagree'), (b'StronglyDisagree', b'Strongly Disagree'), (b'Noidea', b'No idea')])), + ('satisfied_with_learning_experience', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'StronglyAgree', b'Strongly Agree'), (b'Agree', b'Agree'), (b'Neutral', b'Neutral'), (b'Disagree', b'Disagree'), (b'StronglyDisagree', b'Strongly Disagree'), (b'Noidea', b'No idea')])), + ('confident', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'StronglyAgree', b'Strongly Agree'), (b'Agree', b'Agree'), (b'Neutral', b'Neutral'), (b'Disagree', b'Disagree'), (b'StronglyDisagree', b'Strongly Disagree'), (b'Noidea', b'No idea')])), + ('side_by_side_hold_intrest', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'StronglyAgree', b'Strongly Agree'), (b'Agree', b'Agree'), (b'Neutral', b'Neutral'), (b'Disagree', b'Disagree'), (b'StronglyDisagree', b'Strongly Disagree'), (b'Noidea', b'No idea')])), + ('ws_not_useful', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'StronglyAgree', b'Strongly Agree'), (b'Agree', b'Agree'), (b'Neutral', b'Neutral'), (b'Disagree', b'Disagree'), (b'StronglyDisagree', b'Strongly Disagree'), (b'Noidea', b'No idea')])), + ('can_learn_other', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'StronglyAgree', b'Strongly Agree'), (b'Agree', b'Agree'), (b'Neutral', b'Neutral'), (b'Disagree', b'Disagree'), (b'StronglyDisagree', b'Strongly Disagree'), (b'Noidea', b'No idea')])), + ('wantto_conduct_incollege', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'StronglyAgree', b'Strongly Agree'), (b'Agree', b'Agree'), (b'Neutral', b'Neutral'), (b'Disagree', b'Disagree'), (b'StronglyDisagree', b'Strongly Disagree'), (b'Noidea', b'No idea')])), + ('esy_to_conduct_own', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'StronglyAgree', b'Strongly Agree'), (b'Agree', b'Agree'), (b'Neutral', b'Neutral'), (b'Disagree', b'Disagree'), (b'StronglyDisagree', b'Strongly Disagree'), (b'Noidea', b'No idea')])), + ('ask_student_to_use', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'StronglyAgree', b'Strongly Agree'), (b'Agree', b'Agree'), (b'Neutral', b'Neutral'), (b'Disagree', b'Disagree'), (b'StronglyDisagree', b'Strongly Disagree'), (b'Noidea', b'No idea')])), + ('possible_to_use_therotical', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'StronglyAgree', b'Strongly Agree'), (b'Agree', b'Agree'), (b'Neutral', b'Neutral'), (b'Disagree', b'Disagree'), (b'StronglyDisagree', b'Strongly Disagree'), (b'Noidea', b'No idea')])), + ('not_self_explanatory', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'StronglyAgree', b'Strongly Agree'), (b'Agree', b'Agree'), (b'Neutral', b'Neutral'), (b'Disagree', b'Disagree'), (b'StronglyDisagree', b'Strongly Disagree'), (b'Noidea', b'No idea')])), + ('logical_sequence', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'StronglyAgree', b'Strongly Agree'), (b'Agree', b'Agree'), (b'Neutral', b'Neutral'), (b'Disagree', b'Disagree'), (b'StronglyDisagree', b'Strongly Disagree'), (b'Noidea', b'No idea')])), + ('examples_help', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'StronglyAgree', b'Strongly Agree'), (b'Agree', b'Agree'), (b'Neutral', b'Neutral'), (b'Disagree', b'Disagree'), (b'StronglyDisagree', b'Strongly Disagree'), (b'Noidea', b'No idea')])), + ('other_language', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'StronglyAgree', b'Strongly Agree'), (b'Agree', b'Agree'), (b'Neutral', b'Neutral'), (b'Disagree', b'Disagree'), (b'StronglyDisagree', b'Strongly Disagree'), (b'Noidea', b'No idea')])), + ('instructions_easy_to_follow', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'StronglyAgree', b'Strongly Agree'), (b'Agree', b'Agree'), (b'Neutral', b'Neutral'), (b'Disagree', b'Disagree'), (b'StronglyDisagree', b'Strongly Disagree'), (b'Noidea', b'No idea')])), + ('language_complicated', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'StronglyAgree', b'Strongly Agree'), (b'Agree', b'Agree'), (b'Neutral', b'Neutral'), (b'Disagree', b'Disagree'), (b'StronglyDisagree', b'Strongly Disagree'), (b'Noidea', b'No idea')])), + ('acquired_knowledge', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'StronglyAgree', b'Strongly Agree'), (b'Agree', b'Agree'), (b'Neutral', b'Neutral'), (b'Disagree', b'Disagree'), (b'StronglyDisagree', b'Strongly Disagree'), (b'Noidea', b'No idea')])), + ('suff_instruction_by_prof', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'StronglyAgree', b'Strongly Agree'), (b'Agree', b'Agree'), (b'Neutral', b'Neutral'), (b'Disagree', b'Disagree'), (b'StronglyDisagree', b'Strongly Disagree'), (b'Noidea', b'No idea')])), + ('suff_instruction_by_staff', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'StronglyAgree', b'Strongly Agree'), (b'Agree', b'Agree'), (b'Neutral', b'Neutral'), (b'Disagree', b'Disagree'), (b'StronglyDisagree', b'Strongly Disagree'), (b'Noidea', b'No idea')])), + ('method_easy', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'StronglyAgree', b'Strongly Agree'), (b'Agree', b'Agree'), (b'Neutral', b'Neutral'), (b'Disagree', b'Disagree'), (b'StronglyDisagree', b'Strongly Disagree'), (b'Noidea', b'No idea')])), + ('desired_objective', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'StronglyAgree', b'Strongly Agree'), (b'Agree', b'Agree'), (b'Neutral', b'Neutral'), (b'Disagree', b'Disagree'), (b'StronglyDisagree', b'Strongly Disagree'), (b'Noidea', b'No idea')])), + ('recommend', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'StronglyAgree', b'Strongly Agree'), (b'Agree', b'Agree'), (b'Neutral', b'Neutral'), (b'Disagree', b'Disagree'), (b'StronglyDisagree', b'Strongly Disagree'), (b'Noidea', b'No idea')])), + ('like_to_part', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'StronglyAgree', b'Strongly Agree'), (b'Agree', b'Agree'), (b'Neutral', b'Neutral'), (b'Disagree', b'Disagree'), (b'StronglyDisagree', b'Strongly Disagree'), (b'Noidea', b'No idea')])), + ('learn_other_side_by_side', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'StronglyAgree', b'Strongly Agree'), (b'Agree', b'Agree'), (b'Neutral', b'Neutral'), (b'Disagree', b'Disagree'), (b'StronglyDisagree', b'Strongly Disagree'), (b'Noidea', b'No idea')])), + ('referred_forums', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'StronglyAgree', b'Strongly Agree'), (b'Agree', b'Agree'), (b'Neutral', b'Neutral'), (b'Disagree', b'Disagree'), (b'StronglyDisagree', b'Strongly Disagree'), (b'Noidea', b'No idea')])), + ('referred_forums_after', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'StronglyAgree', b'Strongly Agree'), (b'Agree', b'Agree'), (b'Neutral', b'Neutral'), (b'Disagree', b'Disagree'), (b'StronglyDisagree', b'Strongly Disagree'), (b'Noidea', b'No idea')])), + ('asked_ques_forums', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'StronglyAgree', b'Strongly Agree'), (b'Agree', b'Agree'), (b'Neutral', b'Neutral'), (b'Disagree', b'Disagree'), (b'StronglyDisagree', b'Strongly Disagree'), (b'Noidea', b'No idea')])), + ('not_answer_doubts', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'StronglyAgree', b'Strongly Agree'), (b'Agree', b'Agree'), (b'Neutral', b'Neutral'), (b'Disagree', b'Disagree'), (b'StronglyDisagree', b'Strongly Disagree'), (b'Noidea', b'No idea')])), + ('forum_helpful', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'StronglyAgree', b'Strongly Agree'), (b'Agree', b'Agree'), (b'Neutral', b'Neutral'), (b'Disagree', b'Disagree'), (b'StronglyDisagree', b'Strongly Disagree'), (b'Noidea', b'No idea')])), + ('doubts_solved_fast', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'StronglyAgree', b'Strongly Agree'), (b'Agree', b'Agree'), (b'Neutral', b'Neutral'), (b'Disagree', b'Disagree'), (b'StronglyDisagree', b'Strongly Disagree'), (b'Noidea', b'No idea')])), + ('need_not_post', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'StronglyAgree', b'Strongly Agree'), (b'Agree', b'Agree'), (b'Neutral', b'Neutral'), (b'Disagree', b'Disagree'), (b'StronglyDisagree', b'Strongly Disagree'), (b'Noidea', b'No idea')])), + ('faster_on_forums', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'StronglyAgree', b'Strongly Agree'), (b'Agree', b'Agree'), (b'Neutral', b'Neutral'), (b'Disagree', b'Disagree'), (b'StronglyDisagree', b'Strongly Disagree'), (b'Noidea', b'No idea')])), + ('not_have_to_wait', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'StronglyAgree', b'Strongly Agree'), (b'Agree', b'Agree'), (b'Neutral', b'Neutral'), (b'Disagree', b'Disagree'), (b'StronglyDisagree', b'Strongly Disagree'), (b'Noidea', b'No idea')])), + ('not_like_method_forums', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'StronglyAgree', b'Strongly Agree'), (b'Agree', b'Agree'), (b'Neutral', b'Neutral'), (b'Disagree', b'Disagree'), (b'StronglyDisagree', b'Strongly Disagree'), (b'Noidea', b'No idea')])), + ('helpful_pre_ans_ques', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'StronglyAgree', b'Strongly Agree'), (b'Agree', b'Agree'), (b'Neutral', b'Neutral'), (b'Disagree', b'Disagree'), (b'StronglyDisagree', b'Strongly Disagree'), (b'Noidea', b'No idea')])), + ('not_like_reveal_identity', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'StronglyAgree', b'Strongly Agree'), (b'Agree', b'Agree'), (b'Neutral', b'Neutral'), (b'Disagree', b'Disagree'), (b'StronglyDisagree', b'Strongly Disagree'), (b'Noidea', b'No idea')])), + ('forum_motivated', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'StronglyAgree', b'Strongly Agree'), (b'Agree', b'Agree'), (b'Neutral', b'Neutral'), (b'Disagree', b'Disagree'), (b'StronglyDisagree', b'Strongly Disagree'), (b'Noidea', b'No idea')])), + ('per_asked_ques_before_tuts', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'StronglyAgree', b'Strongly Agree'), (b'Agree', b'Agree'), (b'Neutral', b'Neutral'), (b'Disagree', b'Disagree'), (b'StronglyDisagree', b'Strongly Disagree'), (b'Noidea', b'No idea')])), + ('content_management', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'Notconfidentatall', b'Not confident at all'), (b'Unconfident', b'Unconfident'), (b'Neitherconfidentnorunconfident', b'Neither confident nor unconfident'), (b'Confident', b'Confident'), (b'Absolutelyconfident', b'Absolutely confident'), (b'NotApplicable', b'Not Applicable')])), + ('configuration_management', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'Notconfidentatall', b'Not confident at all'), (b'Unconfident', b'Unconfident'), (b'Neitherconfidentnorunconfident', b'Neither confident nor unconfident'), (b'Confident', b'Confident'), (b'Absolutelyconfident', b'Absolutely confident'), (b'NotApplicable', b'Not Applicable')])), + ('creating_basic_content', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'Notconfidentatall', b'Not confident at all'), (b'Unconfident', b'Unconfident'), (b'Neitherconfidentnorunconfident', b'Neither confident nor unconfident'), (b'Confident', b'Confident'), (b'Absolutelyconfident', b'Absolutely confident'), (b'NotApplicable', b'Not Applicable')])), + ('edit_existing_content', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'Notconfidentatall', b'Not confident at all'), (b'Unconfident', b'Unconfident'), (b'Neitherconfidentnorunconfident', b'Neither confident nor unconfident'), (b'Confident', b'Confident'), (b'Absolutelyconfident', b'Absolutely confident'), (b'NotApplicable', b'Not Applicable')])), + ('create_new_content', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'Notconfidentatall', b'Not confident at all'), (b'Unconfident', b'Unconfident'), (b'Neitherconfidentnorunconfident', b'Neither confident nor unconfident'), (b'Confident', b'Confident'), (b'Absolutelyconfident', b'Absolutely confident'), (b'NotApplicable', b'Not Applicable')])), + ('grp_entity_ref', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'Notconfidentatall', b'Not confident at all'), (b'Unconfident', b'Unconfident'), (b'Neitherconfidentnorunconfident', b'Neither confident nor unconfident'), (b'Confident', b'Confident'), (b'Absolutelyconfident', b'Absolutely confident'), (b'NotApplicable', b'Not Applicable')])), + ('taxonomy', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'Notconfidentatall', b'Not confident at all'), (b'Unconfident', b'Unconfident'), (b'Neitherconfidentnorunconfident', b'Neither confident nor unconfident'), (b'Confident', b'Confident'), (b'Absolutelyconfident', b'Absolutely confident'), (b'NotApplicable', b'Not Applicable')])), + ('managing_content', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'Notconfidentatall', b'Not confident at all'), (b'Unconfident', b'Unconfident'), (b'Neitherconfidentnorunconfident', b'Neither confident nor unconfident'), (b'Confident', b'Confident'), (b'Absolutelyconfident', b'Absolutely confident'), (b'NotApplicable', b'Not Applicable')])), + ('creating_dummy_content', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'Notconfidentatall', b'Not confident at all'), (b'Unconfident', b'Unconfident'), (b'Neitherconfidentnorunconfident', b'Neither confident nor unconfident'), (b'Confident', b'Confident'), (b'Absolutelyconfident', b'Absolutely confident'), (b'NotApplicable', b'Not Applicable')])), + ('modify_display_content', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'Notconfidentatall', b'Not confident at all'), (b'Unconfident', b'Unconfident'), (b'Neitherconfidentnorunconfident', b'Neither confident nor unconfident'), (b'Confident', b'Confident'), (b'Absolutelyconfident', b'Absolutely confident'), (b'NotApplicable', b'Not Applicable')])), + ('contents_using_view', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'Notconfidentatall', b'Not confident at all'), (b'Unconfident', b'Unconfident'), (b'Neitherconfidentnorunconfident', b'Neither confident nor unconfident'), (b'Confident', b'Confident'), (b'Absolutelyconfident', b'Absolutely confident'), (b'NotApplicable', b'Not Applicable')])), + ('table_of_fields_with_views', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'Notconfidentatall', b'Not confident at all'), (b'Unconfident', b'Unconfident'), (b'Neitherconfidentnorunconfident', b'Neither confident nor unconfident'), (b'Confident', b'Confident'), (b'Absolutelyconfident', b'Absolutely confident'), (b'NotApplicable', b'Not Applicable')])), + ('control_display_images', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'Notconfidentatall', b'Not confident at all'), (b'Unconfident', b'Unconfident'), (b'Neitherconfidentnorunconfident', b'Neither confident nor unconfident'), (b'Confident', b'Confident'), (b'Absolutelyconfident', b'Absolutely confident'), (b'NotApplicable', b'Not Applicable')])), + ('adding_func', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'Notconfidentatall', b'Not confident at all'), (b'Unconfident', b'Unconfident'), (b'Neitherconfidentnorunconfident', b'Neither confident nor unconfident'), (b'Confident', b'Confident'), (b'Absolutelyconfident', b'Absolutely confident'), (b'NotApplicable', b'Not Applicable')])), + ('finding_modules', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'Notconfidentatall', b'Not confident at all'), (b'Unconfident', b'Unconfident'), (b'Neitherconfidentnorunconfident', b'Neither confident nor unconfident'), (b'Confident', b'Confident'), (b'Absolutelyconfident', b'Absolutely confident'), (b'NotApplicable', b'Not Applicable')])), + ('modifying_page_layout', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'Notconfidentatall', b'Not confident at all'), (b'Unconfident', b'Unconfident'), (b'Neitherconfidentnorunconfident', b'Neither confident nor unconfident'), (b'Confident', b'Confident'), (b'Absolutelyconfident', b'Absolutely confident'), (b'NotApplicable', b'Not Applicable')])), + ('menu_endpoints', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'Notconfidentatall', b'Not confident at all'), (b'Unconfident', b'Unconfident'), (b'Neitherconfidentnorunconfident', b'Neither confident nor unconfident'), (b'Confident', b'Confident'), (b'Absolutelyconfident', b'Absolutely confident'), (b'NotApplicable', b'Not Applicable')])), + ('styling_using_themes', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'Notconfidentatall', b'Not confident at all'), (b'Unconfident', b'Unconfident'), (b'Neitherconfidentnorunconfident', b'Neither confident nor unconfident'), (b'Confident', b'Confident'), (b'Absolutelyconfident', b'Absolutely confident'), (b'NotApplicable', b'Not Applicable')])), + ('installig_ad_themes', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'Notconfidentatall', b'Not confident at all'), (b'Unconfident', b'Unconfident'), (b'Neitherconfidentnorunconfident', b'Neither confident nor unconfident'), (b'Confident', b'Confident'), (b'Absolutelyconfident', b'Absolutely confident'), (b'NotApplicable', b'Not Applicable')])), + ('people_management', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'Notconfidentatall', b'Not confident at all'), (b'Unconfident', b'Unconfident'), (b'Neitherconfidentnorunconfident', b'Neither confident nor unconfident'), (b'Confident', b'Confident'), (b'Absolutelyconfident', b'Absolutely confident'), (b'NotApplicable', b'Not Applicable')])), + ('site_management', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'Notconfidentatall', b'Not confident at all'), (b'Unconfident', b'Unconfident'), (b'Neitherconfidentnorunconfident', b'Neither confident nor unconfident'), (b'Confident', b'Confident'), (b'Absolutelyconfident', b'Absolutely confident'), (b'NotApplicable', b'Not Applicable')])), + ('ws_quality', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'Excellent', b'Excellent'), (b'Good', b'Good'), (b'Fair', b'Fair'), (b'Bad', b'Bad'), (b'Extremelybad', b'Extremely bad')])), + ('relevance', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'Excellent', b'Excellent'), (b'Good', b'Good'), (b'Fair', b'Fair'), (b'Bad', b'Bad'), (b'Extremelybad', b'Extremely bad')])), + ('guidelines', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'Excellent', b'Excellent'), (b'Good', b'Good'), (b'Fair', b'Fair'), (b'Bad', b'Bad'), (b'Extremelybad', b'Extremely bad')])), + ('overall_video_quality', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'Excellent', b'Excellent'), (b'Good', b'Good'), (b'Fair', b'Fair'), (b'Bad', b'Bad'), (b'Extremelybad', b'Extremely bad')])), + ('text_readability', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'Excellent', b'Excellent'), (b'Good', b'Good'), (b'Fair', b'Fair'), (b'Bad', b'Bad'), (b'Extremelybad', b'Extremely bad')])), + ('clarity_of_speech', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'Excellent', b'Excellent'), (b'Good', b'Good'), (b'Fair', b'Fair'), (b'Bad', b'Bad'), (b'Extremelybad', b'Extremely bad')])), + ('visual_presentation', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'Excellent', b'Excellent'), (b'Good', b'Good'), (b'Fair', b'Fair'), (b'Bad', b'Bad'), (b'Extremelybad', b'Extremely bad')])), + ('pace_of_tutorial', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'Excellent', b'Excellent'), (b'Good', b'Good'), (b'Fair', b'Fair'), (b'Bad', b'Bad'), (b'Extremelybad', b'Extremely bad')])), + ('arrangement', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'Excellent', b'Excellent'), (b'Good', b'Good'), (b'Fair', b'Fair'), (b'Bad', b'Bad'), (b'Extremelybad', b'Extremely bad')])), + ('network', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'Excellent', b'Excellent'), (b'Good', b'Good'), (b'Fair', b'Fair'), (b'Bad', b'Bad'), (b'Extremelybad', b'Extremely bad')])), + ('installation_help', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'Excellent', b'Excellent'), (b'Good', b'Good'), (b'Fair', b'Fair'), (b'Bad', b'Bad'), (b'Extremelybad', b'Extremely bad')])), + ('time_for_handson', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'Excellent', b'Excellent'), (b'Good', b'Good'), (b'Fair', b'Fair'), (b'Bad', b'Bad'), (b'Extremelybad', b'Extremely bad')])), + ('experience_of_learning', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'Excellent', b'Excellent'), (b'Good', b'Good'), (b'Fair', b'Fair'), (b'Bad', b'Bad'), (b'Extremelybad', b'Extremely bad')])), + ('overall_arrangement', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'Excellent', b'Excellent'), (b'Good', b'Good'), (b'Fair', b'Fair'), (b'Bad', b'Bad'), (b'Extremelybad', b'Extremely bad')])), + ('like_to_create_st', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'Yes', b'Yes'), (b'No', b'No')])), + ('like_to_create_st_details', models.CharField(max_length=300)), + ('num_of_experts_req', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'1to10', b'1 to 10'), (b'11to20', b'11 to 20'), (b'21to30', b'21 to 30'), (b'31to40', b'31 to 40'), (b'above40', b'Above 40')])), + ('fees', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'below250', b'Below Rs.250/-'), (b'between251to500', b'Between Rs.251 to Rs.500/-'), (b'between501to1000', b'Between Rs.501 to Rs.1000/-'), (b'between1001to2000', b'Between Rs.1001 to Rs.2000/-'), (b'above2000', b'Above Rs. 2000/-')])), + ('like_abt_ws', models.CharField(max_length=500)), + ('how_make_better', models.CharField(max_length=500)), + ('experience', models.CharField(max_length=500)), + ('suggestions', models.CharField(max_length=500)), + ('user', models.ForeignKey(to=settings.AUTH_USER_MODEL)), + ], + ), + migrations.CreateModel( + name='STWorkshopFeedbackPre', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('email', models.EmailField(max_length=100)), + ('gender', models.CharField(max_length=10, choices=[(b'', b'-----'), (b'Male', b'Male'), (b'Female', b'Female')])), + ('age', models.CharField(max_length=20)), + ('content_management', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'Notconfidentatall', b'Not confident at all'), (b'Unconfident', b'Unconfident'), (b'Neitherconfidentnorunconfident', b'Neither confident nor unconfident'), (b'Confident', b'Confident'), (b'Absolutelyconfident', b'Absolutely confident'), (b'NotApplicable', b'Not Applicable')])), + ('configuration_management', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'Notconfidentatall', b'Not confident at all'), (b'Unconfident', b'Unconfident'), (b'Neitherconfidentnorunconfident', b'Neither confident nor unconfident'), (b'Confident', b'Confident'), (b'Absolutelyconfident', b'Absolutely confident'), (b'NotApplicable', b'Not Applicable')])), + ('creating_basic_content', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'Notconfidentatall', b'Not confident at all'), (b'Unconfident', b'Unconfident'), (b'Neitherconfidentnorunconfident', b'Neither confident nor unconfident'), (b'Confident', b'Confident'), (b'Absolutelyconfident', b'Absolutely confident'), (b'NotApplicable', b'Not Applicable')])), + ('edit_existing_content', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'Notconfidentatall', b'Not confident at all'), (b'Unconfident', b'Unconfident'), (b'Neitherconfidentnorunconfident', b'Neither confident nor unconfident'), (b'Confident', b'Confident'), (b'Absolutelyconfident', b'Absolutely confident'), (b'NotApplicable', b'Not Applicable')])), + ('create_new_content', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'Notconfidentatall', b'Not confident at all'), (b'Unconfident', b'Unconfident'), (b'Neitherconfidentnorunconfident', b'Neither confident nor unconfident'), (b'Confident', b'Confident'), (b'Absolutelyconfident', b'Absolutely confident'), (b'NotApplicable', b'Not Applicable')])), + ('grp_entity_ref', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'Notconfidentatall', b'Not confident at all'), (b'Unconfident', b'Unconfident'), (b'Neitherconfidentnorunconfident', b'Neither confident nor unconfident'), (b'Confident', b'Confident'), (b'Absolutelyconfident', b'Absolutely confident'), (b'NotApplicable', b'Not Applicable')])), + ('taxonomy', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'Notconfidentatall', b'Not confident at all'), (b'Unconfident', b'Unconfident'), (b'Neitherconfidentnorunconfident', b'Neither confident nor unconfident'), (b'Confident', b'Confident'), (b'Absolutelyconfident', b'Absolutely confident'), (b'NotApplicable', b'Not Applicable')])), + ('managing_content', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'Notconfidentatall', b'Not confident at all'), (b'Unconfident', b'Unconfident'), (b'Neitherconfidentnorunconfident', b'Neither confident nor unconfident'), (b'Confident', b'Confident'), (b'Absolutelyconfident', b'Absolutely confident'), (b'NotApplicable', b'Not Applicable')])), + ('creating_dummy_content', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'Notconfidentatall', b'Not confident at all'), (b'Unconfident', b'Unconfident'), (b'Neitherconfidentnorunconfident', b'Neither confident nor unconfident'), (b'Confident', b'Confident'), (b'Absolutelyconfident', b'Absolutely confident'), (b'NotApplicable', b'Not Applicable')])), + ('modify_display_content', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'Notconfidentatall', b'Not confident at all'), (b'Unconfident', b'Unconfident'), (b'Neitherconfidentnorunconfident', b'Neither confident nor unconfident'), (b'Confident', b'Confident'), (b'Absolutelyconfident', b'Absolutely confident'), (b'NotApplicable', b'Not Applicable')])), + ('contents_using_view', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'Notconfidentatall', b'Not confident at all'), (b'Unconfident', b'Unconfident'), (b'Neitherconfidentnorunconfident', b'Neither confident nor unconfident'), (b'Confident', b'Confident'), (b'Absolutelyconfident', b'Absolutely confident'), (b'NotApplicable', b'Not Applicable')])), + ('table_of_fields_with_views', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'Notconfidentatall', b'Not confident at all'), (b'Unconfident', b'Unconfident'), (b'Neitherconfidentnorunconfident', b'Neither confident nor unconfident'), (b'Confident', b'Confident'), (b'Absolutelyconfident', b'Absolutely confident'), (b'NotApplicable', b'Not Applicable')])), + ('control_display_images', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'Notconfidentatall', b'Not confident at all'), (b'Unconfident', b'Unconfident'), (b'Neitherconfidentnorunconfident', b'Neither confident nor unconfident'), (b'Confident', b'Confident'), (b'Absolutelyconfident', b'Absolutely confident'), (b'NotApplicable', b'Not Applicable')])), + ('adding_func', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'Notconfidentatall', b'Not confident at all'), (b'Unconfident', b'Unconfident'), (b'Neitherconfidentnorunconfident', b'Neither confident nor unconfident'), (b'Confident', b'Confident'), (b'Absolutelyconfident', b'Absolutely confident'), (b'NotApplicable', b'Not Applicable')])), + ('finding_modules', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'Notconfidentatall', b'Not confident at all'), (b'Unconfident', b'Unconfident'), (b'Neitherconfidentnorunconfident', b'Neither confident nor unconfident'), (b'Confident', b'Confident'), (b'Absolutelyconfident', b'Absolutely confident'), (b'NotApplicable', b'Not Applicable')])), + ('modifying_page_layout', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'Notconfidentatall', b'Not confident at all'), (b'Unconfident', b'Unconfident'), (b'Neitherconfidentnorunconfident', b'Neither confident nor unconfident'), (b'Confident', b'Confident'), (b'Absolutelyconfident', b'Absolutely confident'), (b'NotApplicable', b'Not Applicable')])), + ('menu_endpoints', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'Notconfidentatall', b'Not confident at all'), (b'Unconfident', b'Unconfident'), (b'Neitherconfidentnorunconfident', b'Neither confident nor unconfident'), (b'Confident', b'Confident'), (b'Absolutelyconfident', b'Absolutely confident'), (b'NotApplicable', b'Not Applicable')])), + ('styling_using_themes', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'Notconfidentatall', b'Not confident at all'), (b'Unconfident', b'Unconfident'), (b'Neitherconfidentnorunconfident', b'Neither confident nor unconfident'), (b'Confident', b'Confident'), (b'Absolutelyconfident', b'Absolutely confident'), (b'NotApplicable', b'Not Applicable')])), + ('installig_ad_themes', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'Notconfidentatall', b'Not confident at all'), (b'Unconfident', b'Unconfident'), (b'Neitherconfidentnorunconfident', b'Neither confident nor unconfident'), (b'Confident', b'Confident'), (b'Absolutelyconfident', b'Absolutely confident'), (b'NotApplicable', b'Not Applicable')])), + ('people_management', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'Notconfidentatall', b'Not confident at all'), (b'Unconfident', b'Unconfident'), (b'Neitherconfidentnorunconfident', b'Neither confident nor unconfident'), (b'Confident', b'Confident'), (b'Absolutelyconfident', b'Absolutely confident'), (b'NotApplicable', b'Not Applicable')])), + ('site_management', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'Notconfidentatall', b'Not confident at all'), (b'Unconfident', b'Unconfident'), (b'Neitherconfidentnorunconfident', b'Neither confident nor unconfident'), (b'Confident', b'Confident'), (b'Absolutelyconfident', b'Absolutely confident'), (b'NotApplicable', b'Not Applicable')])), + ('user', models.ForeignKey(to=settings.AUTH_USER_MODEL)), + ], + ), + ] diff --git a/events/events/migrations/0016_learndrupalfeedback.py b/events/events/migrations/0016_learndrupalfeedback.py new file mode 100644 index 000000000..bb8812caa --- /dev/null +++ b/events/events/migrations/0016_learndrupalfeedback.py @@ -0,0 +1,41 @@ +# -*- coding: utf-8 -*- + + +from django.db import models, migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('events', '0015_stworkshopfeedback_stworkshopfeedbackpost_stworkshopfeedbackpre'), + ] + + operations = [ + migrations.CreateModel( + name='LearnDrupalFeedback', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('name', models.CharField(max_length=100)), + ('phonemob', models.CharField(max_length=100)), + ('email', models.EmailField(max_length=100)), + ('affiliation', models.CharField(max_length=100)), + ('place', models.CharField(max_length=100)), + ('agegroup', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'below25', b'below 25'), (b'25to34', b'25 to 34'), (b'35to44', b'35 to 44'), (b'45to54', b'45 to 54'), (b'55to64', b'55 to 64'), (b'65andabove', b'65 and above')])), + ('currentstatus', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'Student', b'Student'), (b'Individuallearner', b'Individual learner'), (b'Workingprofessional', b'Working professional'), (b'Teacher', b'Teacher'), (b'Administrator', b'Administrator'), (b'Others', b'Others')])), + ('currentstatus_other', models.CharField(max_length=50)), + ('is_drupal_in_curriculum', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'Yes', b'Yes'), (b'No', b'No'), (b'NotApplicable ', b'Not Applicable ')])), + ('need_help_in_organizing', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'Yes', b'Yes'), (b'No', b'No'), (b'NotApplicable ', b'Not Applicable ')])), + ('when_plan_to_conduct', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'within3months', b'within 3 months'), (b'within6months', b'within 6 months'), (b'within1year', b'within 1 year'), (b'notyetplanned', b'not yet planned')])), + ('language', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'Hindi', b'Hindi'), (b'English', b'English'), (b'Marathi', b'Marathi'), (b'Urdu', b'Urdu'), (b'Kannanda', b'Kannanda'), (b'Bangali', b'Bangali'), (b'Malyalum', b'Malyalum'), (b'Tamil', b'Tamil'), (b'Telugu', b'Telugu'), (b'Oriya', b'Oriya'), (b'Assamese', b'Assamese'), (b'Gujrati', b'Gujrati')])), + ('did_undergo_st_training', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'Yes', b'Yes'), (b'No', b'No'), (b'NotApplicable ', b'Not Applicable ')])), + ('rate_spoken', models.CharField(max_length=20)), + ('useful_for_placement', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'Yes', b'Yes'), (b'No', b'No'), (b'NotApplicable ', b'Not Applicable ')])), + ('useful_for_placement_for_students', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'Yes', b'Yes'), (b'No', b'No'), (b'NotApplicable ', b'Not Applicable ')])), + ('feedback', models.CharField(max_length=500)), + ('like_to_learn_other_foss', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'Yes', b'Yes'), (b'No', b'No')])), + ('mention_foss', models.CharField(max_length=100)), + ('like_to_give_testimonial', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'Yes', b'Yes'), (b'No', b'No')])), + ('testimonial', models.CharField(max_length=100)), + ], + ), + ] diff --git a/events/events/migrations/0017_trainingrequest_course_type.py b/events/events/migrations/0017_trainingrequest_course_type.py new file mode 100644 index 000000000..b322cf772 --- /dev/null +++ b/events/events/migrations/0017_trainingrequest_course_type.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- + + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('events', '0016_learndrupalfeedback'), + ] + + operations = [ + migrations.AddField( + model_name='trainingrequest', + name='course_type', + field=models.PositiveIntegerField(default=None), + ), + ] diff --git a/events/events/migrations/0018_auto_20170615_1654.py b/events/events/migrations/0018_auto_20170615_1654.py new file mode 100644 index 000000000..03853e50d --- /dev/null +++ b/events/events/migrations/0018_auto_20170615_1654.py @@ -0,0 +1,86 @@ +# -*- coding: utf-8 -*- + + +from django.db import models, migrations +import datetime +from django.utils.timezone import utc + + +class Migration(migrations.Migration): + + dependencies = [ + ('creation', '0008_auto_20170605_1302'), + ('events', '0017_trainingrequest_course_type'), + ] + + operations = [ + migrations.RenameField( + model_name='stworkshopfeedback', + old_name='confident', + new_name='forum_helpful', + ), + migrations.RenameField( + model_name='stworkshopfeedback', + old_name='name1', + new_name='name', + ), + migrations.RenameField( + model_name='stworkshopfeedback', + old_name='other_language', + new_name='not_like_method_forums', + ), + migrations.RemoveField( + model_name='stworkshopfeedback', + name='arrangement', + ), + migrations.RemoveField( + model_name='stworkshopfeedback', + name='installation_difficulties', + ), + migrations.RemoveField( + model_name='stworkshopfeedback', + name='installation_help', + ), + migrations.RemoveField( + model_name='stworkshopfeedback', + name='installed', + ), + migrations.RemoveField( + model_name='stworkshopfeedback', + name='interaction_using_forum', + ), + migrations.RemoveField( + model_name='stworkshopfeedback', + name='network', + ), + migrations.AddField( + model_name='stworkshopfeedback', + name='created', + field=models.DateTimeField(default=datetime.datetime(2017, 6, 15, 11, 22, 17, 188664, tzinfo=utc), auto_now_add=True), + preserve_default=False, + ), + migrations.AddField( + model_name='stworkshopfeedback', + name='foss', + field=models.ForeignKey(default=22, to='creation.FossCategory'), + preserve_default=False, + ), + migrations.AddField( + model_name='stworkshopfeedback', + name='owing_to_forums', + field=models.CharField(default=1, max_length=50, choices=[(b'', b'-----'), (b'StronglyAgree', b'Strongly Agree'), (b'Agree', b'Agree'), (b'Neutral', b'Neutral'), (b'Disagree', b'Disagree'), (b'StronglyDisagree', b'Strongly Disagree'), (b'Noidea', b'No idea')]), + preserve_default=False, + ), + migrations.AddField( + model_name='stworkshopfeedback', + name='venue', + field=models.CharField(default=0, max_length=100), + preserve_default=False, + ), + migrations.AddField( + model_name='stworkshopfeedback', + name='workshop_date', + field=models.DateField(default=datetime.datetime(2017, 6, 15, 11, 24, 8, 676738, tzinfo=utc)), + preserve_default=False, + ), + ] diff --git a/events/events/migrations/0019_auto_20170619_1515.py b/events/events/migrations/0019_auto_20170619_1515.py new file mode 100644 index 000000000..c2bdbc07f --- /dev/null +++ b/events/events/migrations/0019_auto_20170619_1515.py @@ -0,0 +1,152 @@ +# -*- coding: utf-8 -*- + + +from django.db import models, migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('events', '0018_auto_20170615_1654'), + ] + + operations = [ + migrations.AddField( + model_name='stworkshopfeedback', + name='content_any_comment', + field=models.CharField(default=None, max_length=100), + preserve_default=False, + ), + migrations.AddField( + model_name='stworkshopfeedback', + name='learning_any_comment', + field=models.CharField(default=None, max_length=100), + preserve_default=False, + ), + migrations.AddField( + model_name='stworkshopfeedback', + name='training_any_comment', + field=models.CharField(default=None, max_length=100), + preserve_default=False, + ), + migrations.AlterField( + model_name='stworkshopfeedback', + name='acquired_knowledge', + field=models.CharField(max_length=50, choices=[(b'', b'-----'), (b'StronglyAgree', b'Strongly Agree'), (b'Agree', b'Agree'), (b'Neutral', b'Neutral'), (b'Disagree', b'Disagree'), (b'StronglyDisagree', b'Strongly Disagree')]), + ), + migrations.AlterField( + model_name='stworkshopfeedback', + name='desired_objective', + field=models.CharField(max_length=50, choices=[(b'', b'-----'), (b'StronglyAgree', b'Strongly Agree'), (b'Agree', b'Agree'), (b'Neutral', b'Neutral'), (b'Disagree', b'Disagree'), (b'StronglyDisagree', b'Strongly Disagree')]), + ), + migrations.AlterField( + model_name='stworkshopfeedback', + name='diff_instruction', + field=models.CharField(max_length=50, choices=[(b'', b'-----'), (b'StronglyAgree', b'Strongly Agree'), (b'Agree', b'Agree'), (b'Neutral', b'Neutral'), (b'Disagree', b'Disagree'), (b'StronglyDisagree', b'Strongly Disagree')]), + ), + migrations.AlterField( + model_name='stworkshopfeedback', + name='difficult_simultaneously', + field=models.CharField(max_length=50, choices=[(b'', b'-----'), (b'StronglyAgree', b'Strongly Agree'), (b'Agree', b'Agree'), (b'Neutral', b'Neutral'), (b'Disagree', b'Disagree'), (b'StronglyDisagree', b'Strongly Disagree')]), + ), + migrations.AlterField( + model_name='stworkshopfeedback', + name='examples_help', + field=models.CharField(max_length=50, choices=[(b'', b'-----'), (b'StronglyAgree', b'Strongly Agree'), (b'Agree', b'Agree'), (b'Neutral', b'Neutral'), (b'Disagree', b'Disagree'), (b'StronglyDisagree', b'Strongly Disagree')]), + ), + migrations.AlterField( + model_name='stworkshopfeedback', + name='forum_helpful', + field=models.CharField(max_length=50, choices=[(b'', b'-----'), (b'StronglyAgree', b'Strongly Agree'), (b'Agree', b'Agree'), (b'Neutral', b'Neutral'), (b'Disagree', b'Disagree'), (b'StronglyDisagree', b'Strongly Disagree')]), + ), + migrations.AlterField( + model_name='stworkshopfeedback', + name='gender', + field=models.CharField(max_length=10), + ), + migrations.AlterField( + model_name='stworkshopfeedback', + name='help_improve_performance', + field=models.CharField(max_length=50, choices=[(b'', b'-----'), (b'StronglyAgree', b'Strongly Agree'), (b'Agree', b'Agree'), (b'Neutral', b'Neutral'), (b'Disagree', b'Disagree'), (b'StronglyDisagree', b'Strongly Disagree')]), + ), + migrations.AlterField( + model_name='stworkshopfeedback', + name='instructions_easy_to_follow', + field=models.CharField(max_length=50, choices=[(b'', b'-----'), (b'StronglyAgree', b'Strongly Agree'), (b'Agree', b'Agree'), (b'Neutral', b'Neutral'), (b'Disagree', b'Disagree'), (b'StronglyDisagree', b'Strongly Disagree')]), + ), + migrations.AlterField( + model_name='stworkshopfeedback', + name='interface_comfortable', + field=models.CharField(max_length=50, choices=[(b'', b'-----'), (b'StronglyAgree', b'Strongly Agree'), (b'Agree', b'Agree'), (b'Neutral', b'Neutral'), (b'Disagree', b'Disagree'), (b'StronglyDisagree', b'Strongly Disagree')]), + ), + migrations.AlterField( + model_name='stworkshopfeedback', + name='like_to_part', + field=models.CharField(max_length=50, choices=[(b'', b'-----'), (b'StronglyAgree', b'Strongly Agree'), (b'Agree', b'Agree'), (b'Neutral', b'Neutral'), (b'Disagree', b'Disagree'), (b'StronglyDisagree', b'Strongly Disagree')]), + ), + migrations.AlterField( + model_name='stworkshopfeedback', + name='logical_sequence', + field=models.CharField(max_length=50, choices=[(b'', b'-----'), (b'StronglyAgree', b'Strongly Agree'), (b'Agree', b'Agree'), (b'Neutral', b'Neutral'), (b'Disagree', b'Disagree'), (b'StronglyDisagree', b'Strongly Disagree')]), + ), + migrations.AlterField( + model_name='stworkshopfeedback', + name='method_easy', + field=models.CharField(max_length=50, choices=[(b'', b'-----'), (b'StronglyAgree', b'Strongly Agree'), (b'Agree', b'Agree'), (b'Neutral', b'Neutral'), (b'Disagree', b'Disagree'), (b'StronglyDisagree', b'Strongly Disagree')]), + ), + migrations.AlterField( + model_name='stworkshopfeedback', + name='not_like_method_forums', + field=models.CharField(max_length=50, choices=[(b'', b'-----'), (b'StronglyAgree', b'Strongly Agree'), (b'Agree', b'Agree'), (b'Neutral', b'Neutral'), (b'Disagree', b'Disagree'), (b'StronglyDisagree', b'Strongly Disagree')]), + ), + migrations.AlterField( + model_name='stworkshopfeedback', + name='not_self_explanatory', + field=models.CharField(max_length=50, choices=[(b'', b'-----'), (b'StronglyAgree', b'Strongly Agree'), (b'Agree', b'Agree'), (b'Neutral', b'Neutral'), (b'Disagree', b'Disagree'), (b'StronglyDisagree', b'Strongly Disagree')]), + ), + migrations.AlterField( + model_name='stworkshopfeedback', + name='owing_to_forums', + field=models.CharField(max_length=50, choices=[(b'', b'-----'), (b'StronglyAgree', b'Strongly Agree'), (b'Agree', b'Agree'), (b'Neutral', b'Neutral'), (b'Disagree', b'Disagree'), (b'StronglyDisagree', b'Strongly Disagree')]), + ), + migrations.AlterField( + model_name='stworkshopfeedback', + name='plan_to_use_future', + field=models.CharField(max_length=50, choices=[(b'', b'-----'), (b'StronglyAgree', b'Strongly Agree'), (b'Agree', b'Agree'), (b'Neutral', b'Neutral'), (b'Disagree', b'Disagree'), (b'StronglyDisagree', b'Strongly Disagree')]), + ), + migrations.AlterField( + model_name='stworkshopfeedback', + name='recommend', + field=models.CharField(max_length=50, choices=[(b'', b'-----'), (b'StronglyAgree', b'Strongly Agree'), (b'Agree', b'Agree'), (b'Neutral', b'Neutral'), (b'Disagree', b'Disagree'), (b'StronglyDisagree', b'Strongly Disagree')]), + ), + migrations.AlterField( + model_name='stworkshopfeedback', + name='satisfied', + field=models.CharField(max_length=50, choices=[(b'', b'-----'), (b'StronglyAgree', b'Strongly Agree'), (b'Agree', b'Agree'), (b'Neutral', b'Neutral'), (b'Disagree', b'Disagree'), (b'StronglyDisagree', b'Strongly Disagree')]), + ), + migrations.AlterField( + model_name='stworkshopfeedback', + name='self_learning_intrest', + field=models.CharField(max_length=50, choices=[(b'', b'-----'), (b'StronglyAgree', b'Strongly Agree'), (b'Agree', b'Agree'), (b'Neutral', b'Neutral'), (b'Disagree', b'Disagree'), (b'StronglyDisagree', b'Strongly Disagree')]), + ), + migrations.AlterField( + model_name='stworkshopfeedback', + name='side_by_side_effective', + field=models.CharField(max_length=50, choices=[(b'', b'-----'), (b'StronglyAgree', b'Strongly Agree'), (b'Agree', b'Agree'), (b'Neutral', b'Neutral'), (b'Disagree', b'Disagree'), (b'StronglyDisagree', b'Strongly Disagree')]), + ), + migrations.AlterField( + model_name='stworkshopfeedback', + name='suff_instruction', + field=models.CharField(max_length=50, choices=[(b'', b'-----'), (b'StronglyAgree', b'Strongly Agree'), (b'Agree', b'Agree'), (b'Neutral', b'Neutral'), (b'Disagree', b'Disagree'), (b'StronglyDisagree', b'Strongly Disagree')]), + ), + migrations.AlterField( + model_name='stworkshopfeedback', + name='time_sufficient', + field=models.CharField(max_length=50, choices=[(b'', b'-----'), (b'StronglyAgree', b'Strongly Agree'), (b'Agree', b'Agree'), (b'Neutral', b'Neutral'), (b'Disagree', b'Disagree'), (b'StronglyDisagree', b'Strongly Disagree')]), + ), + migrations.AlterField( + model_name='stworkshopfeedback', + name='useful_learning', + field=models.CharField(max_length=50, choices=[(b'', b'-----'), (b'StronglyAgree', b'Strongly Agree'), (b'Agree', b'Agree'), (b'Neutral', b'Neutral'), (b'Disagree', b'Disagree'), (b'StronglyDisagree', b'Strongly Disagree')]), + ), + ] diff --git a/events/events/migrations/0020_inductioninterest.py b/events/events/migrations/0020_inductioninterest.py new file mode 100644 index 000000000..f745673f1 --- /dev/null +++ b/events/events/migrations/0020_inductioninterest.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- + + +from django.db import models, migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('events', '0019_auto_20170619_1515'), + ] + + operations = [ + migrations.CreateModel( + name='InductionInterest', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('email', models.EmailField(max_length=100)), + ('name', models.CharField(max_length=100)), + ('phonemob', models.CharField(max_length=20)), + ('age', models.CharField(max_length=20, choices=[(b'', b'-----'), (b'below25', b'below 25'), (b'25to34', b'25 to 34'), (b'35to44', b'35 to 44'), (b'45to54', b'45 to 54'), (b'55to64', b'55 to 64'), (b'65andabove', b'65 and above')])), + ('gender', models.CharField(max_length=10, choices=[(b'', b'-----'), (b'Male', b'Male'), (b'Female', b'Female')])), + ('mother_tongue', models.CharField(max_length=100)), + ('medium_of_studies', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'English', b'English'), (b'Other', b'Other')])), + ('other_medium', models.CharField(max_length=100)), + ('education', models.CharField(max_length=100, choices=[(b'', b'-----'), (b'3yeargraduatedegree(BABScB.Cometc)', b'3 year graduate degree (BA, BSc, B.Com, etc.)'), (b'Professionaldegree(BEBTechetc)', b'Professional degree (BE, B.Tech, etc.)'), (b'2yearMasters(MAMScMCometc)', b'2 year Masters (MA, MSc, MCom, etc.)'), (b'2yearprofessionalMasters(MEMTechMBAMPhiletc)', b'2 year professional Masters (ME, MTech, MBA, MPhil, etc.)'), (b'PhD', b'PhD'), (b'Other', b'Other')])), + ('other_education', models.CharField(max_length=100)), + ('specialisation', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'Arts', b'Arts'), (b'Science', b'Science'), (b'Commerce', b'Commerce'), (b'EngineeringorComputerScience ', b'Engineering or Computer Science'), (b'Management', b'Management'), (b'Other', b'Other')])), + ('other_specialisation', models.CharField(max_length=100)), + ('designation', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'Lecturer', b'Lecturer'), (b'AssistantProfessor', b'Assistant Professor'), (b'AssociateProfessor', b'Associate Professor'), (b'Professor', b'Professor'), (b'Other', b'Other')])), + ('other_designation', models.CharField(max_length=100)), + ('college', models.CharField(max_length=100)), + ('college_address', models.CharField(max_length=500)), + ('pincode', models.PositiveIntegerField()), + ('experience_in_college', models.CharField(max_length=20, choices=[(b'', b'-----'), (b'Lessthan1year', b'Less than 1 year'), (b'Morethan1yearbutlessthan2years', b'More than 1 year, but less than 2 years'), (b'Morethan2yearsbutlessthan5years', b'More than 2 years but less than 5 years'), (b'Morethan5years', b'More than 5 years')])), + ('bring_laptop', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'Yes', b'Yes'), (b'No', b'No')])), + ('borrow_laptop', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'Yes', b'Yes'), (b'No', b'No')])), + ('do_agree', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'Yes', b'Yes'), (b'No', b'No')])), + ('no_objection', models.CharField(max_length=50, choices=[(b'', b'-----'), (b'Yes', b'Yes'), (b'No', b'No')])), + ('other_comments', models.CharField(max_length=500)), + ('city', models.ForeignKey(to='events.City')), + ('state', models.ForeignKey(to='events.State')), + ], + ), + ] diff --git a/events/events/migrations/0021_auto_20171023_1358.py b/events/events/migrations/0021_auto_20171023_1358.py new file mode 100644 index 000000000..844824749 --- /dev/null +++ b/events/events/migrations/0021_auto_20171023_1358.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- + + +from django.db import models, migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('events', '0020_inductioninterest'), + ] + + operations = [ + migrations.AlterModelOptions( + name='inductioninterest', + options={'ordering': ('city',)}, + ), + migrations.AlterField( + model_name='inductioninterest', + name='age', + field=models.CharField(max_length=20, choices=[(b'', b'-----'), (b'20to25', b'20 to 25 years'), (b'26to30', b'26 to 30 years'), (b'31to35', b'31 to 35 years'), (b'35andabove', b'Above 35 years')]), + ), + ] diff --git a/events/events/migrations/0022_auto_20171023_1505.py b/events/events/migrations/0022_auto_20171023_1505.py new file mode 100644 index 000000000..5989969f1 --- /dev/null +++ b/events/events/migrations/0022_auto_20171023_1505.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- + + +from django.db import models, migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('events', '0021_auto_20171023_1358'), + ] + + operations = [ + migrations.AlterField( + model_name='inductioninterest', + name='age', + field=models.CharField(max_length=100, choices=[(b'', b'-----'), (b'20to25', b'20 to 25 years'), (b'26to30', b'26 to 30 years'), (b'31to35', b'31 to 35 years'), (b'35andabove', b'Above 35 years')]), + ), + migrations.AlterField( + model_name='inductioninterest', + name='designation', + field=models.CharField(max_length=100, choices=[(b'', b'-----'), (b'Lecturer', b'Lecturer'), (b'AssistantProfessor', b'Assistant Professor'), (b'AssociateProfessor', b'Associate Professor'), (b'Professor', b'Professor'), (b'Other', b'Other')]), + ), + migrations.AlterField( + model_name='inductioninterest', + name='experience_in_college', + field=models.CharField(max_length=100, choices=[(b'', b'-----'), (b'Lessthan1year', b'Less than 1 year'), (b'Morethan1yearbutlessthan2years', b'More than 1 year, but less than 2 years'), (b'Morethan2yearsbutlessthan5years', b'More than 2 years but less than 5 years'), (b'Morethan5years', b'More than 5 years')]), + ), + migrations.AlterField( + model_name='inductioninterest', + name='gender', + field=models.CharField(max_length=50, choices=[(b'', b'-----'), (b'Male', b'Male'), (b'Female', b'Female')]), + ), + migrations.AlterField( + model_name='inductioninterest', + name='medium_of_studies', + field=models.CharField(max_length=100, choices=[(b'', b'-----'), (b'English', b'English'), (b'Other', b'Other')]), + ), + migrations.AlterField( + model_name='inductioninterest', + name='phonemob', + field=models.CharField(max_length=100), + ), + migrations.AlterField( + model_name='inductioninterest', + name='specialisation', + field=models.CharField(max_length=100, choices=[(b'', b'-----'), (b'Arts', b'Arts'), (b'Science', b'Science'), (b'Commerce', b'Commerce'), (b'EngineeringorComputerScience ', b'Engineering or Computer Science'), (b'Management', b'Management'), (b'Other', b'Other')]), + ), + ] diff --git a/events/events/migrations/0023_auto_20171023_1545.py b/events/events/migrations/0023_auto_20171023_1545.py new file mode 100644 index 000000000..7d2eb0be5 --- /dev/null +++ b/events/events/migrations/0023_auto_20171023_1545.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- + + +from django.db import models, migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('events', '0022_auto_20171023_1505'), + ] + + operations = [ + migrations.AlterField( + model_name='inductioninterest', + name='do_agree', + field=models.CharField(max_length=50, choices=[(b'', b'-----'), (b'Yes', b'Yes')]), + ), + migrations.AlterField( + model_name='inductioninterest', + name='no_objection', + field=models.CharField(max_length=50, choices=[(b'', b'-----'), (b'Yes', b'Yes')]), + ), + ] diff --git a/events/events/migrations/0024_auto_20171023_1705.py b/events/events/migrations/0024_auto_20171023_1705.py new file mode 100644 index 000000000..87579843b --- /dev/null +++ b/events/events/migrations/0024_auto_20171023_1705.py @@ -0,0 +1,29 @@ +# -*- coding: utf-8 -*- + + +from django.db import models, migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('events', '0023_auto_20171023_1545'), + ] + + operations = [ + migrations.AddField( + model_name='inductioninterest', + name='other_language', + field=models.CharField(default=None, max_length=100), + ), + migrations.AlterField( + model_name='inductioninterest', + name='medium_of_studies', + field=models.CharField(max_length=100, choices=[(b'', b'-----'), (b'Assamese', b'Assamese'), (b'Bengali', b'Bengali'), (b'Bhojpuri', b'Bhojpuri'), (b'Bodo', b'Bodo'), (b'English', b'English'), (b'Gujarati', b'Gujarati'), (b'Hindi', b'Hindi'), (b'Kannada', b'Kannada'), (b'Kashmiri', b'Kashmiri'), (b'Khasi', b'Khasi'), (b'Konkani', b'Konkani'), (b'Maithili', b'Maithili'), (b'Malayalam', b'Malayalam'), (b'Manipuri', b'Manipuri'), (b'Marathi', b'Marathi'), (b'Nepali', b'Nepali'), (b'Oriya', b'Oriya'), (b'Punjabi', b'Punjabi'), (b'Rajasthani', b'Rajasthani'), (b'Sanskrit', b'Sanskrit'), (b'Santhali', b'Santhali'), (b'Sindhi', b'Sindhi'), (b'Tamil', b'Tamil'), (b'Telugu', b'Telugu'), (b'Urdu', b'Urdu'), (b'Other', b'Other')]), + ), + migrations.AlterField( + model_name='inductioninterest', + name='mother_tongue', + field=models.CharField(max_length=100, choices=[(b'', b'-----'), (b'Assamese', b'Assamese'), (b'Bengali', b'Bengali'), (b'Bhojpuri', b'Bhojpuri'), (b'Bodo', b'Bodo'), (b'English', b'English'), (b'Gujarati', b'Gujarati'), (b'Hindi', b'Hindi'), (b'Kannada', b'Kannada'), (b'Kashmiri', b'Kashmiri'), (b'Khasi', b'Khasi'), (b'Konkani', b'Konkani'), (b'Maithili', b'Maithili'), (b'Malayalam', b'Malayalam'), (b'Manipuri', b'Manipuri'), (b'Marathi', b'Marathi'), (b'Nepali', b'Nepali'), (b'Oriya', b'Oriya'), (b'Punjabi', b'Punjabi'), (b'Rajasthani', b'Rajasthani'), (b'Sanskrit', b'Sanskrit'), (b'Santhali', b'Santhali'), (b'Sindhi', b'Sindhi'), (b'Tamil', b'Tamil'), (b'Telugu', b'Telugu'), (b'Urdu', b'Urdu'), (b'Other', b'Other')]), + ), + ] diff --git a/events/events/migrations/0025_auto_20171023_1759.py b/events/events/migrations/0025_auto_20171023_1759.py new file mode 100644 index 000000000..0a580cce0 --- /dev/null +++ b/events/events/migrations/0025_auto_20171023_1759.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- + + +from django.db import models, migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('events', '0024_auto_20171023_1705'), + ] + + operations = [ + migrations.AlterField( + model_name='inductioninterest', + name='city', + field=models.CharField(max_length=100), + ), + ] diff --git a/events/events/migrations/0026_auto_20171023_1801.py b/events/events/migrations/0026_auto_20171023_1801.py new file mode 100644 index 000000000..628a5e5cc --- /dev/null +++ b/events/events/migrations/0026_auto_20171023_1801.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- + + +from django.db import models, migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('events', '0025_auto_20171023_1759'), + ] + + operations = [ + migrations.AlterField( + model_name='inductioninterest', + name='other_language', + field=models.CharField(max_length=100), + ), + ] diff --git a/events/events/migrations/0027_inductionfinallist.py b/events/events/migrations/0027_inductionfinallist.py new file mode 100644 index 000000000..23f82c634 --- /dev/null +++ b/events/events/migrations/0027_inductionfinallist.py @@ -0,0 +1,25 @@ +# -*- coding: utf-8 -*- + + +from django.db import models, migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('events', '0026_auto_20171023_1801'), + ] + + operations = [ + migrations.CreateModel( + name='InductionFinalList', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('email', models.EmailField(max_length=200)), + ('code', models.CharField(default=None, max_length=255)), + ('batch_code', models.PositiveIntegerField()), + ('created', models.DateTimeField(auto_now_add=True)), + ('eoi_id', models.ForeignKey(default=None, to='events.InductionInterest')), + ], + ), + ] diff --git a/events/events/migrations/0028_drupal2018_email.py b/events/events/migrations/0028_drupal2018_email.py new file mode 100644 index 000000000..8de64b6b9 --- /dev/null +++ b/events/events/migrations/0028_drupal2018_email.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- + + +from django.db import models, migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('events', '0027_inductionfinallist'), + ] + + operations = [ + migrations.CreateModel( + name='Drupal2018_email', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('email', models.EmailField(max_length=200)), + ], + ), + ] diff --git a/events/events/migrations/0029_mumbaistudents.py b/events/events/migrations/0029_mumbaistudents.py new file mode 100644 index 000000000..c32acdee5 --- /dev/null +++ b/events/events/migrations/0029_mumbaistudents.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- + + +from django.db import models, migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('events', '0028_drupal2018_email'), + ] + + operations = [ + migrations.CreateModel( + name='MumbaiStudents', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('bid', models.ForeignKey(to='events.StudentBatch')), + ('stuid', models.ForeignKey(to='events.Student')), + ], + ), + ] diff --git a/events/events/migrations/0030_accountexecutive.py b/events/events/migrations/0030_accountexecutive.py new file mode 100644 index 000000000..59437028f --- /dev/null +++ b/events/events/migrations/0030_accountexecutive.py @@ -0,0 +1,28 @@ +# -*- coding: utf-8 -*- + + +from django.db import models, migrations +from django.conf import settings + + +class Migration(migrations.Migration): + + dependencies = [ + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ('events', '0029_mumbaistudents'), + ] + + operations = [ + migrations.CreateModel( + name='Accountexecutive', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('status', models.PositiveSmallIntegerField(default=0)), + ('created', models.DateTimeField(auto_now_add=True)), + ('updated', models.DateTimeField(auto_now=True)), + ('academic', models.ForeignKey(blank=True, to='events.AcademicCenter', null=True)), + ('appoved_by', models.ForeignKey(related_name='accountexecutive_approved_by', blank=True, to=settings.AUTH_USER_MODEL, null=True)), + ('user', models.OneToOneField(related_name='accountexecutive', to=settings.AUTH_USER_MODEL)), + ], + ), + ] diff --git a/events/events/migrations/0031_auto_20180720_1500.py b/events/events/migrations/0031_auto_20180720_1500.py new file mode 100644 index 000000000..f979d9978 --- /dev/null +++ b/events/events/migrations/0031_auto_20180720_1500.py @@ -0,0 +1,36 @@ +# -*- coding: utf-8 -*- + + +from django.db import models, migrations +from django.conf import settings + + +class Migration(migrations.Migration): + + dependencies = [ + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ('events', '0030_accountexecutive'), + ] + + operations = [ + migrations.CreateModel( + name='PaymentDetails', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('amount', models.PositiveIntegerField()), + ('purpose', models.CharField(max_length=20, null=True)), + ('status', models.PositiveIntegerField()), + ('description', models.CharField(max_length=20, null=True)), + ('gstno', models.CharField(max_length=15, null=True)), + ('created', models.DateTimeField(auto_now_add=True)), + ('updated', models.DateTimeField(auto_now_add=True)), + ('academic_id', models.ForeignKey(to='events.AcademicCenter')), + ('user', models.ForeignKey(to=settings.AUTH_USER_MODEL)), + ('academic_year', models.PositiveIntegerField()), + ], + ), + migrations.AlterUniqueTogether( + name='paymentdetails', + unique_together=set([('academic_id','academic_year')]), + ), + ] diff --git a/events/events/migrations/0032_paymenttransactiondetails.py b/events/events/migrations/0032_paymenttransactiondetails.py new file mode 100644 index 000000000..cf927a1eb --- /dev/null +++ b/events/events/migrations/0032_paymenttransactiondetails.py @@ -0,0 +1,34 @@ +# -*- coding: utf-8 -*- + + +from django.db import models, migrations +from django.conf import settings + + +class Migration(migrations.Migration): + + dependencies = [ + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ('events', '0031_auto_20180720_1500'), + ] + + operations = [ + migrations.CreateModel( + name='PaymentTransactionDetails', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('requestType', models.CharField(max_length=2)), + ('amount', models.PositiveIntegerField()), + ('reqId', models.CharField(max_length=50)), + ('transId', models.CharField(max_length=100)), + ('refNo', models.CharField(max_length=50)), + ('provId', models.CharField(max_length=50)), + ('status', models.CharField(max_length=2)), + ('msg', models.CharField(max_length=100)), + ('created', models.DateTimeField(auto_now_add=True)), + ('updated', models.DateTimeField(auto_now_add=True)), + ('paymentdetail', models.ForeignKey(to='events.PaymentDetails')), + ('userId', models.ForeignKey(to=settings.AUTH_USER_MODEL)), + ], + ), + ] diff --git a/events/events/migrations/0033_auto_20180724_1712.py b/events/events/migrations/0033_auto_20180724_1712.py new file mode 100644 index 000000000..a2a6b574e --- /dev/null +++ b/events/events/migrations/0033_auto_20180724_1712.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- + + +from django.db import models, migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('events', '0032_paymenttransactiondetails'), + ] + + operations = [ + migrations.AlterField( + model_name='paymentdetails', + name='amount', + field=models.CharField(max_length=20), + ), + migrations.AlterField( + model_name='paymenttransactiondetails', + name='amount', + field=models.CharField(max_length=20), + ), + ] diff --git a/events/events/migrations/0034_auto_20180803_1804.py b/events/events/migrations/0034_auto_20180803_1804.py new file mode 100644 index 000000000..1e9492fcc --- /dev/null +++ b/events/events/migrations/0034_auto_20180803_1804.py @@ -0,0 +1,64 @@ +# -*- coding: utf-8 -*- + + +from django.db import models, migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('events', '0033_auto_20180724_1712'), + ] + + operations = [ + migrations.AddField( + model_name='stworkshopfeedback', + name='confident_to_apply_knowledge', + field=models.CharField(default=None, max_length=50, choices=[(b'', b'-----'), (b'StronglyAgree', b'Strongly Agree'), (b'Agree', b'Agree'), (b'Neutral', b'Neutral'), (b'Disagree', b'Disagree'), (b'StronglyDisagree', b'Strongly Disagree')]), + ), + migrations.AddField( + model_name='stworkshopfeedback', + name='designation', + field=models.CharField(default=None, max_length=100), + ), + migrations.AddField( + model_name='stworkshopfeedback', + name='difficult_instructions_in_tutorial', + field=models.CharField(default=None, max_length=50, choices=[(b'', b'-----'), (b'StronglyAgree', b'Strongly Agree'), (b'Agree', b'Agree'), (b'Neutral', b'Neutral'), (b'Disagree', b'Disagree'), (b'StronglyDisagree', b'Strongly Disagree')]), + ), + migrations.AddField( + model_name='stworkshopfeedback', + name='dont_like_self_learning_method', + field=models.CharField(default=None, max_length=50, choices=[(b'', b'-----'), (b'StronglyAgree', b'Strongly Agree'), (b'Agree', b'Agree'), (b'Neutral', b'Neutral'), (b'Disagree', b'Disagree'), (b'StronglyDisagree', b'Strongly Disagree')]), + ), + migrations.AddField( + model_name='stworkshopfeedback', + name='educational_back', + field=models.CharField(default=None, max_length=100), + ), + migrations.AddField( + model_name='stworkshopfeedback', + name='language_diff_to_understand', + field=models.CharField(default=None, max_length=50, choices=[(b'', b'-----'), (b'StronglyAgree', b'Strongly Agree'), (b'Agree', b'Agree'), (b'Neutral', b'Neutral'), (b'Disagree', b'Disagree'), (b'StronglyDisagree', b'Strongly Disagree')]), + ), + migrations.AddField( + model_name='stworkshopfeedback', + name='language_of_tutorial', + field=models.CharField(default=None, max_length=20), + ), + migrations.AddField( + model_name='stworkshopfeedback', + name='too_fast', + field=models.CharField(default=None, max_length=50, choices=[(b'', b'-----'), (b'StronglyAgree', b'Strongly Agree'), (b'Agree', b'Agree'), (b'Neutral', b'Neutral'), (b'Disagree', b'Disagree'), (b'StronglyDisagree', b'Strongly Disagree')]), + ), + migrations.AddField( + model_name='stworkshopfeedback', + name='too_slow', + field=models.CharField(default=None, max_length=50, choices=[(b'', b'-----'), (b'StronglyAgree', b'Strongly Agree'), (b'Agree', b'Agree'), (b'Neutral', b'Neutral'), (b'Disagree', b'Disagree'), (b'StronglyDisagree', b'Strongly Disagree')]), + ), + migrations.AddField( + model_name='stworkshopfeedback', + name='translate', + field=models.CharField(default=None, max_length=50, choices=[(b'', b'-----'), (b'StronglyAgree', b'Strongly Agree'), (b'Agree', b'Agree'), (b'Neutral', b'Neutral'), (b'Disagree', b'Disagree'), (b'StronglyDisagree', b'Strongly Disagree')]), + ), + ] diff --git a/events/events/migrations/0035_auto_20180806_1709.py b/events/events/migrations/0035_auto_20180806_1709.py new file mode 100644 index 000000000..817a15605 --- /dev/null +++ b/events/events/migrations/0035_auto_20180806_1709.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- + + +from django.db import models, migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('events', '0034_auto_20180803_1804'), + ] + + operations = [ + migrations.AlterField( + model_name='academiccenter', + name='status', + field=models.PositiveSmallIntegerField(), + ), + ] diff --git a/events/events/migrations/0036_auto_20180824_1241.py b/events/events/migrations/0036_auto_20180824_1241.py new file mode 100644 index 000000000..e8916c424 --- /dev/null +++ b/events/events/migrations/0036_auto_20180824_1241.py @@ -0,0 +1,35 @@ +# -*- coding: utf-8 -*- + + +from django.db import models, migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('creation', '0012_tutorialresource_publish_at'), + ('events', '0035_auto_20180806_1709'), + ] + + operations = [ + migrations.CreateModel( + name='MediaTestimonials', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('path', models.CharField(max_length=255)), + ('user', models.CharField(max_length=255)), + ('content', models.CharField(max_length=255)), + ('created', models.DateTimeField(auto_now_add=True)), + ('foss', models.ForeignKey(to='creation.FossCategory')), + ], + options={ + 'verbose_name': 'Media Testimonials', + 'verbose_name_plural': 'Media Testimonials', + }, + ), + migrations.AlterField( + model_name='testimonials', + name='created', + field=models.DateTimeField(auto_now_add=True), + ), + ] diff --git a/events/events/migrations/0037_auto_20190306_1145.py b/events/events/migrations/0037_auto_20190306_1145.py new file mode 100644 index 000000000..1804243a6 --- /dev/null +++ b/events/events/migrations/0037_auto_20190306_1145.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('events', '0036_auto_20180824_1241'), + ] + + operations = [ + migrations.AddField( + model_name='mediatestimonials', + name='workshop_details', + field=models.CharField(default=b'Workshop', max_length=255), + ), + migrations.AlterField( + model_name='mediatestimonials', + name='content', + field=models.CharField(max_length=500), + ), + ] diff --git a/events/events/migrations/0038_auto_20190531_0738.py b/events/events/migrations/0038_auto_20190531_0738.py new file mode 100644 index 000000000..30006b002 --- /dev/null +++ b/events/events/migrations/0038_auto_20190531_0738.py @@ -0,0 +1,1552 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11 on 2019-05-31 07:38 +from __future__ import unicode_literals + +from django.conf import settings +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('events', '0037_auto_20190306_1145'), + ] + + operations = [ + migrations.AlterField( + model_name='academiccenter', + name='city', + field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='events.City'), + ), + migrations.AlterField( + model_name='academiccenter', + name='district', + field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='events.District'), + ), + migrations.AlterField( + model_name='academiccenter', + name='institute_category', + field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='events.InstituteCategory'), + ), + migrations.AlterField( + model_name='academiccenter', + name='institution_type', + field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='events.InstituteType'), + ), + migrations.AlterField( + model_name='academiccenter', + name='location', + field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.PROTECT, to='events.Location'), + ), + migrations.AlterField( + model_name='academiccenter', + name='state', + field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='events.State'), + ), + migrations.AlterField( + model_name='academiccenter', + name='university', + field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='events.University'), + ), + migrations.AlterField( + model_name='academiccenter', + name='user', + field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL), + ), + migrations.AlterField( + model_name='accountexecutive', + name='academic', + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, to='events.AcademicCenter'), + ), + migrations.AlterField( + model_name='accountexecutive', + name='appoved_by', + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='accountexecutive_approved_by', to=settings.AUTH_USER_MODEL), + ), + migrations.AlterField( + model_name='accountexecutive', + name='user', + field=models.OneToOneField(on_delete=django.db.models.deletion.PROTECT, related_name='accountexecutive', to=settings.AUTH_USER_MODEL), + ), + migrations.AlterField( + model_name='city', + name='state', + field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='events.State'), + ), + migrations.AlterField( + model_name='coursemap', + name='course', + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, to='events.LabCourse'), + ), + migrations.AlterField( + model_name='coursemap', + name='foss', + field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='creation.FossCategory'), + ), + migrations.AlterField( + model_name='district', + name='state', + field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='events.State'), + ), + migrations.AlterField( + model_name='eventsnotification', + name='academic', + field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='events.AcademicCenter'), + ), + migrations.AlterField( + model_name='eventsnotification', + name='user', + field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL), + ), + migrations.AlterField( + model_name='fossmdlcourses', + name='foss', + field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='creation.FossCategory'), + ), + migrations.AlterField( + model_name='helpfulfor', + name='helpful_for', + field=models.CharField(choices=[('0', 'Academic Performance'), ('1', 'Project Assignments'), ('2', 'To get job interviews'), ('3', 'To get jobs'), ('4', 'All of the above')], max_length=50), + ), + migrations.AlterField( + model_name='inductionfinallist', + name='eoi_id', + field=models.ForeignKey(default=None, on_delete=django.db.models.deletion.PROTECT, to='events.InductionInterest'), + ), + migrations.AlterField( + model_name='inductioninterest', + name='age', + field=models.CharField(choices=[('', '-----'), ('20to25', '20 to 25 years'), ('26to30', '26 to 30 years'), ('31to35', '31 to 35 years'), ('35andabove', 'Above 35 years')], max_length=100), + ), + migrations.AlterField( + model_name='inductioninterest', + name='borrow_laptop', + field=models.CharField(choices=[('', '-----'), ('Yes', 'Yes'), ('No', 'No')], max_length=50), + ), + migrations.AlterField( + model_name='inductioninterest', + name='bring_laptop', + field=models.CharField(choices=[('', '-----'), ('Yes', 'Yes'), ('No', 'No')], max_length=50), + ), + migrations.AlterField( + model_name='inductioninterest', + name='designation', + field=models.CharField(choices=[('', '-----'), ('Lecturer', 'Lecturer'), ('AssistantProfessor', 'Assistant Professor'), ('AssociateProfessor', 'Associate Professor'), ('Professor', 'Professor'), ('Other', 'Other')], max_length=100), + ), + migrations.AlterField( + model_name='inductioninterest', + name='do_agree', + field=models.CharField(choices=[('', '-----'), ('Yes', 'Yes')], max_length=50), + ), + migrations.AlterField( + model_name='inductioninterest', + name='education', + field=models.CharField(choices=[('', '-----'), ('3yeargraduatedegree(BABScB.Cometc)', '3 year graduate degree (BA, BSc, B.Com, etc.)'), ('Professionaldegree(BEBTechetc)', 'Professional degree (BE, B.Tech, etc.)'), ('2yearMasters(MAMScMCometc)', '2 year Masters (MA, MSc, MCom, etc.)'), ('2yearprofessionalMasters(MEMTechMBAMPhiletc)', '2 year professional Masters (ME, MTech, MBA, MPhil, etc.)'), ('PhD', 'PhD'), ('Other', 'Other')], max_length=100), + ), + migrations.AlterField( + model_name='inductioninterest', + name='experience_in_college', + field=models.CharField(choices=[('', '-----'), ('Lessthan1year', 'Less than 1 year'), ('Morethan1yearbutlessthan2years', 'More than 1 year, but less than 2 years'), ('Morethan2yearsbutlessthan5years', 'More than 2 years but less than 5 years'), ('Morethan5years', 'More than 5 years')], max_length=100), + ), + migrations.AlterField( + model_name='inductioninterest', + name='gender', + field=models.CharField(choices=[('', '-----'), ('Male', 'Male'), ('Female', 'Female')], max_length=50), + ), + migrations.AlterField( + model_name='inductioninterest', + name='medium_of_studies', + field=models.CharField(choices=[('', '-----'), ('Assamese', 'Assamese'), ('Bengali', 'Bengali'), ('Bhojpuri', 'Bhojpuri'), ('Bodo', 'Bodo'), ('English', 'English'), ('Gujarati', 'Gujarati'), ('Hindi', 'Hindi'), ('Kannada', 'Kannada'), ('Kashmiri', 'Kashmiri'), ('Khasi', 'Khasi'), ('Konkani', 'Konkani'), ('Maithili', 'Maithili'), ('Malayalam', 'Malayalam'), ('Manipuri', 'Manipuri'), ('Marathi', 'Marathi'), ('Nepali', 'Nepali'), ('Oriya', 'Oriya'), ('Punjabi', 'Punjabi'), ('Rajasthani', 'Rajasthani'), ('Sanskrit', 'Sanskrit'), ('Santhali', 'Santhali'), ('Sindhi', 'Sindhi'), ('Tamil', 'Tamil'), ('Telugu', 'Telugu'), ('Urdu', 'Urdu'), ('Other', 'Other')], max_length=100), + ), + migrations.AlterField( + model_name='inductioninterest', + name='mother_tongue', + field=models.CharField(choices=[('', '-----'), ('Assamese', 'Assamese'), ('Bengali', 'Bengali'), ('Bhojpuri', 'Bhojpuri'), ('Bodo', 'Bodo'), ('English', 'English'), ('Gujarati', 'Gujarati'), ('Hindi', 'Hindi'), ('Kannada', 'Kannada'), ('Kashmiri', 'Kashmiri'), ('Khasi', 'Khasi'), ('Konkani', 'Konkani'), ('Maithili', 'Maithili'), ('Malayalam', 'Malayalam'), ('Manipuri', 'Manipuri'), ('Marathi', 'Marathi'), ('Nepali', 'Nepali'), ('Oriya', 'Oriya'), ('Punjabi', 'Punjabi'), ('Rajasthani', 'Rajasthani'), ('Sanskrit', 'Sanskrit'), ('Santhali', 'Santhali'), ('Sindhi', 'Sindhi'), ('Tamil', 'Tamil'), ('Telugu', 'Telugu'), ('Urdu', 'Urdu'), ('Other', 'Other')], max_length=100), + ), + migrations.AlterField( + model_name='inductioninterest', + name='no_objection', + field=models.CharField(choices=[('', '-----'), ('Yes', 'Yes')], max_length=50), + ), + migrations.AlterField( + model_name='inductioninterest', + name='specialisation', + field=models.CharField(choices=[('', '-----'), ('Arts', 'Arts'), ('Science', 'Science'), ('Commerce', 'Commerce'), ('EngineeringorComputerScience ', 'Engineering or Computer Science'), ('Management', 'Management'), ('Other', 'Other')], max_length=100), + ), + migrations.AlterField( + model_name='inductioninterest', + name='state', + field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='events.State'), + ), + migrations.AlterField( + model_name='invigilator', + name='academic', + field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='events.AcademicCenter'), + ), + migrations.AlterField( + model_name='invigilator', + name='appoved_by', + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='invigilator_approved_by', to=settings.AUTH_USER_MODEL), + ), + migrations.AlterField( + model_name='invigilator', + name='user', + field=models.OneToOneField(on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL), + ), + migrations.AlterField( + model_name='learndrupalfeedback', + name='agegroup', + field=models.CharField(choices=[('', '-----'), ('below25', 'below 25'), ('25to34', '25 to 34'), ('35to44', '35 to 44'), ('45to54', '45 to 54'), ('55to64', '55 to 64'), ('65andabove', '65 and above')], max_length=50), + ), + migrations.AlterField( + model_name='learndrupalfeedback', + name='currentstatus', + field=models.CharField(choices=[('', '-----'), ('Student', 'Student'), ('Individuallearner', 'Individual learner'), ('Workingprofessional', 'Working professional'), ('Teacher', 'Teacher'), ('Administrator', 'Administrator'), ('Others', 'Others')], max_length=50), + ), + migrations.AlterField( + model_name='learndrupalfeedback', + name='did_undergo_st_training', + field=models.CharField(choices=[('', '-----'), ('Yes', 'Yes'), ('No', 'No'), ('NotApplicable ', 'Not Applicable ')], max_length=50), + ), + migrations.AlterField( + model_name='learndrupalfeedback', + name='is_drupal_in_curriculum', + field=models.CharField(choices=[('', '-----'), ('Yes', 'Yes'), ('No', 'No'), ('NotApplicable ', 'Not Applicable ')], max_length=50), + ), + migrations.AlterField( + model_name='learndrupalfeedback', + name='language', + field=models.CharField(choices=[('', '-----'), ('Hindi', 'Hindi'), ('English', 'English'), ('Marathi', 'Marathi'), ('Urdu', 'Urdu'), ('Kannanda', 'Kannanda'), ('Bangali', 'Bangali'), ('Malyalum', 'Malyalum'), ('Tamil', 'Tamil'), ('Telugu', 'Telugu'), ('Oriya', 'Oriya'), ('Assamese', 'Assamese'), ('Gujrati', 'Gujrati')], max_length=50), + ), + migrations.AlterField( + model_name='learndrupalfeedback', + name='like_to_give_testimonial', + field=models.CharField(choices=[('', '-----'), ('Yes', 'Yes'), ('No', 'No')], max_length=50), + ), + migrations.AlterField( + model_name='learndrupalfeedback', + name='like_to_learn_other_foss', + field=models.CharField(choices=[('', '-----'), ('Yes', 'Yes'), ('No', 'No')], max_length=50), + ), + migrations.AlterField( + model_name='learndrupalfeedback', + name='need_help_in_organizing', + field=models.CharField(choices=[('', '-----'), ('Yes', 'Yes'), ('No', 'No'), ('NotApplicable ', 'Not Applicable ')], max_length=50), + ), + migrations.AlterField( + model_name='learndrupalfeedback', + name='useful_for_placement', + field=models.CharField(choices=[('', '-----'), ('Yes', 'Yes'), ('No', 'No'), ('NotApplicable ', 'Not Applicable ')], max_length=50), + ), + migrations.AlterField( + model_name='learndrupalfeedback', + name='useful_for_placement_for_students', + field=models.CharField(choices=[('', '-----'), ('Yes', 'Yes'), ('No', 'No'), ('NotApplicable ', 'Not Applicable ')], max_length=50), + ), + migrations.AlterField( + model_name='learndrupalfeedback', + name='when_plan_to_conduct', + field=models.CharField(choices=[('', '-----'), ('within3months', 'within 3 months'), ('within6months', 'within 6 months'), ('within1year', 'within 1 year'), ('notyetplanned', 'not yet planned')], max_length=50), + ), + migrations.AlterField( + model_name='location', + name='district', + field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='events.District'), + ), + migrations.AlterField( + model_name='mediatestimonials', + name='foss', + field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='creation.FossCategory'), + ), + migrations.AlterField( + model_name='mediatestimonials', + name='workshop_details', + field=models.CharField(default='Workshop', max_length=255), + ), + migrations.AlterField( + model_name='mumbaistudents', + name='bid', + field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='events.StudentBatch'), + ), + migrations.AlterField( + model_name='mumbaistudents', + name='stuid', + field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='events.Student'), + ), + migrations.AlterField( + model_name='organiser', + name='academic', + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, to='events.AcademicCenter'), + ), + migrations.AlterField( + model_name='organiser', + name='appoved_by', + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='organiser_approved_by', to=settings.AUTH_USER_MODEL), + ), + migrations.AlterField( + model_name='organiser', + name='user', + field=models.OneToOneField(on_delete=django.db.models.deletion.PROTECT, related_name='organiser', to=settings.AUTH_USER_MODEL), + ), + migrations.AlterField( + model_name='organiserfeedback', + name='age', + field=models.CharField(choices=[('', '-----'), ('<25', '<25 years'), ('25-35', '25-35 years'), ('35+', '35 years and above')], max_length=20), + ), + migrations.AlterField( + model_name='organiserfeedback', + name='audio_video_quality', + field=models.CharField(choices=[('', '-----'), ('Excellent', 'Excellent'), ('Good', 'Good'), ('Fair', 'Fair'), ('Bad', 'Bad'), ('Verybad', 'Very bad')], max_length=50), + ), + migrations.AlterField( + model_name='organiserfeedback', + name='can_contact', + field=models.CharField(choices=[('', '-----'), ('Yes', 'Yes'), ('No', 'No')], max_length=50), + ), + migrations.AlterField( + model_name='organiserfeedback', + name='city', + field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='events.City'), + ), + migrations.AlterField( + model_name='organiserfeedback', + name='designation', + field=models.CharField(choices=[('', '-----'), ('Student', 'Student'), ('Faculty', 'Faculty'), ('Staff', 'Staff'), ('Admin', 'Admin')], max_length=20), + ), + migrations.AlterField( + model_name='organiserfeedback', + name='district', + field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='events.District'), + ), + migrations.AlterField( + model_name='organiserfeedback', + name='duration_of_tutorial', + field=models.CharField(choices=[('', '-----'), ('<0.5', 'Less than 0.5 hour'), ('0.5-2', '0.5 - 2 hour'), ('2-10', '2-10 hours'), ('10+', 'Above 10 hours'), ('NA', 'Not applicable')], max_length=50), + ), + migrations.AlterField( + model_name='organiserfeedback', + name='gender', + field=models.CharField(choices=[('', '-----'), ('Male', 'Male'), ('Female', 'Female')], max_length=10), + ), + migrations.AlterField( + model_name='organiserfeedback', + name='good_investment', + field=models.CharField(choices=[('', '-----'), ('Yes', 'Yes'), ('No', 'No'), ('Notsure', 'Not sure')], max_length=50), + ), + migrations.AlterField( + model_name='organiserfeedback', + name='in_side_by_side_method', + field=models.CharField(choices=[('', '-----'), ('0', 'The video has to be maximized'), ('1', 'The software has to be maximized'), ('2', 'Both software and video are maximized'), ('3', 'None of the above are maximized')], max_length=50), + ), + migrations.AlterField( + model_name='organiserfeedback', + name='information_content', + field=models.CharField(choices=[('', '-----'), ('Excellent', 'Excellent'), ('Good', 'Good'), ('Fair', 'Fair'), ('Bad', 'Bad'), ('Verybad', 'Very bad')], max_length=50), + ), + migrations.AlterField( + model_name='organiserfeedback', + name='is_classroom_better', + field=models.CharField(choices=[('', '-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), ('StronglyDisagree', 'Strongly Disagree'), ('Noidea', 'No idea')], max_length=50), + ), + migrations.AlterField( + model_name='organiserfeedback', + name='is_comfortable_self_learning', + field=models.CharField(choices=[('', '-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), ('StronglyDisagree', 'Strongly Disagree'), ('Noidea', 'No idea')], max_length=50), + ), + migrations.AlterField( + model_name='organiserfeedback', + name='is_got_job', + field=models.CharField(choices=[('', '-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), ('StronglyDisagree', 'Strongly Disagree'), ('Noidea', 'No idea')], max_length=50), + ), + migrations.AlterField( + model_name='organiserfeedback', + name='is_help_get_interview', + field=models.CharField(choices=[('', '-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), ('StronglyDisagree', 'Strongly Disagree'), ('Noidea', 'No idea')], max_length=50), + ), + migrations.AlterField( + model_name='organiserfeedback', + name='is_help_get_job', + field=models.CharField(choices=[('', '-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), ('StronglyDisagree', 'Strongly Disagree'), ('Noidea', 'No idea')], max_length=50), + ), + migrations.AlterField( + model_name='organiserfeedback', + name='is_student_expectations', + field=models.CharField(choices=[('', '-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), ('StronglyDisagree', 'Strongly Disagree'), ('Noidea', 'No idea')], max_length=50), + ), + migrations.AlterField( + model_name='organiserfeedback', + name='is_training_benefited', + field=models.CharField(choices=[('', '-----'), ('Yes', 'Yes'), ('No', 'No'), ('Notsure', 'Not sure')], max_length=50), + ), + migrations.AlterField( + model_name='organiserfeedback', + name='medium_of_instruction', + field=models.CharField(choices=[('', '-----'), ('English', 'English'), ('Vernacular', 'Vernacular'), ('Mixed', 'Mixed')], max_length=50), + ), + migrations.AlterField( + model_name='organiserfeedback', + name='overall_rating', + field=models.CharField(choices=[('', '-----'), ('Excellent', 'Excellent'), ('Good', 'Good'), ('Fair', 'Fair'), ('Bad', 'Bad'), ('Verybad', 'Very bad')], max_length=50), + ), + migrations.AlterField( + model_name='organiserfeedback', + name='presentation_quality', + field=models.CharField(choices=[('', '-----'), ('Excellent', 'Excellent'), ('Good', 'Good'), ('Fair', 'Fair'), ('Bad', 'Bad'), ('Verybad', 'Very bad')], max_length=50), + ), + migrations.AlterField( + model_name='organiserfeedback', + name='relevance', + field=models.CharField(choices=[('', '-----'), ('Excellent', 'Excellent'), ('Good', 'Good'), ('Fair', 'Fair'), ('Bad', 'Bad'), ('Verybad', 'Very bad')], max_length=50), + ), + migrations.AlterField( + model_name='organiserfeedback', + name='side_by_side_method_is', + field=models.CharField(choices=[('', '-----'), ('0', 'Explaining the video to a neighbor'), ('1', 'Waiting for mentors explanation'), ('2', 'Watching and practicing simultaneously'), ('3', 'Dont know what this method is')], max_length=50), + ), + migrations.AlterField( + model_name='organiserfeedback', + name='side_by_side_yes_no', + field=models.CharField(choices=[('', '-----'), ('Yes', 'Yes'), ('No', 'No')], max_length=50), + ), + migrations.AlterField( + model_name='organiserfeedback', + name='state', + field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='events.State'), + ), + migrations.AlterField( + model_name='organiserfeedback', + name='student_education_language', + field=models.CharField(choices=[('', '-----'), ('English', 'Mostly English'), ('Vernacular', 'Mostly Vernacular'), ('Mixed', 'Mostly Mixed')], max_length=50), + ), + migrations.AlterField( + model_name='organiserfeedback', + name='student_gender', + field=models.CharField(choices=[('', '-----'), ('Male', 'Mostly Male'), ('Female', 'Mostly Female'), ('Mixed', 'Mixed')], max_length=50), + ), + migrations.AlterField( + model_name='organiserfeedback', + name='student_location', + field=models.CharField(choices=[('', '-----'), ('Urban', 'Mainly Urban'), ('Rural', 'Mainly Rural'), ('Mixed', 'Mixed'), ('Notsure', 'Not sure')], max_length=50), + ), + migrations.AlterField( + model_name='organiserfeedback', + name='university', + field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='events.AcademicCenter'), + ), + migrations.AlterField( + model_name='organisernotification', + name='user', + field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL), + ), + migrations.AlterField( + model_name='paymentdetails', + name='academic_id', + field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='events.AcademicCenter'), + ), + migrations.AlterField( + model_name='paymentdetails', + name='user', + field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL), + ), + migrations.AlterField( + model_name='paymenttransactiondetails', + name='paymentdetail', + field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='events.PaymentDetails'), + ), + migrations.AlterField( + model_name='paymenttransactiondetails', + name='userId', + field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL), + ), + migrations.AlterField( + model_name='permission', + name='assigned_by', + field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='permission_assigned_by', to=settings.AUTH_USER_MODEL), + ), + migrations.AlterField( + model_name='permission', + name='district', + field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.PROTECT, related_name='permission_district', to='events.District'), + ), + migrations.AlterField( + model_name='permission', + name='institute', + field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.PROTECT, related_name='permission_district', to='events.AcademicCenter'), + ), + migrations.AlterField( + model_name='permission', + name='institute_type', + field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.PROTECT, related_name='permission_institution_type', to='events.InstituteType'), + ), + migrations.AlterField( + model_name='permission', + name='permissiontype', + field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='events.PermissionType'), + ), + migrations.AlterField( + model_name='permission', + name='state', + field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='permission_state', to='events.State'), + ), + migrations.AlterField( + model_name='permission', + name='university', + field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.PROTECT, related_name='permission_iniversity', to='events.University'), + ), + migrations.AlterField( + model_name='permission', + name='user', + field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='permission_user', to=settings.AUTH_USER_MODEL), + ), + migrations.AlterField( + model_name='resourceperson', + name='state', + field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='events.State'), + ), + migrations.AlterField( + model_name='resourceperson', + name='user', + field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL), + ), + migrations.AlterField( + model_name='singletraining', + name='academic', + field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='events.AcademicCenter'), + ), + migrations.AlterField( + model_name='singletraining', + name='course', + field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='events.CourseMap'), + ), + migrations.AlterField( + model_name='singletraining', + name='institution_type', + field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.PROTECT, to='events.InstituteType'), + ), + migrations.AlterField( + model_name='singletraining', + name='language', + field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='creation.Language'), + ), + migrations.AlterField( + model_name='singletraining', + name='organiser', + field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='events.Organiser'), + ), + migrations.AlterField( + model_name='singletraining', + name='state', + field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.PROTECT, to='events.State'), + ), + migrations.AlterField( + model_name='singletrainingattendance', + name='training', + field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='events.SingleTraining'), + ), + migrations.AlterField( + model_name='student', + name='user', + field=models.OneToOneField(on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL), + ), + migrations.AlterField( + model_name='studentbatch', + name='academic', + field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='events.AcademicCenter'), + ), + migrations.AlterField( + model_name='studentbatch', + name='department', + field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='events.Department'), + ), + migrations.AlterField( + model_name='studentbatch', + name='organiser', + field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='events.Organiser'), + ), + migrations.AlterField( + model_name='studentmaster', + name='batch', + field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='events.StudentBatch'), + ), + migrations.AlterField( + model_name='studentmaster', + name='student', + field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='events.Student'), + ), + migrations.AlterField( + model_name='studentstream', + name='student_stream', + field=models.CharField(choices=[('0', 'Engineering'), ('1', 'Science'), ('2', 'Arts and Humanities'), ('3', 'Polytechnic/ Diploma programs'), ('4', 'Commerce and Business Studies'), ('5', 'ITI'), ('6', 'Other')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedback', + name='acquired_knowledge', + field=models.CharField(choices=[('', '-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), ('StronglyDisagree', 'Strongly Disagree')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedback', + name='clarity_of_explanation', + field=models.CharField(choices=[('', '-----'), ('Excellent', 'Excellent'), ('Good', 'Good'), ('Fair', 'Fair'), ('Bad', 'Bad'), ('Extremelybad', 'Extremely bad')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedback', + name='clarity_of_speech', + field=models.CharField(choices=[('', '-----'), ('Excellent', 'Excellent'), ('Good', 'Good'), ('Fair', 'Fair'), ('Bad', 'Bad'), ('Extremelybad', 'Extremely bad')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedback', + name='confident_to_apply_knowledge', + field=models.CharField(choices=[('', '-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), ('StronglyDisagree', 'Strongly Disagree')], default=None, max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedback', + name='desired_objective', + field=models.CharField(choices=[('', '-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), ('StronglyDisagree', 'Strongly Disagree')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedback', + name='diff_instruction', + field=models.CharField(choices=[('', '-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), ('StronglyDisagree', 'Strongly Disagree')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedback', + name='difficult_instructions_in_tutorial', + field=models.CharField(choices=[('', '-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), ('StronglyDisagree', 'Strongly Disagree')], default=None, max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedback', + name='difficult_simultaneously', + field=models.CharField(choices=[('', '-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), ('StronglyDisagree', 'Strongly Disagree')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedback', + name='dont_like_self_learning_method', + field=models.CharField(choices=[('', '-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), ('StronglyDisagree', 'Strongly Disagree')], default=None, max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedback', + name='examples_help', + field=models.CharField(choices=[('', '-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), ('StronglyDisagree', 'Strongly Disagree')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedback', + name='experience_of_learning', + field=models.CharField(choices=[('', '-----'), ('Excellent', 'Excellent'), ('Good', 'Good'), ('Fair', 'Fair'), ('Bad', 'Bad'), ('Extremelybad', 'Extremely bad')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedback', + name='flow', + field=models.CharField(choices=[('', '-----'), ('Excellent', 'Excellent'), ('Good', 'Good'), ('Fair', 'Fair'), ('Bad', 'Bad'), ('Extremelybad', 'Extremely bad')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedback', + name='forum_helpful', + field=models.CharField(choices=[('', '-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), ('StronglyDisagree', 'Strongly Disagree')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedback', + name='foss', + field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='creation.FossCategory'), + ), + migrations.AlterField( + model_name='stworkshopfeedback', + name='guidelines', + field=models.CharField(choices=[('', '-----'), ('Excellent', 'Excellent'), ('Good', 'Good'), ('Fair', 'Fair'), ('Bad', 'Bad'), ('Extremelybad', 'Extremely bad')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedback', + name='help_improve_performance', + field=models.CharField(choices=[('', '-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), ('StronglyDisagree', 'Strongly Disagree')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedback', + name='instructions_easy_to_follow', + field=models.CharField(choices=[('', '-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), ('StronglyDisagree', 'Strongly Disagree')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedback', + name='interface_comfortable', + field=models.CharField(choices=[('', '-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), ('StronglyDisagree', 'Strongly Disagree')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedback', + name='language_diff_to_understand', + field=models.CharField(choices=[('', '-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), ('StronglyDisagree', 'Strongly Disagree')], default=None, max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedback', + name='like_to_part', + field=models.CharField(choices=[('', '-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), ('StronglyDisagree', 'Strongly Disagree')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedback', + name='logical_sequence', + field=models.CharField(choices=[('', '-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), ('StronglyDisagree', 'Strongly Disagree')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedback', + name='method_easy', + field=models.CharField(choices=[('', '-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), ('StronglyDisagree', 'Strongly Disagree')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedback', + name='not_like_method_forums', + field=models.CharField(choices=[('', '-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), ('StronglyDisagree', 'Strongly Disagree')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedback', + name='not_self_explanatory', + field=models.CharField(choices=[('', '-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), ('StronglyDisagree', 'Strongly Disagree')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedback', + name='overall_arrangement', + field=models.CharField(choices=[('', '-----'), ('Excellent', 'Excellent'), ('Good', 'Good'), ('Fair', 'Fair'), ('Bad', 'Bad'), ('Extremelybad', 'Extremely bad')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedback', + name='overall_content_quality', + field=models.CharField(choices=[('', '-----'), ('Excellent', 'Excellent'), ('Good', 'Good'), ('Fair', 'Fair'), ('Bad', 'Bad'), ('Extremelybad', 'Extremely bad')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedback', + name='overall_video_quality', + field=models.CharField(choices=[('', '-----'), ('Excellent', 'Excellent'), ('Good', 'Good'), ('Fair', 'Fair'), ('Bad', 'Bad'), ('Extremelybad', 'Extremely bad')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedback', + name='owing_to_forums', + field=models.CharField(choices=[('', '-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), ('StronglyDisagree', 'Strongly Disagree')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedback', + name='pace_of_tutorial', + field=models.CharField(choices=[('', '-----'), ('Excellent', 'Excellent'), ('Good', 'Good'), ('Fair', 'Fair'), ('Bad', 'Bad'), ('Extremelybad', 'Extremely bad')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedback', + name='plan_to_use_future', + field=models.CharField(choices=[('', '-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), ('StronglyDisagree', 'Strongly Disagree')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedback', + name='recommend', + field=models.CharField(choices=[('', '-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), ('StronglyDisagree', 'Strongly Disagree')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedback', + name='relevance', + field=models.CharField(choices=[('', '-----'), ('Excellent', 'Excellent'), ('Good', 'Good'), ('Fair', 'Fair'), ('Bad', 'Bad'), ('Extremelybad', 'Extremely bad')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedback', + name='satisfied', + field=models.CharField(choices=[('', '-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), ('StronglyDisagree', 'Strongly Disagree')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedback', + name='self_learning_intrest', + field=models.CharField(choices=[('', '-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), ('StronglyDisagree', 'Strongly Disagree')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedback', + name='side_by_side_effective', + field=models.CharField(choices=[('', '-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), ('StronglyDisagree', 'Strongly Disagree')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedback', + name='suff_instruction', + field=models.CharField(choices=[('', '-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), ('StronglyDisagree', 'Strongly Disagree')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedback', + name='text_readability', + field=models.CharField(choices=[('', '-----'), ('Excellent', 'Excellent'), ('Good', 'Good'), ('Fair', 'Fair'), ('Bad', 'Bad'), ('Extremelybad', 'Extremely bad')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedback', + name='time_management', + field=models.CharField(choices=[('', '-----'), ('Excellent', 'Excellent'), ('Good', 'Good'), ('Fair', 'Fair'), ('Bad', 'Bad'), ('Extremelybad', 'Extremely bad')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedback', + name='time_sufficient', + field=models.CharField(choices=[('', '-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), ('StronglyDisagree', 'Strongly Disagree')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedback', + name='too_fast', + field=models.CharField(choices=[('', '-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), ('StronglyDisagree', 'Strongly Disagree')], default=None, max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedback', + name='too_slow', + field=models.CharField(choices=[('', '-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), ('StronglyDisagree', 'Strongly Disagree')], default=None, max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedback', + name='translate', + field=models.CharField(choices=[('', '-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), ('StronglyDisagree', 'Strongly Disagree')], default=None, max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedback', + name='useful_learning', + field=models.CharField(choices=[('', '-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), ('StronglyDisagree', 'Strongly Disagree')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedback', + name='visual_presentation', + field=models.CharField(choices=[('', '-----'), ('Excellent', 'Excellent'), ('Good', 'Good'), ('Fair', 'Fair'), ('Bad', 'Bad'), ('Extremelybad', 'Extremely bad')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedback', + name='ws_quality', + field=models.CharField(choices=[('', '-----'), ('Excellent', 'Excellent'), ('Good', 'Good'), ('Fair', 'Fair'), ('Bad', 'Bad'), ('Extremelybad', 'Extremely bad')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedbackpost', + name='acquired_knowledge', + field=models.CharField(choices=[('', '-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), ('StronglyDisagree', 'Strongly Disagree'), ('Noidea', 'No idea')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedbackpost', + name='adding_func', + field=models.CharField(choices=[('', '-----'), ('Notconfidentatall', 'Not confident at all'), ('Unconfident', 'Unconfident'), ('Neitherconfidentnorunconfident', 'Neither confident nor unconfident'), ('Confident', 'Confident'), ('Absolutelyconfident', 'Absolutely confident'), ('NotApplicable', 'Not Applicable')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedbackpost', + name='arrangement', + field=models.CharField(choices=[('', '-----'), ('Excellent', 'Excellent'), ('Good', 'Good'), ('Fair', 'Fair'), ('Bad', 'Bad'), ('Extremelybad', 'Extremely bad')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedbackpost', + name='ask_student_to_use', + field=models.CharField(choices=[('', '-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), ('StronglyDisagree', 'Strongly Disagree'), ('Noidea', 'No idea')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedbackpost', + name='asked_ques_forums', + field=models.CharField(choices=[('', '-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), ('StronglyDisagree', 'Strongly Disagree'), ('Noidea', 'No idea')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedbackpost', + name='can_learn_other', + field=models.CharField(choices=[('', '-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), ('StronglyDisagree', 'Strongly Disagree'), ('Noidea', 'No idea')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedbackpost', + name='clarity_of_speech', + field=models.CharField(choices=[('', '-----'), ('Excellent', 'Excellent'), ('Good', 'Good'), ('Fair', 'Fair'), ('Bad', 'Bad'), ('Extremelybad', 'Extremely bad')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedbackpost', + name='confident', + field=models.CharField(choices=[('', '-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), ('StronglyDisagree', 'Strongly Disagree'), ('Noidea', 'No idea')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedbackpost', + name='configuration_management', + field=models.CharField(choices=[('', '-----'), ('Notconfidentatall', 'Not confident at all'), ('Unconfident', 'Unconfident'), ('Neitherconfidentnorunconfident', 'Neither confident nor unconfident'), ('Confident', 'Confident'), ('Absolutelyconfident', 'Absolutely confident'), ('NotApplicable', 'Not Applicable')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedbackpost', + name='content_management', + field=models.CharField(choices=[('', '-----'), ('Notconfidentatall', 'Not confident at all'), ('Unconfident', 'Unconfident'), ('Neitherconfidentnorunconfident', 'Neither confident nor unconfident'), ('Confident', 'Confident'), ('Absolutelyconfident', 'Absolutely confident'), ('NotApplicable', 'Not Applicable')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedbackpost', + name='contents_using_view', + field=models.CharField(choices=[('', '-----'), ('Notconfidentatall', 'Not confident at all'), ('Unconfident', 'Unconfident'), ('Neitherconfidentnorunconfident', 'Neither confident nor unconfident'), ('Confident', 'Confident'), ('Absolutelyconfident', 'Absolutely confident'), ('NotApplicable', 'Not Applicable')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedbackpost', + name='control_display_images', + field=models.CharField(choices=[('', '-----'), ('Notconfidentatall', 'Not confident at all'), ('Unconfident', 'Unconfident'), ('Neitherconfidentnorunconfident', 'Neither confident nor unconfident'), ('Confident', 'Confident'), ('Absolutelyconfident', 'Absolutely confident'), ('NotApplicable', 'Not Applicable')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedbackpost', + name='create_new_content', + field=models.CharField(choices=[('', '-----'), ('Notconfidentatall', 'Not confident at all'), ('Unconfident', 'Unconfident'), ('Neitherconfidentnorunconfident', 'Neither confident nor unconfident'), ('Confident', 'Confident'), ('Absolutelyconfident', 'Absolutely confident'), ('NotApplicable', 'Not Applicable')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedbackpost', + name='creating_basic_content', + field=models.CharField(choices=[('', '-----'), ('Notconfidentatall', 'Not confident at all'), ('Unconfident', 'Unconfident'), ('Neitherconfidentnorunconfident', 'Neither confident nor unconfident'), ('Confident', 'Confident'), ('Absolutelyconfident', 'Absolutely confident'), ('NotApplicable', 'Not Applicable')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedbackpost', + name='creating_dummy_content', + field=models.CharField(choices=[('', '-----'), ('Notconfidentatall', 'Not confident at all'), ('Unconfident', 'Unconfident'), ('Neitherconfidentnorunconfident', 'Neither confident nor unconfident'), ('Confident', 'Confident'), ('Absolutelyconfident', 'Absolutely confident'), ('NotApplicable', 'Not Applicable')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedbackpost', + name='desired_objective', + field=models.CharField(choices=[('', '-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), ('StronglyDisagree', 'Strongly Disagree'), ('Noidea', 'No idea')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedbackpost', + name='diff_watch_practice', + field=models.CharField(choices=[('', '-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), ('StronglyDisagree', 'Strongly Disagree'), ('Noidea', 'No idea')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedbackpost', + name='doubts_solved_fast', + field=models.CharField(choices=[('', '-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), ('StronglyDisagree', 'Strongly Disagree'), ('Noidea', 'No idea')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedbackpost', + name='edit_existing_content', + field=models.CharField(choices=[('', '-----'), ('Notconfidentatall', 'Not confident at all'), ('Unconfident', 'Unconfident'), ('Neitherconfidentnorunconfident', 'Neither confident nor unconfident'), ('Confident', 'Confident'), ('Absolutelyconfident', 'Absolutely confident'), ('NotApplicable', 'Not Applicable')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedbackpost', + name='esy_to_conduct_own', + field=models.CharField(choices=[('', '-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), ('StronglyDisagree', 'Strongly Disagree'), ('Noidea', 'No idea')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedbackpost', + name='examples_help', + field=models.CharField(choices=[('', '-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), ('StronglyDisagree', 'Strongly Disagree'), ('Noidea', 'No idea')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedbackpost', + name='experience_of_learning', + field=models.CharField(choices=[('', '-----'), ('Excellent', 'Excellent'), ('Good', 'Good'), ('Fair', 'Fair'), ('Bad', 'Bad'), ('Extremelybad', 'Extremely bad')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedbackpost', + name='faster_on_forums', + field=models.CharField(choices=[('', '-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), ('StronglyDisagree', 'Strongly Disagree'), ('Noidea', 'No idea')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedbackpost', + name='fees', + field=models.CharField(choices=[('', '-----'), ('below250', 'Below Rs.250/-'), ('between251to500', 'Between Rs.251 to Rs.500/-'), ('between501to1000', 'Between Rs.501 to Rs.1000/-'), ('between1001to2000', 'Between Rs.1001 to Rs.2000/-'), ('above2000', 'Above Rs. 2000/-')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedbackpost', + name='finding_modules', + field=models.CharField(choices=[('', '-----'), ('Notconfidentatall', 'Not confident at all'), ('Unconfident', 'Unconfident'), ('Neitherconfidentnorunconfident', 'Neither confident nor unconfident'), ('Confident', 'Confident'), ('Absolutelyconfident', 'Absolutely confident'), ('NotApplicable', 'Not Applicable')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedbackpost', + name='forum_helpful', + field=models.CharField(choices=[('', '-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), ('StronglyDisagree', 'Strongly Disagree'), ('Noidea', 'No idea')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedbackpost', + name='forum_motivated', + field=models.CharField(choices=[('', '-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), ('StronglyDisagree', 'Strongly Disagree'), ('Noidea', 'No idea')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedbackpost', + name='gender', + field=models.CharField(choices=[('', '-----'), ('Male', 'Male'), ('Female', 'Female')], max_length=10), + ), + migrations.AlterField( + model_name='stworkshopfeedbackpost', + name='grp_entity_ref', + field=models.CharField(choices=[('', '-----'), ('Notconfidentatall', 'Not confident at all'), ('Unconfident', 'Unconfident'), ('Neitherconfidentnorunconfident', 'Neither confident nor unconfident'), ('Confident', 'Confident'), ('Absolutelyconfident', 'Absolutely confident'), ('NotApplicable', 'Not Applicable')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedbackpost', + name='guidelines', + field=models.CharField(choices=[('', '-----'), ('Excellent', 'Excellent'), ('Good', 'Good'), ('Fair', 'Fair'), ('Bad', 'Bad'), ('Extremelybad', 'Extremely bad')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedbackpost', + name='helpful_pre_ans_ques', + field=models.CharField(choices=[('', '-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), ('StronglyDisagree', 'Strongly Disagree'), ('Noidea', 'No idea')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedbackpost', + name='install_own', + field=models.CharField(choices=[('', '-----'), ('Yes', 'Yes'), ('No', 'No')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedbackpost', + name='installation_help', + field=models.CharField(choices=[('', '-----'), ('Excellent', 'Excellent'), ('Good', 'Good'), ('Fair', 'Fair'), ('Bad', 'Bad'), ('Extremelybad', 'Extremely bad')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedbackpost', + name='installig_ad_themes', + field=models.CharField(choices=[('', '-----'), ('Notconfidentatall', 'Not confident at all'), ('Unconfident', 'Unconfident'), ('Neitherconfidentnorunconfident', 'Neither confident nor unconfident'), ('Confident', 'Confident'), ('Absolutelyconfident', 'Absolutely confident'), ('NotApplicable', 'Not Applicable')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedbackpost', + name='instructions_easy_to_follow', + field=models.CharField(choices=[('', '-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), ('StronglyDisagree', 'Strongly Disagree'), ('Noidea', 'No idea')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedbackpost', + name='language_complicated', + field=models.CharField(choices=[('', '-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), ('StronglyDisagree', 'Strongly Disagree'), ('Noidea', 'No idea')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedbackpost', + name='learn_other_side_by_side', + field=models.CharField(choices=[('', '-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), ('StronglyDisagree', 'Strongly Disagree'), ('Noidea', 'No idea')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedbackpost', + name='like_to_create_st', + field=models.CharField(choices=[('', '-----'), ('Yes', 'Yes'), ('No', 'No')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedbackpost', + name='like_to_part', + field=models.CharField(choices=[('', '-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), ('StronglyDisagree', 'Strongly Disagree'), ('Noidea', 'No idea')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedbackpost', + name='logical_sequence', + field=models.CharField(choices=[('', '-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), ('StronglyDisagree', 'Strongly Disagree'), ('Noidea', 'No idea')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedbackpost', + name='managing_content', + field=models.CharField(choices=[('', '-----'), ('Notconfidentatall', 'Not confident at all'), ('Unconfident', 'Unconfident'), ('Neitherconfidentnorunconfident', 'Neither confident nor unconfident'), ('Confident', 'Confident'), ('Absolutelyconfident', 'Absolutely confident'), ('NotApplicable', 'Not Applicable')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedbackpost', + name='menu_endpoints', + field=models.CharField(choices=[('', '-----'), ('Notconfidentatall', 'Not confident at all'), ('Unconfident', 'Unconfident'), ('Neitherconfidentnorunconfident', 'Neither confident nor unconfident'), ('Confident', 'Confident'), ('Absolutelyconfident', 'Absolutely confident'), ('NotApplicable', 'Not Applicable')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedbackpost', + name='method_easy', + field=models.CharField(choices=[('', '-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), ('StronglyDisagree', 'Strongly Disagree'), ('Noidea', 'No idea')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedbackpost', + name='modify_display_content', + field=models.CharField(choices=[('', '-----'), ('Notconfidentatall', 'Not confident at all'), ('Unconfident', 'Unconfident'), ('Neitherconfidentnorunconfident', 'Neither confident nor unconfident'), ('Confident', 'Confident'), ('Absolutelyconfident', 'Absolutely confident'), ('NotApplicable', 'Not Applicable')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedbackpost', + name='modifying_page_layout', + field=models.CharField(choices=[('', '-----'), ('Notconfidentatall', 'Not confident at all'), ('Unconfident', 'Unconfident'), ('Neitherconfidentnorunconfident', 'Neither confident nor unconfident'), ('Confident', 'Confident'), ('Absolutelyconfident', 'Absolutely confident'), ('NotApplicable', 'Not Applicable')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedbackpost', + name='need_not_post', + field=models.CharField(choices=[('', '-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), ('StronglyDisagree', 'Strongly Disagree'), ('Noidea', 'No idea')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedbackpost', + name='network', + field=models.CharField(choices=[('', '-----'), ('Excellent', 'Excellent'), ('Good', 'Good'), ('Fair', 'Fair'), ('Bad', 'Bad'), ('Extremelybad', 'Extremely bad')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedbackpost', + name='not_answer_doubts', + field=models.CharField(choices=[('', '-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), ('StronglyDisagree', 'Strongly Disagree'), ('Noidea', 'No idea')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedbackpost', + name='not_have_to_wait', + field=models.CharField(choices=[('', '-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), ('StronglyDisagree', 'Strongly Disagree'), ('Noidea', 'No idea')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedbackpost', + name='not_like_method_forums', + field=models.CharField(choices=[('', '-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), ('StronglyDisagree', 'Strongly Disagree'), ('Noidea', 'No idea')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedbackpost', + name='not_like_reveal_identity', + field=models.CharField(choices=[('', '-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), ('StronglyDisagree', 'Strongly Disagree'), ('Noidea', 'No idea')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedbackpost', + name='not_self_explanatory', + field=models.CharField(choices=[('', '-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), ('StronglyDisagree', 'Strongly Disagree'), ('Noidea', 'No idea')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedbackpost', + name='num_of_experts_req', + field=models.CharField(choices=[('', '-----'), ('1to10', '1 to 10'), ('11to20', '11 to 20'), ('21to30', '21 to 30'), ('31to40', '31 to 40'), ('above40', 'Above 40')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedbackpost', + name='other_language', + field=models.CharField(choices=[('', '-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), ('StronglyDisagree', 'Strongly Disagree'), ('Noidea', 'No idea')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedbackpost', + name='overall_arrangement', + field=models.CharField(choices=[('', '-----'), ('Excellent', 'Excellent'), ('Good', 'Good'), ('Fair', 'Fair'), ('Bad', 'Bad'), ('Extremelybad', 'Extremely bad')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedbackpost', + name='overall_video_quality', + field=models.CharField(choices=[('', '-----'), ('Excellent', 'Excellent'), ('Good', 'Good'), ('Fair', 'Fair'), ('Bad', 'Bad'), ('Extremelybad', 'Extremely bad')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedbackpost', + name='pace_of_tutorial', + field=models.CharField(choices=[('', '-----'), ('Excellent', 'Excellent'), ('Good', 'Good'), ('Fair', 'Fair'), ('Bad', 'Bad'), ('Extremelybad', 'Extremely bad')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedbackpost', + name='participated_before', + field=models.CharField(choices=[('', '-----'), ('Yes', 'Yes'), ('No', 'No')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedbackpost', + name='people_management', + field=models.CharField(choices=[('', '-----'), ('Notconfidentatall', 'Not confident at all'), ('Unconfident', 'Unconfident'), ('Neitherconfidentnorunconfident', 'Neither confident nor unconfident'), ('Confident', 'Confident'), ('Absolutelyconfident', 'Absolutely confident'), ('NotApplicable', 'Not Applicable')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedbackpost', + name='per_asked_ques_before_tuts', + field=models.CharField(choices=[('', '-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), ('StronglyDisagree', 'Strongly Disagree'), ('Noidea', 'No idea')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedbackpost', + name='possible_to_use_therotical', + field=models.CharField(choices=[('', '-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), ('StronglyDisagree', 'Strongly Disagree'), ('Noidea', 'No idea')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedbackpost', + name='recommend', + field=models.CharField(choices=[('', '-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), ('StronglyDisagree', 'Strongly Disagree'), ('Noidea', 'No idea')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedbackpost', + name='referred_forums', + field=models.CharField(choices=[('', '-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), ('StronglyDisagree', 'Strongly Disagree'), ('Noidea', 'No idea')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedbackpost', + name='referred_forums_after', + field=models.CharField(choices=[('', '-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), ('StronglyDisagree', 'Strongly Disagree'), ('Noidea', 'No idea')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedbackpost', + name='relevance', + field=models.CharField(choices=[('', '-----'), ('Excellent', 'Excellent'), ('Good', 'Good'), ('Fair', 'Fair'), ('Bad', 'Bad'), ('Extremelybad', 'Extremely bad')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedbackpost', + name='satisfied_with_learning_experience', + field=models.CharField(choices=[('', '-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), ('StronglyDisagree', 'Strongly Disagree'), ('Noidea', 'No idea')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedbackpost', + name='side_by_side_hold_intrest', + field=models.CharField(choices=[('', '-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), ('StronglyDisagree', 'Strongly Disagree'), ('Noidea', 'No idea')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedbackpost', + name='sim_framework_before', + field=models.CharField(choices=[('', '-----'), ('Yes', 'Yes'), ('No', 'No')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedbackpost', + name='site_management', + field=models.CharField(choices=[('', '-----'), ('Notconfidentatall', 'Not confident at all'), ('Unconfident', 'Unconfident'), ('Neitherconfidentnorunconfident', 'Neither confident nor unconfident'), ('Confident', 'Confident'), ('Absolutelyconfident', 'Absolutely confident'), ('NotApplicable', 'Not Applicable')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedbackpost', + name='spfriendly', + field=models.CharField(choices=[('', '-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), ('StronglyDisagree', 'Strongly Disagree'), ('Noidea', 'No idea')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedbackpost', + name='styling_using_themes', + field=models.CharField(choices=[('', '-----'), ('Notconfidentatall', 'Not confident at all'), ('Unconfident', 'Unconfident'), ('Neitherconfidentnorunconfident', 'Neither confident nor unconfident'), ('Confident', 'Confident'), ('Absolutelyconfident', 'Absolutely confident'), ('NotApplicable', 'Not Applicable')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedbackpost', + name='suff_instruction_by_prof', + field=models.CharField(choices=[('', '-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), ('StronglyDisagree', 'Strongly Disagree'), ('Noidea', 'No idea')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedbackpost', + name='suff_instruction_by_staff', + field=models.CharField(choices=[('', '-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), ('StronglyDisagree', 'Strongly Disagree'), ('Noidea', 'No idea')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedbackpost', + name='table_of_fields_with_views', + field=models.CharField(choices=[('', '-----'), ('Notconfidentatall', 'Not confident at all'), ('Unconfident', 'Unconfident'), ('Neitherconfidentnorunconfident', 'Neither confident nor unconfident'), ('Confident', 'Confident'), ('Absolutelyconfident', 'Absolutely confident'), ('NotApplicable', 'Not Applicable')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedbackpost', + name='taxonomy', + field=models.CharField(choices=[('', '-----'), ('Notconfidentatall', 'Not confident at all'), ('Unconfident', 'Unconfident'), ('Neitherconfidentnorunconfident', 'Neither confident nor unconfident'), ('Confident', 'Confident'), ('Absolutelyconfident', 'Absolutely confident'), ('NotApplicable', 'Not Applicable')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedbackpost', + name='text_readability', + field=models.CharField(choices=[('', '-----'), ('Excellent', 'Excellent'), ('Good', 'Good'), ('Fair', 'Fair'), ('Bad', 'Bad'), ('Extremelybad', 'Extremely bad')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedbackpost', + name='time_for_handson', + field=models.CharField(choices=[('', '-----'), ('Excellent', 'Excellent'), ('Good', 'Good'), ('Fair', 'Fair'), ('Bad', 'Bad'), ('Extremelybad', 'Extremely bad')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedbackpost', + name='used_sw_before', + field=models.CharField(choices=[('', '-----'), ('Yes', 'Yes'), ('No', 'No')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedbackpost', + name='user', + field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL), + ), + migrations.AlterField( + model_name='stworkshopfeedbackpost', + name='visual_presentation', + field=models.CharField(choices=[('', '-----'), ('Excellent', 'Excellent'), ('Good', 'Good'), ('Fair', 'Fair'), ('Bad', 'Bad'), ('Extremelybad', 'Extremely bad')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedbackpost', + name='wantto_conduct_incollege', + field=models.CharField(choices=[('', '-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), ('StronglyDisagree', 'Strongly Disagree'), ('Noidea', 'No idea')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedbackpost', + name='ws_not_useful', + field=models.CharField(choices=[('', '-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), ('StronglyDisagree', 'Strongly Disagree'), ('Noidea', 'No idea')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedbackpost', + name='ws_quality', + field=models.CharField(choices=[('', '-----'), ('Excellent', 'Excellent'), ('Good', 'Good'), ('Fair', 'Fair'), ('Bad', 'Bad'), ('Extremelybad', 'Extremely bad')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedbackpre', + name='adding_func', + field=models.CharField(choices=[('', '-----'), ('Notconfidentatall', 'Not confident at all'), ('Unconfident', 'Unconfident'), ('Neitherconfidentnorunconfident', 'Neither confident nor unconfident'), ('Confident', 'Confident'), ('Absolutelyconfident', 'Absolutely confident'), ('NotApplicable', 'Not Applicable')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedbackpre', + name='configuration_management', + field=models.CharField(choices=[('', '-----'), ('Notconfidentatall', 'Not confident at all'), ('Unconfident', 'Unconfident'), ('Neitherconfidentnorunconfident', 'Neither confident nor unconfident'), ('Confident', 'Confident'), ('Absolutelyconfident', 'Absolutely confident'), ('NotApplicable', 'Not Applicable')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedbackpre', + name='content_management', + field=models.CharField(choices=[('', '-----'), ('Notconfidentatall', 'Not confident at all'), ('Unconfident', 'Unconfident'), ('Neitherconfidentnorunconfident', 'Neither confident nor unconfident'), ('Confident', 'Confident'), ('Absolutelyconfident', 'Absolutely confident'), ('NotApplicable', 'Not Applicable')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedbackpre', + name='contents_using_view', + field=models.CharField(choices=[('', '-----'), ('Notconfidentatall', 'Not confident at all'), ('Unconfident', 'Unconfident'), ('Neitherconfidentnorunconfident', 'Neither confident nor unconfident'), ('Confident', 'Confident'), ('Absolutelyconfident', 'Absolutely confident'), ('NotApplicable', 'Not Applicable')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedbackpre', + name='control_display_images', + field=models.CharField(choices=[('', '-----'), ('Notconfidentatall', 'Not confident at all'), ('Unconfident', 'Unconfident'), ('Neitherconfidentnorunconfident', 'Neither confident nor unconfident'), ('Confident', 'Confident'), ('Absolutelyconfident', 'Absolutely confident'), ('NotApplicable', 'Not Applicable')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedbackpre', + name='create_new_content', + field=models.CharField(choices=[('', '-----'), ('Notconfidentatall', 'Not confident at all'), ('Unconfident', 'Unconfident'), ('Neitherconfidentnorunconfident', 'Neither confident nor unconfident'), ('Confident', 'Confident'), ('Absolutelyconfident', 'Absolutely confident'), ('NotApplicable', 'Not Applicable')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedbackpre', + name='creating_basic_content', + field=models.CharField(choices=[('', '-----'), ('Notconfidentatall', 'Not confident at all'), ('Unconfident', 'Unconfident'), ('Neitherconfidentnorunconfident', 'Neither confident nor unconfident'), ('Confident', 'Confident'), ('Absolutelyconfident', 'Absolutely confident'), ('NotApplicable', 'Not Applicable')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedbackpre', + name='creating_dummy_content', + field=models.CharField(choices=[('', '-----'), ('Notconfidentatall', 'Not confident at all'), ('Unconfident', 'Unconfident'), ('Neitherconfidentnorunconfident', 'Neither confident nor unconfident'), ('Confident', 'Confident'), ('Absolutelyconfident', 'Absolutely confident'), ('NotApplicable', 'Not Applicable')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedbackpre', + name='edit_existing_content', + field=models.CharField(choices=[('', '-----'), ('Notconfidentatall', 'Not confident at all'), ('Unconfident', 'Unconfident'), ('Neitherconfidentnorunconfident', 'Neither confident nor unconfident'), ('Confident', 'Confident'), ('Absolutelyconfident', 'Absolutely confident'), ('NotApplicable', 'Not Applicable')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedbackpre', + name='finding_modules', + field=models.CharField(choices=[('', '-----'), ('Notconfidentatall', 'Not confident at all'), ('Unconfident', 'Unconfident'), ('Neitherconfidentnorunconfident', 'Neither confident nor unconfident'), ('Confident', 'Confident'), ('Absolutelyconfident', 'Absolutely confident'), ('NotApplicable', 'Not Applicable')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedbackpre', + name='gender', + field=models.CharField(choices=[('', '-----'), ('Male', 'Male'), ('Female', 'Female')], max_length=10), + ), + migrations.AlterField( + model_name='stworkshopfeedbackpre', + name='grp_entity_ref', + field=models.CharField(choices=[('', '-----'), ('Notconfidentatall', 'Not confident at all'), ('Unconfident', 'Unconfident'), ('Neitherconfidentnorunconfident', 'Neither confident nor unconfident'), ('Confident', 'Confident'), ('Absolutelyconfident', 'Absolutely confident'), ('NotApplicable', 'Not Applicable')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedbackpre', + name='installig_ad_themes', + field=models.CharField(choices=[('', '-----'), ('Notconfidentatall', 'Not confident at all'), ('Unconfident', 'Unconfident'), ('Neitherconfidentnorunconfident', 'Neither confident nor unconfident'), ('Confident', 'Confident'), ('Absolutelyconfident', 'Absolutely confident'), ('NotApplicable', 'Not Applicable')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedbackpre', + name='managing_content', + field=models.CharField(choices=[('', '-----'), ('Notconfidentatall', 'Not confident at all'), ('Unconfident', 'Unconfident'), ('Neitherconfidentnorunconfident', 'Neither confident nor unconfident'), ('Confident', 'Confident'), ('Absolutelyconfident', 'Absolutely confident'), ('NotApplicable', 'Not Applicable')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedbackpre', + name='menu_endpoints', + field=models.CharField(choices=[('', '-----'), ('Notconfidentatall', 'Not confident at all'), ('Unconfident', 'Unconfident'), ('Neitherconfidentnorunconfident', 'Neither confident nor unconfident'), ('Confident', 'Confident'), ('Absolutelyconfident', 'Absolutely confident'), ('NotApplicable', 'Not Applicable')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedbackpre', + name='modify_display_content', + field=models.CharField(choices=[('', '-----'), ('Notconfidentatall', 'Not confident at all'), ('Unconfident', 'Unconfident'), ('Neitherconfidentnorunconfident', 'Neither confident nor unconfident'), ('Confident', 'Confident'), ('Absolutelyconfident', 'Absolutely confident'), ('NotApplicable', 'Not Applicable')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedbackpre', + name='modifying_page_layout', + field=models.CharField(choices=[('', '-----'), ('Notconfidentatall', 'Not confident at all'), ('Unconfident', 'Unconfident'), ('Neitherconfidentnorunconfident', 'Neither confident nor unconfident'), ('Confident', 'Confident'), ('Absolutelyconfident', 'Absolutely confident'), ('NotApplicable', 'Not Applicable')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedbackpre', + name='people_management', + field=models.CharField(choices=[('', '-----'), ('Notconfidentatall', 'Not confident at all'), ('Unconfident', 'Unconfident'), ('Neitherconfidentnorunconfident', 'Neither confident nor unconfident'), ('Confident', 'Confident'), ('Absolutelyconfident', 'Absolutely confident'), ('NotApplicable', 'Not Applicable')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedbackpre', + name='site_management', + field=models.CharField(choices=[('', '-----'), ('Notconfidentatall', 'Not confident at all'), ('Unconfident', 'Unconfident'), ('Neitherconfidentnorunconfident', 'Neither confident nor unconfident'), ('Confident', 'Confident'), ('Absolutelyconfident', 'Absolutely confident'), ('NotApplicable', 'Not Applicable')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedbackpre', + name='styling_using_themes', + field=models.CharField(choices=[('', '-----'), ('Notconfidentatall', 'Not confident at all'), ('Unconfident', 'Unconfident'), ('Neitherconfidentnorunconfident', 'Neither confident nor unconfident'), ('Confident', 'Confident'), ('Absolutelyconfident', 'Absolutely confident'), ('NotApplicable', 'Not Applicable')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedbackpre', + name='table_of_fields_with_views', + field=models.CharField(choices=[('', '-----'), ('Notconfidentatall', 'Not confident at all'), ('Unconfident', 'Unconfident'), ('Neitherconfidentnorunconfident', 'Neither confident nor unconfident'), ('Confident', 'Confident'), ('Absolutelyconfident', 'Absolutely confident'), ('NotApplicable', 'Not Applicable')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedbackpre', + name='taxonomy', + field=models.CharField(choices=[('', '-----'), ('Notconfidentatall', 'Not confident at all'), ('Unconfident', 'Unconfident'), ('Neitherconfidentnorunconfident', 'Neither confident nor unconfident'), ('Confident', 'Confident'), ('Absolutelyconfident', 'Absolutely confident'), ('NotApplicable', 'Not Applicable')], max_length=50), + ), + migrations.AlterField( + model_name='stworkshopfeedbackpre', + name='user', + field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL), + ), + migrations.AlterField( + model_name='test', + name='academic', + field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='events.AcademicCenter'), + ), + migrations.AlterField( + model_name='test', + name='appoved_by', + field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.PROTECT, related_name='test_approved_by', to=settings.AUTH_USER_MODEL), + ), + migrations.AlterField( + model_name='test', + name='foss', + field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='creation.FossCategory'), + ), + migrations.AlterField( + model_name='test', + name='invigilator', + field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.PROTECT, related_name='test_invigilator', to='events.Invigilator'), + ), + migrations.AlterField( + model_name='test', + name='organiser', + field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='test_organiser', to='events.Organiser'), + ), + migrations.AlterField( + model_name='test', + name='test_category', + field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='category_tests', to='events.TestCategory'), + ), + migrations.AlterField( + model_name='test', + name='training', + field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.PROTECT, to='events.TrainingRequest'), + ), + migrations.AlterField( + model_name='testattendance', + name='student', + field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.PROTECT, to='events.Student'), + ), + migrations.AlterField( + model_name='testattendance', + name='test', + field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='events.Test'), + ), + migrations.AlterField( + model_name='testimonials', + name='approved_by', + field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.PROTECT, related_name='testimonial_approved_by', to=settings.AUTH_USER_MODEL), + ), + migrations.AlterField( + model_name='testimonials', + name='user', + field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='testimonial_created_by', to=settings.AUTH_USER_MODEL), + ), + migrations.AlterField( + model_name='testlog', + name='academic', + field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='events.AcademicCenter'), + ), + migrations.AlterField( + model_name='testlog', + name='test', + field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='events.Test'), + ), + migrations.AlterField( + model_name='testlog', + name='user', + field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL), + ), + migrations.AlterField( + model_name='training', + name='academic', + field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='events.AcademicCenter'), + ), + migrations.AlterField( + model_name='training', + name='appoved_by', + field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.PROTECT, related_name='training_approved_by', to=settings.AUTH_USER_MODEL), + ), + migrations.AlterField( + model_name='training', + name='course', + field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='events.Course'), + ), + migrations.AlterField( + model_name='training', + name='extra_fields', + field=models.OneToOneField(null=True, on_delete=django.db.models.deletion.PROTECT, to='events.TrainingExtraFields'), + ), + migrations.AlterField( + model_name='training', + name='foss', + field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='creation.FossCategory'), + ), + migrations.AlterField( + model_name='training', + name='language', + field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='creation.Language'), + ), + migrations.AlterField( + model_name='training', + name='organiser', + field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='events.Organiser'), + ), + migrations.AlterField( + model_name='trainingattend', + name='language', + field=models.ForeignKey(default=None, on_delete=django.db.models.deletion.PROTECT, to='creation.Language'), + ), + migrations.AlterField( + model_name='trainingattend', + name='student', + field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='events.Student'), + ), + migrations.AlterField( + model_name='trainingattend', + name='training', + field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='events.TrainingRequest'), + ), + migrations.AlterField( + model_name='trainingattendance', + name='training', + field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='events.Training'), + ), + migrations.AlterField( + model_name='trainingcertificate', + name='student', + field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='events.Student'), + ), + migrations.AlterField( + model_name='trainingcertificate', + name='training', + field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='events.TrainingRequest'), + ), + migrations.AlterField( + model_name='trainingfeedback', + name='training', + field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='events.TrainingRequest'), + ), + migrations.AlterField( + model_name='traininglanguagefeedback', + name='language_prefered', + field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.PROTECT, to='creation.Language'), + ), + migrations.AlterField( + model_name='traininglanguagefeedback', + name='training', + field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='events.TrainingRequest'), + ), + migrations.AlterField( + model_name='traininglivefeedback', + name='training', + field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='events.SingleTraining'), + ), + migrations.AlterField( + model_name='traininglog', + name='academic', + field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='events.AcademicCenter'), + ), + migrations.AlterField( + model_name='traininglog', + name='training', + field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='events.Training'), + ), + migrations.AlterField( + model_name='traininglog', + name='user', + field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL), + ), + migrations.AlterField( + model_name='trainingplanner', + name='academic', + field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='events.AcademicCenter'), + ), + migrations.AlterField( + model_name='trainingplanner', + name='organiser', + field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='events.Organiser'), + ), + migrations.AlterField( + model_name='trainingplanner', + name='semester', + field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='events.Semester'), + ), + migrations.AlterField( + model_name='trainingrequest', + name='batch', + field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.PROTECT, to='events.StudentBatch'), + ), + migrations.AlterField( + model_name='trainingrequest', + name='course', + field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='events.CourseMap'), + ), + migrations.AlterField( + model_name='trainingrequest', + name='department', + field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='events.Department'), + ), + migrations.AlterField( + model_name='trainingrequest', + name='training_planner', + field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='events.TrainingPlanner'), + ), + migrations.AlterField( + model_name='university', + name='state', + field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='events.State'), + ), + migrations.AlterField( + model_name='university', + name='user', + field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL), + ), + ] diff --git a/events/events/migrations/0039_trainingrequest_cert_status.py b/events/events/migrations/0039_trainingrequest_cert_status.py new file mode 100644 index 000000000..e0e855a1f --- /dev/null +++ b/events/events/migrations/0039_trainingrequest_cert_status.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11 on 2019-06-19 10:18 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('events', '0038_auto_20190531_0738'), + ] + + operations = [ + migrations.AddField( + model_name='trainingrequest', + name='cert_status', + field=models.PositiveSmallIntegerField(default=0), + ), + ] diff --git a/events/events/migrations/0040_topperlist.py b/events/events/migrations/0040_topperlist.py new file mode 100644 index 000000000..ace790268 --- /dev/null +++ b/events/events/migrations/0040_topperlist.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11 on 2019-10-07 05:35 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('events', '0039_trainingrequest_cert_status'), + ] + + operations = [ + migrations.CreateModel( + name='topperlist', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('emailid', models.EmailField(max_length=100)), + ('userid', models.PositiveIntegerField()), + ], + ), + ] diff --git a/events/events/migrations/0041_auto_20200618_1600.py b/events/events/migrations/0041_auto_20200618_1600.py new file mode 100644 index 000000000..4fae7a511 --- /dev/null +++ b/events/events/migrations/0041_auto_20200618_1600.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11 on 2020-06-18 10:30 +from __future__ import unicode_literals + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('events', '0040_topperlist'), + ] + + operations = [ + migrations.AlterUniqueTogether( + name='studentbatch', + unique_together=set([]), + ), + ] diff --git a/events/events/migrations/0042_auto_20200627_1211.py b/events/events/migrations/0042_auto_20200627_1211.py new file mode 100644 index 000000000..d7cee4119 --- /dev/null +++ b/events/events/migrations/0042_auto_20200627_1211.py @@ -0,0 +1,26 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11 on 2020-06-27 06:41 +from __future__ import unicode_literals + +import datetime +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('events', '0041_auto_20200618_1600'), + ] + + operations = [ + migrations.AddField( + model_name='trainingrequest', + name='training_end_date', + field=models.DateField(default=datetime.datetime.now), + ), + migrations.AddField( + model_name='trainingrequest', + name='training_start_date', + field=models.DateField(default=datetime.datetime.now), + ), + ] diff --git a/events/events/migrations/0043_studentbatch_batch_name.py b/events/events/migrations/0043_studentbatch_batch_name.py new file mode 100644 index 000000000..b78f4bde0 --- /dev/null +++ b/events/events/migrations/0043_studentbatch_batch_name.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11 on 2020-07-07 13:40 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('events', '0042_auto_20200627_1211'), + ] + + operations = [ + migrations.AddField( + model_name='studentbatch', + name='batch_name', + field=models.CharField(max_length=200, null=True), + ), + ] diff --git a/events/events/migrations/0044_auto_20200718_1203.py b/events/events/migrations/0044_auto_20200718_1203.py new file mode 100644 index 000000000..c8cbc9990 --- /dev/null +++ b/events/events/migrations/0044_auto_20200718_1203.py @@ -0,0 +1,66 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11 on 2020-07-18 06:33 +from __future__ import unicode_literals + +from django.conf import settings +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ('events', '0043_studentbatch_batch_name'), + ] + + operations = [ + migrations.CreateModel( + name='AcademicKey', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('u_key', models.CharField(max_length=50)), + ('hex_key', models.CharField(max_length=50)), + ('expiry_date', models.DateField()), + ('entry_date', models.DateTimeField(auto_now_add=True)), + ], + ), + migrations.CreateModel( + name='AcademicPaymentStatus', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name_of_the_payer', models.CharField(max_length=200)), + ('email', models.EmailField(max_length=254, null=True)), + ('phone', models.CharField(max_length=100, null=True)), + ('amount', models.CharField(max_length=20)), + ('subscription', models.CharField(choices=[('', '-----'), ('365', 'One_Year'), ('182', 'Six_Months')], max_length=50)), + ('transactionid', models.CharField(max_length=100, null=True)), + ('payment_date', models.DateField()), + ('payment_status', models.CharField(choices=[('', '-----'), ('New', 'New'), ('Renewal', 'Renewal')], max_length=50)), + ('college_type', models.CharField(choices=[('', '-----'), ('Engg', 'Engg'), ('ASC', 'ASC'), ('University', 'University')], max_length=50)), + ('pan_number', models.CharField(max_length=100, null=True)), + ('gst_number', models.CharField(max_length=15, null=True)), + ('customer_id', models.CharField(max_length=50, null=True)), + ('invoice_no', models.CharField(max_length=100, null=True)), + ('remarks', models.CharField(max_length=200, null=True)), + ('entry_date', models.DateTimeField(auto_now_add=True)), + ('academic', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='events.AcademicCenter')), + ('entry_user', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL)), + ('state', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='events.State')), + ], + ), + migrations.AddField( + model_name='academickey', + name='ac_pay_status', + field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='events.AcademicPaymentStatus'), + ), + migrations.AddField( + model_name='academickey', + name='academic', + field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='events.AcademicCenter'), + ), + migrations.AlterUniqueTogether( + name='academicpaymentstatus', + unique_together=set([('academic', 'transactionid', 'payment_date')]), + ), + ] diff --git a/events/events/migrations/0045_auto_20201111_1648.py b/events/events/migrations/0045_auto_20201111_1648.py new file mode 100644 index 000000000..c10e5e071 --- /dev/null +++ b/events/events/migrations/0045_auto_20201111_1648.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.29 on 2020-11-11 11:18 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('events', '0044_auto_20200718_1203'), + ] + + operations = [ + migrations.AlterField( + model_name='academicpaymentstatus', + name='college_type', + field=models.CharField(choices=[('', '-----'), ('Engg', 'Engg'), ('ASC', 'ASC'), ('University', 'University'), ('School', 'School')], max_length=50), + ), + ] diff --git a/events/events/migrations/0046_auto_20210318_1807.py b/events/events/migrations/0046_auto_20210318_1807.py new file mode 100644 index 000000000..f6bb665af --- /dev/null +++ b/events/events/migrations/0046_auto_20210318_1807.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11 on 2021-03-18 12:37 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('events', '0045_auto_20201111_1648'), + ] + + operations = [ + migrations.AlterField( + model_name='academicpaymentstatus', + name='college_type', + field=models.CharField(choices=[('', '-----'), ('Engg', 'Engg'), ('ASC', 'ASC'), ('Polytechnic', 'Polytechnic'), ('University', 'University'), ('School', 'School')], max_length=50), + ), + ] diff --git a/events/events/migrations/0047_testattendance_mdlgrade.py b/events/events/migrations/0047_testattendance_mdlgrade.py new file mode 100644 index 000000000..0aa301037 --- /dev/null +++ b/events/events/migrations/0047_testattendance_mdlgrade.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11 on 2022-03-22 07:05 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('events', '0046_auto_20210318_1807'), + ] + + operations = [ + migrations.AddField( + model_name='testattendance', + name='mdlgrade', + field=models.DecimalField(decimal_places=5, default=0.0, max_digits=12), + ), + ] diff --git a/events/events/migrations/0048_auto_20241213_1154.py b/events/events/migrations/0048_auto_20241213_1154.py new file mode 100644 index 000000000..2521af560 --- /dev/null +++ b/events/events/migrations/0048_auto_20241213_1154.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11 on 2024-12-13 06:24 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('events', '0047_testattendance_mdlgrade'), + ] + + operations = [ + migrations.AlterField( + model_name='academicpaymentstatus', + name='college_type', + field=models.CharField(max_length=50), + ), + ] diff --git a/events/events/migrations/0049_feedbackfeelings_feedbackopinion_feedbackrate_workshopfeedbackpost.py b/events/events/migrations/0049_feedbackfeelings_feedbackopinion_feedbackrate_workshopfeedbackpost.py new file mode 100644 index 000000000..fb3c21f1f --- /dev/null +++ b/events/events/migrations/0049_feedbackfeelings_feedbackopinion_feedbackrate_workshopfeedbackpost.py @@ -0,0 +1,139 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11 on 2025-01-07 06:06 +from __future__ import unicode_literals + +from django.conf import settings +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ('events', '0048_auto_20241213_1154'), + ] + + operations = [ + migrations.CreateModel( + name='FeedbackFeelings', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('content_management', models.CharField(choices=[('', '-----'), ('Notconfidentatall', 'Not confident at all'), ('Unconfident', 'Unconfident'), ('Neitherconfidentnorunconfident', 'Neither confident nor unconfident'), ('Confident', 'Confident'), ('Absolutelyconfident', 'Absolutely confident'), ('NotApplicable', 'Not Applicable')], max_length=50)), + ('configuration_management', models.CharField(choices=[('', '-----'), ('Notconfidentatall', 'Not confident at all'), ('Unconfident', 'Unconfident'), ('Neitherconfidentnorunconfident', 'Neither confident nor unconfident'), ('Confident', 'Confident'), ('Absolutelyconfident', 'Absolutely confident'), ('NotApplicable', 'Not Applicable')], max_length=50)), + ('creating_basic_content', models.CharField(choices=[('', '-----'), ('Notconfidentatall', 'Not confident at all'), ('Unconfident', 'Unconfident'), ('Neitherconfidentnorunconfident', 'Neither confident nor unconfident'), ('Confident', 'Confident'), ('Absolutelyconfident', 'Absolutely confident'), ('NotApplicable', 'Not Applicable')], max_length=50)), + ('edit_existing_content', models.CharField(choices=[('', '-----'), ('Notconfidentatall', 'Not confident at all'), ('Unconfident', 'Unconfident'), ('Neitherconfidentnorunconfident', 'Neither confident nor unconfident'), ('Confident', 'Confident'), ('Absolutelyconfident', 'Absolutely confident'), ('NotApplicable', 'Not Applicable')], max_length=50)), + ('create_new_content', models.CharField(choices=[('', '-----'), ('Notconfidentatall', 'Not confident at all'), ('Unconfident', 'Unconfident'), ('Neitherconfidentnorunconfident', 'Neither confident nor unconfident'), ('Confident', 'Confident'), ('Absolutelyconfident', 'Absolutely confident'), ('NotApplicable', 'Not Applicable')], max_length=50)), + ('grp_entity_ref', models.CharField(choices=[('', '-----'), ('Notconfidentatall', 'Not confident at all'), ('Unconfident', 'Unconfident'), ('Neitherconfidentnorunconfident', 'Neither confident nor unconfident'), ('Confident', 'Confident'), ('Absolutelyconfident', 'Absolutely confident'), ('NotApplicable', 'Not Applicable')], max_length=50)), + ('taxonomy', models.CharField(choices=[('', '-----'), ('Notconfidentatall', 'Not confident at all'), ('Unconfident', 'Unconfident'), ('Neitherconfidentnorunconfident', 'Neither confident nor unconfident'), ('Confident', 'Confident'), ('Absolutelyconfident', 'Absolutely confident'), ('NotApplicable', 'Not Applicable')], max_length=50)), + ('managing_content', models.CharField(choices=[('', '-----'), ('Notconfidentatall', 'Not confident at all'), ('Unconfident', 'Unconfident'), ('Neitherconfidentnorunconfident', 'Neither confident nor unconfident'), ('Confident', 'Confident'), ('Absolutelyconfident', 'Absolutely confident'), ('NotApplicable', 'Not Applicable')], max_length=50)), + ('creating_dummy_content', models.CharField(choices=[('', '-----'), ('Notconfidentatall', 'Not confident at all'), ('Unconfident', 'Unconfident'), ('Neitherconfidentnorunconfident', 'Neither confident nor unconfident'), ('Confident', 'Confident'), ('Absolutelyconfident', 'Absolutely confident'), ('NotApplicable', 'Not Applicable')], max_length=50)), + ('modify_display_content', models.CharField(choices=[('', '-----'), ('Notconfidentatall', 'Not confident at all'), ('Unconfident', 'Unconfident'), ('Neitherconfidentnorunconfident', 'Neither confident nor unconfident'), ('Confident', 'Confident'), ('Absolutelyconfident', 'Absolutely confident'), ('NotApplicable', 'Not Applicable')], max_length=50)), + ('contents_using_view', models.CharField(choices=[('', '-----'), ('Notconfidentatall', 'Not confident at all'), ('Unconfident', 'Unconfident'), ('Neitherconfidentnorunconfident', 'Neither confident nor unconfident'), ('Confident', 'Confident'), ('Absolutelyconfident', 'Absolutely confident'), ('NotApplicable', 'Not Applicable')], max_length=50)), + ('table_of_fields_with_views', models.CharField(choices=[('', '-----'), ('Notconfidentatall', 'Not confident at all'), ('Unconfident', 'Unconfident'), ('Neitherconfidentnorunconfident', 'Neither confident nor unconfident'), ('Confident', 'Confident'), ('Absolutelyconfident', 'Absolutely confident'), ('NotApplicable', 'Not Applicable')], max_length=50)), + ('control_display_images', models.CharField(choices=[('', '-----'), ('Notconfidentatall', 'Not confident at all'), ('Unconfident', 'Unconfident'), ('Neitherconfidentnorunconfident', 'Neither confident nor unconfident'), ('Confident', 'Confident'), ('Absolutelyconfident', 'Absolutely confident'), ('NotApplicable', 'Not Applicable')], max_length=50)), + ('adding_func', models.CharField(choices=[('', '-----'), ('Notconfidentatall', 'Not confident at all'), ('Unconfident', 'Unconfident'), ('Neitherconfidentnorunconfident', 'Neither confident nor unconfident'), ('Confident', 'Confident'), ('Absolutelyconfident', 'Absolutely confident'), ('NotApplicable', 'Not Applicable')], max_length=50)), + ('finding_modules', models.CharField(choices=[('', '-----'), ('Notconfidentatall', 'Not confident at all'), ('Unconfident', 'Unconfident'), ('Neitherconfidentnorunconfident', 'Neither confident nor unconfident'), ('Confident', 'Confident'), ('Absolutelyconfident', 'Absolutely confident'), ('NotApplicable', 'Not Applicable')], max_length=50)), + ('modifying_page_layout', models.CharField(choices=[('', '-----'), ('Notconfidentatall', 'Not confident at all'), ('Unconfident', 'Unconfident'), ('Neitherconfidentnorunconfident', 'Neither confident nor unconfident'), ('Confident', 'Confident'), ('Absolutelyconfident', 'Absolutely confident'), ('NotApplicable', 'Not Applicable')], max_length=50)), + ('menu_endpoints', models.CharField(choices=[('', '-----'), ('Notconfidentatall', 'Not confident at all'), ('Unconfident', 'Unconfident'), ('Neitherconfidentnorunconfident', 'Neither confident nor unconfident'), ('Confident', 'Confident'), ('Absolutelyconfident', 'Absolutely confident'), ('NotApplicable', 'Not Applicable')], max_length=50)), + ('styling_using_themes', models.CharField(choices=[('', '-----'), ('Notconfidentatall', 'Not confident at all'), ('Unconfident', 'Unconfident'), ('Neitherconfidentnorunconfident', 'Neither confident nor unconfident'), ('Confident', 'Confident'), ('Absolutelyconfident', 'Absolutely confident'), ('NotApplicable', 'Not Applicable')], max_length=50)), + ('installig_ad_themes', models.CharField(choices=[('', '-----'), ('Notconfidentatall', 'Not confident at all'), ('Unconfident', 'Unconfident'), ('Neitherconfidentnorunconfident', 'Neither confident nor unconfident'), ('Confident', 'Confident'), ('Absolutelyconfident', 'Absolutely confident'), ('NotApplicable', 'Not Applicable')], max_length=50)), + ('people_management', models.CharField(choices=[('', '-----'), ('Notconfidentatall', 'Not confident at all'), ('Unconfident', 'Unconfident'), ('Neitherconfidentnorunconfident', 'Neither confident nor unconfident'), ('Confident', 'Confident'), ('Absolutelyconfident', 'Absolutely confident'), ('NotApplicable', 'Not Applicable')], max_length=50)), + ('site_management', models.CharField(choices=[('', '-----'), ('Notconfidentatall', 'Not confident at all'), ('Unconfident', 'Unconfident'), ('Neitherconfidentnorunconfident', 'Neither confident nor unconfident'), ('Confident', 'Confident'), ('Absolutelyconfident', 'Absolutely confident'), ('NotApplicable', 'Not Applicable')], max_length=50)), + ], + ), + migrations.CreateModel( + name='FeedbackOpinion', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('spfriendly', models.CharField(choices=[('', '-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), ('StronglyDisagree', 'Strongly Disagree'), ('Noidea', 'No idea')], max_length=16)), + ('diff_watch_practice', models.CharField(choices=[('', '-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), ('StronglyDisagree', 'Strongly Disagree'), ('Noidea', 'No idea')], max_length=16)), + ('satisfied_with_learning_experience', models.CharField(choices=[('', '-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), ('StronglyDisagree', 'Strongly Disagree'), ('Noidea', 'No idea')], max_length=16)), + ('confident', models.CharField(choices=[('', '-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), ('StronglyDisagree', 'Strongly Disagree'), ('Noidea', 'No idea')], max_length=16)), + ('side_by_side_hold_intrest', models.CharField(choices=[('', '-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), ('StronglyDisagree', 'Strongly Disagree'), ('Noidea', 'No idea')], max_length=16)), + ('ws_not_useful', models.CharField(choices=[('', '-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), ('StronglyDisagree', 'Strongly Disagree'), ('Noidea', 'No idea')], max_length=16)), + ('can_learn_other', models.CharField(choices=[('', '-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), ('StronglyDisagree', 'Strongly Disagree'), ('Noidea', 'No idea')], max_length=16)), + ('wantto_conduct_incollege', models.CharField(choices=[('', '-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), ('StronglyDisagree', 'Strongly Disagree'), ('Noidea', 'No idea')], max_length=16)), + ('esy_to_conduct_own', models.CharField(choices=[('', '-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), ('StronglyDisagree', 'Strongly Disagree'), ('Noidea', 'No idea')], max_length=16)), + ('ask_student_to_use', models.CharField(choices=[('', '-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), ('StronglyDisagree', 'Strongly Disagree'), ('Noidea', 'No idea')], max_length=16)), + ('possible_to_use_therotical', models.CharField(choices=[('', '-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), ('StronglyDisagree', 'Strongly Disagree'), ('Noidea', 'No idea')], max_length=16)), + ('not_self_explanatory', models.CharField(choices=[('', '-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), ('StronglyDisagree', 'Strongly Disagree'), ('Noidea', 'No idea')], max_length=16)), + ('logical_sequence', models.CharField(choices=[('', '-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), ('StronglyDisagree', 'Strongly Disagree'), ('Noidea', 'No idea')], max_length=16)), + ('examples_help', models.CharField(choices=[('', '-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), ('StronglyDisagree', 'Strongly Disagree'), ('Noidea', 'No idea')], max_length=16)), + ('other_language', models.CharField(choices=[('', '-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), ('StronglyDisagree', 'Strongly Disagree'), ('Noidea', 'No idea')], max_length=16)), + ('instructions_easy_to_follow', models.CharField(choices=[('', '-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), ('StronglyDisagree', 'Strongly Disagree'), ('Noidea', 'No idea')], max_length=16)), + ('language_complicated', models.CharField(choices=[('', '-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), ('StronglyDisagree', 'Strongly Disagree'), ('Noidea', 'No idea')], max_length=16)), + ('acquired_knowledge', models.CharField(choices=[('', '-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), ('StronglyDisagree', 'Strongly Disagree'), ('Noidea', 'No idea')], max_length=16)), + ('suff_instruction_by_prof', models.CharField(choices=[('', '-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), ('StronglyDisagree', 'Strongly Disagree'), ('Noidea', 'No idea')], max_length=16)), + ('suff_instruction_by_staff', models.CharField(choices=[('', '-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), ('StronglyDisagree', 'Strongly Disagree'), ('Noidea', 'No idea')], max_length=16)), + ('method_easy', models.CharField(choices=[('', '-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), ('StronglyDisagree', 'Strongly Disagree'), ('Noidea', 'No idea')], max_length=16)), + ('desired_objective', models.CharField(choices=[('', '-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), ('StronglyDisagree', 'Strongly Disagree'), ('Noidea', 'No idea')], max_length=16)), + ('recommend', models.CharField(choices=[('', '-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), ('StronglyDisagree', 'Strongly Disagree'), ('Noidea', 'No idea')], max_length=16)), + ('like_to_part', models.CharField(choices=[('', '-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), ('StronglyDisagree', 'Strongly Disagree'), ('Noidea', 'No idea')], max_length=16)), + ('learn_other_side_by_side', models.CharField(choices=[('', '-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), ('StronglyDisagree', 'Strongly Disagree'), ('Noidea', 'No idea')], max_length=16)), + ('referred_forums', models.CharField(choices=[('', '-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), ('StronglyDisagree', 'Strongly Disagree'), ('Noidea', 'No idea')], max_length=16)), + ('referred_forums_after', models.CharField(choices=[('', '-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), ('StronglyDisagree', 'Strongly Disagree'), ('Noidea', 'No idea')], max_length=16)), + ('asked_ques_forums', models.CharField(choices=[('', '-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), ('StronglyDisagree', 'Strongly Disagree'), ('Noidea', 'No idea')], max_length=16)), + ('not_answer_doubts', models.CharField(choices=[('', '-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), ('StronglyDisagree', 'Strongly Disagree'), ('Noidea', 'No idea')], max_length=16)), + ('forum_helpful', models.CharField(choices=[('', '-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), ('StronglyDisagree', 'Strongly Disagree'), ('Noidea', 'No idea')], max_length=16)), + ('doubts_solved_fast', models.CharField(choices=[('', '-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), ('StronglyDisagree', 'Strongly Disagree'), ('Noidea', 'No idea')], max_length=16)), + ('need_not_post', models.CharField(choices=[('', '-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), ('StronglyDisagree', 'Strongly Disagree'), ('Noidea', 'No idea')], max_length=16)), + ('faster_on_forums', models.CharField(choices=[('', '-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), ('StronglyDisagree', 'Strongly Disagree'), ('Noidea', 'No idea')], max_length=16)), + ('not_have_to_wait', models.CharField(choices=[('', '-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), ('StronglyDisagree', 'Strongly Disagree'), ('Noidea', 'No idea')], max_length=16)), + ('not_like_method_forums', models.CharField(choices=[('', '-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), ('StronglyDisagree', 'Strongly Disagree'), ('Noidea', 'No idea')], max_length=16)), + ('helpful_pre_ans_ques', models.CharField(choices=[('', '-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), ('StronglyDisagree', 'Strongly Disagree'), ('Noidea', 'No idea')], max_length=16)), + ('not_like_reveal_identity', models.CharField(choices=[('', '-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), ('StronglyDisagree', 'Strongly Disagree'), ('Noidea', 'No idea')], max_length=16)), + ('forum_motivated', models.CharField(choices=[('', '-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), ('StronglyDisagree', 'Strongly Disagree'), ('Noidea', 'No idea')], max_length=16)), + ('per_asked_ques_before_tuts', models.CharField(choices=[('', '-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), ('StronglyDisagree', 'Strongly Disagree'), ('Noidea', 'No idea')], max_length=16)), + ], + ), + migrations.CreateModel( + name='FeedbackRate', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('ws_quality', models.CharField(choices=[('', '-----'), ('Excellent', 'Excellent'), ('Good', 'Good'), ('Fair', 'Fair'), ('Bad', 'Bad'), ('Extremelybad', 'Extremely bad')], max_length=50)), + ('relevance', models.CharField(choices=[('', '-----'), ('Excellent', 'Excellent'), ('Good', 'Good'), ('Fair', 'Fair'), ('Bad', 'Bad'), ('Extremelybad', 'Extremely bad')], max_length=50)), + ('guidelines', models.CharField(choices=[('', '-----'), ('Excellent', 'Excellent'), ('Good', 'Good'), ('Fair', 'Fair'), ('Bad', 'Bad'), ('Extremelybad', 'Extremely bad')], max_length=50)), + ('overall_video_quality', models.CharField(choices=[('', '-----'), ('Excellent', 'Excellent'), ('Good', 'Good'), ('Fair', 'Fair'), ('Bad', 'Bad'), ('Extremelybad', 'Extremely bad')], max_length=50)), + ('text_readability', models.CharField(choices=[('', '-----'), ('Excellent', 'Excellent'), ('Good', 'Good'), ('Fair', 'Fair'), ('Bad', 'Bad'), ('Extremelybad', 'Extremely bad')], max_length=50)), + ('clarity_of_speech', models.CharField(choices=[('', '-----'), ('Excellent', 'Excellent'), ('Good', 'Good'), ('Fair', 'Fair'), ('Bad', 'Bad'), ('Extremelybad', 'Extremely bad')], max_length=50)), + ('visual_presentation', models.CharField(choices=[('', '-----'), ('Excellent', 'Excellent'), ('Good', 'Good'), ('Fair', 'Fair'), ('Bad', 'Bad'), ('Extremelybad', 'Extremely bad')], max_length=50)), + ('pace_of_tutorial', models.CharField(choices=[('', '-----'), ('Excellent', 'Excellent'), ('Good', 'Good'), ('Fair', 'Fair'), ('Bad', 'Bad'), ('Extremelybad', 'Extremely bad')], max_length=50)), + ('arrangement', models.CharField(choices=[('', '-----'), ('Excellent', 'Excellent'), ('Good', 'Good'), ('Fair', 'Fair'), ('Bad', 'Bad'), ('Extremelybad', 'Extremely bad')], max_length=50)), + ('network', models.CharField(choices=[('', '-----'), ('Excellent', 'Excellent'), ('Good', 'Good'), ('Fair', 'Fair'), ('Bad', 'Bad'), ('Extremelybad', 'Extremely bad')], max_length=50)), + ('installation_help', models.CharField(choices=[('', '-----'), ('Excellent', 'Excellent'), ('Good', 'Good'), ('Fair', 'Fair'), ('Bad', 'Bad'), ('Extremelybad', 'Extremely bad')], max_length=50)), + ('time_for_handson', models.CharField(choices=[('', '-----'), ('Excellent', 'Excellent'), ('Good', 'Good'), ('Fair', 'Fair'), ('Bad', 'Bad'), ('Extremelybad', 'Extremely bad')], max_length=50)), + ('experience_of_learning', models.CharField(choices=[('', '-----'), ('Excellent', 'Excellent'), ('Good', 'Good'), ('Fair', 'Fair'), ('Bad', 'Bad'), ('Extremelybad', 'Extremely bad')], max_length=50)), + ('overall_arrangement', models.CharField(choices=[('', '-----'), ('Excellent', 'Excellent'), ('Good', 'Good'), ('Fair', 'Fair'), ('Bad', 'Bad'), ('Extremelybad', 'Extremely bad')], max_length=50)), + ], + ), + migrations.CreateModel( + name='WorkshopFeedbackPost', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('email', models.EmailField(max_length=100)), + ('gender', models.CharField(choices=[('', '-----'), ('Male', 'Male'), ('Female', 'Female')], max_length=10)), + ('age', models.CharField(max_length=2)), + ('participated_before', models.CharField(choices=[('', '-----'), ('Yes', 'Yes'), ('No', 'No')], max_length=50)), + ('foss_where', models.CharField(max_length=200)), + ('install_own', models.CharField(choices=[('', '-----'), ('Yes', 'Yes'), ('No', 'No')], max_length=3)), + ('explain', models.TextField()), + ('used_sw_before', models.CharField(choices=[('', '-----'), ('Yes', 'Yes'), ('No', 'No')], max_length=3)), + ('sim_framework_before', models.CharField(choices=[('', '-----'), ('Yes', 'Yes'), ('No', 'No')], max_length=3)), + ('total_tutorials1', models.CharField(max_length=20)), + ('purpose_of_attending', models.CharField(max_length=300)), + ('like_to_create_st', models.CharField(choices=[('', '-----'), ('Yes', 'Yes'), ('No', 'No')], max_length=3)), + ('like_to_create_st_details', models.CharField(max_length=300)), + ('num_of_experts_req', models.CharField(choices=[('', '-----'), ('1to10', '1 to 10'), ('11to20', '11 to 20'), ('21to30', '21 to 30'), ('31to40', '31 to 40'), ('above40', 'Above 40')], max_length=50)), + ('fees', models.CharField(choices=[('', '-----'), ('below250', 'Below Rs.250/-'), ('between251to500', 'Between Rs.251 to Rs.500/-'), ('between501to1000', 'Between Rs.501 to Rs.1000/-'), ('between1001to2000', 'Between Rs.1001 to Rs.2000/-'), ('above2000', 'Above Rs. 2000/-')], max_length=50)), + ('like_abt_ws', models.TextField()), + ('how_make_better', models.TextField()), + ('experience', models.TextField()), + ('suggestions', models.TextField()), + ('feelings', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='events.FeedbackFeelings')), + ('opinion', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='events.FeedbackOpinion')), + ('rate', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='events.FeedbackRate')), + ('user', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL)), + ], + ), + ] diff --git a/events/events/migrations/0050_auto_20250107_1314.py b/events/events/migrations/0050_auto_20250107_1314.py new file mode 100644 index 000000000..8734e3303 --- /dev/null +++ b/events/events/migrations/0050_auto_20250107_1314.py @@ -0,0 +1,41 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11 on 2025-01-07 07:44 +from __future__ import unicode_literals + +from django.db import migrations + + +def copy_feedback_data(apps, schema_editor): + OriginalModel = apps.get_model('events', 'STWorkshopFeedbackPost') + FeedbackOpinionModel = apps.get_model('events', 'FeedbackOpinion') + FeedbackRateModel = apps.get_model('events', 'FeedbackRate') + FeedbackFeelingsModel = apps.get_model('events', 'FeedbackFeelings') + NewFeedbackModel = apps.get_model('events', 'WorkshopFeedbackPost') + + feedbackOpinionFields = ["id","spfriendly","diff_watch_practice","satisfied_with_learning_experience","confident","side_by_side_hold_intrest","ws_not_useful","can_learn_other","wantto_conduct_incollege","esy_to_conduct_own","ask_student_to_use","possible_to_use_therotical","not_self_explanatory","logical_sequence","examples_help","other_language","instructions_easy_to_follow","language_complicated","acquired_knowledge","suff_instruction_by_prof","suff_instruction_by_staff","method_easy","desired_objective","recommend","like_to_part","learn_other_side_by_side","referred_forums","referred_forums_after","asked_ques_forums","not_answer_doubts","forum_helpful","doubts_solved_fast","need_not_post","faster_on_forums","not_have_to_wait","not_like_method_forums","helpful_pre_ans_ques","not_like_reveal_identity","forum_motivated","per_asked_ques_before_tuts"] + feedbackRateFields = ["id","ws_quality","relevance","guidelines","overall_video_quality","text_readability","clarity_of_speech","visual_presentation","pace_of_tutorial","arrangement","network","installation_help","time_for_handson","experience_of_learning","overall_arrangement"] + feedbackFeelingsFields = ["id","content_management","configuration_management","creating_basic_content","edit_existing_content","create_new_content","grp_entity_ref","taxonomy","managing_content","creating_dummy_content","modify_display_content","contents_using_view","table_of_fields_with_views","control_display_images","adding_func","finding_modules","modifying_page_layout","menu_endpoints","styling_using_themes","installig_ad_themes","people_management","site_management"] + newFeedbackFields = ["id","user","email","gender","age","participated_before","foss_where","install_own","explain","used_sw_before","sim_framework_before","total_tutorials1","purpose_of_attending","like_to_create_st","like_to_create_st_details","num_of_experts_req","fees","like_abt_ws","how_make_better","experience","suggestions"] + + + + for obj in OriginalModel.objects.all(): + # Copy data to new models + feedbackOpinionData = {field: getattr(obj, field) for field in feedbackOpinionFields} + FeedbackOpinionModel.objects.create(**feedbackOpinionData) + feedbackRateData = {field: getattr(obj, field) for field in feedbackRateFields} + FeedbackRateModel.objects.create(**feedbackRateData) + feedbackFeelingsData = {field: getattr(obj, field) for field in feedbackFeelingsFields} + FeedbackFeelingsModel.objects.create(**feedbackFeelingsData) + newFeedbackFieldsData = {field: getattr(obj, field) for field in newFeedbackFields} + NewFeedbackModel.objects.create(**newFeedbackFieldsData, opinion_id=obj.id, rate_id=obj.id, feelings_id=obj.id) + +class Migration(migrations.Migration): + + dependencies = [ + ('events', '0049_feedbackfeelings_feedbackopinion_feedbackrate_workshopfeedbackpost'), + ] + + operations = [ + migrations.RunPython(copy_feedback_data) + ] diff --git a/events/events/migrations/0051_auto_20250109_1613.py b/events/events/migrations/0051_auto_20250109_1613.py new file mode 100644 index 000000000..f768af31d --- /dev/null +++ b/events/events/migrations/0051_auto_20250109_1613.py @@ -0,0 +1,18 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11 on 2025-01-09 10:43 +from __future__ import unicode_literals + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('events', '0050_auto_20250107_1314'), + ] + + operations = [ + migrations.DeleteModel( + name='STWorkshopFeedbackPost', + ), + ] diff --git a/events/events/migrations/0052_academicpaymentstatus_via_subscription_page.py b/events/events/migrations/0052_academicpaymentstatus_via_subscription_page.py new file mode 100644 index 000000000..fae59a3f0 --- /dev/null +++ b/events/events/migrations/0052_academicpaymentstatus_via_subscription_page.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11 on 2025-09-26 05:18 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('events', '0051_auto_20250109_1613'), + ] + + operations = [ + migrations.AddField( + model_name='academicpaymentstatus', + name='via_subscription_page', + field=models.BooleanField(default=False, verbose_name='Payment made via Spoken Tutorial Subscription page?'), + ), + ] diff --git a/events/events/migrations/0053_auto_20251028_1507.py b/events/events/migrations/0053_auto_20251028_1507.py new file mode 100644 index 000000000..cd079066a --- /dev/null +++ b/events/events/migrations/0053_auto_20251028_1507.py @@ -0,0 +1,27 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.29 on 2025-10-28 09:37 +from __future__ import unicode_literals + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('creation', '0032_domain_is_active'), + ('events', '0052_academicpaymentstatus_via_subscription_page'), + ] + + operations = [ + migrations.AddField( + model_name='fossmdlcourses', + name='language', + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, to='creation.Language'), + ), + migrations.AddField( + model_name='fossmdlcourses', + name='level', + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, to='creation.Level'), + ), + ] diff --git a/events/events/migrations/__init__.py b/events/events/migrations/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/events/events/models.py b/events/events/models.py new file mode 100644 index 000000000..6857fe5b0 --- /dev/null +++ b/events/events/models.py @@ -0,0 +1,1790 @@ + +from builtins import str +from builtins import object +from django.db import models +from datetime import datetime, date, timedelta +from django.db.models.signals import pre_delete, post_delete +from django.dispatch import receiver +from django.db.models import Q, Count, Sum, Min +from django.utils.encoding import python_2_unicode_compatible + +from creation.models import FossCategory, Language, Level + +#import auth user models +from django.contrib.auth.models import User + +#validation +from django.core.exceptions import ValidationError + +# importing models to access moodle DB +from mdldjango.models import * + +# importing from events.signals +from events.signals import revoke_student_permission + +#creation app models +from creation.models import FossAvailableForWorkshop, FossAvailableForTest + +from spoken.config import SUBSCRIPTION_CHOICES + + +PAYMENT_STATUS_CHOICES =( + ('', '-----'), ('New', 'New'), ('Renewal', 'Renewal') + ) +COLLEGE_TYPE_CHOICES =( + ('', '-----'), ('Engg', 'Engg'), ('ASC', 'ASC'), ('Polytechnic', 'Polytechnic'), ('University', 'University'), ('School', 'School') + ) + + + +# Create your models here. +@python_2_unicode_compatible +class State(models.Model): + users = models.ManyToManyField( + User, + related_name="resource_person", + through='ResourcePerson' + ) + code = models.CharField(max_length=3) + name = models.CharField(max_length=50) + slug = models.CharField(max_length = 100) + latitude = models.DecimalField( + null=True, + max_digits=10, + decimal_places=4, + blank=True + ) + longtitude = models.DecimalField( + null=True, + max_digits=10, + decimal_places=4, + blank=True + ) + img_map_area = models.TextField() + has_map = models.BooleanField(default=1) + created = models.DateTimeField(auto_now_add = True, null=True) + updated = models.DateTimeField(auto_now = True, null=True) + + def __str__(self): + return self.name + + class Meta(object): + unique_together = (("code","name"),) + + +@python_2_unicode_compatible +class District(models.Model): + state = models.ForeignKey(State, on_delete=models.PROTECT ) + code = models.CharField(max_length=3) + name = models.CharField(max_length=200) + created = models.DateTimeField(auto_now_add = True, null=True) + updated = models.DateTimeField(auto_now = True, null=True) + + def __str__(self): + return self.name + + class Meta(object): + unique_together = (("state", "code","name"),) + #unique_together = (("state_id","name"),) + + +@python_2_unicode_compatible +class City(models.Model): + state = models.ForeignKey(State, on_delete=models.PROTECT ) + name = models.CharField(max_length=200) + created = models.DateTimeField(auto_now_add = True, null=True) + updated = models.DateTimeField(auto_now = True, null=True) + + def __str__(self): + return self.name + + class Meta(object): + unique_together = (("name","state"),) + + +@python_2_unicode_compatible +class Location(models.Model): + district = models.ForeignKey(District, on_delete=models.PROTECT ) + name = models.CharField(max_length=200) + pincode = models.PositiveIntegerField() + created = models.DateTimeField(auto_now_add = True, null=True) + updated = models.DateTimeField(auto_now = True) + + def __str__(self): + return self.name + + class Meta(object): + unique_together = (("name","district","pincode"),) + + +class ResourcePerson(models.Model): + user = models.ForeignKey(User, on_delete=models.PROTECT ) + state = models.ForeignKey(State, on_delete=models.PROTECT ) + assigned_by = models.PositiveIntegerField() + status = models.BooleanField() + created = models.DateTimeField(auto_now_add = True) + updated = models.DateTimeField(auto_now = True) + class Meta(object): + verbose_name = "Resource Person" + unique_together = (("user","state"),) + + +@python_2_unicode_compatible +class University(models.Model): + name = models.CharField(max_length=200) + state = models.ForeignKey(State, on_delete=models.PROTECT ) + user = models.ForeignKey(User, on_delete=models.PROTECT ) + created = models.DateTimeField(auto_now_add = True) + updated = models.DateTimeField(auto_now = True) + + def __str__(self): + return self.name + + class Meta(object): + unique_together = (("name","state"),) + + +@python_2_unicode_compatible +class InstituteCategory(models.Model): + name = models.CharField(max_length=200) + created = models.DateTimeField(auto_now_add = True) + updated = models.DateTimeField(auto_now = True) + + def __str__(self): + return self.name + + class Meta(object): + verbose_name = "Institute Categorie" + + +@python_2_unicode_compatible +class InstituteType(models.Model): + name = models.CharField(max_length=200) + created = models.DateTimeField(auto_now_add = True) + updated = models.DateTimeField(auto_now = True) + + def __str__(self): + return self.name + + class Meta(object): + unique_together = (("name"),) + + +@python_2_unicode_compatible +class AcademicCenter(models.Model): + user = models.ForeignKey(User, on_delete=models.PROTECT ) + state = models.ForeignKey(State, on_delete=models.PROTECT ) + institution_type = models.ForeignKey(InstituteType, on_delete=models.PROTECT ) + institute_category = models.ForeignKey(InstituteCategory, on_delete=models.PROTECT ) + university = models.ForeignKey(University, on_delete=models.PROTECT ) + academic_code = models.CharField(max_length=100, unique = True) + institution_name = models.CharField(max_length=200) + district = models.ForeignKey(District, on_delete=models.PROTECT ) + location = models.ForeignKey(Location, null=True, on_delete=models.PROTECT ) + city = models.ForeignKey(City, on_delete=models.PROTECT ) + address = models.TextField() + pincode = models.PositiveIntegerField() + resource_center = models.BooleanField() + rating = models.PositiveSmallIntegerField() + contact_person = models.TextField() + remarks = models.TextField() + status = models.PositiveSmallIntegerField() + created = models.DateTimeField(auto_now_add = True) + updated = models.DateTimeField(auto_now = True) + + class Meta(object): + verbose_name = "Academic Center" + #unique_together = ( + # ("institution_name","district"), + # ("institution_name","university") + #) + + def __str__(self): + return self.institution_name + + def get_training_count(self): + return TrainingRequest.objects.filter( + training_planner__academic_id=self.id, + participants__gt=0, + sem_start_date__lte=datetime.now() + ).count() + + def get_training_participant_count(self): + training = TrainingRequest.objects.filter( + training_planner__academic_id=self.id, + participants__gt=0, + sem_start_date__lte=datetime.now() + ).aggregate(Sum('participants')) + return training['participants__sum'] + +@python_2_unicode_compatible +class Accountexecutive(models.Model): + user = models.OneToOneField(User, related_name = 'accountexecutive', on_delete=models.PROTECT ) + appoved_by = models.ForeignKey( + User, + related_name = 'accountexecutive_approved_by', + blank=True, + null=True, on_delete=models.PROTECT ) + academic = models.ForeignKey(AcademicCenter, blank=True, null=True, on_delete=models.PROTECT ) + status = models.PositiveSmallIntegerField(default=0) + created = models.DateTimeField(auto_now_add = True) + updated = models.DateTimeField(auto_now = True) + + def __str__(self): + return self.user.username + + +@python_2_unicode_compatible +class Organiser(models.Model): + user = models.OneToOneField(User, related_name = 'organiser', on_delete=models.PROTECT ) + appoved_by = models.ForeignKey( + User, + related_name = 'organiser_approved_by', + blank=True, + null=True, on_delete=models.PROTECT ) + academic = models.ForeignKey(AcademicCenter, blank=True, null=True, on_delete=models.PROTECT ) + status = models.PositiveSmallIntegerField(default=0) + created = models.DateTimeField(auto_now_add = True) + updated = models.DateTimeField(auto_now = True) + + def __str__(self): + return self.user.username + + +@python_2_unicode_compatible +class Invigilator(models.Model): + user = models.OneToOneField(User, on_delete=models.PROTECT ) + appoved_by = models.ForeignKey( + User, + related_name = 'invigilator_approved_by', + blank=True, + null=True, on_delete=models.PROTECT ) + academic = models.ForeignKey(AcademicCenter, on_delete=models.PROTECT ) + status = models.PositiveSmallIntegerField(default=0) + created = models.DateTimeField(auto_now_add = True) + updated = models.DateTimeField(auto_now = True) + + def __str__(self): + return self.user.username + + +@python_2_unicode_compatible +class Department(models.Model): + name = models.CharField(max_length=200) + created = models.DateTimeField(auto_now_add = True) + updated = models.DateTimeField(auto_now = True) + + def __str__(self): + return self.name + + class Meta(object): + ordering = ['name'] + + +@python_2_unicode_compatible +class Course(models.Model): + name = models.CharField(max_length=200) + created = models.DateTimeField(auto_now_add = True) + updated = models.DateTimeField(auto_now = True) + + def __str__(self): + return self.name + + class Meta(object): + unique_together = (("name"),) + + +class TrainingExtraFields(models.Model): + paper_name = models.CharField(max_length = 200) + approximate_hour = models.PositiveIntegerField(default = 0) + online_test = models.PositiveIntegerField(default = 0) + is_tutorial_useful = models.BooleanField(default = 0) + future_training = models.BooleanField(default = 0) + recommend_to_others = models.BooleanField(default = 0) + no_of_lab_session = models.CharField(max_length = 30, null=True) + +class Training(models.Model): + organiser = models.ForeignKey(Organiser, on_delete=models.PROTECT ) + appoved_by = models.ForeignKey( + User, + related_name = 'training_approved_by', + null=True, on_delete=models.PROTECT ) + academic = models.ForeignKey(AcademicCenter, on_delete=models.PROTECT ) + course = models.ForeignKey(Course, on_delete=models.PROTECT ) + training_type = models.PositiveIntegerField(default=0) + training_code = models.CharField(max_length=100, null=True) + department = models.ManyToManyField(Department) + language = models.ForeignKey(Language, on_delete=models.PROTECT ) + foss = models.ForeignKey(FossCategory, on_delete=models.PROTECT ) + tdate = models.DateField() + ttime = models.TimeField() + skype = models.PositiveSmallIntegerField(default=0) + status = models.PositiveSmallIntegerField(default=0) + # 0:request done, 1: attendance submit, 2: training manger approved, + # 3: mark attenda done, 4: complete, 5: rejected + extra_fields = models.OneToOneField(TrainingExtraFields, null = True, on_delete=models.PROTECT ) + participant_count = models.PositiveIntegerField(default=0) + trusted = models.BooleanField(default=1) + created = models.DateTimeField(auto_now_add = True) + updated = models.DateTimeField(auto_now = True) + + class Meta(object): + unique_together = (("organiser", "academic", "foss", "tdate", "ttime"),) + + +class TrainingAttendance(models.Model): + training = models.ForeignKey(Training, on_delete=models.PROTECT ) + mdluser_id = models.PositiveIntegerField(null=True, blank=True) + firstname = models.CharField(max_length = 100, null=True) + lastname = models.CharField(max_length = 100, null=True) + gender = models.CharField(max_length=10, null=True) + email = models.EmailField(null=True) + password = models.CharField(max_length = 100, null=True) + count = models.PositiveSmallIntegerField(default=0) + status = models.PositiveSmallIntegerField(default=0) + created = models.DateTimeField(auto_now_add = True) + updated = models.DateTimeField(auto_now = True) + + class Meta(object): + verbose_name = "Training Attendance" + #unique_together = (("training", "mdluser_id")) + + +class TrainingLog(models.Model): + user = models.ForeignKey(User, on_delete=models.PROTECT ) + training = models.ForeignKey(Training, on_delete=models.PROTECT ) + academic = models.ForeignKey(AcademicCenter, on_delete=models.PROTECT ) + role = models.PositiveSmallIntegerField() + #{0:'organiser', 1:'ResourcePerson', 2: 'Event Manager'} + status = models.PositiveSmallIntegerField() + # {0:'new', 1:'approved', 2:'completed', 3: 'rejected', 4:'update', + # 5:'Offline-Attendance submited', 6:'Marked Attendance'} + created = models.DateTimeField(auto_now_add = True) + + +@python_2_unicode_compatible +class TestCategory(models.Model): + name = models.CharField(max_length=200) + status = models.BooleanField(default = 0) + created = models.DateTimeField(auto_now_add = True, null=True) + updated = models.DateTimeField(auto_now = True, null=True) + + def __str__(self): + return self.name + + +class Test(models.Model): + organiser = models.ForeignKey(Organiser, related_name = 'test_organiser', on_delete=models.PROTECT ) + test_category = models.ForeignKey( + TestCategory, + related_name = 'category_tests', on_delete=models.PROTECT ) + appoved_by = models.ForeignKey( + User, + related_name = 'test_approved_by', + null=True, on_delete=models.PROTECT ) + invigilator = models.ForeignKey( + Invigilator, + related_name = 'test_invigilator', + null=True, on_delete=models.PROTECT ) + academic = models.ForeignKey(AcademicCenter, on_delete=models.PROTECT ) + department = models.ManyToManyField(Department) + training = models.ForeignKey('TrainingRequest', null=True, on_delete=models.PROTECT ) + foss = models.ForeignKey(FossCategory, on_delete=models.PROTECT ) + test_code = models.CharField(max_length=100) + tdate = models.DateField() + ttime = models.TimeField() + status = models.PositiveSmallIntegerField(default=0) + participant_count = models.PositiveIntegerField(default=0) + created = models.DateTimeField(auto_now_add = True) + updated = models.DateTimeField(auto_now = True) + + class Meta(object): + verbose_name = "Test Categorie" + unique_together = (("organiser", "academic", "foss", "tdate", "ttime"),) + + def get_test_attendance_count(self): + return TestAttendance.objects.filter( + test_id=self.id, + status__gte=2 + ).count() + + def update_test_participant_count(self): + self.participant_count = self.get_test_attendance_count() + self.save() + return self + + +class TestAttendance(models.Model): + test = models.ForeignKey(Test, on_delete=models.PROTECT ) + student = models.ForeignKey('Student', null=True, on_delete=models.PROTECT ) + mdluser_firstname = models.CharField(max_length = 100) + mdluser_lastname = models.CharField(max_length = 100) + mdluser_id = models.PositiveIntegerField() + mdlcourse_id = models.PositiveIntegerField(default=0) + mdlquiz_id = models.PositiveIntegerField(default=0) + mdlattempt_id = models.PositiveIntegerField(default=0) + password = models.CharField(max_length = 100, null=True) + count = models.PositiveSmallIntegerField(default=0) + status = models.PositiveSmallIntegerField(default=0) + mdlgrade = models.DecimalField(max_digits=12, decimal_places=5, default=0.00) + created = models.DateTimeField(auto_now_add = True) + updated = models.DateTimeField(auto_now = True) + class Meta(object): + verbose_name = "Test Attendance" + unique_together = (("test", "mdluser_id")) + + +class TestLog(models.Model): + user = models.ForeignKey(User, on_delete=models.PROTECT ) + test = models.ForeignKey(Test, on_delete=models.PROTECT ) + academic = models.ForeignKey(AcademicCenter, on_delete=models.PROTECT ) + role = models.PositiveSmallIntegerField(default=0) + # {0:'organiser', 1:'invigilator', 2:'ResourcePerson', 3: 'Event Manager'} + status = models.PositiveSmallIntegerField(default=0) + # {0:'new', 1:'RP-approved', 2:'Inv-approved', 3: 'ongoing', 4:'completed', + # 5:'Rp-rejected', 6:'Inv-rejected', 7:'Update', + # 8:'Attendance submited', 9:'Marked Attendance'} + created = models.DateTimeField(auto_now_add = True) + + +@python_2_unicode_compatible +class PermissionType(models.Model): + name = models.CharField(max_length=200) + created = models.DateTimeField(auto_now_add = True) + updated = models.DateTimeField(auto_now = True) + def __str__(self): + return self.name + + +class Permission(models.Model): + permissiontype = models.ForeignKey(PermissionType, on_delete=models.PROTECT ) + user = models.ForeignKey(User, related_name = 'permission_user', on_delete=models.PROTECT ) + state = models.ForeignKey(State, related_name = 'permission_state', on_delete=models.PROTECT ) + district = models.ForeignKey( + District, + related_name = 'permission_district', + null=True, on_delete=models.PROTECT ) + university = models.ForeignKey( + University, + related_name = 'permission_iniversity', + null=True, on_delete=models.PROTECT ) + institute_type = models.ForeignKey( + InstituteType, + related_name = 'permission_institution_type', + null=True, on_delete=models.PROTECT ) + institute = models.ForeignKey( + AcademicCenter, + related_name = 'permission_district', + null=True, on_delete=models.PROTECT ) + assigned_by = models.ForeignKey( + User, + related_name = 'permission_assigned_by', on_delete=models.PROTECT ) + created = models.DateTimeField(auto_now_add = True) + updated = models.DateTimeField(auto_now = True) + + +class FossMdlCourses(models.Model): + foss = models.ForeignKey(FossCategory, on_delete=models.PROTECT) + mdlcourse_id = models.PositiveIntegerField() + mdlquiz_id = models.PositiveIntegerField() + language = models.ForeignKey(Language, on_delete=models.PROTECT, null=True, blank=True) + level = models.ForeignKey(Level, on_delete=models.PROTECT, null=True, blank=True) + + + +class EventsNotification(models.Model): + user = models.ForeignKey(User, on_delete=models.PROTECT ) + role = models.PositiveSmallIntegerField(default=0) + # {0:'organiser', 1:'invigilator', 2:'ResourcePerson', 3: 'Event Manager'} + academic = models.ForeignKey(AcademicCenter, on_delete=models.PROTECT ) + category = models.PositiveSmallIntegerField(default=0) + # {'workshop', 'training', 'test'} + categoryid = models.PositiveIntegerField(default=0) + status = models.PositiveSmallIntegerField(default=0) + # {0:'new', 1:'update', 2:'approved', 3:'attendance', + # 4: 'completed', 5:'rejected'} + message = models.CharField(max_length = 255) + created = models.DateTimeField(auto_now_add = True) + + +class Testimonials(models.Model): + user = models.ForeignKey(User, related_name = 'testimonial_created_by', on_delete=models.PROTECT ) + approved_by = models.ForeignKey(User, related_name = 'testimonial_approved_by', null=True, on_delete=models.PROTECT ) + user_name = models.CharField(max_length=200) + actual_content = models.TextField() + minified_content = models.TextField() + short_description = models.TextField() + source_title = models.CharField(max_length=200, null=True) + source_link = models.URLField(null = True) + status = models.PositiveSmallIntegerField(default = 0) + created = models.DateTimeField(auto_now_add=True) + updated = models.DateTimeField(auto_now = True, null=True) + +@python_2_unicode_compatible +class MediaTestimonials(models.Model): + ''' + This model is required for storing audio / video testimonials + * path contains the location of the file, + * user is the person who has send the testimonial. + ''' + foss = models.ForeignKey(FossCategory, on_delete=models.PROTECT ) + path = models.CharField(max_length=255) + user = models.CharField(max_length=255) + workshop_details = models.CharField(max_length=255, default='Workshop') + content = models.CharField(max_length=500) + created = models.DateTimeField(auto_now_add=True) + + class Meta(object): + verbose_name = 'Media Testimonials' + verbose_name_plural = 'Media Testimonials' + + def __str__(self): + return self.path + +class OrganiserNotification(models.Model): + user = models.ForeignKey(User, on_delete=models.PROTECT ) + + +################ EVENTS VERSION II MODELS ################### + + +# Create your models here. +@python_2_unicode_compatible +class Student(models.Model): + user = models.OneToOneField(User, on_delete=models.PROTECT ) + gender = models.CharField(max_length = 15) + verified = models.PositiveSmallIntegerField(default = 0) + error = models.BooleanField(default=False) + created = models.DateTimeField(auto_now_add = True) + updated = models.DateTimeField(auto_now = True) + + def __str__(self): + return self.user.first_name + + def student_fullname(self): + if self.user.first_name: + return '%s %s' % (self.user.first_name, self.user.last_name) + return self.user.username + + def is_student_has_attendance(self): + if TrainingAttend.objects.filter(student_id=self.id).exists(): + return True + return False + + +@python_2_unicode_compatible +class StudentBatch(models.Model): + academic = models.ForeignKey(AcademicCenter, on_delete=models.PROTECT ) + organiser = models.ForeignKey(Organiser, on_delete=models.PROTECT ) + department = models.ForeignKey(Department, on_delete=models.PROTECT ) + year = models.PositiveIntegerField() # 2010-2014 + stcount = models.PositiveIntegerField(default=0) + batch_name = models.CharField(max_length=200, null=True) + + def __str__(self): + return '%s, %s Batch' % (self.department.name, self.year) + + def get_batch_info(self): + return '%s, %s, %s Batch' % (self.academic, self.department.name, self.year) + + def student_count(self): + return StudentMaster.objects.filter(batch_id = self.id).count() + + def can_add_student(self, organiser_id): + organiser = Organiser.objects.get(pk=organiser_id) + if self.organiser.academic_id == organiser.academic_id: + return True + return False + + def update_student_count(self): + self.stcount = StudentMaster.objects.filter(batch_id = self.id).count() + self.save() + return self.stcount + + def is_foss_batch_acceptable(self, course_id): + sm = StudentMaster.objects.filter(batch_id=self.id) + for s in sm: + if not TrainingAttend.objects.filter( + student_id=s.student_id, + training__course_id=course_id + ).exists(): + return True + return False + + def has_training(self): + if self.trainingrequest_set.exists(): + return False + return True + + def create_batch_name(self): + batch_query = StudentBatch.objects.filter(department_id=self.department_id, year=self.year, organiser=self.organiser) + b_count = batch_query.count() + name = str(self.department)+"-"+str(self.year)+"-"+str(b_count) + + for a in range(b_count+1): + name = str(self.department)+"-"+str(self.year)+"-"+str(a+1) + + if not batch_query.filter(batch_name=name).exists(): + self.batch_name = name + self.save() + break + return name + + +class StudentMaster(models.Model): + batch = models.ForeignKey(StudentBatch, on_delete=models.PROTECT ) + student = models.ForeignKey(Student, on_delete=models.PROTECT ) + moved = models.BooleanField(default=False) + created = models.DateTimeField(auto_now_add = True) + updated = models.DateTimeField(auto_now = True) + + class Meta(object): + unique_together = ("batch", "student") + ordering = ["student__user__first_name"] + + def is_student_has_attendance(self): + tids = TrainingRequest.objects.filter(batch=self.batch_id).values('id') + if TrainingAttend.objects.filter(training_id__in=tids, student_id=self.student_id).exists(): + return True + return False + +# Update student count in batch when delete student from batch +@receiver(post_delete, sender=StudentMaster, dispatch_uid='update_batch_count') +def update_batch_count(sender, instance, **kwargs): + instance.batch.update_student_count() + + +@python_2_unicode_compatible +class Semester(models.Model): + name = models.CharField(max_length = 50) + even = models.BooleanField(default = True) + + def __str__(self): + return self.name + + +@python_2_unicode_compatible +class LabCourse(models.Model): + name = models.CharField(max_length=200) + created = models.DateTimeField(auto_now_add = True) + updated = models.DateTimeField(auto_now = True) + + def __str__(self): + return self.name + + +@python_2_unicode_compatible +class CourseMap(models.Model): + #name = models.CharField(max_length=200, null=True, blank=True) + course = models.ForeignKey(LabCourse, null=True, blank=True, on_delete=models.PROTECT ) + foss = models.ForeignKey(FossCategory, on_delete=models.PROTECT ) + test = models.BooleanField(default=False) + # {0 => one day workshop, 1 => mapped course, 2 => unmapped course} + category = models.PositiveIntegerField(default=0) + created = models.DateTimeField(auto_now_add = True) + updated = models.DateTimeField(auto_now = True) + + def __str__(self): + if self.course_id: + return '%s (%s)' % (self.foss.foss, self.course.name) + return self.foss.foss + def course_name(self): + if self.course_id: + return '%s - %s' % (self.course.name, self.foss.foss) + return self.foss + + def category_name(self): + courses = { + 0 : 'Software Course outside lab hours', + 1 : 'Software Course mapped in lab hours', + 2 : 'Software Course unmapped in lab hours', + 3 : 'EduEasy Software', + 4 : 'other' + } + return courses[self.category] + + class Meta(object): + unique_together = ("course", "foss", "category") + ordering = ('foss',) + + +@python_2_unicode_compatible +class TrainingPlanner(models.Model): + year = models.CharField(max_length = 50) + academic = models.ForeignKey(AcademicCenter, on_delete=models.PROTECT ) + organiser = models.ForeignKey(Organiser, on_delete=models.PROTECT ) + semester = models.ForeignKey(Semester, on_delete=models.PROTECT ) + created = models.DateTimeField(auto_now_add = True) + updated = models.DateTimeField(auto_now = True) + + def __str__(self): + return self.semester.name + + def training_requests(self): + return TrainingRequest.objects.filter( + training_planner_id = self.id + ).exclude(Q(participants=0)&Q(status=1)) + + # Select all training which has no attendance + def training_with_no_attend(self): + return TrainingRequest.objects.filter( + (Q(participants=0, status=0) | Q(participants=0, status=1)), + training_planner_id = self.id + ) + + def get_semester(self): + if self.semester.even: + return 'January - June, %s' % (int(self.year) + 1) + return 'July - December, %s' % (self.year) + + def is_current_planner(self): + year, sem = self.get_current_year_and_sem() + if int(self.year) == year and self.semester.id == sem.id: + return True + return False + + def is_next_planner(self): + year, sem = self.get_current_year_and_sem() + try: + ctp = TrainingPlanner.objects.get( + year=year, + semester=sem, + organiser=self.organiser, + academic=self.academic + ) + year = int(ctp.year) + even = True + if ctp.semester.even: + year = year + 1 + even = False + if int(self.year) == year and bool(self.semester.even) == even: + return True + except Exception as e: + print(e) + return False + + def get_current_year_and_sem(self): + now = datetime.now() + year = now.year + month = now.month + is_even = True + # finding semester + if month > 6 and month < 13: + sem = Semester.objects.get(name='Odd') + is_even = False + else: + sem = Semester.objects.get(name='Even') + # finding year + if is_even: + year = year - 1 + return year, sem + + def completed_training(self): + return self.training_requests().filter(status=1) + + def ongoing_training(self): + return self.training_requests().filter(status=0) + + def is_full(self, department_id, batch_id): + if self.training_requests().filter( + department_id=department_id, + batch_id=batch_id, + training_planner__semester=self.semester + ).count() > 2: + return True + return False + + def is_school_full(self, department_id, batch_id): + if self.training_requests().filter( + department_id=department_id, + batch_id=batch_id + ).count() > 4: + return True + return False + + def get_current_semester_date_duration(self): + if self.semester.even: + return datetime.strptime( + str(int(self.year)+1)+'-01-01', '%Y-%m-%d' + ).date(), datetime.strptime( + str(int(self.year)+1)+'-06-30', '%Y-%m-%d' + ).date() + return datetime.strptime( + str(self.year)+'-07-01', '%Y-%m-%d' + ).date(), datetime.strptime( + str(self.year)+'-12-31', '%Y-%m-%d' + ).date() + + def get_current_semester_date_duration_new(self): + if self.semester.even: + return datetime.strptime( + str(int(self.year)+1)+'-01-01', '%Y-%m-%d' + ).date(), datetime.strptime( + str(int(self.year)+1)+'-03-31', '%Y-%m-%d' + ).date() + return datetime.strptime( + str(self.year)+'-07-01', '%Y-%m-%d' + ).date(), datetime.strptime( + str(self.year)+'-9-30', '%Y-%m-%d' + ).date() + + class Meta(object): + unique_together = ("year", "academic", "organiser", "semester") + + +class TestTrainingManager(models.Manager): + def get_queryset(self): + return super(TestTrainingManager, self).get_queryset().filter( + ( + Q(course__category=0) & + #Q(status=1) & + Q(sem_start_date__lte=datetime.now()-timedelta(days=15)) + ) | + ( + Q(course__category__gt=0) & + Q(sem_start_date__lte=datetime.now()-timedelta(days=15)) + ), + participants__gt=0 + ).order_by('-training_planner__year', '-training_planner__semester_id') + + +class TrainingRequest(models.Model): + training_planner = models.ForeignKey(TrainingPlanner, on_delete=models.PROTECT ) + department = models.ForeignKey(Department, on_delete=models.PROTECT ) + sem_start_date = models.DateField() + training_start_date = models.DateField(default=datetime.now) + training_end_date = models.DateField(default=datetime.now) + course = models.ForeignKey(CourseMap, on_delete=models.PROTECT ) + batch = models.ForeignKey(StudentBatch, null = True, on_delete=models.PROTECT ) + participants = models.PositiveIntegerField(default=0) + course_type = models.PositiveIntegerField(default=None) + #status = models.BooleanField(default=False) + status = models.PositiveSmallIntegerField(default=0) + cert_status = models.PositiveSmallIntegerField(default=0) + created = models.DateTimeField(auto_now_add = True) + updated = models.DateTimeField(auto_now = True) + #created = models.DateTimeField() + #updated = models.DateTimeField() + + # managers + objects = models.Manager() # The default manager. + test_training = TestTrainingManager() + + # return course type + def get_course_type(self): + if self.course_type == 0: + return 'Outside Lab Hours' + elif self.course_type == 1: + return 'Mapped Course' + elif self.course_type == 2: + return 'Unmapped Course' + return '' + + def is_training_certificate_allowed(self): + if not FossAvailableForTest.objects.filter( + foss=self.course.foss, + foss__status=True + ).count(): + return True + return False + + def is_learners_allowed(self): + if FossCategory.objects.filter( + id = self.course.foss.id, + is_learners_allowed=True,).count(): + return True + return False + + def have_test(self): + if FossAvailableForTest.objects.filter(foss=self.course.foss, foss__status=True).count(): + return True + return False + + def is_training_before_july2017(self): + d = date(2017,6,30) + if self.sem_start_date < d: + return True + return False + + def is_certificate_not_allowed(self): + if self.course.foss.id in [4,12,34,35,76]: + return True + return False + + # restrict the month to rise a training request + def can_mark_attendance(self): + sem_start, sem_end = self.training_planner.get_current_semester_date_duration() + today = date.today() + if self.status == 1 or today < self.sem_start_date or today > sem_end: + return False + #elif self.course.category == 0 and date.today() > self.sem_start_date: + #return False + return True + + def update_participants_count(self): + self.participants = TrainingAttend.objects.filter( + training_id = self.id + ).count() + self.save() + return self.participants + + def get_partipants_from_attendance(self): + return TrainingAttend.objects.filter(training_id = self.id).count() + + def get_partipants_from_batch(self): + if self.batch: + return self.batch.stcount + return 0 + + def attendance_summery(self): + if self.status == 1: + return self.participants + training_attend_count = TrainingAttend.objects.filter( + training_id = self.id + ).count() + student_master_count = StudentMaster.objects.filter( + batch_id=self.batch_id + ).count() + return '(%d / %d)' % (training_attend_count, student_master_count) + + def can_edit(self): + if self.status == 1 or TrainingAttend.objects.filter(training_id=self.id).exclude(training__department_id=169).exists(): + return False + return True + + def training_name(self): + if self.batch: + return 'WC-{0}, {1}, {2} - {3} - {4}'.format(self.id, self.course, self.batch, \ + self.training_planner.year, int(self.training_planner.year)+1) + return 'WC-{0}, {1}, {2} - {3}'.format(self.id, self.course, \ + self.training_planner.year, int(self.training_planner.year)+1) + + +class TrainingAttend(models.Model): + training = models.ForeignKey(TrainingRequest, on_delete=models.PROTECT ) + student = models.ForeignKey(Student, on_delete=models.PROTECT ) + language = models.ForeignKey(Language, default=None, on_delete=models.PROTECT ) + created = models.DateTimeField(auto_now_add = True) + updated = models.DateTimeField(auto_now = True) + language = models.ForeignKey(Language, on_delete=models.PROTECT) + level = models.ForeignKey(Level, on_delete=models.PROTECT, null=True, blank=True) + + class Meta(object): + unique_together = ("training", "student") + + +@python_2_unicode_compatible +class TrainingCertificate(models.Model): + student = models.ForeignKey(Student, on_delete=models.PROTECT ) + training = models.ForeignKey(TrainingRequest, on_delete=models.PROTECT ) + password = models.CharField(max_length = 255, null = True) + count = models.PositiveSmallIntegerField(default=0) + #updated = models.DateTimeField(auto_now = True) + updated = models.DateTimeField() + + def __str__(self): + return self.student + + +class TrainingFeedback(models.Model): + training = models.ForeignKey(TrainingRequest, on_delete=models.PROTECT ) + mdluser_id = models.PositiveIntegerField() + rate_workshop = models.PositiveSmallIntegerField() + + content = models.PositiveSmallIntegerField() + sequence = models.PositiveSmallIntegerField() + clarity = models.PositiveSmallIntegerField() + interesting = models.PositiveSmallIntegerField() + appropriate_example = models.PositiveSmallIntegerField() + instruction_sheet = models.PositiveSmallIntegerField() + assignment = models.PositiveSmallIntegerField() + + pace_of_tutorial = models.PositiveSmallIntegerField() + workshop_learnt = models.TextField() + weakness_workshop = models.BooleanField() + weakness_narration = models.BooleanField() + weakness_understand = models.BooleanField() + other_weakness = models.TextField() + tutorial_language = models.PositiveSmallIntegerField() + apply_information = models.PositiveSmallIntegerField() + if_apply_information_yes = models.TextField() + + setup_learning = models.PositiveSmallIntegerField() + computers_lab = models.PositiveSmallIntegerField() + audio_quality = models.PositiveSmallIntegerField() + video_quality = models.PositiveSmallIntegerField() + + workshop_orgainsation = models.PositiveSmallIntegerField() + faciliate_learning = models.PositiveSmallIntegerField() + motivate_learners = models.PositiveSmallIntegerField() + time_management = models.PositiveSmallIntegerField() + + knowledge_about_software = models.PositiveSmallIntegerField() + provide_clear_explanation = models.PositiveSmallIntegerField() + answered_questions = models.PositiveSmallIntegerField() + interested_helping = models.PositiveSmallIntegerField() + executed_workshop = models.PositiveSmallIntegerField() + workshop_improved = models.TextField() + + recommend_workshop = models.PositiveSmallIntegerField() + reason_why = models.TextField() + other_comments = models.TextField() + created = models.DateTimeField(auto_now_add = True) + class Meta(object): + unique_together = (("training", "mdluser_id")) + + +class TrainingLanguageFeedback(models.Model): + training = models.ForeignKey(TrainingRequest, on_delete=models.PROTECT ) + mdluser_id = models.PositiveIntegerField() + name = models.CharField(max_length=100, null=True, default=None) + age = models.PositiveIntegerField() + medium_of_instruction = models.PositiveIntegerField() + gender = models.BooleanField() + language_prefered = models.ForeignKey(Language, null=True, on_delete=models.PROTECT ) + tutorial_was_useful = models.PositiveIntegerField() + learning_experience = models.PositiveIntegerField() + satisfied_with_learning_experience = models.PositiveIntegerField() + concept_explain_clearity = models.PositiveIntegerField() + overall_learning_experience = models.PositiveIntegerField() + user_interface = models.PositiveIntegerField() + understanding_difficult_concept = models.PositiveIntegerField() + curious_and_motivated = models.PositiveIntegerField() + similar_tutorial_with_other_content = models.PositiveIntegerField() + foss_tutorial_was_mentally_demanding = models.PositiveIntegerField() + side_by_side_method_is_understood = models.PositiveIntegerField(default=0) + + compfortable_learning_in_language = models.PositiveIntegerField() + confidence_level_in_language = models.PositiveIntegerField() + preferred_language = models.PositiveIntegerField() + preferred_language_reason = models.TextField() + prefer_translation_in_mother_tongue = models.PositiveIntegerField() + prefer_translation_in_mother_tongue_reason = models.TextField() + side_by_side_method_meant = models.PositiveIntegerField() + side_by_side_method_is_beneficial = models.PositiveIntegerField() + side_by_side_method_is_beneficial_reason = models.TextField() + limitations_of_side_by_side_method = models.TextField() + + content_information_flow = models.PositiveIntegerField() + content_appropriate_examples = models.PositiveIntegerField() + content_ease_of_understanding = models.PositiveIntegerField() + content_clarity_of_instruction_sheet = models.PositiveIntegerField() + content_ease_of_performing_assignment = models.PositiveIntegerField() + content_best_features = models.TextField() + content_areas_of_improvement = models.TextField() + + video_audio_video_synchronization = models.PositiveIntegerField() + video_attractive_color_features = models.PositiveIntegerField() + video_text_readable = models.PositiveIntegerField() + video_best_features = models.TextField() + video_areas_of_improvement = models.TextField() + + audio_pleasant_speech_and_accent = models.PositiveIntegerField() + audio_soothing_and_friendly_tone = models.PositiveIntegerField() + audio_understandable_and_clear_speech = models.PositiveIntegerField() + audio_best_features = models.TextField() + audio_areas_of_improvement = models.TextField() + + side_by_side_method_is_effective = models.PositiveIntegerField(default=0) + side_by_side_method_is = models.PositiveIntegerField(default=0) + + created = models.DateTimeField(auto_now_add = True) + class Meta(object): + unique_together = (("training", "mdluser_id")) + + +# School, Live Workshop, Pilot Workshop +class SingleTraining(models.Model): + organiser = models.ForeignKey(Organiser, on_delete=models.PROTECT ) + state = models.ForeignKey(State, null=True, on_delete=models.PROTECT ) + institution_type = models.ForeignKey(InstituteType, null=True, on_delete=models.PROTECT ) + academic = models.ForeignKey(AcademicCenter, on_delete=models.PROTECT ) + course = models.ForeignKey(CourseMap, on_delete=models.PROTECT ) # type 0 + # {0:School, 3:Vocational, 1:Live Workshop, 2:Pilot Workshop} + training_type = models.PositiveIntegerField(default=0) + language = models.ForeignKey(Language, on_delete=models.PROTECT ) + tdate = models.DateField() + ttime = models.TimeField(null=True, blank=True) + #{0:request done, 1: attendance submited, 2: completed} + status = models.PositiveSmallIntegerField(default=0) + participant_count = models.PositiveIntegerField(default=0) + total_participant_count = models.PositiveIntegerField(default=0) + created = models.DateTimeField(auto_now_add = True) + updated = models.DateTimeField(auto_now = True) + #created = models.DateTimeField() + #updated = models.DateTimeField() + + def is_singletraining_certificate_allowed(self): + if not FossAvailableForTest.objects.filter( + foss=self.course.foss, + foss__status=True + ).count(): + return True + return False + + class Meta(object): + unique_together = (("organiser", "academic", "course", "tdate", "ttime"),) + + +class SingleTrainingAttendance(models.Model): + training = models.ForeignKey(SingleTraining, on_delete=models.PROTECT ) + foss = models.PositiveIntegerField(default=0) + firstname = models.CharField(max_length = 100, null=True) + lastname = models.CharField(max_length = 100, null=True) + gender = models.CharField(max_length=10, null=True) + email = models.EmailField(null=True) + password = models.CharField(max_length = 100, null=True) + count = models.PositiveSmallIntegerField(default=0) + # {0:waiting for confirmation, 1:approved, 2:complete} + status = models.PositiveSmallIntegerField(default=0) + created = models.DateTimeField(auto_now_add = True) + updated = models.DateTimeField(auto_now = True) + #created = models.DateTimeField() + #updated = models.DateTimeField() + + class Meta(object): + unique_together = (("training", "firstname", "lastname", "email"),) + + +class TrainingLiveFeedback(models.Model): + training = models.ForeignKey(SingleTraining, on_delete=models.PROTECT ) + + rate_workshop = models.PositiveSmallIntegerField() + + name = models.CharField(max_length=100) + email = models.EmailField() + branch = models.CharField(max_length=100) + institution = models.CharField(max_length=100) + + content = models.PositiveSmallIntegerField() + sequence = models.PositiveSmallIntegerField() + clarity = models.PositiveSmallIntegerField() + interesting = models.PositiveSmallIntegerField() + appropriate_example = models.PositiveSmallIntegerField() + instruction_sheet = models.PositiveSmallIntegerField() + assignment = models.PositiveSmallIntegerField() + + pace_of_tutorial = models.PositiveSmallIntegerField() + workshop_learnt = models.TextField() + weakness_workshop = models.BooleanField() + weakness_narration = models.BooleanField() + weakness_understand = models.BooleanField() + other_weakness = models.TextField() + tutorial_language = models.PositiveSmallIntegerField() + apply_information = models.PositiveSmallIntegerField() + if_apply_information_yes = models.TextField() + + setup_learning = models.PositiveSmallIntegerField() + computers_lab = models.PositiveSmallIntegerField() + audio_quality = models.PositiveSmallIntegerField() + video_quality = models.PositiveSmallIntegerField() + + workshop_orgainsation = models.PositiveSmallIntegerField() + faciliate_learning = models.PositiveSmallIntegerField() + motivate_learners = models.PositiveSmallIntegerField() + time_management = models.PositiveSmallIntegerField() + + knowledge_about_software = models.PositiveSmallIntegerField() + provide_clear_explanation = models.PositiveSmallIntegerField() + answered_questions = models.PositiveSmallIntegerField() + interested_helping = models.PositiveSmallIntegerField() + executed_workshop = models.PositiveSmallIntegerField() + workshop_improved = models.TextField() + + recommend_workshop = models.PositiveSmallIntegerField() + reason_why = models.TextField() + other_comments = models.TextField() + created = models.DateTimeField(auto_now_add = True) + + class Meta(object): + unique_together = (("training", "email")) + + +### Signals +pre_delete.connect(revoke_student_permission, sender=Student) + +@python_2_unicode_compatible +class StudentStream(models.Model): + STUDENT_STREAM_CHOICES = ( + ('0', 'Engineering'), ('1', 'Science'), ('2', 'Arts and Humanities'),('3', 'Polytechnic/ Diploma programs'), + ('4', 'Commerce and Business Studies'),('5', 'ITI'),('6', 'Other') + ) + student_stream = models.CharField(max_length =50, choices = STUDENT_STREAM_CHOICES) + + def __str__(self): + return self.student_stream + +@python_2_unicode_compatible +class HelpfulFor(models.Model): + HELPFUL_FOR_CHOICES = ( + ('0', 'Academic Performance'), ('1', 'Project Assignments'), ('2', 'To get job interviews'),('3', 'To get jobs'), + ('4', 'All of the above') + ) + helpful_for = models.CharField(max_length = 50, choices = HELPFUL_FOR_CHOICES) + + def __str__(self): + return self.helpful_for + +class OrganiserFeedback(models.Model): + IS_SPOKEN_HELPFUL_CHOICES = ( + ('','-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), + ('StronglyDisagree', 'Strongly Disagree'), ('Noidea', 'No idea')) + RATE_SPOKEN_CHOICES = ( + ('','-----'), ('Excellent', 'Excellent'), ('Good', 'Good'), ('Fair', 'Fair'), ('Bad', 'Bad'), ('Verybad', 'Very bad')) + YES_NO_CHOICES =( + ('','-----'), ('Yes', 'Yes'), ('No', 'No'), + ) + AGE_CHOICES = ( + ('', '-----'), ('<25', '<25 years'), ('25-35', '25-35 years'), ('35+', '35 years and above'), + ) + GENDER_CHOICES =( + ('', '-----'), ('Male', 'Male'), ('Female', 'Female'), + ) + DESIGNATION_CHOICES = ( + ('', '-----'), ('Student', 'Student'), ('Faculty', 'Faculty'), ('Staff', 'Staff'), ('Admin', 'Admin'), + ) + MEDIUM_OF_INSTRUCTION_CHOICES = ( + ('', '-----'), ('English', 'English'), ('Vernacular', 'Vernacular'), ('Mixed', 'Mixed'), + ) + STUDENT_EDUCATION_LANGUAGE_CHOICES = ( + ('', '-----'), ('English', 'Mostly English'), ('Vernacular', 'Mostly Vernacular'), ('Mixed', 'Mostly Mixed') + ) + STUDENT_GENDER_CHOICES = ( + ('', '-----'), ('Male', 'Mostly Male'), ('Female', 'Mostly Female'), ('Mixed', 'Mixed') + ) + STUDENT_LOCATION_CHOICES = ( + ('', '-----'), ('Urban', 'Mainly Urban'), ('Rural', 'Mainly Rural'), ('Mixed', 'Mixed'), ('Notsure', 'Not sure') + ) + DURATION_OF_TUTORIAL_CHOICES = ( + ('', '-----'), ('<0.5', 'Less than 0.5 hour'), ('0.5-2', '0.5 - 2 hour'), ('2-10', '2-10 hours'),('10+', 'Above 10 hours'),('NA', 'Not applicable') + ) + SIDE_BY_SIDE_METHOD_IS_CHOICES = ( + ('', '-----'), ('0', 'Explaining the video to a neighbor'), ('1', 'Waiting for mentors explanation'), ('2', 'Watching and practicing simultaneously'), ('3', 'Dont know what this method is') + ) + IN_SIDE_BY_SIDE_METHOD_CHOICES = ( + ('', '-----'), ('0', 'The video has to be maximized'), ('1', 'The software has to be maximized'), ('2', 'Both software and video are maximized'), ('3', 'None of the above are maximized') + ) + GOOD_INVESTMENT_CHOICES = ( + ('', '-----'), ('Yes', 'Yes'), ('No', 'No'), ('Notsure', 'Not sure') + ) + + name = models.CharField(max_length = 100) + email = models.EmailField(max_length = 100) + gender = models.CharField(max_length = 10, choices = GENDER_CHOICES) + age = models.CharField(max_length = 20, choices = AGE_CHOICES) + state = models.ForeignKey(State, on_delete=models.PROTECT ) + district = models.ForeignKey(District, on_delete=models.PROTECT ) + city = models.ForeignKey(City, on_delete=models.PROTECT ) + university = models.ForeignKey(AcademicCenter, on_delete=models.PROTECT ) + designation = models.CharField(max_length = 20, choices = DESIGNATION_CHOICES) + medium_of_instruction = models.CharField(max_length =50, choices = MEDIUM_OF_INSTRUCTION_CHOICES) + student_stream = models.ManyToManyField(StudentStream , related_name = 'events_StudentStream_related') + student_education_language = models.CharField(max_length =50, choices = STUDENT_EDUCATION_LANGUAGE_CHOICES) + student_gender = models.CharField(max_length =50 ,choices = STUDENT_GENDER_CHOICES) + student_location = models.CharField(max_length =50, choices = STUDENT_LOCATION_CHOICES) + offered_training_foss = models.ManyToManyField(FossCategory , related_name = 'events_FossCategory_related') + duration_of_tutorial = models.CharField(max_length =50 ,choices = DURATION_OF_TUTORIAL_CHOICES) + language = models.ManyToManyField(Language , related_name = 'events_Language_related') + side_by_side_yes_no = models.CharField(max_length = 50, choices = YES_NO_CHOICES) + side_by_side_method_is = models.CharField(max_length = 50, choices = SIDE_BY_SIDE_METHOD_IS_CHOICES) + in_side_by_side_method = models.CharField(max_length = 50, choices = IN_SIDE_BY_SIDE_METHOD_CHOICES) + good_investment = models.CharField(max_length = 50, choices = GOOD_INVESTMENT_CHOICES) + helpful_for = models.ManyToManyField(HelpfulFor , related_name = 'events_HelpfulFor_related') + is_comfortable_self_learning = models.CharField(max_length = 50, choices = IS_SPOKEN_HELPFUL_CHOICES) + is_classroom_better = models.CharField(max_length = 50, choices = IS_SPOKEN_HELPFUL_CHOICES) + is_student_expectations = models.CharField(max_length = 50, choices = IS_SPOKEN_HELPFUL_CHOICES) + is_help_get_interview = models.CharField(max_length = 50, choices = IS_SPOKEN_HELPFUL_CHOICES) + is_help_get_job = models.CharField(max_length = 50, choices = IS_SPOKEN_HELPFUL_CHOICES) + is_got_job = models.CharField(max_length = 50, choices = IS_SPOKEN_HELPFUL_CHOICES) + relevance = models.CharField(max_length = 50, choices = RATE_SPOKEN_CHOICES) + information_content = models.CharField(max_length = 50, choices = RATE_SPOKEN_CHOICES) + audio_video_quality = models.CharField(max_length = 50, choices = RATE_SPOKEN_CHOICES) + presentation_quality = models.CharField(max_length = 50, choices = RATE_SPOKEN_CHOICES) + overall_rating = models.CharField(max_length = 50, choices = RATE_SPOKEN_CHOICES) + trained_foss = models.ManyToManyField(FossCategory) + is_training_benefited = models.CharField(max_length = 50, choices = GOOD_INVESTMENT_CHOICES) + testimonial = models.CharField(max_length = 500) + any_other_suggestions = models.CharField(max_length = 500) + can_contact = models.CharField(max_length = 50, choices = YES_NO_CHOICES) + +def get_email_dir(instance, filename): + email_dir = instance.email.replace('.','_') + email_dir = email_dir.replace('@','on') + return "latex/%s/%s" %(email_dir, filename) + +class LatexWorkshopFileUpload(models.Model): + email = models.EmailField() + file_upload = models.FileField(upload_to=get_email_dir) + +class STWorkshopFeedback(models.Model): + YES_NO_CHOICES =( + ('','-----'), ('Yes', 'Yes'), ('No', 'No'), + ) + OPINION =( + ('','-----'),('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), + ('StronglyDisagree', 'Strongly Disagree') + ) + RATE_SPOKEN_CHOICES = ( + ('','-----'), ('Excellent', 'Excellent'), ('Good', 'Good'), ('Fair', 'Fair'), ('Bad', 'Bad'), ('Extremelybad', 'Extremely bad') + ) + GENDER_CHOICES =( + ('', '-----'), ('Male', 'Male'), ('Female', 'Female'), + ) + + name = models.CharField(max_length = 100) + email = models.EmailField(max_length = 100) + gender = models.CharField(max_length = 10) + age = models.CharField(max_length = 20) + affiliation = models.CharField(max_length = 100) + designation = models.CharField(max_length = 100, default=None) + educational_back = models.CharField(max_length = 100, default=None) + foss = models.ForeignKey(FossCategory, on_delete=models.PROTECT ) + venue = models.CharField(max_length = 100) + workshop_date = models.DateField() + total_tutorials1 = models.CharField(max_length = 20) + language_of_tutorial = models.CharField(max_length = 20, default=None) + + acquired_knowledge = models.CharField(max_length = 50, choices = OPINION) + suff_instruction = models.CharField(max_length = 50, choices = OPINION) + diff_instruction = models.CharField(max_length = 50, choices = OPINION) + method_easy = models.CharField(max_length = 50, choices = OPINION) + time_sufficient =models.CharField(max_length = 50, choices = OPINION) + desired_objective = models.CharField(max_length = 50, choices = OPINION) + recommend = models.CharField(max_length = 50, choices = OPINION) + like_to_part = models.CharField(max_length = 50, choices = OPINION) + side_by_side_effective = models.CharField(max_length = 50, choices = OPINION) + dont_like_self_learning_method = models.CharField(max_length = 50, choices = OPINION, default=None) + training_any_comment = models.CharField(max_length = 100) + + not_self_explanatory = models.CharField(max_length = 50, choices = OPINION) + logical_sequence = models.CharField(max_length = 50, choices = OPINION) + examples_help = models.CharField(max_length = 50, choices = OPINION) + instructions_easy_to_follow = models.CharField(max_length = 50, choices = OPINION) + difficult_instructions_in_tutorial = models.CharField(max_length = 50, choices = OPINION, default=None) + translate = models.CharField(max_length = 50, choices = OPINION, default=None) + content_any_comment = models.CharField(max_length = 100) + + useful_learning = models.CharField(max_length = 50, choices = OPINION) + help_improve_performance = models.CharField(max_length = 50, choices = OPINION) + plan_to_use_future = models.CharField(max_length = 50, choices = OPINION) + confident_to_apply_knowledge = models.CharField(max_length = 50, choices = OPINION, default=None) + difficult_simultaneously = models.CharField(max_length = 50, choices = OPINION) + too_fast = models.CharField(max_length = 50, choices = OPINION, default=None) + too_slow = models.CharField(max_length = 50, choices = OPINION, default=None) + interface_comfortable = models.CharField(max_length = 50, choices = OPINION) + satisfied = models.CharField(max_length = 50, choices = OPINION) + self_learning_intrest = models.CharField(max_length = 50, choices = OPINION) + language_diff_to_understand = models.CharField(max_length = 50, choices = OPINION, default=None) + not_like_method_forums = models.CharField(max_length = 50, choices = OPINION) + forum_helpful = models.CharField(max_length = 50, choices = OPINION) + owing_to_forums = models.CharField(max_length = 50, choices = OPINION) + learning_any_comment = models.CharField(max_length = 100) + + ws_quality = models.CharField(max_length = 50, choices = RATE_SPOKEN_CHOICES) + overall_content_quality = models.CharField(max_length = 50, choices = RATE_SPOKEN_CHOICES) + clarity_of_explanation = models.CharField(max_length = 50, choices = RATE_SPOKEN_CHOICES) + flow = models.CharField(max_length = 50, choices = RATE_SPOKEN_CHOICES) + relevance = models.CharField(max_length = 50, choices = RATE_SPOKEN_CHOICES) + guidelines = models.CharField(max_length = 50, choices = RATE_SPOKEN_CHOICES) + overall_video_quality = models.CharField(max_length = 50, choices = RATE_SPOKEN_CHOICES) + text_readability = models.CharField(max_length = 50, choices = RATE_SPOKEN_CHOICES) + clarity_of_speech = models.CharField(max_length = 50, choices = RATE_SPOKEN_CHOICES) + visual_presentation = models.CharField(max_length = 50, choices = RATE_SPOKEN_CHOICES) + pace_of_tutorial = models.CharField(max_length = 50, choices = RATE_SPOKEN_CHOICES) + time_management = models.CharField(max_length = 50, choices = RATE_SPOKEN_CHOICES) + experience_of_learning = models.CharField(max_length = 50, choices = RATE_SPOKEN_CHOICES) + overall_arrangement = models.CharField(max_length = 50, choices = RATE_SPOKEN_CHOICES) + like_abt_ws = models.CharField(max_length = 500) + how_make_better = models.CharField(max_length = 500) + experience = models.CharField(max_length = 500) + suggestions = models.CharField(max_length = 500) + created = models.DateTimeField(auto_now_add = True) + +class STWorkshopFeedbackPre(models.Model): + FEELINGS =( + ('','-----'),('Notconfidentatall', 'Not confident at all'), ('Unconfident', 'Unconfident'), ('Neitherconfidentnorunconfident', 'Neither confident nor unconfident'), ('Confident', 'Confident'), + ('Absolutelyconfident', 'Absolutely confident'),('NotApplicable', 'Not Applicable')) + GENDER_CHOICES =( + ('', '-----'), ('Male', 'Male'), ('Female', 'Female'), + ) + user = models.ForeignKey(User, on_delete=models.PROTECT ) + email = models.EmailField(max_length = 100) + gender = models.CharField(max_length = 10, choices = GENDER_CHOICES) + age = models.CharField(max_length = 20) + content_management = models.CharField(max_length = 50, choices = FEELINGS) + configuration_management = models.CharField(max_length = 50, choices = FEELINGS) + creating_basic_content = models.CharField(max_length = 50, choices = FEELINGS) + edit_existing_content = models.CharField(max_length = 50, choices = FEELINGS) + create_new_content = models.CharField(max_length = 50, choices = FEELINGS) + grp_entity_ref = models.CharField(max_length = 50, choices = FEELINGS) + taxonomy = models.CharField(max_length = 50, choices = FEELINGS) + managing_content = models.CharField(max_length = 50, choices = FEELINGS) + creating_dummy_content = models.CharField(max_length = 50, choices = FEELINGS) + modify_display_content = models.CharField(max_length = 50, choices = FEELINGS) + contents_using_view = models.CharField(max_length = 50, choices = FEELINGS) + table_of_fields_with_views = models.CharField(max_length = 50, choices = FEELINGS) + control_display_images = models.CharField(max_length = 50, choices = FEELINGS) + adding_func = models.CharField(max_length = 50, choices = FEELINGS) + finding_modules = models.CharField(max_length = 50, choices = FEELINGS) + modifying_page_layout = models.CharField(max_length = 50, choices = FEELINGS) + menu_endpoints = models.CharField(max_length = 50, choices = FEELINGS) + styling_using_themes = models.CharField(max_length = 50, choices = FEELINGS) + installig_ad_themes = models.CharField(max_length = 50, choices = FEELINGS) + people_management = models.CharField(max_length = 50, choices = FEELINGS) + site_management = models.CharField(max_length = 50, choices = FEELINGS) + +class FeedbackOpinion(models.Model): + OPINION =( + ('','-----'),('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), + ('StronglyDisagree', 'Strongly Disagree'), ('Noidea', 'No idea') + ) + OPINION_MAX_LENGTH = max(len(x[0]) for x in OPINION) + spfriendly = models.CharField(max_length = OPINION_MAX_LENGTH, choices = OPINION) + diff_watch_practice = models.CharField(max_length = OPINION_MAX_LENGTH, choices = OPINION) + satisfied_with_learning_experience = models.CharField(max_length = OPINION_MAX_LENGTH, choices = OPINION) + confident = models.CharField(max_length = OPINION_MAX_LENGTH, choices = OPINION) + side_by_side_hold_intrest = models.CharField(max_length = OPINION_MAX_LENGTH, choices = OPINION) + ws_not_useful = models.CharField(max_length = OPINION_MAX_LENGTH, choices = OPINION) + can_learn_other = models.CharField(max_length = OPINION_MAX_LENGTH, choices = OPINION) + wantto_conduct_incollege = models.CharField(max_length = OPINION_MAX_LENGTH, choices = OPINION) + esy_to_conduct_own = models.CharField(max_length = OPINION_MAX_LENGTH, choices = OPINION) + ask_student_to_use = models.CharField(max_length = OPINION_MAX_LENGTH, choices = OPINION) + possible_to_use_therotical = models.CharField(max_length = OPINION_MAX_LENGTH, choices = OPINION) + not_self_explanatory = models.CharField(max_length = OPINION_MAX_LENGTH, choices = OPINION) + logical_sequence = models.CharField(max_length = OPINION_MAX_LENGTH, choices = OPINION) + examples_help = models.CharField(max_length = OPINION_MAX_LENGTH, choices = OPINION) + other_language = models.CharField(max_length = OPINION_MAX_LENGTH, choices = OPINION) + instructions_easy_to_follow = models.CharField(max_length = OPINION_MAX_LENGTH, choices = OPINION) + language_complicated = models.CharField(max_length = OPINION_MAX_LENGTH, choices = OPINION) + acquired_knowledge = models.CharField(max_length = OPINION_MAX_LENGTH, choices = OPINION) + suff_instruction_by_prof = models.CharField(max_length = OPINION_MAX_LENGTH, choices = OPINION) + suff_instruction_by_staff = models.CharField(max_length = OPINION_MAX_LENGTH, choices = OPINION) + method_easy = models.CharField(max_length = OPINION_MAX_LENGTH, choices = OPINION) + desired_objective = models.CharField(max_length = OPINION_MAX_LENGTH, choices = OPINION) + recommend = models.CharField(max_length = OPINION_MAX_LENGTH, choices = OPINION) + like_to_part = models.CharField(max_length = OPINION_MAX_LENGTH, choices = OPINION) + learn_other_side_by_side = models.CharField(max_length = OPINION_MAX_LENGTH, choices = OPINION) + referred_forums = models.CharField(max_length = OPINION_MAX_LENGTH, choices = OPINION) + referred_forums_after = models.CharField(max_length = OPINION_MAX_LENGTH, choices = OPINION) + asked_ques_forums = models.CharField(max_length = OPINION_MAX_LENGTH, choices = OPINION) + not_answer_doubts = models.CharField(max_length = OPINION_MAX_LENGTH, choices = OPINION) + forum_helpful = models.CharField(max_length = OPINION_MAX_LENGTH, choices = OPINION) + doubts_solved_fast = models.CharField(max_length = OPINION_MAX_LENGTH, choices = OPINION) + need_not_post = models.CharField(max_length = OPINION_MAX_LENGTH, choices = OPINION) + faster_on_forums = models.CharField(max_length = OPINION_MAX_LENGTH, choices = OPINION) + not_have_to_wait = models.CharField(max_length = OPINION_MAX_LENGTH, choices = OPINION) + not_like_method_forums = models.CharField(max_length = OPINION_MAX_LENGTH, choices = OPINION) + helpful_pre_ans_ques = models.CharField(max_length = OPINION_MAX_LENGTH, choices = OPINION) + not_like_reveal_identity = models.CharField(max_length = OPINION_MAX_LENGTH, choices = OPINION) + forum_motivated = models.CharField(max_length = OPINION_MAX_LENGTH, choices = OPINION) + per_asked_ques_before_tuts = models.CharField(max_length = OPINION_MAX_LENGTH, choices = OPINION) + +class FeedbackRate(models.Model): + RATE_SPOKEN_CHOICES = ( + ('','-----'), ('Excellent', 'Excellent'), ('Good', 'Good'), ('Fair', 'Fair'), ('Bad', 'Bad'), ('Extremelybad', 'Extremely bad') + ) + RATE_SPOKEN_CHOICES_LENGTH = max(len(x[0]) for x in RATE_SPOKEN_CHOICES) + ws_quality = models.CharField(max_length = 50, choices = RATE_SPOKEN_CHOICES) + relevance = models.CharField(max_length = 50, choices = RATE_SPOKEN_CHOICES) + guidelines = models.CharField(max_length = 50, choices = RATE_SPOKEN_CHOICES) + overall_video_quality = models.CharField(max_length = 50, choices = RATE_SPOKEN_CHOICES) + text_readability = models.CharField(max_length = 50, choices = RATE_SPOKEN_CHOICES) + clarity_of_speech = models.CharField(max_length = 50, choices = RATE_SPOKEN_CHOICES) + visual_presentation = models.CharField(max_length = 50, choices = RATE_SPOKEN_CHOICES) + pace_of_tutorial = models.CharField(max_length = 50, choices = RATE_SPOKEN_CHOICES) + arrangement = models.CharField(max_length = 50, choices = RATE_SPOKEN_CHOICES) + network = models.CharField(max_length = 50, choices = RATE_SPOKEN_CHOICES) + installation_help = models.CharField(max_length = 50, choices = RATE_SPOKEN_CHOICES) + time_for_handson = models.CharField(max_length = 50, choices = RATE_SPOKEN_CHOICES) + experience_of_learning = models.CharField(max_length = 50, choices = RATE_SPOKEN_CHOICES) + overall_arrangement = models.CharField(max_length = 50, choices = RATE_SPOKEN_CHOICES) + + +class FeedbackFeelings(models.Model): + FEELINGS =( + ('','-----'),('Notconfidentatall', 'Not confident at all'), ('Unconfident', 'Unconfident'), ('Neitherconfidentnorunconfident', 'Neither confident nor unconfident'), ('Confident', 'Confident'), + ('Absolutelyconfident', 'Absolutely confident'),('NotApplicable', 'Not Applicable')) + FEELINGS_MAX_LENGTH = max(len(x[0]) for x in FEELINGS) + + content_management = models.CharField(max_length = 50, choices = FEELINGS) + configuration_management = models.CharField(max_length = 50, choices = FEELINGS) + creating_basic_content = models.CharField(max_length = 50, choices = FEELINGS) + edit_existing_content = models.CharField(max_length = 50, choices = FEELINGS) + create_new_content = models.CharField(max_length = 50, choices = FEELINGS) + grp_entity_ref = models.CharField(max_length = 50, choices = FEELINGS) + taxonomy = models.CharField(max_length = 50, choices = FEELINGS) + managing_content = models.CharField(max_length = 50, choices = FEELINGS) + creating_dummy_content = models.CharField(max_length = 50, choices = FEELINGS) + + modify_display_content = models.CharField(max_length = 50, choices = FEELINGS) + contents_using_view = models.CharField(max_length = 50, choices = FEELINGS) + table_of_fields_with_views = models.CharField(max_length = 50, choices = FEELINGS) + control_display_images = models.CharField(max_length = 50, choices = FEELINGS) + adding_func = models.CharField(max_length = 50, choices = FEELINGS) + finding_modules = models.CharField(max_length = 50, choices = FEELINGS) + modifying_page_layout = models.CharField(max_length = 50, choices = FEELINGS) + menu_endpoints = models.CharField(max_length = 50, choices = FEELINGS) + styling_using_themes = models.CharField(max_length = 50, choices = FEELINGS) + installig_ad_themes = models.CharField(max_length = 50, choices = FEELINGS) + people_management = models.CharField(max_length = 50, choices = FEELINGS) + site_management = models.CharField(max_length = 50, choices = FEELINGS) + + +class WorkshopFeedbackPost(models.Model): + YES_NO_CHOICES =( + ('','-----'), ('Yes', 'Yes'), ('No', 'No'), + ) + YES_NO_CHOICES_LENGTH = max(len(x[0]) for x in YES_NO_CHOICES) + GENDER_CHOICES =( + ('', '-----'), ('Male', 'Male'), ('Female', 'Female'), + ) + FEES =( + ('', '-----'), ('below250', 'Below Rs.250/-'), + ('between251to500', 'Between Rs.251 to Rs.500/-'), + ('between501to1000', 'Between Rs.501 to Rs.1000/-'), + ('between1001to2000', 'Between Rs.1001 to Rs.2000/-'), + ('above2000', 'Above Rs. 2000/-'), + ) + NUM_OF_EXPERTS =( + ('','-----'), ('1to10', '1 to 10'), ('11to20', '11 to 20'),('21to30', '21 to 30'),('31to40', '31 to 40'),('above40', 'Above 40'), + ) + user = models.ForeignKey(User, on_delete=models.PROTECT ) + email = models.EmailField(max_length = 100) + gender = models.CharField(max_length = 10, choices = GENDER_CHOICES) + age = models.CharField(max_length = 2) + participated_before = models.CharField(max_length = 50, choices = YES_NO_CHOICES) + foss_where = models.CharField(max_length = 200) + install_own = models.CharField(max_length = YES_NO_CHOICES_LENGTH, choices = YES_NO_CHOICES) + explain = models.TextField() + used_sw_before = models.CharField(max_length = YES_NO_CHOICES_LENGTH, choices = YES_NO_CHOICES) + sim_framework_before = models.CharField(max_length = YES_NO_CHOICES_LENGTH, choices = YES_NO_CHOICES) + total_tutorials1 = models.CharField(max_length = 20) + purpose_of_attending = models.CharField(max_length = 300) + like_to_create_st = models.CharField(max_length = YES_NO_CHOICES_LENGTH, choices = YES_NO_CHOICES) + like_to_create_st_details = models.CharField(max_length = 300) + num_of_experts_req = models.CharField(max_length = 50, choices = NUM_OF_EXPERTS) + fees = models.CharField(max_length = 50, choices = FEES) + like_abt_ws = models.TextField() + how_make_better = models.TextField() + experience = models.TextField() + suggestions = models.TextField() + opinion = models.ForeignKey(FeedbackOpinion, on_delete=models.CASCADE, null=True, blank=True) + rate = models.ForeignKey(FeedbackRate, on_delete=models.CASCADE, null=True, blank=True) + feelings = models.ForeignKey(FeedbackFeelings, on_delete=models.CASCADE, null=True, blank=True) + +class LearnDrupalFeedback(models.Model): + YES_NO_CHOICES =( + ('','-----'), ('Yes', 'Yes'), ('No', 'No'),('NotApplicable ', 'Not Applicable '), + ) + YES_NO = ( + ('','-----'), ('Yes', 'Yes'), ('No', 'No') + ) + AGE =( + ('','-----'),('below25', 'below 25'), ('25to34', '25 to 34'), ('35to44', '35 to 44'),('45to54', '45 to 54'),('55to64', '55 to 64'),('65andabove', '65 and above') + ) + CURRENT_STATUS =( + ('','-----'), ('Student', 'Student'), ('Individuallearner', 'Individual learner'), ('Workingprofessional', 'Working professional'), ('Teacher', 'Teacher'), ('Administrator', 'Administrator'), ('Others', 'Others') + ) + PLAN_TO_CONDUCT = ( + ('','-----'), ('within3months', 'within 3 months'), ('within6months', 'within 6 months'), ('within1year', 'within 1 year'), ('notyetplanned', 'not yet planned') + ) + LANGUAGE = ( + ('','-----'),('Hindi','Hindi'),('English','English'),('Marathi','Marathi'),('Urdu','Urdu'),('Kannanda','Kannanda'),('Bangali','Bangali'),('Malyalum','Malyalum'),('Tamil','Tamil'),('Telugu','Telugu'),('Oriya','Oriya'),('Assamese','Assamese'),('Gujrati','Gujrati'), + ) + + name = models.CharField(max_length = 100) + phonemob = models.CharField(max_length = 100) + email = models.EmailField(max_length = 100) + affiliation = models.CharField(max_length = 100) + place = models.CharField(max_length = 100) + agegroup = models.CharField(max_length = 50, choices = AGE) + currentstatus = models.CharField(max_length = 50, choices = CURRENT_STATUS) + currentstatus_other = models.CharField(max_length = 50) + is_drupal_in_curriculum = models.CharField(max_length = 50, choices = YES_NO_CHOICES) + need_help_in_organizing = models.CharField(max_length = 50, choices = YES_NO_CHOICES) + when_plan_to_conduct = models.CharField(max_length = 50, choices = PLAN_TO_CONDUCT) + language = models.CharField(max_length = 50, choices = LANGUAGE) + did_undergo_st_training = models.CharField(max_length = 50, choices = YES_NO_CHOICES) + rate_spoken = models.CharField(max_length = 20) + useful_for_placement = models.CharField(max_length = 50, choices = YES_NO_CHOICES) + useful_for_placement_for_students = models.CharField(max_length = 50, choices = YES_NO_CHOICES) + feedback = models.CharField(max_length = 500) + like_to_learn_other_foss = models.CharField(max_length = 50, choices = YES_NO) + mention_foss = models.CharField(max_length = 100) + like_to_give_testimonial = models.CharField(max_length = 50, choices = YES_NO) + testimonial = models.CharField(max_length = 100) + +class InductionInterest(models.Model): + YES_NO =( + ('','-----'), ('Yes', 'Yes'), ('No', 'No'), + ) + yes_option=( + ('','-----'), ('Yes', 'Yes'), + ) + GENDER_CHOICES =( + ('', '-----'), ('Male', 'Male'), ('Female', 'Female'), + ) + languages = ( + ('', '-----'), ('Assamese','Assamese'), ('Bengali', 'Bengali'), ('Bhojpuri', 'Bhojpuri'), ('Bodo', 'Bodo'), ('English', 'English'), ('Gujarati', 'Gujarati'), + ('Hindi', 'Hindi'), ('Kannada', 'Kannada'), ('Kashmiri', 'Kashmiri'), ('Khasi', 'Khasi'), ('Konkani', 'Konkani'), ('Maithili', 'Maithili'), + ('Malayalam', 'Malayalam'), ('Manipuri', 'Manipuri'), ('Marathi', 'Marathi'), ('Nepali', 'Nepali'),('Oriya', 'Oriya'), ('Punjabi', 'Punjabi'), + ('Rajasthani', 'Rajasthani'), ('Sanskrit', 'Sanskrit'), ('Santhali', 'Santhali'), ('Sindhi', 'Sindhi'), ('Tamil', 'Tamil'), ('Telugu', 'Telugu'), + ('Urdu', 'Urdu'), ('Other', 'Other'), + ) + AGE =( + ('','-----'),('20to25', '20 to 25 years'), ('26to30', '26 to 30 years'),('31to35', '31 to 35 years'),('35andabove', 'Above 35 years') + ) + specialisation =( + ('','-----'),('Arts', 'Arts'),('Science', 'Science'),('Commerce', 'Commerce'), + ('EngineeringorComputerScience ', 'Engineering or Computer Science'),('Management', 'Management'), + ('Other', 'Other'), + ) + education =( + ('','-----'), ('3yeargraduatedegree(BABScB.Cometc)','3 year graduate degree (BA, BSc, B.Com, etc.)'), + ('Professionaldegree(BEBTechetc)', 'Professional degree (BE, B.Tech, etc.)'), + ('2yearMasters(MAMScMCometc)', '2 year Masters (MA, MSc, MCom, etc.)'), + ('2yearprofessionalMasters(MEMTechMBAMPhiletc)', '2 year professional Masters (ME, MTech, MBA, MPhil, etc.)'), + ('PhD', 'PhD'), + ('Other','Other'), + ) + designation = ( + ('','-----'), + ('Lecturer','Lecturer'), + ('AssistantProfessor','Assistant Professor'), + ('AssociateProfessor','Associate Professor'), + ('Professor','Professor'), + ('Other','Other'), + ) + years_of_experience = ( + ('','-----'), + ('Lessthan1year','Less than 1 year'), + ('Morethan1yearbutlessthan2years','More than 1 year, but less than 2 years'), + ('Morethan2yearsbutlessthan5years','More than 2 years but less than 5 years'), + ('Morethan5years','More than 5 years'), + ) + + email = models.EmailField(max_length = 100) + name = models.CharField(max_length = 100) + phonemob = models.CharField(max_length = 100) + age = models.CharField(max_length = 100, choices = AGE) + gender = models.CharField(max_length = 50, choices = GENDER_CHOICES) + mother_tongue = models.CharField(max_length = 100, choices = languages) + other_language = models.CharField(max_length = 100) + + medium_of_studies = models.CharField(max_length = 100, choices = languages) + other_medium = models.CharField(max_length = 100) + + education = models.CharField(max_length = 100, choices = education) + other_education = models.CharField(max_length = 100) + + specialisation = models.CharField(max_length = 100, choices = specialisation) + other_specialisation = models.CharField(max_length = 100) + + designation = models.CharField(max_length = 100, choices = designation) + other_designation = models.CharField(max_length = 100) + + college = models.CharField(max_length = 100) + college_address = models.CharField(max_length = 500) + state = models.ForeignKey(State, on_delete=models.PROTECT ) + city = models.CharField(max_length = 100) + pincode = models.PositiveIntegerField() + experience_in_college = models.CharField(max_length = 100, choices = years_of_experience) + + bring_laptop = models.CharField(max_length = 50, choices = YES_NO) + borrow_laptop = models.CharField(max_length = 50, choices = YES_NO) + + do_agree = models.CharField(max_length = 50, choices = yes_option) + no_objection = models.CharField(max_length = 50, choices = yes_option) + other_comments = models.CharField(max_length = 500) + + class Meta(object): + ordering = ('city',) + +class InductionFinalList(models.Model): + email = models.EmailField(max_length = 200) + eoi_id = models.ForeignKey(InductionInterest, default=None, on_delete=models.PROTECT ) + code = models.CharField(max_length=255, default=None) + # batch_code should be in form of year+month+batch_number e.g. 20171101 = [year 2017,month 11, batch 01] + batch_code = models.PositiveIntegerField() + created = models.DateTimeField(auto_now_add = True) + +class Drupal2018_email(models.Model): + email = models.EmailField(max_length = 200) + +class MumbaiStudents(models.Model): + stuid = models.ForeignKey('Student', on_delete=models.PROTECT ) + bid = models.ForeignKey('StudentBatch', on_delete=models.PROTECT ) + +class PaymentDetails(models.Model): + user = models.ForeignKey(User, on_delete=models.PROTECT ) + academic_id = models.ForeignKey(AcademicCenter, on_delete=models.PROTECT ) + academic_year = models.PositiveIntegerField() + amount = models.CharField(max_length=20) + purpose = models.CharField(max_length=20, null=True) + status = models.PositiveIntegerField() + description = models.CharField(max_length=20, null=True) + gstno = models.CharField(max_length=15,null=True) + created = models.DateTimeField(auto_now_add = True) + updated = models.DateTimeField(auto_now_add = True) + + class Meta(object): + unique_together = ('academic_id','academic_year',) + +class PaymentTransactionDetails(models.Model): + paymentdetail = models.ForeignKey(PaymentDetails, on_delete=models.PROTECT ) + requestType = models.CharField(max_length=2) + userId = models.ForeignKey(User, on_delete=models.PROTECT ) + amount = models.CharField(max_length=20) + reqId = models.CharField(max_length=50) + transId = models.CharField(max_length=100) + refNo = models.CharField(max_length=50) + provId = models.CharField(max_length=50) + status = models.CharField(max_length=2) + msg = models.CharField(max_length=100) + created = models.DateTimeField(auto_now_add = True) + updated = models.DateTimeField(auto_now_add = True) + + +class topperlist(models.Model): + emailid = models.EmailField(max_length = 100) + userid = models.PositiveIntegerField() + +class AcademicPaymentStatus(models.Model): + state = models.ForeignKey(State, on_delete=models.PROTECT ) + academic = models.ForeignKey(AcademicCenter, on_delete=models.PROTECT ) + name_of_the_payer = models.CharField(max_length=200) + email = models.EmailField(null=True) + phone = models.CharField(max_length = 100, null=True) + amount = models.CharField(max_length=20) + subscription = models.CharField(max_length = 50, choices = SUBSCRIPTION_CHOICES) + transactionid = models.CharField(max_length=100, null=True) + payment_date = models.DateField() + payment_status = models.CharField(max_length = 50, choices = PAYMENT_STATUS_CHOICES) + college_type = models.CharField(max_length = 50) + pan_number = models.CharField(max_length = 100, null=True) + gst_number = models.CharField(max_length=15, null=True) + customer_id = models.CharField(max_length = 50, null=True) + invoice_no = models.CharField(max_length = 100, null=True) + remarks = models.CharField(max_length = 200, null=True) + entry_date = models.DateTimeField(auto_now_add = True) + entry_user = models.ForeignKey(User, on_delete=models.PROTECT ) + via_subscription_page = models.BooleanField(default=False, + verbose_name="Payment made via Spoken Tutorial Subscription page?") + + def __str__(self): + return self.academic.institution_name + + class Meta(object): + unique_together = (("academic","transactionid","payment_date"),) + + +class AcademicKey(models.Model): + ac_pay_status = models.ForeignKey(AcademicPaymentStatus, on_delete=models.PROTECT ) + academic = models.ForeignKey(AcademicCenter, on_delete=models.PROTECT ) + u_key = models.CharField(max_length = 50) + hex_key = models.CharField(max_length = 50) + expiry_date = models.DateField() + entry_date = models.DateTimeField(auto_now_add = True) + + def __str__(self): + return self.academic.institution_name diff --git a/events/events/models.py.bak b/events/events/models.py.bak new file mode 100644 index 000000000..a4c24d7fc --- /dev/null +++ b/events/events/models.py.bak @@ -0,0 +1,1701 @@ +from django.db import models +from datetime import datetime, date, timedelta +from django.db.models.signals import pre_delete, post_delete +from django.dispatch import receiver +from django.db.models import Q, Count, Sum, Min + +#import auth user models +from django.contrib.auth.models import User + +#validation +from django.core.exceptions import ValidationError + +# importing models to access moodle DB +from mdldjango.models import * + +# importing from events.signals +from events.signals import revoke_student_permission + +#creation app models +from creation.models import FossCategory, Language, \ + FossAvailableForWorkshop, FossAvailableForTest + + +# Create your models here. +class State(models.Model): + users = models.ManyToManyField( + User, + related_name="resource_person", + through='ResourcePerson' + ) + code = models.CharField(max_length=3) + name = models.CharField(max_length=50) + slug = models.CharField(max_length = 100) + latitude = models.DecimalField( + null=True, + max_digits=10, + decimal_places=4, + blank=True + ) + longtitude = models.DecimalField( + null=True, + max_digits=10, + decimal_places=4, + blank=True + ) + img_map_area = models.TextField() + has_map = models.BooleanField(default=1) + created = models.DateTimeField(auto_now_add = True, null=True) + updated = models.DateTimeField(auto_now = True, null=True) + + def __unicode__(self): + return self.name + + class Meta: + unique_together = (("code","name"),) + + +class District(models.Model): + state = models.ForeignKey(State) + code = models.CharField(max_length=3) + name = models.CharField(max_length=200) + created = models.DateTimeField(auto_now_add = True, null=True) + updated = models.DateTimeField(auto_now = True, null=True) + + def __unicode__(self): + return self.name + + class Meta: + unique_together = (("state", "code","name"),) + #unique_together = (("state_id","name"),) + + +class City(models.Model): + state = models.ForeignKey(State) + name = models.CharField(max_length=200) + created = models.DateTimeField(auto_now_add = True, null=True) + updated = models.DateTimeField(auto_now = True, null=True) + + def __unicode__(self): + return self.name + + class Meta: + unique_together = (("name","state"),) + + +class Location(models.Model): + district = models.ForeignKey(District) + name = models.CharField(max_length=200) + pincode = models.PositiveIntegerField() + created = models.DateTimeField(auto_now_add = True, null=True) + updated = models.DateTimeField(auto_now = True) + + def __unicode__(self): + return self.name + + class Meta: + unique_together = (("name","district","pincode"),) + + +class ResourcePerson(models.Model): + user = models.ForeignKey(User) + state = models.ForeignKey(State) + assigned_by = models.PositiveIntegerField() + status = models.BooleanField() + created = models.DateTimeField(auto_now_add = True) + updated = models.DateTimeField(auto_now = True) + class Meta: + verbose_name = "Resource Person" + unique_together = (("user","state"),) + + +class University(models.Model): + name = models.CharField(max_length=200) + state = models.ForeignKey(State) + user = models.ForeignKey(User) + created = models.DateTimeField(auto_now_add = True) + updated = models.DateTimeField(auto_now = True) + + def __unicode__(self): + return self.name + + class Meta: + unique_together = (("name","state"),) + + +class InstituteCategory(models.Model): + name = models.CharField(max_length=200) + created = models.DateTimeField(auto_now_add = True) + updated = models.DateTimeField(auto_now = True) + + def __unicode__(self): + return self.name + + class Meta: + verbose_name = "Institute Categorie" + + +class InstituteType(models.Model): + name = models.CharField(max_length=200) + created = models.DateTimeField(auto_now_add = True) + updated = models.DateTimeField(auto_now = True) + + def __unicode__(self): + return self.name + + class Meta: + unique_together = (("name"),) + + +class AcademicCenter(models.Model): + user = models.ForeignKey(User) + state = models.ForeignKey(State) + institution_type = models.ForeignKey(InstituteType) + institute_category = models.ForeignKey(InstituteCategory) + university = models.ForeignKey(University) + academic_code = models.CharField(max_length=100, unique = True) + institution_name = models.CharField(max_length=200) + district = models.ForeignKey(District) + location = models.ForeignKey(Location, null=True) + city = models.ForeignKey(City) + address = models.TextField() + pincode = models.PositiveIntegerField() + resource_center = models.BooleanField() + rating = models.PositiveSmallIntegerField() + contact_person = models.TextField() + remarks = models.TextField() + status = models.PositiveSmallIntegerField() + created = models.DateTimeField(auto_now_add = True) + updated = models.DateTimeField(auto_now = True) + + class Meta: + verbose_name = "Academic Center" + #unique_together = ( + # ("institution_name","district"), + # ("institution_name","university") + #) + + def __unicode__(self): + return self.institution_name + + def get_training_count(self): + return TrainingRequest.objects.filter( + training_planner__academic_id=self.id, + participants__gt=0, + sem_start_date__lte=datetime.now() + ).count() + + def get_training_participant_count(self): + training = TrainingRequest.objects.filter( + training_planner__academic_id=self.id, + participants__gt=0, + sem_start_date__lte=datetime.now() + ).aggregate(Sum('participants')) + return training['participants__sum'] + +class Accountexecutive(models.Model): + user = models.OneToOneField(User, related_name = 'accountexecutive') + appoved_by = models.ForeignKey( + User, + related_name = 'accountexecutive_approved_by', + blank=True, + null=True + ) + academic = models.ForeignKey(AcademicCenter, blank=True, null=True) + status = models.PositiveSmallIntegerField(default=0) + created = models.DateTimeField(auto_now_add = True) + updated = models.DateTimeField(auto_now = True) + + def __unicode__(self): + return self.user.username + + +class Organiser(models.Model): + user = models.OneToOneField(User, related_name = 'organiser') + appoved_by = models.ForeignKey( + User, + related_name = 'organiser_approved_by', + blank=True, + null=True + ) + academic = models.ForeignKey(AcademicCenter, blank=True, null=True) + status = models.PositiveSmallIntegerField(default=0) + created = models.DateTimeField(auto_now_add = True) + updated = models.DateTimeField(auto_now = True) + + def __unicode__(self): + return self.user.username + + +class Invigilator(models.Model): + user = models.OneToOneField(User) + appoved_by = models.ForeignKey( + User, + related_name = 'invigilator_approved_by', + blank=True, + null=True + ) + academic = models.ForeignKey(AcademicCenter) + status = models.PositiveSmallIntegerField(default=0) + created = models.DateTimeField(auto_now_add = True) + updated = models.DateTimeField(auto_now = True) + + def __unicode__(self): + return self.user.username + + +class Department(models.Model): + name = models.CharField(max_length=200) + created = models.DateTimeField(auto_now_add = True) + updated = models.DateTimeField(auto_now = True) + + def __unicode__(self): + return self.name + + class Meta: + ordering = ['name'] + + +class Course(models.Model): + name = models.CharField(max_length=200) + created = models.DateTimeField(auto_now_add = True) + updated = models.DateTimeField(auto_now = True) + + def __unicode__(self): + return self.name + + class Meta: + unique_together = (("name"),) + + +class TrainingExtraFields(models.Model): + paper_name = models.CharField(max_length = 200) + approximate_hour = models.PositiveIntegerField(default = 0) + online_test = models.PositiveIntegerField(default = 0) + is_tutorial_useful = models.BooleanField(default = 0) + future_training = models.BooleanField(default = 0) + recommend_to_others = models.BooleanField(default = 0) + no_of_lab_session = models.CharField(max_length = 30, null=True) + +class Training(models.Model): + organiser = models.ForeignKey(Organiser) + appoved_by = models.ForeignKey( + User, + related_name = 'training_approved_by', + null=True + ) + academic = models.ForeignKey(AcademicCenter) + course = models.ForeignKey(Course) + training_type = models.PositiveIntegerField(default=0) + training_code = models.CharField(max_length=100, null=True) + department = models.ManyToManyField(Department) + language = models.ForeignKey(Language) + foss = models.ForeignKey(FossCategory) + tdate = models.DateField() + ttime = models.TimeField() + skype = models.PositiveSmallIntegerField(default=0) + status = models.PositiveSmallIntegerField(default=0) + # 0:request done, 1: attendance submit, 2: training manger approved, + # 3: mark attenda done, 4: complete, 5: rejected + extra_fields = models.OneToOneField(TrainingExtraFields, null = True) + participant_count = models.PositiveIntegerField(default=0) + trusted = models.BooleanField(default=1) + created = models.DateTimeField(auto_now_add = True) + updated = models.DateTimeField(auto_now = True) + + class Meta: + unique_together = (("organiser", "academic", "foss", "tdate", "ttime"),) + + +class TrainingAttendance(models.Model): + training = models.ForeignKey(Training) + mdluser_id = models.PositiveIntegerField(null=True, blank=True) + firstname = models.CharField(max_length = 100, null=True) + lastname = models.CharField(max_length = 100, null=True) + gender = models.CharField(max_length=10, null=True) + email = models.EmailField(null=True) + password = models.CharField(max_length = 100, null=True) + count = models.PositiveSmallIntegerField(default=0) + status = models.PositiveSmallIntegerField(default=0) + created = models.DateTimeField(auto_now_add = True) + updated = models.DateTimeField(auto_now = True) + + class Meta: + verbose_name = "Training Attendance" + #unique_together = (("training", "mdluser_id")) + + +class TrainingLog(models.Model): + user = models.ForeignKey(User) + training = models.ForeignKey(Training) + academic = models.ForeignKey(AcademicCenter) + role = models.PositiveSmallIntegerField() + #{0:'organiser', 1:'ResourcePerson', 2: 'Event Manager'} + status = models.PositiveSmallIntegerField() + # {0:'new', 1:'approved', 2:'completed', 3: 'rejected', 4:'update', + # 5:'Offline-Attendance submited', 6:'Marked Attendance'} + created = models.DateTimeField(auto_now_add = True) + + +class TestCategory(models.Model): + name = models.CharField(max_length=200) + status = models.BooleanField(default = 0) + created = models.DateTimeField(auto_now_add = True, null=True) + updated = models.DateTimeField(auto_now = True, null=True) + + def __unicode__(self): + return self.name + + +class Test(models.Model): + organiser = models.ForeignKey(Organiser, related_name = 'test_organiser') + test_category = models.ForeignKey( + TestCategory, + related_name = 'test_category' + ) + appoved_by = models.ForeignKey( + User, + related_name = 'test_approved_by', + null=True + ) + invigilator = models.ForeignKey( + Invigilator, + related_name = 'test_invigilator', + null=True + ) + academic = models.ForeignKey(AcademicCenter) + department = models.ManyToManyField(Department) + training = models.ForeignKey('TrainingRequest', null=True) + foss = models.ForeignKey(FossCategory) + test_code = models.CharField(max_length=100) + tdate = models.DateField() + ttime = models.TimeField() + status = models.PositiveSmallIntegerField(default=0) + participant_count = models.PositiveIntegerField(default=0) + created = models.DateTimeField(auto_now_add = True) + updated = models.DateTimeField(auto_now = True) + + class Meta: + verbose_name = "Test Categorie" + unique_together = (("organiser", "academic", "foss", "tdate", "ttime"),) + + def get_test_attendance_count(self): + return TestAttendance.objects.filter( + test_id=self.id, + status__gte=2 + ).count() + + def update_test_participant_count(self): + self.participant_count = self.get_test_attendance_count() + self.save() + return self + + +class TestAttendance(models.Model): + test = models.ForeignKey(Test) + student = models.ForeignKey('Student', null=True) + mdluser_firstname = models.CharField(max_length = 100) + mdluser_lastname = models.CharField(max_length = 100) + mdluser_id = models.PositiveIntegerField() + mdlcourse_id = models.PositiveIntegerField(default=0) + mdlquiz_id = models.PositiveIntegerField(default=0) + mdlattempt_id = models.PositiveIntegerField(default=0) + password = models.CharField(max_length = 100, null=True) + count = models.PositiveSmallIntegerField(default=0) + status = models.PositiveSmallIntegerField(default=0) + created = models.DateTimeField(auto_now_add = True) + updated = models.DateTimeField(auto_now = True) + class Meta: + verbose_name = "Test Attendance" + unique_together = (("test", "mdluser_id")) + + +class TestLog(models.Model): + user = models.ForeignKey(User) + test = models.ForeignKey(Test) + academic = models.ForeignKey(AcademicCenter) + role = models.PositiveSmallIntegerField(default=0) + # {0:'organiser', 1:'invigilator', 2:'ResourcePerson', 3: 'Event Manager'} + status = models.PositiveSmallIntegerField(default=0) + # {0:'new', 1:'RP-approved', 2:'Inv-approved', 3: 'ongoing', 4:'completed', + # 5:'Rp-rejected', 6:'Inv-rejected', 7:'Update', + # 8:'Attendance submited', 9:'Marked Attendance'} + created = models.DateTimeField(auto_now_add = True) + + +class PermissionType(models.Model): + name = models.CharField(max_length=200) + created = models.DateTimeField(auto_now_add = True) + updated = models.DateTimeField(auto_now = True) + def __unicode__(self): + return self.name + + +class Permission(models.Model): + permissiontype = models.ForeignKey(PermissionType) + user = models.ForeignKey(User, related_name = 'permission_user') + state = models.ForeignKey(State, related_name = 'permission_state') + district = models.ForeignKey( + District, + related_name = 'permission_district', + null=True + ) + university = models.ForeignKey( + University, + related_name = 'permission_iniversity', + null=True + ) + institute_type = models.ForeignKey( + InstituteType, + related_name = 'permission_institution_type', + null=True + ) + institute = models.ForeignKey( + AcademicCenter, + related_name = 'permission_district', + null=True + ) + assigned_by = models.ForeignKey( + User, + related_name = 'permission_assigned_by' + ) + created = models.DateTimeField(auto_now_add = True) + updated = models.DateTimeField(auto_now = True) + + +class FossMdlCourses(models.Model): + foss = models.ForeignKey(FossCategory) + mdlcourse_id = models.PositiveIntegerField() + mdlquiz_id = models.PositiveIntegerField() + + +class EventsNotification(models.Model): + user = models.ForeignKey(User) + role = models.PositiveSmallIntegerField(default=0) + # {0:'organiser', 1:'invigilator', 2:'ResourcePerson', 3: 'Event Manager'} + academic = models.ForeignKey(AcademicCenter) + category = models.PositiveSmallIntegerField(default=0) + # {'workshop', 'training', 'test'} + categoryid = models.PositiveIntegerField(default=0) + status = models.PositiveSmallIntegerField(default=0) + # {0:'new', 1:'update', 2:'approved', 3:'attendance', + # 4: 'completed', 5:'rejected'} + message = models.CharField(max_length = 255) + created = models.DateTimeField(auto_now_add = True) + + +class Testimonials(models.Model): + user = models.ForeignKey(User, related_name = 'testimonial_created_by') + approved_by = models.ForeignKey(User, related_name = 'testimonial_approved_by', null=True) + user_name = models.CharField(max_length=200) + actual_content = models.TextField() + minified_content = models.TextField() + short_description = models.TextField() + source_title = models.CharField(max_length=200, null=True) + source_link = models.URLField(null = True) + status = models.PositiveSmallIntegerField(default = 0) + created = models.DateTimeField(auto_now_add=True) + updated = models.DateTimeField(auto_now = True, null=True) + +class MediaTestimonials(models.Model): + ''' + This model is required for storing audio / video testimonials + * path contains the location of the file, + * user is the person who has send the testimonial. + ''' + foss = models.ForeignKey(FossCategory) + path = models.CharField(max_length=255) + user = models.CharField(max_length=255) + content = models.CharField(max_length=255) + created = models.DateTimeField(auto_now_add=True) + + class Meta: + verbose_name = 'Media Testimonials' + verbose_name_plural = 'Media Testimonials' + + def __unicode__(self): + return self.path + +class OrganiserNotification(models.Model): + user = models.ForeignKey(User) + + +################ EVENTS VERSION II MODELS ################### + + +# Create your models here. +class Student(models.Model): + user = models.OneToOneField(User) + gender = models.CharField(max_length = 15) + verified = models.PositiveSmallIntegerField(default = 0) + error = models.BooleanField(default=False) + created = models.DateTimeField(auto_now_add = True) + updated = models.DateTimeField(auto_now = True) + + def __unicode__(self): + return self.user.first_name + + def student_fullname(self): + if self.user.first_name: + return '%s %s' % (self.user.first_name, self.user.last_name) + return self.user.username + + def is_student_has_attendance(self): + if TrainingAttend.objects.filter(student_id=self.id).exists(): + return True + return False + + +class StudentBatch(models.Model): + academic = models.ForeignKey(AcademicCenter) + organiser = models.ForeignKey(Organiser) + department = models.ForeignKey(Department) + year = models.PositiveIntegerField() # 2010-2014 + stcount = models.PositiveIntegerField(default=0) + + class Meta: + unique_together = ("academic", "year", "department") + + def __unicode__(self): + return '%s, %s Batch' % (self.department.name, self.year) + + def get_batch_info(self): + return '%s, %s, %s Batch' % (self.academic, self.department.name, self.year) + + def student_count(self): + return StudentMaster.objects.filter(batch_id = self.id).count() + + def can_add_student(self, organiser_id): + organiser = Organiser.objects.get(pk=organiser_id) + if self.organiser.academic_id == organiser.academic_id: + return True + return False + + def update_student_count(self): + self.stcount = StudentMaster.objects.filter(batch_id = self.id).count() + self.save() + return self.stcount + + def is_foss_batch_acceptable(self, course_id): + sm = StudentMaster.objects.filter(batch_id=self.id) + for s in sm: + if not TrainingAttend.objects.filter( + student_id=s.student_id, + training__course_id=course_id + ).exists(): + return True + return False + + def has_training(self): + if self.trainingrequest_set.exists(): + return False + return True + + +class StudentMaster(models.Model): + batch = models.ForeignKey(StudentBatch) + student = models.ForeignKey(Student) + moved = models.BooleanField(default=False) + created = models.DateTimeField(auto_now_add = True) + updated = models.DateTimeField(auto_now = True) + + class Meta: + unique_together = ("batch", "student") + ordering = ["student__user__first_name"] + + def is_student_has_attendance(self): + tids = TrainingRequest.objects.filter(batch=self.batch_id).values('id') + if TrainingAttend.objects.filter(training_id__in=tids, student_id=self.student_id).exists(): + return True + return False + +# Update student count in batch when delete student from batch +@receiver(post_delete, sender=StudentMaster, dispatch_uid='update_batch_count') +def update_batch_count(sender, instance, **kwargs): + instance.batch.update_student_count() + + +class Semester(models.Model): + name = models.CharField(max_length = 50) + even = models.BooleanField(default = True) + + def __unicode__(self): + return self.name + + +class LabCourse(models.Model): + name = models.CharField(max_length=200) + created = models.DateTimeField(auto_now_add = True) + updated = models.DateTimeField(auto_now = True) + + def __unicode__(self): + return self.name + + +class CourseMap(models.Model): + #name = models.CharField(max_length=200, null=True, blank=True) + course = models.ForeignKey(LabCourse, null=True, blank=True) + foss = models.ForeignKey(FossCategory) + test = models.BooleanField(default=False) + # {0 => one day workshop, 1 => mapped course, 2 => unmapped course} + category = models.PositiveIntegerField(default=0) + created = models.DateTimeField(auto_now_add = True) + updated = models.DateTimeField(auto_now = True) + + def __unicode__(self): + if self.course_id: + return '%s (%s)' % (self.foss.foss, self.course.name) + return self.foss.foss + def course_name(self): + if self.course_id: + return '%s - %s' % (self.course.name, self.foss.foss) + return self.foss + + def category_name(self): + courses = { + 0 : 'Software Course outside lab hours', + 1 : 'Software Course mapped in lab hours', + 2 : 'Software Course unmapped in lab hours', + 3 : 'EduEasy Software', + 4 : 'other' + } + return courses[self.category] + + class Meta: + unique_together = ("course", "foss", "category") + ordering = ('foss',) + + +class TrainingPlanner(models.Model): + year = models.CharField(max_length = 50) + academic = models.ForeignKey(AcademicCenter) + organiser = models.ForeignKey(Organiser) + semester = models.ForeignKey(Semester) + created = models.DateTimeField(auto_now_add = True) + updated = models.DateTimeField(auto_now = True) + + def __unicode__(self): + return self.semester.name + + def training_requests(self): + return TrainingRequest.objects.filter( + training_planner_id = self.id + ).exclude(Q(participants=0)&Q(status=1)) + + # Select all training which has no attendance + def training_with_no_attend(self): + return TrainingRequest.objects.filter( + (Q(participants=0, status=0) | Q(participants=0, status=1)), + training_planner_id = self.id + ) + + def get_semester(self): + if self.semester.even: + return 'January - June, %s' % (int(self.year) + 1) + return 'July - December, %s' % (self.year) + + def is_current_planner(self): + year, sem = self.get_current_year_and_sem() + if int(self.year) == year and self.semester.id == sem.id: + return True + return False + + def is_next_planner(self): + year, sem = self.get_current_year_and_sem() + try: + ctp = TrainingPlanner.objects.get( + year=year, + semester=sem, + organiser=self.organiser, + academic=self.academic + ) + year = int(ctp.year) + even = True + if ctp.semester.even: + year = year + 1 + even = False + if int(self.year) == year and bool(self.semester.even) == even: + return True + except Exception, e: + print e + return False + + def get_current_year_and_sem(self): + now = datetime.now() + year = now.year + month = now.month + is_even = True + # finding semester + if month > 6 and month < 13: + sem = Semester.objects.get(name='Odd') + is_even = False + else: + sem = Semester.objects.get(name='Even') + # finding year + if is_even: + year = year - 1 + return year, sem + + def completed_training(self): + return self.training_requests().filter(status=1) + + def ongoing_training(self): + return self.training_requests().filter(status=0) + + def is_full(self, department_id, batch_id): + if self.training_requests().filter( + department_id=department_id, + batch_id=batch_id, + training_planner__semester=self.semester + ).count() > 2: + return True + return False + + def is_school_full(self, department_id, batch_id): + if self.training_requests().filter( + department_id=department_id, + batch_id=batch_id + ).count() > 11: + return True + return False + + def get_current_semester_date_duration(self): + if self.semester.even: + return datetime.strptime( + str(int(self.year)+1)+'-01-01', '%Y-%m-%d' + ).date(), datetime.strptime( + str(int(self.year)+1)+'-06-30', '%Y-%m-%d' + ).date() + return datetime.strptime( + str(self.year)+'-07-01', '%Y-%m-%d' + ).date(), datetime.strptime( + str(self.year)+'-12-31', '%Y-%m-%d' + ).date() + + def get_current_semester_date_duration_new(self): + if self.semester.even: + return datetime.strptime( + str(int(self.year)+1)+'-01-01', '%Y-%m-%d' + ).date(), datetime.strptime( + str(int(self.year)+1)+'-03-31', '%Y-%m-%d' + ).date() + return datetime.strptime( + str(self.year)+'-07-01', '%Y-%m-%d' + ).date(), datetime.strptime( + str(self.year)+'-9-30', '%Y-%m-%d' + ).date() + + class Meta: + unique_together = ("year", "academic", "organiser", "semester") + + +class TestTrainingManager(models.Manager): + def get_queryset(self): + return super(TestTrainingManager, self).get_queryset().filter( + ( + Q(course__category=0) & + #Q(status=1) & + Q(sem_start_date__lte=datetime.now()-timedelta(days=15)) + ) | + ( + Q(course__category__gt=0) & + Q(sem_start_date__lte=datetime.now()-timedelta(days=30)) + ), + participants__gt=0 + ).order_by('-training_planner__year', '-training_planner__semester_id') + + +class TrainingRequest(models.Model): + training_planner = models.ForeignKey(TrainingPlanner) + department = models.ForeignKey(Department) + sem_start_date = models.DateField() + course = models.ForeignKey(CourseMap) + batch = models.ForeignKey(StudentBatch, null = True) + participants = models.PositiveIntegerField(default=0) + course_type = models.PositiveIntegerField(default=None) + #status = models.BooleanField(default=False) + status = models.PositiveSmallIntegerField(default=0) + created = models.DateTimeField(auto_now_add = True) + updated = models.DateTimeField(auto_now = True) + #created = models.DateTimeField() + #updated = models.DateTimeField() + + # managers + objects = models.Manager() # The default manager. + test_training = TestTrainingManager() + + # return course type + def get_course_type(self): + if self.course_type == 0: + return 'Outside Lab Hours' + elif self.course_type == 1: + return 'Mapped Course' + elif self.course_type == 2: + return 'Unmapped Course' + return '' + + def is_training_certificate_allowed(self): + if not FossAvailableForTest.objects.filter( + foss=self.course.foss, + foss__status=True + ).count(): + return True + return False + + def is_learners_allowed(self): + if FossCategory.objects.filter( + id = self.course.foss.id, + is_learners_allowed=True,).count(): + return True + return False + + def have_test(self): + if FossAvailableForTest.objects.filter(foss=self.course.foss, foss__status=True).count(): + return True + return False + + def is_training_before_july2017(self): + d = date(2017,6,30) + if self.sem_start_date < d: + return True + return False + + def is_certificate_not_allowed(self): + if self.course.foss.id in [4,12,34,35,76]: + return True + return False + + # restrict the month to rise a training request + def can_mark_attendance(self): + sem_start, sem_end = self.training_planner.get_current_semester_date_duration() + today = date.today() + if self.status == 1 or today < self.sem_start_date or today > sem_end: + return False + #elif self.course.category == 0 and date.today() > self.sem_start_date: + #return False + return True + + def update_participants_count(self): + self.participants = TrainingAttend.objects.filter( + training_id = self.id + ).count() + self.save() + return self.participants + + def get_partipants_from_attendance(self): + return TrainingAttend.objects.filter(training_id = self.id).count() + + def get_partipants_from_batch(self): + if self.batch: + return self.batch.stcount + return 0 + + def attendance_summery(self): + if self.status == 1: + return self.participants + training_attend_count = TrainingAttend.objects.filter( + training_id = self.id + ).count() + student_master_count = StudentMaster.objects.filter( + batch_id=self.batch_id + ).count() + return '(%d / %d)' % (training_attend_count, student_master_count) + + def can_edit(self): + if self.status == 1 or TrainingAttend.objects.filter( + training_id=self.id + ).exists(): + return False + return True + + def training_name(self): + if self.batch: + return 'WC-{0}, {1}, {2} - {3} - {4}'.format(self.id, self.course, self.batch, \ + self.training_planner.year, int(self.training_planner.year)+1) + return 'WC-{0}, {1}, {2} - {3}'.format(self.id, self.course, \ + self.training_planner.year, int(self.training_planner.year)+1) + + +class TrainingAttend(models.Model): + training = models.ForeignKey(TrainingRequest) + student = models.ForeignKey(Student) + language = models.ForeignKey(Language, default=None) + created = models.DateTimeField(auto_now_add = True) + updated = models.DateTimeField(auto_now = True) + #created = models.DateTimeField() + #updated = models.DateTimeField() + + class Meta: + unique_together = ("training", "student") + + +class TrainingCertificate(models.Model): + student = models.ForeignKey(Student) + training = models.ForeignKey(TrainingRequest) + password = models.CharField(max_length = 255, null = True) + count = models.PositiveSmallIntegerField(default=0) + #updated = models.DateTimeField(auto_now = True) + updated = models.DateTimeField() + + def __unicode__(self): + return self.student + + +class TrainingFeedback(models.Model): + training = models.ForeignKey(TrainingRequest) + mdluser_id = models.PositiveIntegerField() + rate_workshop = models.PositiveSmallIntegerField() + + content = models.PositiveSmallIntegerField() + sequence = models.PositiveSmallIntegerField() + clarity = models.PositiveSmallIntegerField() + interesting = models.PositiveSmallIntegerField() + appropriate_example = models.PositiveSmallIntegerField() + instruction_sheet = models.PositiveSmallIntegerField() + assignment = models.PositiveSmallIntegerField() + + pace_of_tutorial = models.PositiveSmallIntegerField() + workshop_learnt = models.TextField() + weakness_workshop = models.BooleanField() + weakness_narration = models.BooleanField() + weakness_understand = models.BooleanField() + other_weakness = models.TextField() + tutorial_language = models.PositiveSmallIntegerField() + apply_information = models.PositiveSmallIntegerField() + if_apply_information_yes = models.TextField() + + setup_learning = models.PositiveSmallIntegerField() + computers_lab = models.PositiveSmallIntegerField() + audio_quality = models.PositiveSmallIntegerField() + video_quality = models.PositiveSmallIntegerField() + + workshop_orgainsation = models.PositiveSmallIntegerField() + faciliate_learning = models.PositiveSmallIntegerField() + motivate_learners = models.PositiveSmallIntegerField() + time_management = models.PositiveSmallIntegerField() + + knowledge_about_software = models.PositiveSmallIntegerField() + provide_clear_explanation = models.PositiveSmallIntegerField() + answered_questions = models.PositiveSmallIntegerField() + interested_helping = models.PositiveSmallIntegerField() + executed_workshop = models.PositiveSmallIntegerField() + workshop_improved = models.TextField() + + recommend_workshop = models.PositiveSmallIntegerField() + reason_why = models.TextField() + other_comments = models.TextField() + created = models.DateTimeField(auto_now_add = True) + class Meta: + unique_together = (("training", "mdluser_id")) + + +class TrainingLanguageFeedback(models.Model): + training = models.ForeignKey(TrainingRequest) + mdluser_id = models.PositiveIntegerField() + name = models.CharField(max_length=100, null=True, default=None) + age = models.PositiveIntegerField() + medium_of_instruction = models.PositiveIntegerField() + gender = models.BooleanField() + language_prefered = models.ForeignKey(Language, null=True) + tutorial_was_useful = models.PositiveIntegerField() + learning_experience = models.PositiveIntegerField() + satisfied_with_learning_experience = models.PositiveIntegerField() + concept_explain_clearity = models.PositiveIntegerField() + overall_learning_experience = models.PositiveIntegerField() + user_interface = models.PositiveIntegerField() + understanding_difficult_concept = models.PositiveIntegerField() + curious_and_motivated = models.PositiveIntegerField() + similar_tutorial_with_other_content = models.PositiveIntegerField() + foss_tutorial_was_mentally_demanding = models.PositiveIntegerField() + side_by_side_method_is_understood = models.PositiveIntegerField(default=0) + + compfortable_learning_in_language = models.PositiveIntegerField() + confidence_level_in_language = models.PositiveIntegerField() + preferred_language = models.PositiveIntegerField() + preferred_language_reason = models.TextField() + prefer_translation_in_mother_tongue = models.PositiveIntegerField() + prefer_translation_in_mother_tongue_reason = models.TextField() + side_by_side_method_meant = models.PositiveIntegerField() + side_by_side_method_is_beneficial = models.PositiveIntegerField() + side_by_side_method_is_beneficial_reason = models.TextField() + limitations_of_side_by_side_method = models.TextField() + + content_information_flow = models.PositiveIntegerField() + content_appropriate_examples = models.PositiveIntegerField() + content_ease_of_understanding = models.PositiveIntegerField() + content_clarity_of_instruction_sheet = models.PositiveIntegerField() + content_ease_of_performing_assignment = models.PositiveIntegerField() + content_best_features = models.TextField() + content_areas_of_improvement = models.TextField() + + video_audio_video_synchronization = models.PositiveIntegerField() + video_attractive_color_features = models.PositiveIntegerField() + video_text_readable = models.PositiveIntegerField() + video_best_features = models.TextField() + video_areas_of_improvement = models.TextField() + + audio_pleasant_speech_and_accent = models.PositiveIntegerField() + audio_soothing_and_friendly_tone = models.PositiveIntegerField() + audio_understandable_and_clear_speech = models.PositiveIntegerField() + audio_best_features = models.TextField() + audio_areas_of_improvement = models.TextField() + + side_by_side_method_is_effective = models.PositiveIntegerField(default=0) + side_by_side_method_is = models.PositiveIntegerField(default=0) + + created = models.DateTimeField(auto_now_add = True) + class Meta: + unique_together = (("training", "mdluser_id")) + + +# School, Live Workshop, Pilot Workshop +class SingleTraining(models.Model): + organiser = models.ForeignKey(Organiser) + state = models.ForeignKey(State, null=True) + institution_type = models.ForeignKey(InstituteType, null=True) + academic = models.ForeignKey(AcademicCenter) + course = models.ForeignKey(CourseMap) # type 0 + # {0:School, 3:Vocational, 1:Live Workshop, 2:Pilot Workshop} + training_type = models.PositiveIntegerField(default=0) + language = models.ForeignKey(Language) + tdate = models.DateField() + ttime = models.TimeField(null=True, blank=True) + #{0:request done, 1: attendance submited, 2: completed} + status = models.PositiveSmallIntegerField(default=0) + participant_count = models.PositiveIntegerField(default=0) + total_participant_count = models.PositiveIntegerField(default=0) + created = models.DateTimeField(auto_now_add = True) + updated = models.DateTimeField(auto_now = True) + #created = models.DateTimeField() + #updated = models.DateTimeField() + + def is_singletraining_certificate_allowed(self): + if not FossAvailableForTest.objects.filter( + foss=self.course.foss, + foss__status=True + ).count(): + return True + return False + + class Meta: + unique_together = (("organiser", "academic", "course", "tdate", "ttime"),) + + +class SingleTrainingAttendance(models.Model): + training = models.ForeignKey(SingleTraining) + foss = models.PositiveIntegerField(default=0) + firstname = models.CharField(max_length = 100, null=True) + lastname = models.CharField(max_length = 100, null=True) + gender = models.CharField(max_length=10, null=True) + email = models.EmailField(null=True) + password = models.CharField(max_length = 100, null=True) + count = models.PositiveSmallIntegerField(default=0) + # {0:waiting for confirmation, 1:approved, 2:complete} + status = models.PositiveSmallIntegerField(default=0) + created = models.DateTimeField(auto_now_add = True) + updated = models.DateTimeField(auto_now = True) + #created = models.DateTimeField() + #updated = models.DateTimeField() + + class Meta: + unique_together = (("training", "firstname", "lastname", "email"),) + + +class TrainingLiveFeedback(models.Model): + training = models.ForeignKey(SingleTraining) + + rate_workshop = models.PositiveSmallIntegerField() + + name = models.CharField(max_length=100) + email = models.EmailField() + branch = models.CharField(max_length=100) + institution = models.CharField(max_length=100) + + content = models.PositiveSmallIntegerField() + sequence = models.PositiveSmallIntegerField() + clarity = models.PositiveSmallIntegerField() + interesting = models.PositiveSmallIntegerField() + appropriate_example = models.PositiveSmallIntegerField() + instruction_sheet = models.PositiveSmallIntegerField() + assignment = models.PositiveSmallIntegerField() + + pace_of_tutorial = models.PositiveSmallIntegerField() + workshop_learnt = models.TextField() + weakness_workshop = models.BooleanField() + weakness_narration = models.BooleanField() + weakness_understand = models.BooleanField() + other_weakness = models.TextField() + tutorial_language = models.PositiveSmallIntegerField() + apply_information = models.PositiveSmallIntegerField() + if_apply_information_yes = models.TextField() + + setup_learning = models.PositiveSmallIntegerField() + computers_lab = models.PositiveSmallIntegerField() + audio_quality = models.PositiveSmallIntegerField() + video_quality = models.PositiveSmallIntegerField() + + workshop_orgainsation = models.PositiveSmallIntegerField() + faciliate_learning = models.PositiveSmallIntegerField() + motivate_learners = models.PositiveSmallIntegerField() + time_management = models.PositiveSmallIntegerField() + + knowledge_about_software = models.PositiveSmallIntegerField() + provide_clear_explanation = models.PositiveSmallIntegerField() + answered_questions = models.PositiveSmallIntegerField() + interested_helping = models.PositiveSmallIntegerField() + executed_workshop = models.PositiveSmallIntegerField() + workshop_improved = models.TextField() + + recommend_workshop = models.PositiveSmallIntegerField() + reason_why = models.TextField() + other_comments = models.TextField() + created = models.DateTimeField(auto_now_add = True) + + class Meta: + unique_together = (("training", "email")) + + +### Signals +pre_delete.connect(revoke_student_permission, sender=Student) + +class StudentStream(models.Model): + STUDENT_STREAM_CHOICES = ( + ('0', 'Engineering'), ('1', 'Science'), ('2', 'Arts and Humanities'),('3', 'Polytechnic/ Diploma programs'), + ('4', 'Commerce and Business Studies'),('5', 'ITI'),('6', 'Other') + ) + student_stream = models.CharField(max_length =50, choices = STUDENT_STREAM_CHOICES) + + def __unicode__(self): + return self.student_stream + +class HelpfulFor(models.Model): + HELPFUL_FOR_CHOICES = ( + ('0', 'Academic Performance'), ('1', 'Project Assignments'), ('2', 'To get job interviews'),('3', 'To get jobs'), + ('4', 'All of the above') + ) + helpful_for = models.CharField(max_length = 50, choices = HELPFUL_FOR_CHOICES) + + def __unicode__(self): + return self.helpful_for + +class OrganiserFeedback(models.Model): + IS_SPOKEN_HELPFUL_CHOICES = ( + ('','-----'), ('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), + ('StronglyDisagree', 'Strongly Disagree'), ('Noidea', 'No idea')) + RATE_SPOKEN_CHOICES = ( + ('','-----'), ('Excellent', 'Excellent'), ('Good', 'Good'), ('Fair', 'Fair'), ('Bad', 'Bad'), ('Verybad', 'Very bad')) + YES_NO_CHOICES =( + ('','-----'), ('Yes', 'Yes'), ('No', 'No'), + ) + AGE_CHOICES = ( + ('', '-----'), ('<25', '<25 years'), ('25-35', '25-35 years'), ('35+', '35 years and above'), + ) + GENDER_CHOICES =( + ('', '-----'), ('Male', 'Male'), ('Female', 'Female'), + ) + DESIGNATION_CHOICES = ( + ('', '-----'), ('Student', 'Student'), ('Faculty', 'Faculty'), ('Staff', 'Staff'), ('Admin', 'Admin'), + ) + MEDIUM_OF_INSTRUCTION_CHOICES = ( + ('', '-----'), ('English', 'English'), ('Vernacular', 'Vernacular'), ('Mixed', 'Mixed'), + ) + STUDENT_EDUCATION_LANGUAGE_CHOICES = ( + ('', '-----'), ('English', 'Mostly English'), ('Vernacular', 'Mostly Vernacular'), ('Mixed', 'Mostly Mixed') + ) + STUDENT_GENDER_CHOICES = ( + ('', '-----'), ('Male', 'Mostly Male'), ('Female', 'Mostly Female'), ('Mixed', 'Mixed') + ) + STUDENT_LOCATION_CHOICES = ( + ('', '-----'), ('Urban', 'Mainly Urban'), ('Rural', 'Mainly Rural'), ('Mixed', 'Mixed'), ('Notsure', 'Not sure') + ) + DURATION_OF_TUTORIAL_CHOICES = ( + ('', '-----'), ('<0.5', 'Less than 0.5 hour'), ('0.5-2', '0.5 - 2 hour'), ('2-10', '2-10 hours'),('10+', 'Above 10 hours'),('NA', 'Not applicable') + ) + SIDE_BY_SIDE_METHOD_IS_CHOICES = ( + ('', '-----'), ('0', 'Explaining the video to a neighbor'), ('1', 'Waiting for mentors explanation'), ('2', 'Watching and practicing simultaneously'), ('3', 'Dont know what this method is') + ) + IN_SIDE_BY_SIDE_METHOD_CHOICES = ( + ('', '-----'), ('0', 'The video has to be maximized'), ('1', 'The software has to be maximized'), ('2', 'Both software and video are maximized'), ('3', 'None of the above are maximized') + ) + GOOD_INVESTMENT_CHOICES = ( + ('', '-----'), ('Yes', 'Yes'), ('No', 'No'), ('Notsure', 'Not sure') + ) + + name = models.CharField(max_length = 100) + email = models.EmailField(max_length = 100) + gender = models.CharField(max_length = 10, choices = GENDER_CHOICES) + age = models.CharField(max_length = 20, choices = AGE_CHOICES) + state = models.ForeignKey(State) + district = models.ForeignKey(District) + city = models.ForeignKey(City) + university = models.ForeignKey(AcademicCenter) + designation = models.CharField(max_length = 20, choices = DESIGNATION_CHOICES) + medium_of_instruction = models.CharField(max_length =50, choices = MEDIUM_OF_INSTRUCTION_CHOICES) + student_stream = models.ManyToManyField(StudentStream , related_name = 'events_StudentStream_related') + student_education_language = models.CharField(max_length =50, choices = STUDENT_EDUCATION_LANGUAGE_CHOICES) + student_gender = models.CharField(max_length =50 ,choices = STUDENT_GENDER_CHOICES) + student_location = models.CharField(max_length =50, choices = STUDENT_LOCATION_CHOICES) + offered_training_foss = models.ManyToManyField(FossCategory , related_name = 'events_FossCategory_related') + duration_of_tutorial = models.CharField(max_length =50 ,choices = DURATION_OF_TUTORIAL_CHOICES) + language = models.ManyToManyField(Language , related_name = 'events_Language_related') + side_by_side_yes_no = models.CharField(max_length = 50, choices = YES_NO_CHOICES) + side_by_side_method_is = models.CharField(max_length = 50, choices = SIDE_BY_SIDE_METHOD_IS_CHOICES) + in_side_by_side_method = models.CharField(max_length = 50, choices = IN_SIDE_BY_SIDE_METHOD_CHOICES) + good_investment = models.CharField(max_length = 50, choices = GOOD_INVESTMENT_CHOICES) + helpful_for = models.ManyToManyField(HelpfulFor , related_name = 'events_HelpfulFor_related') + is_comfortable_self_learning = models.CharField(max_length = 50, choices = IS_SPOKEN_HELPFUL_CHOICES) + is_classroom_better = models.CharField(max_length = 50, choices = IS_SPOKEN_HELPFUL_CHOICES) + is_student_expectations = models.CharField(max_length = 50, choices = IS_SPOKEN_HELPFUL_CHOICES) + is_help_get_interview = models.CharField(max_length = 50, choices = IS_SPOKEN_HELPFUL_CHOICES) + is_help_get_job = models.CharField(max_length = 50, choices = IS_SPOKEN_HELPFUL_CHOICES) + is_got_job = models.CharField(max_length = 50, choices = IS_SPOKEN_HELPFUL_CHOICES) + relevance = models.CharField(max_length = 50, choices = RATE_SPOKEN_CHOICES) + information_content = models.CharField(max_length = 50, choices = RATE_SPOKEN_CHOICES) + audio_video_quality = models.CharField(max_length = 50, choices = RATE_SPOKEN_CHOICES) + presentation_quality = models.CharField(max_length = 50, choices = RATE_SPOKEN_CHOICES) + overall_rating = models.CharField(max_length = 50, choices = RATE_SPOKEN_CHOICES) + trained_foss = models.ManyToManyField(FossCategory) + is_training_benefited = models.CharField(max_length = 50, choices = GOOD_INVESTMENT_CHOICES) + testimonial = models.CharField(max_length = 500) + any_other_suggestions = models.CharField(max_length = 500) + can_contact = models.CharField(max_length = 50, choices = YES_NO_CHOICES) + +def get_email_dir(instance, filename): + email_dir = instance.email.replace('.','_') + email_dir = email_dir.replace('@','on') + return "latex/%s/%s" %(email_dir, filename) + +class LatexWorkshopFileUpload(models.Model): + email = models.EmailField() + file_upload = models.FileField(upload_to=get_email_dir) + +class STWorkshopFeedback(models.Model): + YES_NO_CHOICES =( + ('','-----'), ('Yes', 'Yes'), ('No', 'No'), + ) + OPINION =( + ('','-----'),('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), + ('StronglyDisagree', 'Strongly Disagree') + ) + RATE_SPOKEN_CHOICES = ( + ('','-----'), ('Excellent', 'Excellent'), ('Good', 'Good'), ('Fair', 'Fair'), ('Bad', 'Bad'), ('Extremelybad', 'Extremely bad') + ) + GENDER_CHOICES =( + ('', '-----'), ('Male', 'Male'), ('Female', 'Female'), + ) + + name = models.CharField(max_length = 100) + email = models.EmailField(max_length = 100) + gender = models.CharField(max_length = 10) + age = models.CharField(max_length = 20) + affiliation = models.CharField(max_length = 100) + designation = models.CharField(max_length = 100, default=None) + educational_back = models.CharField(max_length = 100, default=None) + foss = models.ForeignKey(FossCategory) + venue = models.CharField(max_length = 100) + workshop_date = models.DateField() + total_tutorials1 = models.CharField(max_length = 20) + language_of_tutorial = models.CharField(max_length = 20, default=None) + + acquired_knowledge = models.CharField(max_length = 50, choices = OPINION) + suff_instruction = models.CharField(max_length = 50, choices = OPINION) + diff_instruction = models.CharField(max_length = 50, choices = OPINION) + method_easy = models.CharField(max_length = 50, choices = OPINION) + time_sufficient =models.CharField(max_length = 50, choices = OPINION) + desired_objective = models.CharField(max_length = 50, choices = OPINION) + recommend = models.CharField(max_length = 50, choices = OPINION) + like_to_part = models.CharField(max_length = 50, choices = OPINION) + side_by_side_effective = models.CharField(max_length = 50, choices = OPINION) + dont_like_self_learning_method = models.CharField(max_length = 50, choices = OPINION, default=None) + training_any_comment = models.CharField(max_length = 100) + + not_self_explanatory = models.CharField(max_length = 50, choices = OPINION) + logical_sequence = models.CharField(max_length = 50, choices = OPINION) + examples_help = models.CharField(max_length = 50, choices = OPINION) + instructions_easy_to_follow = models.CharField(max_length = 50, choices = OPINION) + difficult_instructions_in_tutorial = models.CharField(max_length = 50, choices = OPINION, default=None) + translate = models.CharField(max_length = 50, choices = OPINION, default=None) + content_any_comment = models.CharField(max_length = 100) + + useful_learning = models.CharField(max_length = 50, choices = OPINION) + help_improve_performance = models.CharField(max_length = 50, choices = OPINION) + plan_to_use_future = models.CharField(max_length = 50, choices = OPINION) + confident_to_apply_knowledge = models.CharField(max_length = 50, choices = OPINION, default=None) + difficult_simultaneously = models.CharField(max_length = 50, choices = OPINION) + too_fast = models.CharField(max_length = 50, choices = OPINION, default=None) + too_slow = models.CharField(max_length = 50, choices = OPINION, default=None) + interface_comfortable = models.CharField(max_length = 50, choices = OPINION) + satisfied = models.CharField(max_length = 50, choices = OPINION) + self_learning_intrest = models.CharField(max_length = 50, choices = OPINION) + language_diff_to_understand = models.CharField(max_length = 50, choices = OPINION, default=None) + not_like_method_forums = models.CharField(max_length = 50, choices = OPINION) + forum_helpful = models.CharField(max_length = 50, choices = OPINION) + owing_to_forums = models.CharField(max_length = 50, choices = OPINION) + learning_any_comment = models.CharField(max_length = 100) + + ws_quality = models.CharField(max_length = 50, choices = RATE_SPOKEN_CHOICES) + overall_content_quality = models.CharField(max_length = 50, choices = RATE_SPOKEN_CHOICES) + clarity_of_explanation = models.CharField(max_length = 50, choices = RATE_SPOKEN_CHOICES) + flow = models.CharField(max_length = 50, choices = RATE_SPOKEN_CHOICES) + relevance = models.CharField(max_length = 50, choices = RATE_SPOKEN_CHOICES) + guidelines = models.CharField(max_length = 50, choices = RATE_SPOKEN_CHOICES) + overall_video_quality = models.CharField(max_length = 50, choices = RATE_SPOKEN_CHOICES) + text_readability = models.CharField(max_length = 50, choices = RATE_SPOKEN_CHOICES) + clarity_of_speech = models.CharField(max_length = 50, choices = RATE_SPOKEN_CHOICES) + visual_presentation = models.CharField(max_length = 50, choices = RATE_SPOKEN_CHOICES) + pace_of_tutorial = models.CharField(max_length = 50, choices = RATE_SPOKEN_CHOICES) + time_management = models.CharField(max_length = 50, choices = RATE_SPOKEN_CHOICES) + experience_of_learning = models.CharField(max_length = 50, choices = RATE_SPOKEN_CHOICES) + overall_arrangement = models.CharField(max_length = 50, choices = RATE_SPOKEN_CHOICES) + like_abt_ws = models.CharField(max_length = 500) + how_make_better = models.CharField(max_length = 500) + experience = models.CharField(max_length = 500) + suggestions = models.CharField(max_length = 500) + created = models.DateTimeField(auto_now_add = True) + +class STWorkshopFeedbackPre(models.Model): + FEELINGS =( + ('','-----'),('Notconfidentatall', 'Not confident at all'), ('Unconfident', 'Unconfident'), ('Neitherconfidentnorunconfident', 'Neither confident nor unconfident'), ('Confident', 'Confident'), + ('Absolutelyconfident', 'Absolutely confident'),('NotApplicable', 'Not Applicable')) + GENDER_CHOICES =( + ('', '-----'), ('Male', 'Male'), ('Female', 'Female'), + ) + user = models.ForeignKey(User) + email = models.EmailField(max_length = 100) + gender = models.CharField(max_length = 10, choices = GENDER_CHOICES) + age = models.CharField(max_length = 20) + content_management = models.CharField(max_length = 50, choices = FEELINGS) + configuration_management = models.CharField(max_length = 50, choices = FEELINGS) + creating_basic_content = models.CharField(max_length = 50, choices = FEELINGS) + edit_existing_content = models.CharField(max_length = 50, choices = FEELINGS) + create_new_content = models.CharField(max_length = 50, choices = FEELINGS) + grp_entity_ref = models.CharField(max_length = 50, choices = FEELINGS) + taxonomy = models.CharField(max_length = 50, choices = FEELINGS) + managing_content = models.CharField(max_length = 50, choices = FEELINGS) + creating_dummy_content = models.CharField(max_length = 50, choices = FEELINGS) + modify_display_content = models.CharField(max_length = 50, choices = FEELINGS) + contents_using_view = models.CharField(max_length = 50, choices = FEELINGS) + table_of_fields_with_views = models.CharField(max_length = 50, choices = FEELINGS) + control_display_images = models.CharField(max_length = 50, choices = FEELINGS) + adding_func = models.CharField(max_length = 50, choices = FEELINGS) + finding_modules = models.CharField(max_length = 50, choices = FEELINGS) + modifying_page_layout = models.CharField(max_length = 50, choices = FEELINGS) + menu_endpoints = models.CharField(max_length = 50, choices = FEELINGS) + styling_using_themes = models.CharField(max_length = 50, choices = FEELINGS) + installig_ad_themes = models.CharField(max_length = 50, choices = FEELINGS) + people_management = models.CharField(max_length = 50, choices = FEELINGS) + site_management = models.CharField(max_length = 50, choices = FEELINGS) + + +class STWorkshopFeedbackPost(models.Model): + YES_NO_CHOICES =( + ('','-----'), ('Yes', 'Yes'), ('No', 'No'), + ) + OPINION =( + ('','-----'),('StronglyAgree', 'Strongly Agree'), ('Agree', 'Agree'), ('Neutral', 'Neutral'), ('Disagree', 'Disagree'), + ('StronglyDisagree', 'Strongly Disagree'), ('Noidea', 'No idea') + ) + RATE_SPOKEN_CHOICES = ( + ('','-----'), ('Excellent', 'Excellent'), ('Good', 'Good'), ('Fair', 'Fair'), ('Bad', 'Bad'), ('Extremelybad', 'Extremely bad') + ) + GENDER_CHOICES =( + ('', '-----'), ('Male', 'Male'), ('Female', 'Female'), + ) + FEELINGS =( + ('','-----'),('Notconfidentatall', 'Not confident at all'), ('Unconfident', 'Unconfident'), ('Neitherconfidentnorunconfident', 'Neither confident nor unconfident'), ('Confident', 'Confident'), + ('Absolutelyconfident', 'Absolutely confident'),('NotApplicable', 'Not Applicable')) + + FEES =( + ('', '-----'), ('below250', 'Below Rs.250/-'), + ('between251to500', 'Between Rs.251 to Rs.500/-'), + ('between501to1000', 'Between Rs.501 to Rs.1000/-'), + ('between1001to2000', 'Between Rs.1001 to Rs.2000/-'), + ('above2000', 'Above Rs. 2000/-'), + ) + + NUM_OF_EXPERTS =( + ('','-----'), ('1to10', '1 to 10'), ('11to20', '11 to 20'),('21to30', '21 to 30'),('31to40', '31 to 40'),('above40', 'Above 40'), + ) + user = models.ForeignKey(User) + email = models.EmailField(max_length = 100) + gender = models.CharField(max_length = 10, choices = GENDER_CHOICES) + age = models.CharField(max_length = 20) + participated_before = models.CharField(max_length = 50, choices = YES_NO_CHOICES) + foss_where = models.CharField(max_length = 200) + install_own = models.CharField(max_length = 50, choices = YES_NO_CHOICES) + explain = models.CharField(max_length = 300) + used_sw_before = models.CharField(max_length = 50, choices = YES_NO_CHOICES) + sim_framework_before = models.CharField(max_length = 50, choices = YES_NO_CHOICES) + total_tutorials1 = models.CharField(max_length = 20) + purpose_of_attending = models.CharField(max_length = 300) + + + spfriendly = models.CharField(max_length = 50, choices = OPINION) + diff_watch_practice = models.CharField(max_length = 50, choices = OPINION) + satisfied_with_learning_experience = models.CharField(max_length = 50, choices = OPINION) + confident = models.CharField(max_length = 50, choices = OPINION) + side_by_side_hold_intrest = models.CharField(max_length = 50, choices = OPINION) + ws_not_useful = models.CharField(max_length = 50, choices = OPINION) + can_learn_other = models.CharField(max_length = 50, choices = OPINION) + wantto_conduct_incollege = models.CharField(max_length = 50, choices = OPINION) + esy_to_conduct_own = models.CharField(max_length = 50, choices = OPINION) + ask_student_to_use = models.CharField(max_length = 50, choices = OPINION) + possible_to_use_therotical = models.CharField(max_length = 50, choices = OPINION) + + + not_self_explanatory = models.CharField(max_length = 50, choices = OPINION) + logical_sequence = models.CharField(max_length = 50, choices = OPINION) + examples_help = models.CharField(max_length = 50, choices = OPINION) + other_language = models.CharField(max_length = 50, choices = OPINION) + instructions_easy_to_follow = models.CharField(max_length = 50, choices = OPINION) + language_complicated = models.CharField(max_length = 50, choices = OPINION) + + + acquired_knowledge = models.CharField(max_length = 50, choices = OPINION) + suff_instruction_by_prof = models.CharField(max_length = 50, choices = OPINION) + suff_instruction_by_staff = models.CharField(max_length = 50, choices = OPINION) + method_easy = models.CharField(max_length = 50, choices = OPINION) + desired_objective = models.CharField(max_length = 50, choices = OPINION) + recommend = models.CharField(max_length = 50, choices = OPINION) + like_to_part = models.CharField(max_length = 50, choices = OPINION) + learn_other_side_by_side = models.CharField(max_length = 50, choices = OPINION) + + + referred_forums = models.CharField(max_length = 50, choices = OPINION) + referred_forums_after = models.CharField(max_length = 50, choices = OPINION) + asked_ques_forums = models.CharField(max_length = 50, choices = OPINION) + not_answer_doubts = models.CharField(max_length = 50, choices = OPINION) + forum_helpful = models.CharField(max_length = 50, choices = OPINION) + doubts_solved_fast = models.CharField(max_length = 50, choices = OPINION) + need_not_post = models.CharField(max_length = 50, choices = OPINION) + faster_on_forums = models.CharField(max_length = 50, choices = OPINION) + not_have_to_wait = models.CharField(max_length = 50, choices = OPINION) + not_like_method_forums = models.CharField(max_length = 50, choices = OPINION) + helpful_pre_ans_ques = models.CharField(max_length = 50, choices = OPINION) + not_like_reveal_identity = models.CharField(max_length = 50, choices = OPINION) + forum_motivated = models.CharField(max_length = 50, choices = OPINION) + per_asked_ques_before_tuts = models.CharField(max_length = 50, choices = OPINION) + + + content_management = models.CharField(max_length = 50, choices = FEELINGS) + configuration_management = models.CharField(max_length = 50, choices = FEELINGS) + creating_basic_content = models.CharField(max_length = 50, choices = FEELINGS) + edit_existing_content = models.CharField(max_length = 50, choices = FEELINGS) + create_new_content = models.CharField(max_length = 50, choices = FEELINGS) + grp_entity_ref = models.CharField(max_length = 50, choices = FEELINGS) + taxonomy = models.CharField(max_length = 50, choices = FEELINGS) + managing_content = models.CharField(max_length = 50, choices = FEELINGS) + creating_dummy_content = models.CharField(max_length = 50, choices = FEELINGS) + + modify_display_content = models.CharField(max_length = 50, choices = FEELINGS) + contents_using_view = models.CharField(max_length = 50, choices = FEELINGS) + table_of_fields_with_views = models.CharField(max_length = 50, choices = FEELINGS) + control_display_images = models.CharField(max_length = 50, choices = FEELINGS) + adding_func = models.CharField(max_length = 50, choices = FEELINGS) + finding_modules = models.CharField(max_length = 50, choices = FEELINGS) + modifying_page_layout = models.CharField(max_length = 50, choices = FEELINGS) + menu_endpoints = models.CharField(max_length = 50, choices = FEELINGS) + styling_using_themes = models.CharField(max_length = 50, choices = FEELINGS) + installig_ad_themes = models.CharField(max_length = 50, choices = FEELINGS) + people_management = models.CharField(max_length = 50, choices = FEELINGS) + site_management = models.CharField(max_length = 50, choices = FEELINGS) + + ws_quality = models.CharField(max_length = 50, choices = RATE_SPOKEN_CHOICES) + relevance = models.CharField(max_length = 50, choices = RATE_SPOKEN_CHOICES) + guidelines = models.CharField(max_length = 50, choices = RATE_SPOKEN_CHOICES) + overall_video_quality = models.CharField(max_length = 50, choices = RATE_SPOKEN_CHOICES) + text_readability = models.CharField(max_length = 50, choices = RATE_SPOKEN_CHOICES) + clarity_of_speech = models.CharField(max_length = 50, choices = RATE_SPOKEN_CHOICES) + visual_presentation = models.CharField(max_length = 50, choices = RATE_SPOKEN_CHOICES) + pace_of_tutorial = models.CharField(max_length = 50, choices = RATE_SPOKEN_CHOICES) + arrangement = models.CharField(max_length = 50, choices = RATE_SPOKEN_CHOICES) + network = models.CharField(max_length = 50, choices = RATE_SPOKEN_CHOICES) + installation_help = models.CharField(max_length = 50, choices = RATE_SPOKEN_CHOICES) + time_for_handson = models.CharField(max_length = 50, choices = RATE_SPOKEN_CHOICES) + experience_of_learning = models.CharField(max_length = 50, choices = RATE_SPOKEN_CHOICES) + overall_arrangement = models.CharField(max_length = 50, choices = RATE_SPOKEN_CHOICES) + + + + like_to_create_st = models.CharField(max_length = 50, choices = YES_NO_CHOICES) + like_to_create_st_details = models.CharField(max_length = 300) + num_of_experts_req = models.CharField(max_length = 50, choices = NUM_OF_EXPERTS) + fees = models.CharField(max_length = 50, choices = FEES) + + + like_abt_ws = models.CharField(max_length = 500) + how_make_better = models.CharField(max_length = 500) + experience = models.CharField(max_length = 500) + suggestions = models.CharField(max_length = 500) + +class LearnDrupalFeedback(models.Model): + YES_NO_CHOICES =( + ('','-----'), ('Yes', 'Yes'), ('No', 'No'),('NotApplicable ', 'Not Applicable '), + ) + YES_NO = ( + ('','-----'), ('Yes', 'Yes'), ('No', 'No') + ) + AGE =( + ('','-----'),('below25', 'below 25'), ('25to34', '25 to 34'), ('35to44', '35 to 44'),('45to54', '45 to 54'),('55to64', '55 to 64'),('65andabove', '65 and above') + ) + CURRENT_STATUS =( + ('','-----'), ('Student', 'Student'), ('Individuallearner', 'Individual learner'), ('Workingprofessional', 'Working professional'), ('Teacher', 'Teacher'), ('Administrator', 'Administrator'), ('Others', 'Others') + ) + PLAN_TO_CONDUCT = ( + ('','-----'), ('within3months', 'within 3 months'), ('within6months', 'within 6 months'), ('within1year', 'within 1 year'), ('notyetplanned', 'not yet planned') + ) + LANGUAGE = ( + ('','-----'),('Hindi','Hindi'),('English','English'),('Marathi','Marathi'),('Urdu','Urdu'),('Kannanda','Kannanda'),('Bangali','Bangali'),('Malyalum','Malyalum'),('Tamil','Tamil'),('Telugu','Telugu'),('Oriya','Oriya'),('Assamese','Assamese'),('Gujrati','Gujrati'), + ) + + name = models.CharField(max_length = 100) + phonemob = models.CharField(max_length = 100) + email = models.EmailField(max_length = 100) + affiliation = models.CharField(max_length = 100) + place = models.CharField(max_length = 100) + agegroup = models.CharField(max_length = 50, choices = AGE) + currentstatus = models.CharField(max_length = 50, choices = CURRENT_STATUS) + currentstatus_other = models.CharField(max_length = 50) + is_drupal_in_curriculum = models.CharField(max_length = 50, choices = YES_NO_CHOICES) + need_help_in_organizing = models.CharField(max_length = 50, choices = YES_NO_CHOICES) + when_plan_to_conduct = models.CharField(max_length = 50, choices = PLAN_TO_CONDUCT) + language = models.CharField(max_length = 50, choices = LANGUAGE) + did_undergo_st_training = models.CharField(max_length = 50, choices = YES_NO_CHOICES) + rate_spoken = models.CharField(max_length = 20) + useful_for_placement = models.CharField(max_length = 50, choices = YES_NO_CHOICES) + useful_for_placement_for_students = models.CharField(max_length = 50, choices = YES_NO_CHOICES) + feedback = models.CharField(max_length = 500) + like_to_learn_other_foss = models.CharField(max_length = 50, choices = YES_NO) + mention_foss = models.CharField(max_length = 100) + like_to_give_testimonial = models.CharField(max_length = 50, choices = YES_NO) + testimonial = models.CharField(max_length = 100) + +class InductionInterest(models.Model): + YES_NO =( + ('','-----'), ('Yes', 'Yes'), ('No', 'No'), + ) + yes_option=( + ('','-----'), ('Yes', 'Yes'), + ) + GENDER_CHOICES =( + ('', '-----'), ('Male', 'Male'), ('Female', 'Female'), + ) + languages = ( + ('', '-----'), ('Assamese','Assamese'), ('Bengali', 'Bengali'), ('Bhojpuri', 'Bhojpuri'), ('Bodo', 'Bodo'), ('English', 'English'), ('Gujarati', 'Gujarati'), + ('Hindi', 'Hindi'), ('Kannada', 'Kannada'), ('Kashmiri', 'Kashmiri'), ('Khasi', 'Khasi'), ('Konkani', 'Konkani'), ('Maithili', 'Maithili'), + ('Malayalam', 'Malayalam'), ('Manipuri', 'Manipuri'), ('Marathi', 'Marathi'), ('Nepali', 'Nepali'),('Oriya', 'Oriya'), ('Punjabi', 'Punjabi'), + ('Rajasthani', 'Rajasthani'), ('Sanskrit', 'Sanskrit'), ('Santhali', 'Santhali'), ('Sindhi', 'Sindhi'), ('Tamil', 'Tamil'), ('Telugu', 'Telugu'), + ('Urdu', 'Urdu'), ('Other', 'Other'), + ) + AGE =( + ('','-----'),('20to25', '20 to 25 years'), ('26to30', '26 to 30 years'),('31to35', '31 to 35 years'),('35andabove', 'Above 35 years') + ) + specialisation =( + ('','-----'),('Arts', 'Arts'),('Science', 'Science'),('Commerce', 'Commerce'), + ('EngineeringorComputerScience ', 'Engineering or Computer Science'),('Management', 'Management'), + ('Other', 'Other'), + ) + education =( + ('','-----'), ('3yeargraduatedegree(BABScB.Cometc)','3 year graduate degree (BA, BSc, B.Com, etc.)'), + ('Professionaldegree(BEBTechetc)', 'Professional degree (BE, B.Tech, etc.)'), + ('2yearMasters(MAMScMCometc)', '2 year Masters (MA, MSc, MCom, etc.)'), + ('2yearprofessionalMasters(MEMTechMBAMPhiletc)', '2 year professional Masters (ME, MTech, MBA, MPhil, etc.)'), + ('PhD', 'PhD'), + ('Other','Other'), + ) + designation = ( + ('','-----'), + ('Lecturer','Lecturer'), + ('AssistantProfessor','Assistant Professor'), + ('AssociateProfessor','Associate Professor'), + ('Professor','Professor'), + ('Other','Other'), + ) + years_of_experience = ( + ('','-----'), + ('Lessthan1year','Less than 1 year'), + ('Morethan1yearbutlessthan2years','More than 1 year, but less than 2 years'), + ('Morethan2yearsbutlessthan5years','More than 2 years but less than 5 years'), + ('Morethan5years','More than 5 years'), + ) + + email = models.EmailField(max_length = 100) + name = models.CharField(max_length = 100) + phonemob = models.CharField(max_length = 100) + age = models.CharField(max_length = 100, choices = AGE) + gender = models.CharField(max_length = 50, choices = GENDER_CHOICES) + mother_tongue = models.CharField(max_length = 100, choices = languages) + other_language = models.CharField(max_length = 100) + + medium_of_studies = models.CharField(max_length = 100, choices = languages) + other_medium = models.CharField(max_length = 100) + + education = models.CharField(max_length = 100, choices = education) + other_education = models.CharField(max_length = 100) + + specialisation = models.CharField(max_length = 100, choices = specialisation) + other_specialisation = models.CharField(max_length = 100) + + designation = models.CharField(max_length = 100, choices = designation) + other_designation = models.CharField(max_length = 100) + + college = models.CharField(max_length = 100) + college_address = models.CharField(max_length = 500) + state = models.ForeignKey(State) + city = models.CharField(max_length = 100) + pincode = models.PositiveIntegerField() + experience_in_college = models.CharField(max_length = 100, choices = years_of_experience) + + bring_laptop = models.CharField(max_length = 50, choices = YES_NO) + borrow_laptop = models.CharField(max_length = 50, choices = YES_NO) + + do_agree = models.CharField(max_length = 50, choices = yes_option) + no_objection = models.CharField(max_length = 50, choices = yes_option) + other_comments = models.CharField(max_length = 500) + + class Meta: + ordering = ('city',) + +class InductionFinalList(models.Model): + email = models.EmailField(max_length = 200) + eoi_id = models.ForeignKey(InductionInterest, default=None) + code = models.CharField(max_length=255, default=None) + # batch_code should be in form of year+month+batch_number e.g. 20171101 = [year 2017,month 11, batch 01] + batch_code = models.PositiveIntegerField() + created = models.DateTimeField(auto_now_add = True) + +class Drupal2018_email(models.Model): + email = models.EmailField(max_length = 200) + +class MumbaiStudents(models.Model): + stuid = models.ForeignKey('Student') + bid = models.ForeignKey('StudentBatch') + +class PaymentDetails(models.Model): + user = models.ForeignKey(User) + academic_id = models.ForeignKey(AcademicCenter) + academic_year = models.PositiveIntegerField() + amount = models.CharField(max_length=20) + purpose = models.CharField(max_length=20, null=True) + status = models.PositiveIntegerField() + description = models.CharField(max_length=20, null=True) + gstno = models.CharField(max_length=15,null=True) + created = models.DateTimeField(auto_now_add = True) + updated = models.DateTimeField(auto_now_add = True) + + class Meta: + unique_together = ('academic_id','academic_year',) + +class PaymentTransactionDetails(models.Model): + paymentdetail = models.ForeignKey(PaymentDetails) + requestType = models.CharField(max_length=2) + userId = models.ForeignKey(User) + amount = models.CharField(max_length=20) + reqId = models.CharField(max_length=50) + transId = models.CharField(max_length=100) + refNo = models.CharField(max_length=50) + provId = models.CharField(max_length=50) + status = models.CharField(max_length=2) + msg = models.CharField(max_length=100) + created = models.DateTimeField(auto_now_add = True) + updated = models.DateTimeField(auto_now_add = True) diff --git a/events/events/notification.py b/events/events/notification.py new file mode 100644 index 000000000..63c88340a --- /dev/null +++ b/events/events/notification.py @@ -0,0 +1,91 @@ + +from builtins import str +from django.core.mail import EmailMultiAlternatives +from django.template.loader import get_template +from django.template import Context +from events.models import * +from django.http import HttpResponse, HttpResponseRedirect +import time +def nemail(request): + + plaintext = get_template('email-template/email-template.txt') + htmly = get_template('email-template/email-template.html') + d = Context({ 'username': 'username' }) + text_content = plaintext.render(d) + html_content = htmly.render(d) + organisers = Organiser.objects.filter(status=1).exclude(user_id__in=OrganiserNotification.objects.all().values_list('user_id')) + sent = 0 + notsent = 0 + count = 0 + tot_count = organisers.count() + + subject = "Spoken Tutorial Software Training Program" + message = '''Dear Organiser, + + Many thanks to you and your Institute for being a part of the Spoken Tutorial Software training program and contributing towards making it such a mega success. This is to inform you that we have introduced a separate interface in the Training Dashboard of our website, namely the Semester Training Planner (STP), that has to be completed prior to raising the Training Request. This ensures that all the batches belonging to the different departments and the specific semesters are able to take training in maximum possible relevant FOSS.The Institute will + + 1. Appoint Faculty coordinator/s (FC) - so as to cover maximum departments in the Institute. + + 2. As a first step in the Training process, each FC will Register/ Create a login ID + + 3. Second step, complete the STP with details - + Dept. name/s (single/multiple), Semester number (single semester), Semester start date, FOSS Course selection method - + i) Mapped with computer lab course hours, + vii) Unmapped but during computer lab course hours, + iii) Outside lab course hours/time-table. + N.B : Many of you have completed mapping of FOSS courses in your time-tables so this part should not be difficult to do. + + 4. Third step, FC will upload a Master Batch (all students in that Dept. and Year), .csv file of Student details - + i) Dept. name + ii) Year of joining + iii) First name, Last name, Valid e-mail ID, Gender + + 5. Fourth step, complete the Training Request form which is to be filled within 10 weeks of Semester start date in the case of FOSS courses that come with Online Assessment Tests. This is so that students get adequate time to completely revise the entire series of tutorials of the particular FOSS course. + + 6. In the fourth step, the FC will select from the Master Batch to create a list with the names of students who will learn the particular FOSS/s + + 7. In the fifth step, the FC will need to download the specified software, for that Click below. + Link : http://process.spoken-tutorial.org/images/1/1b/Download-Tutorials.pdf + + And get the lab and systems ready for the training Click below + Link : http://process.spoken-tutorial.org/images/5/58/Machine-Readiness.pdf + + IMPORTANT - Learner's Certificates will no longer be provided for FOSS courses that come with Online assessment Tests. For these courses, only Completion Certificate will be given on successfully completing and passing the test. + + As before, the students must go through the instruction sheet and see the tutorials as directed in the instructions mentioned in it and also practice the commands and instruction as shown in the tutorial following the Side by Side method during the Training. Side by Side means that on the screen, we keep the terminal/console window open on the right hand side for the practice and the tutorial window open on the left hand side for the learning. + + Here's wishing you the best and guaranteeing our continued support for offering the Spoken Tutorial Software training to all. + + Regards, + Spoken Tutorial Team, + IIT Bombay.''' + + + for organiser in organisers: + to = [organiser.user.email] + #to = ['k.sanmugam2@gmail.com', 'sanmugam@iitb.ac.in'] + email = EmailMultiAlternatives( + subject, text_content, 'no-reply@spoken-tutorial.org', + to = to, + headers = { + "Content-type" : "text/html" + } + ) + email.attach_alternative(html_content, "text/html") + count = count + 1 + try: + result = email.send(fail_silently=False) + sent += 1 + OrganiserNotification.objects.create(user=organiser.user) + if sent%10 == 0: + time.sleep(5) + print((to," => sent (", str(count),"/",str(tot_count),")")) + except Exception as e: + print(e) + print((to," => not sent (",count,"/",tot_count,")")) + #break + print("--------------------------------") + print(("Total sent mails:", sent)) + print(("Total not sent mails:", notsent)) + print("--------------------------------") + return HttpResponse("Done!") diff --git a/events/events/signals.py b/events/events/signals.py new file mode 100644 index 000000000..80987c3e7 --- /dev/null +++ b/events/events/signals.py @@ -0,0 +1,35 @@ +from django.contrib.auth.models import Group, User +from django.core.exceptions import ObjectDoesNotExist + +def get_or_create_user(instance, password=None): + user = None + instance.email = instance.email.lower() + instance.username = instance.email + instance.firstname = instance.firstname.upper() + instance.lastname = instance.lastname.upper() + instance.save() + flag = 0 + try: + user = User.objects.get(email=instance.email) + except ObjectDoesNotExist: + user = User.objects.create_user(instance.email, instance.email, instance.firstname) + flag = 1 + if user: + user.first_name = instance.firstname + user.last_name = instance.lastname + user.save() + if password: + user.set_password(password) + try: + student_group = Group.objects.get(name = 'Student') + user.groups.add(student_group) + except: + pass + return instance, flag, user + +def revoke_student_permission(sender, instance, *args, **kwargs): + try: + group = instance.user.groups.get(name='Student') + group.user_set.remove(instance.user) + except: + pass diff --git a/events/events/templates/academic_payment_details_form.html b/events/events/templates/academic_payment_details_form.html new file mode 100644 index 000000000..cc46af7cd --- /dev/null +++ b/events/events/templates/academic_payment_details_form.html @@ -0,0 +1,286 @@ +{% extends 'base.html' %} +{% load widget_tweaks %} +{% load static %} +{% block title %}Academic Payament Details Form{% endblock %} +{% block heading %} + Activate/Deactivate Academic Centers : +{% endblock %} +{% block search %}{% endblock %} +{% block cssblock %} + + +{% endblock %} +{% block content %} +{{message.tags}} +
+
+ +
+
+ +
+ {% csrf_token %} +
+
+ +
+ {% render_field form.state class+="form-control state" %} + {{ form.state.errors }} +
+
+ +
+ +
+ {% render_field form.academic class+="form-control academic" %} + {{ form.academic.errors }} +
+
+ +
+ +
+ {% render_field form.name_of_the_payer class+="form-control name_of_the_payer" %} + {{ form.name_of_the_payer.errors }} +
+
+ +
+ +
+ {% render_field form.email class+="form-control email" %} + {{ form.email.errors }} +
+
+ +
+ +
+ {% render_field form.phone class+="form-control phone" %} + {{ form.phone.errors }} +
+
+ +
+ +
+ {% render_field form.subscription class+="form-control subscription" %} + {{ form.subscription.errors }} +
+
+ +
+ +
+ {% render_field form.amount class+="form-control amount" %} + {{ form.amount.errors }} +
+
+ + + +
+ +
+ {% render_field form.transactionid class+="form-control transactionid" %} + {{ form.transactionid.errors }} +
+
+ +
+ +
+ {% render_field form.payment_date class+="form-control payment_date" %} + {{ form.payment_date.errors }} +
+
+ +
+ +
+ {% render_field form.payment_status class+="form-control payment_status" %} + {{ form.payment_status.errors }} +
+
+ +
+ +
+ {% render_field form.college_type class+="form-control college_type" %} + {{ form.college_type.errors }} +
+
+ +
+ +
+ {% render_field form.pan_number class+="form-control pan_number" %} + {{ form.pan_number.errors }} +
+
+ +
+ +
+ {% render_field form.gst_number class+="form-control gst_number" %} + {{ form.gst_number.errors }} +
+
+ +
+ +
+ {% render_field form.customer_id class+="form-control customer_id" %} + {{ form.customer_id.errors }} +
+
+ +
+ +
+ {% render_field form.invoice_no class+="form-control invoice_no" %} + {{ form.invoice_no.errors }} +
+
+ +
+ +
+ {% render_field form.remarks class+="form-control remarks" %} + {{ form.remarks.errors }} +
+
+
+
+
+
+ +
+
+ +
+
+
+
+ +
+
+ + +{% endblock %} +{% block jsblock %} + +{% endblock %} \ No newline at end of file diff --git a/events/events/templates/activate_academics.html b/events/events/templates/activate_academics.html new file mode 100644 index 000000000..54d17af60 --- /dev/null +++ b/events/events/templates/activate_academics.html @@ -0,0 +1,115 @@ +{% extends 'spoken/templates/base.html' %} +{% load widget_tweaks %} +{% load static %} +{% load cmsdata %} +{% load creationdata %} +{% block title %} Academic Centers {% endblock %} +{% block cssblock %}{% endblock %} +{% block heading %} + Activate/Deactivate Academic Centers : +{% endblock %} +{% block search %}{% endblock %} +{% block content %} +{{message.tags}} +
+
+ +
+
+ +
+ {% render_field form.state class+="form-control state" tabindex="1" %} + {{ form.state.errors }} +
+
+
+ +
+ {% render_field form.institution_type class+="form-control institution_type" tabindex="1" %} + {{ form.institution_type.errors }} +
+
+
+ +
+
+ +
+ {% render_field form.institution_name class+="form-control institution_name" tabindex="1" %} + {{ form.institution_name.errors }} +
+
+
+ +
+ {% render_field form.status class+="form-control status" tabindex="1" %} + {{ form.status.errors }} +
+
+ +
+
+ + Reset Filter +
+
+
+
+
+
+ {% if collection %} + + {% get_sortable_header header ordering request.GET %} + {% for record in collection %} + + + + + + + + {% endfor %} +
{{ forloop.counter }} + {{ record.state }}{{ record.institution_name }}{{ record.academic_code }}|View| + {% if record.status == 3 %} + Activate| + {% else %} + Deactivate | + {% endif %} + + {% if record.status == 3 %} + Deactivated + {% else %} + Activated + {% endif %} +
+ {% else %} +

No record found!

+ {% endif %} +
+{% endblock %} +{% block jsblock %} + +{% endblock %} \ No newline at end of file diff --git a/events/events/templates/base.html b/events/events/templates/base.html new file mode 100644 index 000000000..66ded5637 --- /dev/null +++ b/events/events/templates/base.html @@ -0,0 +1,36 @@ +{% extends 'spoken/templates/base.html' %} +{% load cmsdata %} +{% load static %} + +{% block pager %} + {% if is_paginated %} + {% if page_obj.paginator.num_pages > 1 %} +