Skip to content

Commit

Permalink
gitignore modified
Browse files Browse the repository at this point in the history
  • Loading branch information
root committed Sep 30, 2012
2 parents f0bc391 + c97b536 commit 6bf57da
Show file tree
Hide file tree
Showing 232 changed files with 21,404 additions and 38 deletions.
23 changes: 9 additions & 14 deletions Database views/View_Student
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,14 @@ b."RollNo" as "RollNo",
(select sum(cast(tmp."SecuredMarks" as double precision)*100)/sum(tmp."TotalMarks") from "UserProfile_marks" as tmp where tmp."DegreeType_id"=(select id from "UserProfile_degreetype" where "Name"='undergraduation') and tmp."UserId_id"=a.id) as "UG_Percentage",
(select sum(tmp."ReappersRemaining") from "UserProfile_marks" as tmp where tmp."DegreeType_id"=(select id from "UserProfile_degreetype" where "Name"='undergraduation') and tmp."UserId_id"=a.id) as "UG_ReappersRemaining",
b."AIEEE" as "AIEEE",
f."MobileNo" as "MobileNo",
c."AdressNo" as "PresentAdressNo",
c."StreetAdress1" as "PresentStreetAdress1",
c."StreetAdress2" as "PresentStreetAdress2",
d."CityName" as "PresentCityName",
e."StateName" as "PresentStateName",
c."PinCode" as "PresentPinCode"

(select tmp."MobileNo" from "UserAdress_usercontactinfo" as tmp where tmp."User_id"=a.id) as "MobileNo",
(select tmp1."AdressNo" from "UserAdress_adress" as tmp1,"UserAdress_usercontactinfo" as tmp2 where tmp2."User_id"=a.id and tmp2."PresentAdress" =tmp1.id) as "AdressNo",
(select tmp1."StreetAdress1" from "UserAdress_adress" as tmp1,"UserAdress_usercontactinfo" as tmp2 where tmp2."User_id"=a.id and tmp2."PresentAdress" =tmp1.id) as "PresentStreetAdressNo1",
(select tmp1."StreetAdress2" from "UserAdress_adress" as tmp1,"UserAdress_usercontactinfo" as tmp2 where tmp2."User_id"=a.id and tmp2."PresentAdress" =tmp1.id) as "PresentStreetAdressNo2",
(select tmp3."CityName" from "UserAdress_adress" as tmp1,"UserAdress_city" as tmp3,"UserAdress_usercontactinfo" as tmp2 where tmp2."User_id"=a.id and tmp2."PresentAdress" =tmp1.id and tmp3.id=tmp1."City_id") as "PresentCityName",
(select tmp3."StateName" from "UserAdress_adress" as tmp1,"UserAdress_state" as tmp3,"UserAdress_usercontactinfo" as tmp2 where tmp2."User_id"=a.id and tmp2."PresentAdress" =tmp1.id and tmp3.id=tmp1."State_id") as "PresentStateName",
(select tmp1."PinCode" from "UserAdress_adress" as tmp1,"UserAdress_usercontactinfo" as tmp2 where tmp2."User_id"=a.id and tmp2."PresentAdress" =tmp1.id) as "PinCode"
from "Users_user" as a ,
"UserProfile_studentdetails" as b,
"UserAdress_adress" as c,
"UserAdress_city" as d,
"UserAdress_state" as e,
"UserAdress_usercontactinfo" as f
where a.id=b."User_id" and f."User_id"=a.id and c.id=f."PresentAdress" and c."City_id"=d.id and c."State_id"=e.id;
"UserProfile_studentdetails" as b
where a.id=b."User_id" ;
select * from "View_Student";
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ BEGIN
temp := 0;


