ayush 6 months ago
commit 9f19445301
  1. 54
      README.md
  2. 16
      backend/app.py
  3. 45
      backend/blueprints/admin/__init__.py
  4. 49
      backend/blueprints/badge/__init__.py
  5. 2
      backend/blueprints/chat/__init__.py
  6. 84
      backend/blueprints/course/__init__.py
  7. 228
      backend/blueprints/quiz/__init__.py
  8. 1
      backend/config.py
  9. 9
      backend/db/model.py
  10. BIN
      backend/uploads/CrKZMGYNpfofiwwyZjzAPoAlKpJHIYYn.pdf
  11. BIN
      backend/uploads/CrKZMGYNpfofiwwyZjzAPoAlKpJHIYYn.pdf_parts/1.pdf
  12. 34
      backend/uploads/CrKZMGYNpfofiwwyZjzAPoAlKpJHIYYn.pdf_parts/1.txt
  13. BIN
      backend/uploads/CrKZMGYNpfofiwwyZjzAPoAlKpJHIYYn.pdf_parts/2.pdf
  14. 45
      backend/uploads/CrKZMGYNpfofiwwyZjzAPoAlKpJHIYYn.pdf_parts/2.txt
  15. BIN
      backend/uploads/CrKZMGYNpfofiwwyZjzAPoAlKpJHIYYn.pdf_parts/3.pdf
  16. 63
      backend/uploads/CrKZMGYNpfofiwwyZjzAPoAlKpJHIYYn.pdf_parts/3.txt
  17. BIN
      backend/uploads/CrKZMGYNpfofiwwyZjzAPoAlKpJHIYYn.pdf_parts/4.pdf
  18. 128
      backend/uploads/CrKZMGYNpfofiwwyZjzAPoAlKpJHIYYn.pdf_parts/4.txt
  19. BIN
      backend/uploads/CrKZMGYNpfofiwwyZjzAPoAlKpJHIYYn.pdf_parts/5.pdf
  20. 129
      backend/uploads/CrKZMGYNpfofiwwyZjzAPoAlKpJHIYYn.pdf_parts/5.txt
  21. BIN
      backend/uploads/CrKZMGYNpfofiwwyZjzAPoAlKpJHIYYn.pdf_parts/6.pdf
  22. 15
      backend/uploads/CrKZMGYNpfofiwwyZjzAPoAlKpJHIYYn.pdf_parts/6.txt
  23. BIN
      backend/uploads/CyPqrZgrAeCMNWawSfEvwJFTxgaLuJav.pdf
  24. BIN
      backend/uploads/CyPqrZgrAeCMNWawSfEvwJFTxgaLuJav.pdf_parts/1.pdf
  25. 34
      backend/uploads/CyPqrZgrAeCMNWawSfEvwJFTxgaLuJav.pdf_parts/1.txt
  26. BIN
      backend/uploads/CyPqrZgrAeCMNWawSfEvwJFTxgaLuJav.pdf_parts/2.pdf
  27. 45
      backend/uploads/CyPqrZgrAeCMNWawSfEvwJFTxgaLuJav.pdf_parts/2.txt
  28. BIN
      backend/uploads/CyPqrZgrAeCMNWawSfEvwJFTxgaLuJav.pdf_parts/3.pdf
  29. 63
      backend/uploads/CyPqrZgrAeCMNWawSfEvwJFTxgaLuJav.pdf_parts/3.txt
  30. BIN
      backend/uploads/CyPqrZgrAeCMNWawSfEvwJFTxgaLuJav.pdf_parts/4.pdf
  31. 128
      backend/uploads/CyPqrZgrAeCMNWawSfEvwJFTxgaLuJav.pdf_parts/4.txt
  32. BIN
      backend/uploads/CyPqrZgrAeCMNWawSfEvwJFTxgaLuJav.pdf_parts/5.pdf
  33. 129
      backend/uploads/CyPqrZgrAeCMNWawSfEvwJFTxgaLuJav.pdf_parts/5.txt
  34. BIN
      backend/uploads/CyPqrZgrAeCMNWawSfEvwJFTxgaLuJav.pdf_parts/6.pdf
  35. 15
      backend/uploads/CyPqrZgrAeCMNWawSfEvwJFTxgaLuJav.pdf_parts/6.txt
  36. BIN
      backend/uploads/TbjYLfSVjZSrBtnLxFaAoZLlRyzrHJEV.pdf
  37. BIN
      backend/uploads/TbjYLfSVjZSrBtnLxFaAoZLlRyzrHJEV.pdf_parts/1.pdf
  38. 34
      backend/uploads/TbjYLfSVjZSrBtnLxFaAoZLlRyzrHJEV.pdf_parts/1.txt
  39. BIN
      backend/uploads/TbjYLfSVjZSrBtnLxFaAoZLlRyzrHJEV.pdf_parts/2.pdf
  40. 45
      backend/uploads/TbjYLfSVjZSrBtnLxFaAoZLlRyzrHJEV.pdf_parts/2.txt
  41. BIN
      backend/uploads/TbjYLfSVjZSrBtnLxFaAoZLlRyzrHJEV.pdf_parts/3.pdf
  42. 63
      backend/uploads/TbjYLfSVjZSrBtnLxFaAoZLlRyzrHJEV.pdf_parts/3.txt
  43. BIN
      backend/uploads/TbjYLfSVjZSrBtnLxFaAoZLlRyzrHJEV.pdf_parts/4.pdf
  44. 128
      backend/uploads/TbjYLfSVjZSrBtnLxFaAoZLlRyzrHJEV.pdf_parts/4.txt
  45. BIN
      backend/uploads/TbjYLfSVjZSrBtnLxFaAoZLlRyzrHJEV.pdf_parts/5.pdf
  46. 129
      backend/uploads/TbjYLfSVjZSrBtnLxFaAoZLlRyzrHJEV.pdf_parts/5.txt
  47. BIN
      backend/uploads/TbjYLfSVjZSrBtnLxFaAoZLlRyzrHJEV.pdf_parts/6.pdf
  48. 15
      backend/uploads/TbjYLfSVjZSrBtnLxFaAoZLlRyzrHJEV.pdf_parts/6.txt
  49. BIN
      backend/uploads/ToasQcxJytcIEzWUREfvPfkVEmFAYPRT.jpeg
  50. BIN
      backend/uploads/ZFRQjJYWCKWLQQSpPJRZRcAvGFtqzFBd.jpeg
  51. BIN
      backend/uploads/ayjGosqfWMPHKTIyeeaeGwvlRutoshUb.pdf
  52. BIN
      backend/uploads/ayjGosqfWMPHKTIyeeaeGwvlRutoshUb.pdf_parts/1.pdf
  53. 34
      backend/uploads/ayjGosqfWMPHKTIyeeaeGwvlRutoshUb.pdf_parts/1.txt
  54. BIN
      backend/uploads/ayjGosqfWMPHKTIyeeaeGwvlRutoshUb.pdf_parts/2.pdf
  55. 45
      backend/uploads/ayjGosqfWMPHKTIyeeaeGwvlRutoshUb.pdf_parts/2.txt
  56. BIN
      backend/uploads/ayjGosqfWMPHKTIyeeaeGwvlRutoshUb.pdf_parts/3.pdf
  57. 63
      backend/uploads/ayjGosqfWMPHKTIyeeaeGwvlRutoshUb.pdf_parts/3.txt
  58. BIN
      backend/uploads/ayjGosqfWMPHKTIyeeaeGwvlRutoshUb.pdf_parts/4.pdf
  59. 128
      backend/uploads/ayjGosqfWMPHKTIyeeaeGwvlRutoshUb.pdf_parts/4.txt
  60. BIN
      backend/uploads/ayjGosqfWMPHKTIyeeaeGwvlRutoshUb.pdf_parts/5.pdf
  61. 129
      backend/uploads/ayjGosqfWMPHKTIyeeaeGwvlRutoshUb.pdf_parts/5.txt
  62. BIN
      backend/uploads/ayjGosqfWMPHKTIyeeaeGwvlRutoshUb.pdf_parts/6.pdf
  63. 15
      backend/uploads/ayjGosqfWMPHKTIyeeaeGwvlRutoshUb.pdf_parts/6.txt
  64. BIN
      backend/uploads/bIhlRmHCOUumtwXCFBbVipXOEvgFvBNN.jpeg
  65. BIN
      backend/uploads/cTWekssdRoWYgpXYaHJsyBPtKwdbeBOL.jpeg
  66. BIN
      backend/uploads/gVnryGmAkJesQziGcGjqjScHCXWVqMxL.pdf
  67. BIN
      backend/uploads/gVnryGmAkJesQziGcGjqjScHCXWVqMxL.pdf_parts/1.pdf
  68. 34
      backend/uploads/gVnryGmAkJesQziGcGjqjScHCXWVqMxL.pdf_parts/1.txt
  69. BIN
      backend/uploads/gVnryGmAkJesQziGcGjqjScHCXWVqMxL.pdf_parts/2.pdf
  70. 45
      backend/uploads/gVnryGmAkJesQziGcGjqjScHCXWVqMxL.pdf_parts/2.txt
  71. BIN
      backend/uploads/gVnryGmAkJesQziGcGjqjScHCXWVqMxL.pdf_parts/3.pdf
  72. 63
      backend/uploads/gVnryGmAkJesQziGcGjqjScHCXWVqMxL.pdf_parts/3.txt
  73. BIN
      backend/uploads/gVnryGmAkJesQziGcGjqjScHCXWVqMxL.pdf_parts/4.pdf
  74. 128
      backend/uploads/gVnryGmAkJesQziGcGjqjScHCXWVqMxL.pdf_parts/4.txt
  75. BIN
      backend/uploads/gVnryGmAkJesQziGcGjqjScHCXWVqMxL.pdf_parts/5.pdf
  76. 129
      backend/uploads/gVnryGmAkJesQziGcGjqjScHCXWVqMxL.pdf_parts/5.txt
  77. BIN
      backend/uploads/gVnryGmAkJesQziGcGjqjScHCXWVqMxL.pdf_parts/6.pdf
  78. 15
      backend/uploads/gVnryGmAkJesQziGcGjqjScHCXWVqMxL.pdf_parts/6.txt
  79. BIN
      backend/uploads/uBYfyzaCrsAeHTYdKnPfmVVcahWaTVte.jpeg
  80. 38
      backend/utils/utils.py
  81. 2
      frontend/edu-connect/src/lib/routes.ts