IF EXISTS ( SELECT id FROM "UserProfile_extraacademicinfodetails" WHERE "User_id"=_User_id and "Start"=_Start and "Organisation"=_Organisation) THEN
IF EXISTS ( SELECT id FROM "UserProfile_extraacademicinfodetails" WHERE "User_id"=_User_id and "Start"=_Start and "Organisation"=_Organisation and "Title" =_Title) THEN
result := 2;
rescode := 161;
RETURN;
Expand Down
46 changes: 31 additions & 15 deletions sp/UsrProfile/yettobeuploaded/ExtraAcademicInfoDetailsUpdate
Original file line number Diff line number Diff line change
@@ -1,26 +1,28 @@
CREATE OR REPLACE FUNCTION ExtraAcademicInfoDetailsUpdate(
_Id integer,
_User_id integer,
RequestedOperation VARCHAR,
by_user INTEGER,
ip VARCHAR,
OUT result INTEGER,
OUT rescode INTEGER
) RETURNS RECORD AS $$
-- Function: extraacademicinfodetailsupdate(integer, integer, character varying, timestamp without time zone, timestamp without time zone, character varying, character varying, character varying, character varying, character varying, integer, character varying, character varying, character varying, character varying, integer, character varying)

-- DROP FUNCTION extraacademicinfodetailsupdate(integer, integer, character varying, timestamp without time zone, timestamp without time zone, character varying, character varying, character varying, character varying, character varying, integer, character varying, character varying, character varying, character varying, integer, character varying);

CREATE OR REPLACE FUNCTION extraacademicinfodetailsupdate(IN _id integer, IN _user_id integer, IN _title character varying, IN _start timestamp without time zone, IN _end timestamp without time zone, IN _organisation character varying, IN _designation character varying, IN _details character varying, IN _placeofwork character varying, IN _functionalarea character varying, IN _extraacadmicinfotype_id integer, IN _references character varying, IN _summary character varying, IN prev character varying, IN requestedoperation character varying, IN by_user integer, IN ip character varying, OUT result integer, OUT rescode integer)
RETURNS record AS
$BODY$
DECLARE
temp INTEGER;
varrec RECORD;
BEGIN
temp := 0;

IF NOT EXISTS ( SELECT id FROM "UserProfile_extraacademicinfodetails" WHERE id=_Id) THEN
result := 2;
result := -4;
rescode := 161;
RETURN;
END IF;



IF EXISTS ( SELECT id FROM "UserProfile_extraacademicinfodetails" WHERE "User_id"=_User_id and "Start"=_Start and "Organisation"=_Organisation and id<>_Id and "Title" =_Title) THEN
result := -3;
rescode := 200;
RETURN;
END IF;

SELECT * INTO varrec FROM CheckUserForPermission(by_user,RequestedOperation,'extraacademicinfodetails','UserProfile');
IF varrec.result <> 1 THEN
Expand All @@ -31,7 +33,19 @@ END IF;

Update "UserProfile_extraacademicinfodetails"
set
"User_id"=_User_id,
"Title"=_Title,
"Start"=_Start,
"End"=_End,
"Organisation"=_Organisation,
"Designation"=_Designation,
"Details"=_Details,
"PlaceOfWork"=_PlaceOfWork,
"FunctionalArea"=_FunctionalArea,
"ExtraAcadmicInfoType_id"=_ExtraAcadmicInfoType_id,
"State_id"=varrec.varsci,
"References"=_References,
"Summary"=_Summary
WHERE Id=_Id;

GET DIAGNOSTICS temp := ROW_COUNT;
Expand All @@ -45,7 +59,7 @@ SELECT id INTO rescode FROM "UserProfile_extraacademicinfodetails" WHERE "User_i


INSERT INTO "UserProfile_userprofilelogs"("LogsUser_id", "ContentType_id", "LogsObject", "LogsPermission_id", "LogsIP", "LogsTimeStamp", "LogsDescription","LogsPreviousState")
VALUES (by_user,varrec.var_ctid,rescode,varrec.varpci,ip,now(),'DELETE','VALUE Deleted');
VALUES (by_user,varrec.var_ctid,rescode,varrec.varpci,ip,now(),'UPDATE',prev);
GET DIAGNOSTICS temp := ROW_COUNT;
IF temp <> 1 THEN
rescode := 999;
Expand All @@ -56,6 +70,8 @@ ELSE
RETURN;
END IF;
END;
$$ LANGUAGE plpgsql;


$BODY$
LANGUAGE plpgsql VOLATILE
COST 100;
ALTER FUNCTION extraacademicinfodetailsupdate(integer, integer, character varying, timestamp without time zone, timestamp without time zone, character varying, character varying, character varying, character varying, character varying, integer, character varying, character varying, character varying, character varying, integer, character varying)
OWNER TO "ThoughtXplore";
6 changes: 4 additions & 2 deletions templates/Jobs/ListJobs.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@
<th scope="col" style="width:150px;">Details</th>
{% if Edit %}
<th scope="col" style="width:150px;">edit</th>
{% endif %}

<th scope="col" style="width:150px;">See Students who applied</th>
{% endif %}
</tr>
</thead>
<tbody>
Expand All @@ -30,8 +31,9 @@
<td><a href="/jobs/details/{{Jobs.id}}/" />Details</td>
{% if Edit %}
<td><a href="/jobs/company/{{Jobs.Company.id}}/jobs/{{Jobs.id}}/edit/">edit</a></td>
{% endif %}

<td><a href="/jobs/view/job/{{Jobs.id}}/applied" target="_blank"/>Students Applied</td>
{% endif %}
</tr>
{% endfor %}
{% else %}
Expand Down
34 changes: 34 additions & 0 deletions templates/Search/search.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<html>
<body>
<form action="/Search/" method="post">
{% csrf_token %}
<input type="hidden" name="ControlsInfo" value="{{ControlsInfo}}"/>
<select name="Search_Options">
{{options|safe}}
</select>
<input type="submit" name="Add" value="Add"/>
<br/>
{{Search_Controls|safe}}
<input type="submit" name="Search" value="Search"/>
<input type="submit" name="Excel" value="Save To Excel"/>
</form>
{% if StudentList|length %}
<table border="1">
{% for rows in StudentList %}
<tr>
<td>{%if forloop.counter != 1%}{{forloop.counter|add:"-1"}}{%endif%}</td>
{% for col in rows %}
<td>
{{ col }}
</td>
{% endfor %}
</tr>
{% endfor %}
</table>
{% else %}
<h1>
No Data was found
</h1>
{% endif %}
</body>
</html>
Empty file.
43 changes: 43 additions & 0 deletions tx2.backup.sept22/AppEvent/models.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
from django.db import models
from django.contrib.contenttypes.models import ContentType
from tx2.UserReg.models import RegisterUser
from tx2.Users.models import User
from tx2.Security.models import SecurityStates,SecurityPermissions

# Create your models here.

class AppEventType(models.Model):
EventTypeName = models.CharField(max_length=100)
EventTypeDesc = models.CharField(max_length=500)

class AppEvent(models.Model):
EventType = models.ForeignKey(AppEventType)
EventName = models.CharField(max_length=100)
EventDesc = models.TextField()
EventStart = models.DateTimeField()
EventDuration = models.IntegerField()
EventRounds = models.IntegerField()
EventRef = models.IntegerField()
EventFolders = models.CharField(max_length=500)
EventState = models.ForeignKey(SecurityStates)

class AppEventRound(models.Model):
RoundName = models.CharField(max_length=100)
RoundDesc = models.TextField()
RoundStart = models.DateTimeField()
RoundDuration = models.IntegerField()
Event = models.ForeignKey(AppEvent)
RoundRegUsers = models.ForeignKey(RegisterUser)
EventRoundState = models.ForeignKey(SecurityStates)

class AppEventLogs(models.Model):
# user making changes
LogsUser = models.ForeignKey(User)
ContentType = models.ForeignKey(ContentType)
# row id being changed
LogsObject = models.IntegerField()
LogsPermission = models.ForeignKey(SecurityPermissions)
LogsIP = models.CharField(max_length=20)
LogsTimeStamp = models.DateTimeField()
LogsDescription = models.CharField(max_length=200)