@ -1 +1,53 @@
# HackX Entry By FreeBug # eduConnect by Team freeBug
Welcome to eduConnect, a revolutionary platform where users can gain and share knowledge in specific domains. eduConnect offers a seamless experience for users to learn, interact, and grow in their areas of interest. Whether you're an expert wanting to share your insights or a learner eager to explore, eduConnect has you covered.
## 🚀 Features
### 🔐 User Authentication
- Register and Login: Secure authentication system for users to create accounts and access their personalized dashboard.
### 📚 Knowledge Sharing
- Create Courses: Share your expertise by creating courses in specific domains.
- Enroll in Courses: Explore and enroll in various courses to enhance your knowledge.
### 💬 Interactive Learning
- Chat Rooms: Each course has its own chat room, enabling students and instructors to interact and discuss.
- Spam Prevention: Robust measures to prevent spam messages in chat rooms, ensuring meaningful conversations.
### 🧠 Personalized Quizzes
- Identical Quizzes: Based on a user’s read history, tailored quizzes are provided to reinforce learning and retention.
### 📊 Progress Tracking
- Activity Log: Users can keep track of their progress, monitor their activities, and evaluate how much they’ve learned.
- Knowledge Metrics: Insights into user performance and course engagement.
### 🎖 Badges & Rewards
- User Badges: Earn badges for achievements to stay motivated and energized while learning.
## 🛠 Tech Stack
- Backend: Python, Flask
- Frontend: HTML, CSS, JavaScript
- Database: PostgreSQL/MySQL
- Authentication: JWT-based secure authentication
- Hosting: AWS/Heroku/Your Hosting Solution
## 📄 Installation Guide
### Prerequisites
1. Python 3.8+ installed on your system.
2. PostgreSQL/MySQL database setup.
3. Node.js and npm (if applicable for frontend).
4. A virtual environment for Python dependencies.
### Steps
1. Clone the Repository
bash
git clone https://hackethon.ai/hack/HackXlbef/FreeBug.git
cd eduConnect

@ -20,6 +20,8 @@ from blueprints.admin import admin as adminBlueprint
from blueprints.chat import chat as chatBlueprint from blueprints.chat import chat as chatBlueprint
from blueprints.public import public_summary as publicBlueprint from blueprints.public import public_summary as publicBlueprint
from blueprints.course import course as courseBlueprint from blueprints.course import course as courseBlueprint
from blueprints.badge import badge_route as badgeBlueprint
from blueprints.quiz import quiz as quizBlueprint
app = Flask(__name__) app = Flask(__name__)
@ -27,10 +29,11 @@ app = Flask(__name__)
CORS(app) CORS(app)
# Enable CORS for specific routes # Enable CORS for specific routes
# CORS(app, resources={ # CORS(app, resources={
# r"/api/*": {"origins": "*"} # Allows CORS for all `/api/` routes # r"*": {"origins": "*"} # Allows CORS for all `/api/` routes
# }) # })
# Set configuration directly on the app instance # Set configuration directly on the app instance
app.config['ALLOWED_EXTENSIONS'] = {'png', 'jpg', 'jpeg', 'gif','pdf'} app.config['ALLOWED_EXTENSIONS'] = {'png', 'jpg', 'jpeg', 'gif','pdf'}
app.config['MAX_CONTENT_LENGTH'] = 1600 * 1000 * 1000
app.config["SQLALCHEMY_DATABASE_URI"] = DB_URI app.config["SQLALCHEMY_DATABASE_URI"] = DB_URI
@ -39,7 +42,11 @@ db.init_app(app)
app.register_blueprint(profileBlueprint, url_prefix='/api/profile') app.register_blueprint(profileBlueprint, url_prefix='/api/profile')
app.register_blueprint(sessionBlueprint,url_prefix='/api/session') app.register_blueprint(sessionBlueprint,url_prefix='/api/session')
app.register_blueprint(adminBlueprint,url_prefix='/api/admin') app.register_blueprint(adminBlueprint,url_prefix='/api/admin')
app.register_blueprint(badgeBlueprint, url_prefix='/api/badge')
# TODO: Register Notif API
app.register_blueprint(chatBlueprint,url_prefix='/api/chat') app.register_blueprint(chatBlueprint,url_prefix='/api/chat')
app.register_blueprint(quizBlueprint,url_prefix='/api/quiz')
app.register_blueprint(publicBlueprint,url_prefix='/api/public') app.register_blueprint(publicBlueprint,url_prefix='/api/public')
app.register_blueprint(courseBlueprint,url_prefix='/api/course') app.register_blueprint(courseBlueprint,url_prefix='/api/course')
@ -47,6 +54,13 @@ app.register_blueprint(courseBlueprint,url_prefix='/api/course')
def send_file(filename): def send_file(filename):
return send_from_directory(USER_UPLOADS_DIR, filename) return send_from_directory(USER_UPLOADS_DIR, filename)
@app.route('/courseSegment/<string:filename>/<int:page>/<string:dtype>')
def get_pdf_file_as_pages(filename: str, page: int, dtype: str):
if dtype == 'txt':
return send_from_directory(os.path.join(USER_UPLOADS_DIR, filename+'_parts'), f"{page}.txt")
else:
return send_from_directory(os.path.join(USER_UPLOADS_DIR, filename+'_parts'), f"{page}.pdf")
@app.route('/', methods=['GET', 'POST']) @app.route('/', methods=['GET', 'POST'])
def homepage(): def homepage():
return {'message': 'Welcome back !'}, 200 return {'message': 'Welcome back !'}, 200

@ -1,5 +1,5 @@
from utils .auth import auth_required, requires_role from utils .auth import auth_required, requires_role
from flask import Blueprint, jsonify, g from flask import Blueprint, jsonify, g, url_for
from db.model import User, Course, Enrollment, Chat, db from db.model import User, Course, Enrollment, Chat, db
from sqlalchemy import select, func, desc, and_ from sqlalchemy import select, func, desc, and_
from datetime import datetime, timedelta from datetime import datetime, timedelta
@ -138,3 +138,46 @@ def get_discussion_stats():
except Exception as e: except Exception as e:
return jsonify({'message': f'An error occurred: {str(e)}'}), 500 return jsonify({'message': f'An error occurred: {str(e)}'}), 500
@admin.route('/stats/userDetail', methods=['GET'])
@auth_required()
@requires_role([UserRole.ADMIN])
def get_user_details():
"""
Get detailed information for all users.
Only accessible by admin users.
"""
try:
current_user: User = g.current_user
# Get all users with basic info
users = db.session.execute(
select(User)
.order_by(desc(User.joinedDate))
).scalars()
# Format user data
user_list = [{
'id': str(user.id),
'username': user.username,
'email': user.email,
'firstName': user.firstName,
'lastName': user.lastName,
'profilePicture': url_for('send_file', filename=current_user.pfpFilename, _external=True),
'bio': user.bio,
'role': user.role,
'isActivated': user.isActivated,
'joinedDate': user.joinedDate.isoformat(),
'lastOnline': user.lastOnline.isoformat(),
'dateOfBirth': user.dob.isoformat() if user.dob else None
} for user in users]
return jsonify({
'users': user_list,
'count': len(user_list)
}), 200
except Exception as e:
return jsonify({'message': f'An error occurred: {str(e)}'}), 500

@ -1,3 +1,48 @@
from flask import Blueprint from flask import Blueprint, url_for, jsonify, g
from utils.auth import auth_required
from db.model import db, Badge, UserBadge
from sqlalchemy import select
badge_route = Blueprint('badge', __name__)
badge = Blueprint('badge', __name__) @badge_route.route('/listAllBadges')
def all_badges():
badges: list[Badge] = db.session.execute(select(Badge)).scalars()
data: list = []
for bgd in badges:
data.append({
'id': bgd.id,
'name': bgd.name,
'description': bgd.description,
'createDate': bgd.createDate,
'icon': url_for('send_file', filename=bgd.icon),
'canClaim': bgd.canClaim
})
return jsonify({
'count': len(data),
'data': data
})
@badge_route.route('/myBadges')
@auth_required()
def my_badges():
user_badges: list[UserBadge] = db.session.execute(select(UserBadge).where(
UserBadge.userID == g.current_user.id
)).scalars()
data: list = []
for ub in user_badges:
bgd = ub.badge
data.append({
'id': ub.id,
'badgeID': bgd.id,
'userID': ub.userID,
'name': bgd.name,
'description': bgd.description,
'createDate': bgd.createDate,
'icon': url_for('send_file', filename=bgd.icon),
'canClaim': bgd.canClaim,
'claimedDate': ub.claimedDate,
})
return jsonify({
'count': len(data),
'data': data
})

@ -55,7 +55,7 @@ def create_chat():
except Exception as e: except Exception as e:
return jsonify({"error": f"An error occurred: {str(e)}"}), 500 return jsonify({"error": f"An error occurred: {str(e)}"}), 500
@chat.route("/get", methods=["GET"]) @chat.route("/get", methods=["GET", "POST"])
@auth_required() @auth_required()
def get_messages(): def get_messages():
try: try:

@ -7,7 +7,7 @@ import uuid
import math import math
from config import DEFAULT_COURSE_COVER from config import DEFAULT_COURSE_COVER
from db.model import db, Course, Category, User, Chat, Enrollment from db.model import db, Course, Category, User, Chat, Enrollment
from utils.utils import random_string_generator from utils.utils import random_string_generator, split_pdf_into_pages_with_text
from utils.auth import auth_required, requires_role from utils.auth import auth_required, requires_role
from constants import * from constants import *
from config import * from config import *
@ -72,6 +72,7 @@ def list_all_courses():
'creationDate': item.creationDate, 'creationDate': item.creationDate,
'coverImage': url_for('send_file', filename=item.coverImage), 'coverImage': url_for('send_file', filename=item.coverImage),
'totalEnrolled': item.totalEnrolled, 'totalEnrolled': item.totalEnrolled,
'pdf0': url_for('send_file', filename=item.serverFilename),
'author': { 'author': {
'id': item.author.id, 'id': item.author.id,
'firstName': item.author.firstName, 'firstName': item.author.firstName,
@ -94,7 +95,7 @@ def list_all_courses():
'data': course_list, 'data': course_list,
}) })
@course.route('/enroll') @course.route('/enroll',methods=['POST'])
@auth_required() @auth_required()
def enroll_user(): def enroll_user():
if not request.form.get('course_uuid'): if not request.form.get('course_uuid'):
@ -103,9 +104,14 @@ def enroll_user():
selected_course: Course = db.session.execute(select(Course).where(Course.id == course_uuid)).scalar() selected_course: Course = db.session.execute(select(Course).where(Course.id == course_uuid)).scalar()
if not selected_course: if not selected_course:
return jsonify({'message': 'Course not found'}), 404 return jsonify({'message': 'Course not found'}), 404
#make sure if user is already enrolled h/she can't enroll
if db.session.execute(select(Enrollment).where(and_(Enrollment.userID == g.current_user.id, Enrollment.courseID == course_uuid))).scalar():
return jsonify({'message': 'Already enrolled to this course'}), 400
new_enroll: Enrollment = Enrollment( new_enroll: Enrollment = Enrollment(
userID=g.current_user.id, userID=g.current_user.id,
courseID=course_uuid courseID=course_uuid,
user=g.current_user,
course=selected_course
) )
try: try:
selected_course.totalEnrolled = selected_course.totalEnrolled + 1 selected_course.totalEnrolled = selected_course.totalEnrolled + 1
@ -123,12 +129,23 @@ def create_course():
course_uploaded_pdf: MultiDict|None = request.files.get('course_pdf', None) course_uploaded_pdf: MultiDict|None = request.files.get('course_pdf', None)
cover_file_name: str = DEFAULT_COURSE_COVER cover_file_name: str = DEFAULT_COURSE_COVER
pdf_file_name: str = '' pdf_file_name: str = ''
pdf_total_pages: int = 1
if course_uploaded_cover_image is not None: if course_uploaded_cover_image is not None:
print("COURSE COVER ATTACHED")
cover_file_name: str = random_string_generator(32)+"."+course_uploaded_cover_image.filename.split('.')[-1] cover_file_name: str = random_string_generator(32)+"."+course_uploaded_cover_image.filename.split('.')[-1]
course_uploaded_cover_image.save(os.path.join(USER_UPLOADS_DIR, cover_file_name)) course_uploaded_cover_image.save(os.path.join(USER_UPLOADS_DIR, cover_file_name))
if course_uploaded_pdf is not None: if course_uploaded_pdf is not None:
print('PDF ATTACHED')
pdf_file_name: str = random_string_generator(32) +"."+ course_uploaded_pdf.filename.split('.')[-1] pdf_file_name: str = random_string_generator(32) +"."+ course_uploaded_pdf.filename.split('.')[-1]
course_uploaded_pdf.save(os.path.join(USER_UPLOADS_DIR, pdf_file_name)) course_uploaded_pdf.save(os.path.join(USER_UPLOADS_DIR, pdf_file_name))
pdf_parts_root_dir = os.path.join(USER_UPLOADS_DIR, pdf_file_name + "_parts")
os.makedirs(pdf_parts_root_dir, exist_ok=True)
pdf_total_pages = split_pdf_into_pages_with_text(
pdf_path=os.path.join(USER_UPLOADS_DIR, pdf_file_name),
output_directory=pdf_parts_root_dir
)
published_status: PublishedStatus = PublishedStatus.PENDING published_status: PublishedStatus = PublishedStatus.PENDING
try: try:
course_name: str = form_data['course_name'] course_name: str = form_data['course_name']
@ -137,13 +154,13 @@ def create_course():
course_description: str = form_data.get('course_description', '') course_description: str = form_data.get('course_description', '')
category_id: uuid.UUID = uuid.UUID(form_data['category_uuid']) category_id: uuid.UUID = uuid.UUID(form_data['category_uuid'])
page_for_community: int = int(form_data.get('page_for_community', 1)) # TODO: Add this field to model page_for_community: int = int(form_data.get('page_for_community', 1)) # TODO: Add this field to model
catgory: Category = db.session.execute(select(Category).where(Category.id == category_id)).scalar() category: Category = db.session.execute(select(Category).where(Category.id == category_id)).scalar()
# author: User = db.session.execute(select(User).where(User.id == g.current_user.id)).scalar() # author: User = db.session.execute(select(User).where(User.id == g.current_user.id)).scalar()
new_course: Course = Course( new_course: Course = Course(
name=course_name, name=course_name,
categoryID=category_id, categoryID=category_id,
authorID=g.current_user.id, authorID=g.current_user.id,
category=catgory, category=category,
author=g.current_user, author=g.current_user,
description=course_description, description=course_description,
isActive=True, isActive=True,
@ -151,6 +168,7 @@ def create_course():
publishedStatus=int(published_status), publishedStatus=int(published_status),
coverImage=cover_file_name, coverImage=cover_file_name,
serverFilename=pdf_file_name, serverFilename=pdf_file_name,
totalPages=pdf_total_pages,
enrollments=[], enrollments=[],
quizzes=[], quizzes=[],
chats=[] chats=[]
@ -159,7 +177,7 @@ def create_course():
# chat: Chat = Chat(courseID=new_course.id) TODO: Add a welcome chat for this course # chat: Chat = Chat(courseID=new_course.id) TODO: Add a welcome chat for this course
db.session.add(new_course) db.session.add(new_course)
db.session.commit() db.session.commit()
return jsonify({'message': 'Course was created successfully.'}), 200 return jsonify({'message': 'Course was created successfully.', 'courseID': new_course.id}), 200
@course.route('/update', methods=['UPDATE', 'DELETE']) @course.route('/update', methods=['UPDATE', 'DELETE'])
@auth_required() @auth_required()
@ -258,21 +276,46 @@ def course_info(course_uuid):
'joinedDate': self_enrollment_record.joinedDate, 'joinedDate': self_enrollment_record.joinedDate,
'userID': self_enrollment_record.userID 'userID': self_enrollment_record.userID
} }
# Get total enrolled user and total unique user chatting about the course and put it in dict # Get total enrolled user and total unique user chatting about the course and put it in dict
summary_user: dict = { summary_user: dict = {
'totalEnrolled': db.session.execute( 'totalEnrolled': db.session.execute(
select(func.count(Enrollment.id)).where(Enrollment.courseID == course_uuid) select(func.count(Enrollment.id)).where(Enrollment.courseID == course_uuid)
).scalar(), ).scalar(),
'usersInChat': db.session.execute( 'usersInChat': db.session.execute(
select(func.count(distinct(Chat.userID))).select_from(Chat).where(Chat.courseID == course_uuid) select(func.count(distinct(Chat.userID))).select_from(Chat).where(Chat.courseID == course_uuid)
).scalar(), ).scalar(),
'totalChats': db.session.execute( 'totalChats': db.session.execute(
select(func.count()).select_from(Chat).where(Chat.courseID == course_uuid) select(func.count()).select_from(Chat).where(Chat.courseID == course_uuid)
).scalar() ).scalar()
} }
jsonify({ pages: list = []
if self_enrollment_record:
for i in range(selected_course.totalPages):
pages.append(
url_for('get_pdf_file_as_pages',
filename=selected_course.serverFilename,
page=i + 1,
dtype='pdf')
)
else:
if selected_course.totalPages < 3:
pages.append(
url_for('get_pdf_file_as_pages',
filename=selected_course.serverFilename,
page=1,
dtype='pdf')
)
else:
for i in range(3):
pages.append(
url_for('get_pdf_file_as_pages',
filename=selected_course.serverFilename,
page=i+1,
dtype='pdf')
)
return jsonify({
'message': 'successful', 'message': 'successful',
'data': { 'data': {
'id': selected_course.id, 'id': selected_course.id,
@ -284,6 +327,7 @@ def course_info(course_uuid):
'coverImage': url_for('send_file', filename=selected_course.coverImage), 'coverImage': url_for('send_file', filename=selected_course.coverImage),
'serverFilename': url_for('send_file', filename=selected_course.serverFilename), 'serverFilename': url_for('send_file', filename=selected_course.serverFilename),
'totalPages': 100, 'totalPages': 100,
'pages': pages,
'author': { 'author': {
'id': selected_course.authorID, 'id': selected_course.authorID,
'username': selected_course.author.username, 'username': selected_course.author.username,
@ -405,7 +449,7 @@ def enrolled_courses():
@course.route('/myCourses') @course.route('/myCourses')
@auth_required() @auth_required()
def enrolled_courses(): def my_courses():
courses: Course = db.session.execute(select(Course).where(Course.authorID == g.current_user.id) courses: Course = db.session.execute(select(Course).where(Course.authorID == g.current_user.id)
).scalars() ).scalars()
course_list: list[dict] = [] course_list: list[dict] = []

@ -0,0 +1,228 @@
import json
import os
import uuid
import requests
from flask import Blueprint, request, jsonify, g, url_for
from uuid import UUID
from db.model import db, User, Course, Enrollment,Chat, Quiz, QuizAttempt
from utils.auth import auth_required
import requests
from config import SPAM_SCORE_THRESHOLD, AI_SPAM_SERVICES_MICROSERVICE, USER_UPLOADS_DIR, AI_QUIZ_SERVICES_MICROSERVICE
from sqlalchemy import desc, select, and_
quiz = Blueprint('quiz', __name__)
@quiz.route('/generate')
@auth_required()
def generate_quiz():
try:
course_id: uuid.UUID = uuid.UUID(request.form['course_id'])
current_page: int = int(request.form['page'])
except KeyError:
return jsonify({'message': 'course_id and page must be specified'}), 401
enrollment_record: Enrollment = db.session.execute(
select(Enrollment).where(and_(
Enrollment.courseID == course_id,
Enrollment.userID == g.current_user.id)
)
).scalar()
if not enrollment_record:
return jsonify({"error": "You are not enrolled in this course."}), 403
if current_page > enrollment_record.course.totalPages or current_page < 1:
return jsonify({
'message': 'Page range out of bound. No such page'
}), 404
# Everything is alright, now get the text in current page and generate quiz
current_page_text: str = ''
with open(
os.path.join(
USER_UPLOADS_DIR,
enrollment_record.course.serverFilename+"_parts",
f"{current_page}.txt")
) as f:
current_page_text = f.read()
quiz_data_resp = requests.post(AI_QUIZ_SERVICES_MICROSERVICE, json={"string_message": current_page_text})
if quiz_data_resp.status_code != 200:
return jsonify({"error": "Failed to make quiz request."}), 500
quiz_data = quiz_data_resp.json()
# Insert the quiz into table
rows: list[Quiz] = []
for quiz_item in quiz_data['questions']:
rows.append(
Quiz(
creatorUserID=g.current_user.id,
creatorUser=g.current_user,
quiz_attempts=[],
courseID=course_id,
course=enrollment_record.course,
quizQuestion=quiz_item['question'],
quizAnswers=json.dumps(quiz_item['options']),
quizCorrectAnswer=quiz_item['correct_answer']
)
)
db.session.add_all(rows)
db.session.commit()
return jsonify({'message': 'quizzes were generated for the current page'})
@quiz.route('/get/personalIncomplete')
@auth_required()
def get_incomplete_quiz():
try:
course_id: uuid.UUID = uuid.UUID(request.form['course_id'])
except KeyError:
return jsonify({'message': 'course_id must be specified'}), 401
quiz_rows: list[Quiz] = db.session.execute(select(Quiz).where(
and_(Quiz.creatorUserID == g.current_user.id, Quiz.creatorHasAttempted == False)
)).scalars()
data: list = []
for quiz_row in quiz_rows:
data.append(
{
'id': quiz_row.id,
'isActive': quiz_row.isActive,
'creationDate': quiz_row.creationDate,
'quizAnswers': quiz_row.quizAnswers,
'quizQuestion': quiz_row.quizQuestion,
'course': {
'id': quiz_row.course.id,
'name': quiz_row.course.name,
'description': quiz_row.course.description
},
'creator': {
'id': quiz_row.creatorUserID,
'firstName': quiz_row.creatorUser.firstName,
'lastName': quiz_row.creatorUser.lastName,
'username': quiz_row.creatorUser.username,
'pfpFilename': url_for('send_file', filename=quiz_row.creatorUser.pfpFilename)
}
}
)
return jsonify({
'count': len(data),
'data': data
}), 200
@quiz.route('/get/allComplete')
@auth_required()
def get_complete_quiz():
try:
course_id: uuid.UUID = uuid.UUID(request.form['course_id'])
except KeyError:
return jsonify({'message': 'course_id must be specified'}), 401
quiz_attempts: list[QuizAttempt] = db.session.execute(
select(QuizAttempt).where(and_(
QuizAttempt.userID == g.current_user.id,
Course.id == course_id
))).scalars() # IF THIS DOES NOT WORK, ADD COURSE IF TO QUIZ_ATTEMPT TABLE ITSELF
completes: list = []
for attempt in quiz_attempts:
quiz_row: Quiz = attempt.quiz
completes.append(
{
'id': attempt.id,
'quizID': quiz_row.id,
'isActive': quiz_row.isActive,
'creationDate': quiz_row.creationDate,
'quizAnswers': quiz_row.quizAnswers,
'quizQuestion': quiz_row.quizQuestion,
'userAnswer': attempt.userAnswer,
'quizCorrectAnswer': quiz_row.quizCorrectAnswer,
'isCorrect': attempt.isCorrect,
'course': {
'id': quiz_row.course.id,
'name': quiz_row.course.name,
'description': quiz_row.course.description
},
'creator': {
'id': quiz_row.creatorUserID,
'firstName': quiz_row.creatorUser.firstName,
'lastName': quiz_row.creatorUser.lastName,
'username': quiz_row.creatorUser.username,
'pfpFilename': url_for('send_file', filename=quiz_row.creatorUser.pfpFilename)
}
}
)
return jsonify({
'count': len(completes),
'data': completes
}), 200
@quiz.route('/submit',methods=['POST'])
@auth_required()
def submit_quiz():
try:
answer: str = request.form['answer'].strip()
quiz_id: uuid.UUID = uuid.UUID(request.form['quiz_id'])
except KeyError:
return jsonify({'message': 'course_id and answer must be specified'}), 401
quiz_already_attempted: QuizAttempt = db.session.execute(select(QuizAttempt).where(
and_(QuizAttempt.quizID == quiz_id, QuizAttempt.userID == g.current_user.id )
)).scalar()
if quiz_already_attempted:
return jsonify({'message': 'Already attempted this quiz'}), 401
quiz_row: Quiz = db.session.execute(select(Quiz).where(Quiz.id == quiz_id)).scalar()
if not quiz_row:
return jsonify({'message': 'Quiz does not exist'}), 404
valid_answers: list = json.loads(quiz_row.quizAnswers)
is_correct: bool = False
if answer not in valid_answers:
return jsonify({'message': 'No such choice of answer given'}), 404
if answer == quiz_row.quizCorrectAnswer:
is_correct = True
new_attempt: QuizAttempt = QuizAttempt(
userID=g.current_user.id,
user=g.current_user,
quizID=quiz_id,
quiz=quiz_row,
userAnswer=answer,
isCorrect=int(is_correct)
)
db.session.add(new_attempt)
if quiz_row.creatorUser.id == g.current_user.id:
quiz_row.creatorHasAttempted = True
db.session.commit()
return jsonify({
'message': 'Answer submitted',
'isCorrect': is_correct,
'attemptID': new_attempt.id,
'quizID': quiz_row.id,
'quizAnswers': quiz_row.quizAnswers,
'quizQuestion': quiz_row.quizQuestion,
'quizCorrectAnswer': quiz_row.quizCorrectAnswer,
'userAnswer': answer
})
@quiz.route('/quizData')
@auth_required()
def get_quiz_info():
try:
quiz_id: uuid.UUID = uuid.UUID(request.args['quiz_id'])
except KeyError:
return jsonify({'message': 'quiz_id must be specified'}), 401
quiz_row: Quiz = db.session.execute(select(Quiz).where(Quiz.id == quiz_id)).scalar()
if not quiz_row:
return jsonify({'message': 'Quiz does not exist'}), 404
return jsonify({
'id': quiz_row.id,
'isActive': quiz_row.isActive,
'creationDate': quiz_row.creationDate,
'quizAnswers': quiz_row.quizAnswers,
'quizQuestion': quiz_row.quizQuestion,
'course': {
'id': quiz_row.course.id,
'name': quiz_row.course.name,
'description': quiz_row.course.description
},
'creator': {
'id': quiz_row.creatorUserID,
'firstName': quiz_row.creatorUser.firstName,
'lastName': quiz_row.creatorUser.lastName,
'username': quiz_row.creatorUser.username,
'pfpFilename': url_for('send_file', filename=quiz_row.creatorUser.pfpFilename)
}
}), 200

@ -22,6 +22,7 @@ USER_UPLOADS_DIR: str = os.path.abspath(os.path.join(PROJECT_ROOT, "uploads"))
SPAM_SCORE_THRESHOLD: int = 6 SPAM_SCORE_THRESHOLD: int = 6
AI_SPAM_SERVICES_MICROSERVICE: str ='http://localhost:5000/test-spam' AI_SPAM_SERVICES_MICROSERVICE: str ='http://localhost:5000/test-spam'
AI_QUIZ_SERVICES_MICROSERVICE: str = 'http://localhost:5000/generate-questions'
DB_URI: str = f"{DB_ENGINE}://{DB_USER}:{DB_PASSWORD}@{DB_HOST}:{DB_PORT}/{DB_NAME}" DB_URI: str = f"{DB_ENGINE}://{DB_USER}:{DB_PASSWORD}@{DB_HOST}:{DB_PORT}/{DB_NAME}"
ACTIVATE_ACCOUNTS_ON_SIGNUP: bool = True ACTIVATE_ACCOUNTS_ON_SIGNUP: bool = True

@ -105,9 +105,12 @@ class Quiz(db.Model):
quiz_attempts: Mapped[List["QuizAttempt"]] = relationship(back_populates="quiz", cascade="all, delete-orphan") quiz_attempts: Mapped[List["QuizAttempt"]] = relationship(back_populates="quiz", cascade="all, delete-orphan")
courseID: Mapped[uuid.UUID] = mapped_column(ForeignKey("course.id")) courseID: Mapped[uuid.UUID] = mapped_column(ForeignKey("course.id"))
course: Mapped["Course"] = relationship(back_populates="quizzes") course: Mapped["Course"] = relationship(back_populates="quizzes")
quizJson: Mapped[str] = mapped_column(String, nullable=False) quizQuestion: Mapped[str] = mapped_column(String, nullable=False)
quizAnswers: Mapped[str] = mapped_column(String, nullable=False)
quizCorrectAnswer: Mapped[str] = mapped_column(String, nullable=False)
creationDate: Mapped[datetime] = mapped_column(DateTime, nullable=False, default=func.now()) creationDate: Mapped[datetime] = mapped_column(DateTime, nullable=False, default=func.now())
isActive: Mapped[bool] = mapped_column(Boolean, nullable=False, default=True) isActive: Mapped[bool] = mapped_column(Boolean, nullable=False, default=True)
creatorHasAttempted: Mapped[bool] = mapped_column(Boolean, nullable=False, default=False)
class QuizAttempt(db.Model): class QuizAttempt(db.Model):
__tablename__ = 'quiz_attempts' __tablename__ = 'quiz_attempts'
@ -117,8 +120,8 @@ class QuizAttempt(db.Model):
user: Mapped["User"] = relationship(back_populates="quiz_attempts") user: Mapped["User"] = relationship(back_populates="quiz_attempts")
quizID: Mapped[uuid.UUID] = mapped_column(ForeignKey("quiz.id")) quizID: Mapped[uuid.UUID] = mapped_column(ForeignKey("quiz.id"))
quiz: Mapped["Quiz"] = relationship(back_populates="quiz_attempts") quiz: Mapped["Quiz"] = relationship(back_populates="quiz_attempts")
answerKey: Mapped[str] = mapped_column(String, nullable=False) userAnswer: Mapped[str] = mapped_column(String, nullable=False)
score: Mapped[int] = mapped_column(default=0, nullable=False) isCorrect: Mapped[int] = mapped_column(default=0, nullable=False)
attemptDate: Mapped[datetime] = mapped_column(DateTime, nullable=False, default=func.now()) attemptDate: Mapped[datetime] = mapped_column(DateTime, nullable=False, default=func.now())
class Chat(db.Model): class Chat(db.Model):

@ -0,0 +1,34 @@
Assessment 3 Instructions INT2024
Discrete Mathematics ICT101 Assessment 3 ( 50%)
Instructions
Assessment Type : Individual Assignment
Purpose of the assessment : To develop a plan for a real -world example of an
application in information technology from the one of the topics given below .
This assessment contributes to the various learning outcomes of your Bachelor
of IT degree.
Assessment Task : In the initial part of assignment, the student will be tested on their skills on
writing literature review of a topic student have learnt in the Discrete Mathematics (ICT101) course
in the week 1 to 6. Students need to read at least 3 articles or bo oks on this topic especially with
application to Information Technology and give detail review of those. Student will also identify one
application of information Technology related to the topic in which he/she is interested and write a
complete account of that interest.
Student can use the following database to find article or books.
o EBSCO Databases
o Emerald Insight
o IBISWorld
o IGI Global
o ProQuest eBooks
o O’Reilly Learnin g
Student will be exploring and analysis the application of information technology related to the topic
which are identified by him/her , and he/she must recognise an application that can be programmed
into computer. Each group must sketch a plane to draw a flow -chart and algorithm. Use some inputs
to test the algorithm (Give different trace table for each input) and identify any problem in the
algorithm. Suggest a plane to rectify or explain why it can ’t be rectified. Each student must write on e
report on its findings.

@ -0,0 +1,45 @@
Assessment 3 Instructions INT2024
Student can choose one from the following Topic. However, after deciding on the topic to work on ,
consult with your tutor.
The topic student group can choose from are :
• Number system used in Computing
• Logic in computing
• Inverse Function in Computing
• Induction Proof and its computing applicatio n
• 16-bit representation
• Cryptography
The written report must have the following sections:
1. Introduction
2. Proper reference of at least three articles or books
3. Write detail review of those articles or books related to the topic student chooses
4. Identify one application in Information Technology in which student is interested.
Write a complete account of that interest
5. Description of why students choose this application
6. Give a complete plane to implement the application into a computer program with use of
flow -chart
7. Write an appropriate algorithm
8. Use at least two inputs to test the algor ithm. Group need to give a trace table for each input.
9. Conclusion
10. Short statement about contributions/Reflections from each group member
11. References
Deadline to submit written report: On or before Sunday 18th May 2024, 11.59pm via Moodle.
The report must be:
1. Word or pdf document (3 to 4 pages long)
2. Size: A4
3. Use Assignment Cover Page (download from Moodle) with your details and signature
4. Single space
5. Font: Calibri, 11pt

@ -0,0 +1,63 @@
Assessment 3 Instructions INT2024
Deduction, Late Submission and Extension
Late submission penalty: - 5% of the total available marks per calendar day unless an extension is
approved. For extension application procedure, please refer to Section 3.3 of the Subject Outline.
Plagiarism
Please read Section 3.4 Plagiarism and Refere ncing, from the Subject Outline. Below is part of the
statement:
“Students plagiarising run the risk of severe penalties ranging from a reduction through to 0 marks for
a first offence for a single assessment task, to exclusion from KOI in the most serio us repeat cases.
Exclusion has serious visa implications.”
“Authorship is also an issue under Plagiarism – KOI expects students to submit their own original work
in both assessment and exams, or the original work of their group in the case of a group pr oject. All
students agree to a statement of authorship when submitting assessments online via Moodle, stating
that the work submitted is their own original work. The following are examples of academic
misconduct and can attract severe penalties:
• Handing in work created by someone else (without acknowledgement), whether copied
from another student, written by someone else, or from any published or electronic
source, is fraud, and falls under the general Plagiarism guidelines.
• Students who willingl y allow another student to copy their work in any assessment may
be considered to assisting in copying/cheating, and similar penalties may be applied. ”
• Any form of AI usage such as ChatGPT in your assessment is considered as plagiarism.
Marking Rubric for Assessment N. 03 (Individual Assignment) ; Value 50%
Criteria Fail
(0 – 49%) Pass
(50 – 64%) Credit
(65 – 74%) Distinction
(75 – 84%) High Distinction
(85 – 100%)
Understanding of the
Topic
4 marks
Inaccurate
mathematical
description
of the Topic Basic
mathematical
description
of the Topic Accurate
mathematical
description
of the Topic Accurate
mathematical
description of
the Topic and
some
connections
with
Information
Technology Polished
mathematical
description
of the Topic
and
references to
Information
Technology

@ -0,0 +1,128 @@
Assessment 3 Instructions INT2024
Evidence of depth of
research with reference
6 marks Little or no
relevant
reading and
references Some
relevant
reading and
references Some
relevant
reading and
references
with
explanations
of
connections
to the Topic Relevant
reading and
references and
clear
connections
illuminating
the Topic Relevant
reading and
refere nces
and polished
connections
illuminating
the Topic
Identifying an application
of Information
Technology relevant to
the topic
2 mark Little or no
connection
between the
topic and the
application Basic
connection
between the
topic and the
application Accurate
application of
the topic to
the
information
technology Accurate and
comprehensive
application of
the topic to
the
information
technology Detail and
complete
account of
application
of the topic
to the
information
technology
Understanding of the
Information technology
application(s)
6 marks Inaccurate
description
of application
of
information
Technology Basic
description
of
application
of
information
Technology Accurate
description
of application
of
information
Technology Accurate
description of
application of
information
Technology
and some
connections
with relevant
topics Polished
description
of
application
of
information
Technology
and
references to
relevant
theories
Detail description of the
choice of the application
7 marks Little or no
evidence is
given for the
choice and
omit. Basic
evidence is
given for the
choice. Accurate
evidence is
given for the
choice. Accurate
evidence is
given for the
choice and
omit with
relevant
analysis Accurate
evidence is
given for the
choice and
omit with
relevant
analysis and
complete
detail

@ -0,0 +1,129 @@
Assessment 3 Instructions INT2024
Design a plane for
computer
implementation
7 marks Plane is not
designed in a
proper
manner Plane is
designed in a
proper
manner and
no flow -chart
is given Plane is
designed in a
proper
manner and
flow -chart is
also given Accurate and
comprehensive
plane is given
with a correct
flow -chart Appropriate
plane with
correct flow -
chart and
complete
detail is
given.
Writing an algorithm
7 marks Inaccurate
algorithm or
algorithm is
given in an
inappropriate
manner Correct
algorithm but
written in an
inappropriate
manner Correct
algorithm
which is
written in an
appropriate
manner Correct
algorithm
which is
written in an
inappropriate
manner with
little discussion Correct
algorithm
which is
written in an
inappropriate
manner with
complete
discussion
Conclusions
7 mark s Little or no
evidence of
accuracy of
the algorithm Basic
evidence of
accuracy of
the algorithm Accurate
evidence of
accuracy of
the algorithm Accurate
evidence of
accuracy of the
algorithm Complete
analysis and
justification
of accuracy
of the
algorithm
Presentation
1 mark Poorly
organised
report with
unclear
structure Well
organised
report but
with some
errors Clearly
organised
report with
few errors Clearly
organised
report and
good use of
tables and
graphs Polished
report and
creative use
of tables and
graphs
Presentation
5 marks Poor quality
of slides or
poor
performance
of
presentation Well
prepared
presentation
but some
error Well
prepared
presentation
but one or
two error Well prepared
presentation
without an
error and
explain
everything
correctly Well
prepared
presentation
without an
error and
explain
everything
explicitly
with quality.

@ -0,0 +1,15 @@
Assessment 3 Instructions INT2024
Total Mark: / 25
25%
COMMENTS:

@ -0,0 +1,34 @@
Assessment 3 Instructions INT2024
Discrete Mathematics ICT101 Assessment 3 ( 50%)
Instructions
Assessment Type : Individual Assignment
Purpose of the assessment : To develop a plan for a real -world example of an
application in information technology from the one of the topics given below .
This assessment contributes to the various learning outcomes of your Bachelor
of IT degree.
Assessment Task : In the initial part of assignment, the student will be tested on their skills on
writing literature review of a topic student have learnt in the Discrete Mathematics (ICT101) course
in the week 1 to 6. Students need to read at least 3 articles or bo oks on this topic especially with
application to Information Technology and give detail review of those. Student will also identify one
application of information Technology related to the topic in which he/she is interested and write a
complete account of that interest.
Student can use the following database to find article or books.
o EBSCO Databases
o Emerald Insight
o IBISWorld
o IGI Global
o ProQuest eBooks
o O’Reilly Learnin g
Student will be exploring and analysis the application of information technology related to the topic
which are identified by him/her , and he/she must recognise an application that can be programmed
into computer. Each group must sketch a plane to draw a flow -chart and algorithm. Use some inputs
to test the algorithm (Give different trace table for each input) and identify any problem in the
algorithm. Suggest a plane to rectify or explain why it can ’t be rectified. Each student must write on e
report on its findings.

@ -0,0 +1,45 @@
Assessment 3 Instructions INT2024
Student can choose one from the following Topic. However, after deciding on the topic to work on ,
consult with your tutor.
The topic student group can choose from are :
• Number system used in Computing
• Logic in computing
• Inverse Function in Computing
• Induction Proof and its computing applicatio n
• 16-bit representation
• Cryptography
The written report must have the following sections:
1. Introduction
2. Proper reference of at least three articles or books
3. Write detail review of those articles or books related to the topic student chooses
4. Identify one application in Information Technology in which student is interested.
Write a complete account of that interest
5. Description of why students choose this application
6. Give a complete plane to implement the application into a computer program with use of
flow -chart
7. Write an appropriate algorithm
8. Use at least two inputs to test the algor ithm. Group need to give a trace table for each input.
9. Conclusion
10. Short statement about contributions/Reflections from each group member
11. References
Deadline to submit written report: On or before Sunday 18th May 2024, 11.59pm via Moodle.
The report must be:
1. Word or pdf document (3 to 4 pages long)
2. Size: A4
3. Use Assignment Cover Page (download from Moodle) with your details and signature
4. Single space
5. Font: Calibri, 11pt

@ -0,0 +1,63 @@
Assessment 3 Instructions INT2024
Deduction, Late Submission and Extension
Late submission penalty: - 5% of the total available marks per calendar day unless an extension is
approved. For extension application procedure, please refer to Section 3.3 of the Subject Outline.
Plagiarism
Please read Section 3.4 Plagiarism and Refere ncing, from the Subject Outline. Below is part of the
statement:
“Students plagiarising run the risk of severe penalties ranging from a reduction through to 0 marks for
a first offence for a single assessment task, to exclusion from KOI in the most serio us repeat cases.
Exclusion has serious visa implications.”
“Authorship is also an issue under Plagiarism – KOI expects students to submit their own original work
in both assessment and exams, or the original work of their group in the case of a group pr oject. All
students agree to a statement of authorship when submitting assessments online via Moodle, stating
that the work submitted is their own original work. The following are examples of academic
misconduct and can attract severe penalties:
• Handing in work created by someone else (without acknowledgement), whether copied
from another student, written by someone else, or from any published or electronic
source, is fraud, and falls under the general Plagiarism guidelines.
• Students who willingl y allow another student to copy their work in any assessment may
be considered to assisting in copying/cheating, and similar penalties may be applied. ”
• Any form of AI usage such as ChatGPT in your assessment is considered as plagiarism.
Marking Rubric for Assessment N. 03 (Individual Assignment) ; Value 50%
Criteria Fail
(0 – 49%) Pass
(50 – 64%) Credit
(65 – 74%) Distinction
(75 – 84%) High Distinction
(85 – 100%)
Understanding of the
Topic
4 marks
Inaccurate
mathematical
description
of the Topic Basic
mathematical
description
of the Topic Accurate
mathematical
description
of the Topic Accurate
mathematical
description of
the Topic and
some
connections
with
Information
Technology Polished
mathematical
description
of the Topic
and
references to
Information
Technology

@ -0,0 +1,128 @@
Assessment 3 Instructions INT2024
Evidence of depth of
research with reference
6 marks Little or no
relevant
reading and
references Some
relevant
reading and
references Some
relevant
reading and
references
with
explanations
of
connections
to the Topic Relevant
reading and
references and
clear
connections
illuminating
the Topic Relevant
reading and
refere nces
and polished
connections
illuminating
the Topic
Identifying an application
of Information
Technology relevant to
the topic
2 mark Little or no
connection
between the
topic and the
application Basic
connection
between the
topic and the
application Accurate
application of
the topic to
the
information
technology Accurate and
comprehensive
application of
the topic to
the
information
technology Detail and
complete
account of
application
of the topic
to the
information
technology
Understanding of the
Information technology
application(s)
6 marks Inaccurate
description
of application
of
information
Technology Basic
description
of
application
of
information
Technology Accurate
description
of application
of
information
Technology Accurate
description of
application of
information
Technology
and some
connections
with relevant
topics Polished
description
of
application
of
information
Technology
and
references to
relevant
theories
Detail description of the
choice of the application
7 marks Little or no
evidence is
given for the
choice and
omit. Basic
evidence is
given for the
choice. Accurate
evidence is
given for the
choice. Accurate
evidence is
given for the
choice and
omit with
relevant
analysis Accurate
evidence is
given for the
choice and
omit with
relevant
analysis and
complete
detail

@ -0,0 +1,129 @@
Assessment 3 Instructions INT2024
Design a plane for
computer
implementation
7 marks Plane is not
designed in a
proper
manner Plane is
designed in a
proper
manner and
no flow -chart
is given Plane is
designed in a
proper
manner and
flow -chart is
also given Accurate and
comprehensive
plane is given
with a correct
flow -chart Appropriate
plane with
correct flow -
chart and
complete
detail is
given.
Writing an algorithm
7 marks Inaccurate
algorithm or
algorithm is
given in an
inappropriate
manner Correct
algorithm but
written in an
inappropriate
manner Correct
algorithm
which is
written in an
appropriate
manner Correct
algorithm
which is
written in an
inappropriate
manner with
little discussion Correct
algorithm
which is
written in an
inappropriate
manner with
complete
discussion
Conclusions
7 mark s Little or no
evidence of
accuracy of
the algorithm Basic
evidence of
accuracy of
the algorithm Accurate
evidence of
accuracy of
the algorithm Accurate
evidence of
accuracy of the
algorithm Complete
analysis and
justification
of accuracy
of the
algorithm
Presentation
1 mark Poorly
organised
report with
unclear
structure Well
organised
report but
with some
errors Clearly
organised
report with
few errors Clearly
organised
report and
good use of
tables and
graphs Polished
report and
creative use
of tables and
graphs
Presentation
5 marks Poor quality
of slides or
poor
performance
of
presentation Well
prepared
presentation
but some
error Well
prepared
presentation
but one or
two error Well prepared
presentation
without an
error and
explain
everything
correctly Well
prepared
presentation
without an
error and
explain
everything
explicitly
with quality.

@ -0,0 +1,15 @@
Assessment 3 Instructions INT2024
Total Mark: / 25
25%
COMMENTS:

@ -0,0 +1,34 @@
Assessment 3 Instructions INT2024
Discrete Mathematics ICT101 Assessment 3 ( 50%)
Instructions
Assessment Type : Individual Assignment
Purpose of the assessment : To develop a plan for a real -world example of an
application in information technology from the one of the topics given below .
This assessment contributes to the various learning outcomes of your Bachelor
of IT degree.
Assessment Task : In the initial part of assignment, the student will be tested on their skills on
writing literature review of a topic student have learnt in the Discrete Mathematics (ICT101) course
in the week 1 to 6. Students need to read at least 3 articles or bo oks on this topic especially with
application to Information Technology and give detail review of those. Student will also identify one
application of information Technology related to the topic in which he/she is interested and write a
complete account of that interest.
Student can use the following database to find article or books.
o EBSCO Databases
o Emerald Insight
o IBISWorld
o IGI Global
o ProQuest eBooks
o O’Reilly Learnin g
Student will be exploring and analysis the application of information technology related to the topic
which are identified by him/her , and he/she must recognise an application that can be programmed
into computer. Each group must sketch a plane to draw a flow -chart and algorithm. Use some inputs
to test the algorithm (Give different trace table for each input) and identify any problem in the
algorithm. Suggest a plane to rectify or explain why it can ’t be rectified. Each student must write on e
report on its findings.

@ -0,0 +1,45 @@
Assessment 3 Instructions INT2024
Student can choose one from the following Topic. However, after deciding on the topic to work on ,
consult with your tutor.
The topic student group can choose from are :
• Number system used in Computing
• Logic in computing
• Inverse Function in Computing
• Induction Proof and its computing applicatio n
• 16-bit representation
• Cryptography
The written report must have the following sections:
1. Introduction
2. Proper reference of at least three articles or books
3. Write detail review of those articles or books related to the topic student chooses
4. Identify one application in Information Technology in which student is interested.
Write a complete account of that interest
5. Description of why students choose this application
6. Give a complete plane to implement the application into a computer program with use of
flow -chart
7. Write an appropriate algorithm
8. Use at least two inputs to test the algor ithm. Group need to give a trace table for each input.
9. Conclusion
10. Short statement about contributions/Reflections from each group member
11. References
Deadline to submit written report: On or before Sunday 18th May 2024, 11.59pm via Moodle.
The report must be:
1. Word or pdf document (3 to 4 pages long)
2. Size: A4
3. Use Assignment Cover Page (download from Moodle) with your details and signature
4. Single space
5. Font: Calibri, 11pt

@ -0,0 +1,63 @@
Assessment 3 Instructions INT2024
Deduction, Late Submission and Extension
Late submission penalty: - 5% of the total available marks per calendar day unless an extension is
approved. For extension application procedure, please refer to Section 3.3 of the Subject Outline.
Plagiarism
Please read Section 3.4 Plagiarism and Refere ncing, from the Subject Outline. Below is part of the
statement:
“Students plagiarising run the risk of severe penalties ranging from a reduction through to 0 marks for
a first offence for a single assessment task, to exclusion from KOI in the most serio us repeat cases.
Exclusion has serious visa implications.”
“Authorship is also an issue under Plagiarism – KOI expects students to submit their own original work
in both assessment and exams, or the original work of their group in the case of a group pr oject. All
students agree to a statement of authorship when submitting assessments online via Moodle, stating
that the work submitted is their own original work. The following are examples of academic
misconduct and can attract severe penalties:
• Handing in work created by someone else (without acknowledgement), whether copied
from another student, written by someone else, or from any published or electronic
source, is fraud, and falls under the general Plagiarism guidelines.
• Students who willingl y allow another student to copy their work in any assessment may
be considered to assisting in copying/cheating, and similar penalties may be applied. ”
• Any form of AI usage such as ChatGPT in your assessment is considered as plagiarism.
Marking Rubric for Assessment N. 03 (Individual Assignment) ; Value 50%
Criteria Fail
(0 – 49%) Pass
(50 – 64%) Credit
(65 – 74%) Distinction
(75 – 84%) High Distinction
(85 – 100%)
Understanding of the
Topic
4 marks
Inaccurate
mathematical
description
of the Topic Basic
mathematical
description
of the Topic Accurate
mathematical
description
of the Topic Accurate
mathematical
description of
the Topic and
some
connections
with
Information
Technology Polished
mathematical
description
of the Topic
and
references to
Information
Technology

@ -0,0 +1,128 @@
Assessment 3 Instructions INT2024
Evidence of depth of
research with reference
6 marks Little or no
relevant
reading and
references Some
relevant
reading and
references Some
relevant
reading and
references
with
explanations
of
connections
to the Topic Relevant
reading and
references and
clear
connections
illuminating
the Topic Relevant
reading and
refere nces
and polished
connections
illuminating
the Topic
Identifying an application
of Information
Technology relevant to
the topic
2 mark Little or no
connection
between the
topic and the
application Basic
connection
between the
topic and the
application Accurate
application of
the topic to
the
information
technology Accurate and
comprehensive
application of
the topic to
the
information
technology Detail and
complete
account of
application
of the topic
to the
information
technology
Understanding of the
Information technology
application(s)
6 marks Inaccurate
description
of application
of
information
Technology Basic
description
of
application
of
information
Technology Accurate
description
of application
of
information
Technology Accurate
description of
application of
information
Technology
and some
connections
with relevant
topics Polished
description
of
application
of
information
Technology
and
references to
relevant
theories
Detail description of the
choice of the application
7 marks Little or no
evidence is
given for the
choice and
omit. Basic
evidence is
given for the
choice. Accurate
evidence is
given for the
choice. Accurate
evidence is
given for the
choice and
omit with
relevant
analysis Accurate
evidence is
given for the
choice and
omit with
relevant
analysis and
complete
detail

@ -0,0 +1,129 @@
Assessment 3 Instructions INT2024
Design a plane for
computer
implementation
7 marks Plane is not
designed in a
proper
manner Plane is
designed in a
proper
manner and
no flow -chart
is given Plane is
designed in a
proper
manner and
flow -chart is
also given Accurate and
comprehensive
plane is given
with a correct
flow -chart Appropriate
plane with
correct flow -
chart and
complete
detail is
given.
Writing an algorithm
7 marks Inaccurate
algorithm or
algorithm is
given in an
inappropriate
manner Correct
algorithm but
written in an
inappropriate
manner Correct
algorithm
which is
written in an
appropriate
manner Correct
algorithm
which is
written in an
inappropriate
manner with
little discussion Correct
algorithm
which is
written in an
inappropriate
manner with
complete
discussion
Conclusions
7 mark s Little or no
evidence of
accuracy of
the algorithm Basic
evidence of
accuracy of
the algorithm Accurate
evidence of
accuracy of
the algorithm Accurate
evidence of
accuracy of the
algorithm Complete
analysis and
justification
of accuracy
of the
algorithm
Presentation
1 mark Poorly
organised
report with
unclear
structure Well
organised
report but
with some
errors Clearly
organised
report with
few errors Clearly
organised
report and
good use of
tables and
graphs Polished
report and
creative use
of tables and
graphs
Presentation
5 marks Poor quality
of slides or
poor
performance
of
presentation Well
prepared
presentation
but some
error Well
prepared
presentation
but one or
two error Well prepared
presentation
without an
error and
explain
everything
correctly Well
prepared
presentation
without an
error and
explain
everything
explicitly
with quality.

@ -0,0 +1,15 @@
Assessment 3 Instructions INT2024
Total Mark: / 25
25%
COMMENTS:

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB

@ -0,0 +1,34 @@
Assessment 3 Instructions INT2024
Discrete Mathematics ICT101 Assessment 3 ( 50%)
Instructions
Assessment Type : Individual Assignment
Purpose of the assessment : To develop a plan for a real -world example of an
application in information technology from the one of the topics given below .
This assessment contributes to the various learning outcomes of your Bachelor
of IT degree.
Assessment Task : In the initial part of assignment, the student will be tested on their skills on
writing literature review of a topic student have learnt in the Discrete Mathematics (ICT101) course
in the week 1 to 6. Students need to read at least 3 articles or bo oks on this topic especially with
application to Information Technology and give detail review of those. Student will also identify one
application of information Technology related to the topic in which he/she is interested and write a
complete account of that interest.
Student can use the following database to find article or books.
o EBSCO Databases
o Emerald Insight
o IBISWorld
o IGI Global
o ProQuest eBooks
o O’Reilly Learnin g
Student will be exploring and analysis the application of information technology related to the topic
which are identified by him/her , and he/she must recognise an application that can be programmed
into computer. Each group must sketch a plane to draw a flow -chart and algorithm. Use some inputs
to test the algorithm (Give different trace table for each input) and identify any problem in the
algorithm. Suggest a plane to rectify or explain why it can ’t be rectified. Each student must write on e
report on its findings.

@ -0,0 +1,45 @@
Assessment 3 Instructions INT2024
Student can choose one from the following Topic. However, after deciding on the topic to work on ,
consult with your tutor.
The topic student group can choose from are :
• Number system used in Computing
• Logic in computing
• Inverse Function in Computing
• Induction Proof and its computing applicatio n
• 16-bit representation
• Cryptography
The written report must have the following sections:
1. Introduction
2. Proper reference of at least three articles or books
3. Write detail review of those articles or books related to the topic student chooses
4. Identify one application in Information Technology in which student is interested.
Write a complete account of that interest
5. Description of why students choose this application
6. Give a complete plane to implement the application into a computer program with use of
flow -chart
7. Write an appropriate algorithm
8. Use at least two inputs to test the algor ithm. Group need to give a trace table for each input.
9. Conclusion
10. Short statement about contributions/Reflections from each group member
11. References
Deadline to submit written report: On or before Sunday 18th May 2024, 11.59pm via Moodle.
The report must be:
1. Word or pdf document (3 to 4 pages long)
2. Size: A4
3. Use Assignment Cover Page (download from Moodle) with your details and signature
4. Single space
5. Font: Calibri, 11pt

@ -0,0 +1,63 @@
Assessment 3 Instructions INT2024
Deduction, Late Submission and Extension
Late submission penalty: - 5% of the total available marks per calendar day unless an extension is
approved. For extension application procedure, please refer to Section 3.3 of the Subject Outline.
Plagiarism
Please read Section 3.4 Plagiarism and Refere ncing, from the Subject Outline. Below is part of the
statement:
“Students plagiarising run the risk of severe penalties ranging from a reduction through to 0 marks for
a first offence for a single assessment task, to exclusion from KOI in the most serio us repeat cases.
Exclusion has serious visa implications.”
“Authorship is also an issue under Plagiarism – KOI expects students to submit their own original work
in both assessment and exams, or the original work of their group in the case of a group pr oject. All
students agree to a statement of authorship when submitting assessments online via Moodle, stating
that the work submitted is their own original work. The following are examples of academic
misconduct and can attract severe penalties:
• Handing in work created by someone else (without acknowledgement), whether copied
from another student, written by someone else, or from any published or electronic
source, is fraud, and falls under the general Plagiarism guidelines.
• Students who willingl y allow another student to copy their work in any assessment may
be considered to assisting in copying/cheating, and similar penalties may be applied. ”
• Any form of AI usage such as ChatGPT in your assessment is considered as plagiarism.
Marking Rubric for Assessment N. 03 (Individual Assignment) ; Value 50%
Criteria Fail
(0 – 49%) Pass
(50 – 64%) Credit
(65 – 74%) Distinction
(75 – 84%) High Distinction
(85 – 100%)
Understanding of the
Topic
4 marks
Inaccurate
mathematical
description
of the Topic Basic
mathematical
description
of the Topic Accurate
mathematical
description
of the Topic Accurate
mathematical
description of
the Topic and
some
connections
with
Information
Technology Polished
mathematical
description
of the Topic
and
references to
Information
Technology

@ -0,0 +1,128 @@
Assessment 3 Instructions INT2024
Evidence of depth of
research with reference
6 marks Little or no
relevant
reading and
references Some
relevant
reading and
references Some
relevant
reading and
references
with
explanations
of
connections
to the Topic Relevant
reading and
references and
clear
connections
illuminating
the Topic Relevant
reading and
refere nces
and polished
connections
illuminating
the Topic
Identifying an application
of Information
Technology relevant to
the topic
2 mark Little or no
connection
between the
topic and the
application Basic
connection
between the
topic and the
application Accurate
application of
the topic to
the
information
technology Accurate and
comprehensive
application of
the topic to
the
information
technology Detail and
complete
account of
application
of the topic
to the
information
technology
Understanding of the
Information technology
application(s)
6 marks Inaccurate
description
of application
of
information
Technology Basic
description
of
application
of
information
Technology Accurate
description
of application
of
information
Technology Accurate
description of
application of
information
Technology
and some
connections
with relevant
topics Polished
description
of
application
of
information
Technology
and
references to
relevant
theories
Detail description of the
choice of the application
7 marks Little or no
evidence is
given for the
choice and
omit. Basic
evidence is
given for the
choice. Accurate
evidence is
given for the
choice. Accurate
evidence is
given for the
choice and
omit with
relevant
analysis Accurate
evidence is
given for the
choice and
omit with
relevant
analysis and
complete
detail

@ -0,0 +1,129 @@
Assessment 3 Instructions INT2024
Design a plane for
computer
implementation
7 marks Plane is not
designed in a
proper
manner Plane is
designed in a
proper
manner and
no flow -chart
is given Plane is
designed in a
proper
manner and
flow -chart is
also given Accurate and
comprehensive
plane is given
with a correct
flow -chart Appropriate
plane with
correct flow -
chart and
complete
detail is
given.
Writing an algorithm
7 marks Inaccurate
algorithm or
algorithm is
given in an
inappropriate
manner Correct
algorithm but
written in an
inappropriate
manner Correct
algorithm
which is
written in an
appropriate
manner Correct
algorithm
which is
written in an
inappropriate
manner with
little discussion Correct
algorithm
which is
written in an
inappropriate
manner with
complete
discussion
Conclusions
7 mark s Little or no
evidence of
accuracy of
the algorithm Basic
evidence of
accuracy of
the algorithm Accurate
evidence of
accuracy of
the algorithm Accurate
evidence of
accuracy of the
algorithm Complete
analysis and
justification
of accuracy
of the
algorithm
Presentation
1 mark Poorly
organised
report with
unclear
structure Well
organised
report but
with some
errors Clearly
organised
report with
few errors Clearly
organised
report and
good use of
tables and
graphs Polished
report and
creative use
of tables and
graphs
Presentation
5 marks Poor quality
of slides or
poor
performance
of
presentation Well
prepared
presentation
but some
error Well
prepared
presentation
but one or
two error Well prepared
presentation
without an
error and
explain
everything
correctly Well
prepared
presentation
without an
error and
explain
everything
explicitly
with quality.

@ -0,0 +1,15 @@
Assessment 3 Instructions INT2024
Total Mark: / 25
25%
COMMENTS:

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB

@ -0,0 +1,34 @@
Assessment 3 Instructions INT2024
Discrete Mathematics ICT101 Assessment 3 ( 50%)
Instructions
Assessment Type : Individual Assignment
Purpose of the assessment : To develop a plan for a real -world example of an
application in information technology from the one of the topics given below .
This assessment contributes to the various learning outcomes of your Bachelor
of IT degree.
Assessment Task : In the initial part of assignment, the student will be tested on their skills on
writing literature review of a topic student have learnt in the Discrete Mathematics (ICT101) course
in the week 1 to 6. Students need to read at least 3 articles or bo oks on this topic especially with
application to Information Technology and give detail review of those. Student will also identify one
application of information Technology related to the topic in which he/she is interested and write a
complete account of that interest.
Student can use the following database to find article or books.
o EBSCO Databases
o Emerald Insight
o IBISWorld
o IGI Global
o ProQuest eBooks
o O’Reilly Learnin g
Student will be exploring and analysis the application of information technology related to the topic
which are identified by him/her , and he/she must recognise an application that can be programmed
into computer. Each group must sketch a plane to draw a flow -chart and algorithm. Use some inputs
to test the algorithm (Give different trace table for each input) and identify any problem in the
algorithm. Suggest a plane to rectify or explain why it can ’t be rectified. Each student must write on e
report on its findings.

@ -0,0 +1,45 @@
Assessment 3 Instructions INT2024
Student can choose one from the following Topic. However, after deciding on the topic to work on ,
consult with your tutor.
The topic student group can choose from are :
• Number system used in Computing
• Logic in computing
• Inverse Function in Computing
• Induction Proof and its computing applicatio n
• 16-bit representation
• Cryptography
The written report must have the following sections:
1. Introduction
2. Proper reference of at least three articles or books
3. Write detail review of those articles or books related to the topic student chooses
4. Identify one application in Information Technology in which student is interested.
Write a complete account of that interest
5. Description of why students choose this application
6. Give a complete plane to implement the application into a computer program with use of
flow -chart
7. Write an appropriate algorithm
8. Use at least two inputs to test the algor ithm. Group need to give a trace table for each input.
9. Conclusion
10. Short statement about contributions/Reflections from each group member
11. References
Deadline to submit written report: On or before Sunday 18th May 2024, 11.59pm via Moodle.
The report must be:
1. Word or pdf document (3 to 4 pages long)
2. Size: A4
3. Use Assignment Cover Page (download from Moodle) with your details and signature
4. Single space
5. Font: Calibri, 11pt

@ -0,0 +1,63 @@
Assessment 3 Instructions INT2024
Deduction, Late Submission and Extension
Late submission penalty: - 5% of the total available marks per calendar day unless an extension is
approved. For extension application procedure, please refer to Section 3.3 of the Subject Outline.
Plagiarism
Please read Section 3.4 Plagiarism and Refere ncing, from the Subject Outline. Below is part of the
statement:
“Students plagiarising run the risk of severe penalties ranging from a reduction through to 0 marks for
a first offence for a single assessment task, to exclusion from KOI in the most serio us repeat cases.
Exclusion has serious visa implications.”
“Authorship is also an issue under Plagiarism – KOI expects students to submit their own original work
in both assessment and exams, or the original work of their group in the case of a group pr oject. All
students agree to a statement of authorship when submitting assessments online via Moodle, stating
that the work submitted is their own original work. The following are examples of academic
misconduct and can attract severe penalties:
• Handing in work created by someone else (without acknowledgement), whether copied
from another student, written by someone else, or from any published or electronic
source, is fraud, and falls under the general Plagiarism guidelines.
• Students who willingl y allow another student to copy their work in any assessment may
be considered to assisting in copying/cheating, and similar penalties may be applied. ”
• Any form of AI usage such as ChatGPT in your assessment is considered as plagiarism.
Marking Rubric for Assessment N. 03 (Individual Assignment) ; Value 50%
Criteria Fail
(0 – 49%) Pass
(50 – 64%) Credit
(65 – 74%) Distinction
(75 – 84%) High Distinction
(85 – 100%)
Understanding of the
Topic
4 marks
Inaccurate
mathematical
description
of the Topic Basic
mathematical
description
of the Topic Accurate
mathematical
description
of the Topic Accurate
mathematical
description of
the Topic and
some
connections
with
Information
Technology Polished
mathematical
description
of the Topic
and
references to
Information
Technology

@ -0,0 +1,128 @@
Assessment 3 Instructions INT2024
Evidence of depth of
research with reference
6 marks Little or no
relevant
reading and
references Some
relevant
reading and
references Some
relevant
reading and
references
with
explanations
of
connections
to the Topic Relevant
reading and
references and
clear
connections
illuminating
the Topic Relevant
reading and
refere nces
and polished
connections
illuminating
the Topic
Identifying an application
of Information
Technology relevant to
the topic
2 mark Little or no
connection
between the
topic and the
application Basic
connection
between the
topic and the
application Accurate
application of
the topic to
the
information
technology Accurate and
comprehensive
application of
the topic to
the
information
technology Detail and
complete
account of
application
of the topic
to the
information
technology
Understanding of the
Information technology
application(s)
6 marks Inaccurate
description
of application
of
information
Technology Basic
description
of
application
of
information
Technology Accurate
description
of application
of
information
Technology Accurate
description of
application of
information
Technology
and some
connections
with relevant
topics Polished
description
of
application
of
information
Technology
and
references to
relevant
theories
Detail description of the
choice of the application
7 marks Little or no
evidence is
given for the
choice and
omit. Basic
evidence is
given for the
choice. Accurate
evidence is
given for the
choice. Accurate
evidence is
given for the
choice and
omit with
relevant
analysis Accurate
evidence is
given for the
choice and
omit with
relevant
analysis and
complete
detail

@ -0,0 +1,129 @@
Assessment 3 Instructions INT2024
Design a plane for
computer
implementation
7 marks Plane is not
designed in a
proper
manner Plane is
designed in a
proper
manner and
no flow -chart
is given Plane is
designed in a
proper
manner and
flow -chart is
also given Accurate and
comprehensive
plane is given
with a correct
flow -chart Appropriate
plane with
correct flow -
chart and
complete
detail is
given.
Writing an algorithm
7 marks Inaccurate
algorithm or
algorithm is
given in an
inappropriate
manner Correct
algorithm but
written in an
inappropriate
manner Correct
algorithm
which is
written in an
appropriate
manner Correct
algorithm
which is
written in an
inappropriate
manner with
little discussion Correct
algorithm
which is
written in an
inappropriate
manner with
complete
discussion
Conclusions
7 mark s Little or no
evidence of
accuracy of
the algorithm Basic
evidence of
accuracy of
the algorithm Accurate
evidence of
accuracy of
the algorithm Accurate
evidence of
accuracy of the
algorithm Complete
analysis and
justification
of accuracy
of the
algorithm
Presentation
1 mark Poorly
organised
report with
unclear
structure Well
organised
report but
with some
errors Clearly
organised
report with
few errors Clearly
organised
report and
good use of
tables and
graphs Polished
report and
creative use
of tables and
graphs
Presentation
5 marks Poor quality
of slides or
poor
performance
of
presentation Well
prepared
presentation
but some
error Well
prepared
presentation
but one or
two error Well prepared
presentation
without an
error and
explain
everything
correctly Well
prepared
presentation
without an
error and
explain
everything
explicitly
with quality.

@ -0,0 +1,15 @@
Assessment 3 Instructions INT2024
Total Mark: / 25
25%
COMMENTS:

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB

@ -2,12 +2,10 @@ import string
import hashlib import hashlib
import random import random
import os import os
from PyPDF2 import PdfReader from PyPDF2 import PdfReader, PdfWriter
from config import * from config import *
import re import re
FILE_NAME = 'manjil.pdf'
FILE_PATH = os.path.join(os.getcwd(), FILE_NAME)
def random_string_generator(string_length: int) -> str: def random_string_generator(string_length: int) -> str:
letters = string.ascii_letters letters = string.ascii_letters
@ -17,15 +15,6 @@ def random_string_generator(string_length: int) -> str:
def hash_string(string_value: str) ->str: def hash_string(string_value: str) ->str:
return hashlib.sha256(string_value.encode('utf-8')).hexdigest() return hashlib.sha256(string_value.encode('utf-8')).hexdigest()
def read_pdf_human_readable(file_path: str) -> list[str]:
pdf_page_text_contents: list = []
reader: PdfReader = PdfReader(file_path)
for i, page in enumerate(reader.pages):
text: str = page.extract_text()
if text:
pdf_page_text_contents.append(text.strip())
return pdf_page_text_contents
def is_valid_email(email): def is_valid_email(email):
pattern = r'^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$' pattern = r'^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$'
if re.match(pattern, email): if re.match(pattern, email):
@ -63,3 +52,28 @@ def password_check_sanity(passwd: str) -> bool:
class InsecurePasswordException(Exception): class InsecurePasswordException(Exception):
pass pass
def split_pdf_into_pages_with_text(pdf_path: str, output_directory: str) -> int:
print("SPLIT PDF INTO PAGES WITH TEXT")
with open(pdf_path, 'rb') as pdf_file:
reader = PdfReader(pdf_file)
page_counter = 1
for page_num in range(len(reader.pages)):
page = reader.pages[page_num]
text = page.extract_text()
if text is None:
text = ''
output_txt_filename = os.path.join(output_directory, f"{page_counter}.txt")
with open(output_txt_filename, 'w', encoding='utf-8') as output_file:
output_file.write(text)
# Save as PDF file
writer = PdfWriter()
writer.add_page(page)
output_pdf_filename = os.path.join(output_directory, f"{page_counter}.pdf")
with open(output_pdf_filename, 'wb') as output_pdf_file:
writer.write(output_pdf_file)
if len(reader.pages) == page_counter:
return len(reader.pages)
page_counter += 1

@ -1,5 +1,5 @@
export const routes = { export const routes = {
INDEX_PAGE : '/' , INDEX_PAGE : '/' ,
LOGIN_ROUTES : '/auth/login', LOGIN_ROUTES : '/auth/login',
REGISTER_ROUTES : '/auth/register', REGISTER_ROUTES : '/auth/register',
DASHBOARD_ROUTE : '/admin/dashboard', DASHBOARD_ROUTE : '/admin/dashboard',

Loading…
Cancel
Save