16 changes: 16 additions & 0 deletions tx2.backup.sept22/AppEvent/tests.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
"""
This file demonstrates writing tests using the unittest module. These will pass
when you run "manage.py test".
Replace this with more appropriate tests for your application.
"""

from django.test import TestCase


class SimpleTest(TestCase):
def test_basic_addition(self):
"""
Tests that 1 + 1 always equals 2.
"""
self.assertEqual(1 + 1, 2)
1 change: 1 addition & 0 deletions tx2.backup.sept22/AppEvent/views.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Create your views here.
33 changes: 33 additions & 0 deletions tx2.backup.sept22/CONFIG.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
LoggerSecurity = 'LOGGER_Security'
LoggerQuery = 'LOGGER_Query'
LoggerUser = 'LOGGER_User'

CACHE_LOGGED_IN_USERS_DICT = 'CACHE_LOGGED_IN_USERS_DICT'


SECONDAR_GROUP = {
'VALIDATION_EMAIL':'Group_Comm_EmailValidation',
}

GROUP_MENU_PREFIX = 'group_menu_'
TEMPLATE_PARAM_USER_NOT_LOGGED_IN = 'NotDefined'
LOGGER_USER = 'LOGGER_UserSystem'
LOGGER_MISC = 'LOGGER_MiscSystem'
LOGGER_MENU = ''
LOGGER_QUERY = 'LOGGER_QueryLogger'
LOGGER_UserReg = 'LOGGER_UserReg'
LOGGER_COMMUNICATION = 'LOGGER_Communication'
LoggerAdress = 'LOGGER_Adress'
LoggerJob = 'LOGGER_Job'
AlumniLogger = 'AlumniLogger'
LOGGER_USER_PROFILE = 'LOGGER_UserProfile'
LOGGER_ADRESS = 'LOGGER_Adress'

SESSION_MESSAGE = 'UserMessages'
SESSION_USER_EXPIRY_TIME = 5*60*1000
CACHE_TIME_FOR_GROUP_MENU = 24*60*60
CACHE_TIME_FOR_SECURITY = 30*24*60*60
CACHE_CONTENTTYPES = 'ThoughtXploreContentTypes'

Login_From_Type = 1
LogOut_From_Type = 10
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
from tx2.Communication.DBFunctions.DBFunctions import DBInsertAttachment, DBUpdateAttachment
from tx2.CONFIG import LOGGER_COMMUNICATION
import logging


class AttachmentFnx():
def __init__(self):
self.CommunicationLogger = logging.getLogger(LOGGER_COMMUNICATION)


def InsertAttachment(self,ContentType,Record, AttachmentType, AttachmentDesc, AttachmentName, AttachmentRef,by,ip,RequestedOperation):
try:
details= {
'ContentType': ContentType,
'Record': Record,
'AttachmentType':AttachmentType,
'AttachmentName':AttachmentName,
'AttachmentDesc':AttachmentDesc,
'AttachmentRef':AttachmentRef,
'op':RequestedOperation,
'by':by,
'ip':ip

}
res= DBInsertAttachment(details)
return res
except:
error_msg = 'Error @ InsertAttachment in Business Functions'
self.CommunicationLogger.exception('[%s] == Exception =='%('InsertAttachment'))
return (-5,error_msg)

def UpdateAttachment(self,Content,Record, AttachmentType, AttachmentDesc, AttachmentName, AttachmentRef,by,ip,RequestedOperation,LogsDesc):
try:
details= {
'Content': Content,
'Record': Record,
'AttachmentType':AttachmentType,
'AttachmentName':AttachmentName,
'AttachmentDesc':AttachmentDesc,
'AttachmentRef':AttachmentRef,
'op':RequestedOperation,
'by':by,
'ip':ip,
'LogsDesc':LogsDesc

}
res= DBUpdateAttachment(details)
return res
except:
error_msg = 'Error @ UpdateAttachment in Business Functions'
self.CommunicationLogger.exception('[%s] == Exception =='%('UpdateAttachment'))
return (-5,error_msg)




Loading

0 comments on commit 6bf57da

Please sign in to comment.