Php,html, mysql, jQuery - Create Rondom Auto examination paper Generator System:

Main Business Process
Users (a) Normal user who can just login and Create Exam name, no of Questions and click hit PROCESS BUTTON to get PDF and WORD document   (b) Admin who can add exam questions and answer and image if it is need and manage System Users

Some tables in db can be
- Classes
- Subject
- Topic
- Exam Type (MCAQ, Essay, Short answer)
- 
User Basic Normal steps
1. Register to System
2. Login To system
3. Create Exam LIKE examName i.e Geography Paper II, Classes (Any or Class I, II), Subject(Any or Geography,History), no of Questions i.e 5, exam type (Rondom, MCAQ only, Shorty Answer only)
4. Hit PROCESS BUTTON to process and display PDF, and WORD document when view and not conviced user must be able to reprocess the Auto paper generating

Admin Basic role and steps
1. Managing Questions
2. Managing Users by Disable and enabling


Django Framework Python Project with Admin LTE for Automatic Pen and Paper making with the following capabilities
1. Admin side
- Register
- Login
- Add Class,Subjects Topic, Sub-topic, question types
- Manage Users
- Add question with answer (it should be added Sub-Topicwise where infront of Sub-Topic to have ADD Button and on top to have Bulk Excel upload
2. Normal user
- Register to the system
- Login
- Complete profile by just enroll to Atleast One-Thee subject only in a List
- Create Automatic Exam (By having the following structure : (a) Cretae Exam name then infron of it having a Button AUTOPAPER which will create exam with the following condition by asking Choose Class->Choose Subject->Choose Coverage (if its Topicwise-Subtopicwise-Whole Class *if any choice proceed with ->number of Section(if Number of Section Choosen Example 2 then the 2 Field should display with Section 1: Question Type ()number of question() Section instruction AND ection 2: Question Type ()number of question() Section instruction then GENERATE Exam that will make PDF and WORD output 

* IMPORTANT: I will make Android App with Java and Android Studio for user for this so make it considering the future of this

from exams.models import ExamClass
ExamClass.objects.all()

0714822268
0767622735

Kigoma Printing  - 097

ps1606093.htm
ps1605104.htm 
ps1602117.htm 
ps1601116.htm 

Nimetumika kwa Uaminifu Halmashauri ya Wilaya ya Buhigwe kwa Miaka 12
Naomba kubadili mazingira ili nipate ari Zaidi ya Kazi kwenye kituo kipya
Naomba kuwasilisha

python manage.py shell

py -m venv venv
venv\Scripts\activate
python manage.py runserver

CMD/TERMINAL YA LIVE source /home/liveserv/virtualenv/public_html/mbeya_results_analysis/3.11/bin/activate


USIGUSEbryt@2018


python manage.py makemigrations exams
python manage.py migrate

unzip the project

create venv, install pip install -r requirements.txt

python manage.py migrate

from exams.models import ExamClass, ExamSubject

# List all classes
classes = ExamClass.objects.all()
for cls in classes:
    print(cls.class_id, cls.class_name)

# Pick a class_id you want to test
class_id = 8  # replace with a real ID from above

# Fetch subjects linked to this class
subjects = ExamSubject.objects.filter(exam_class_id=class_id)
for subj in subjects:
    print(subj.subject_id, subj.subject_name_sw, subj.subject_name_eng)

python manage.py createsuperuser



pip install pandas --default-timeout=100
py -m pip install random
py -m pip install Document reportlab reportlab BytesIO

Use /api/auth/register/ to register, /api/auth/token/ to obtain JWT, /api/enrollments/ to enroll, /api/exams/ to create exams (POST exam metadata), and download generated files from the exam object (pdf_file, docx_file).


exams_exam - contain column exam_id, subject_id(the foreign key to store subject) exam_name, exam_instructions(texteria for instructions), no_of_questions(just ready to rondom populate exact number  questions) on now create Model, Admin,py, Recreate manage exams html and view *so when click Generate Rondo Button the system will go to exam_question table with the respective created exams subject with the respective number of question defined in the Exam created. Top of PDF and  WORD should include exam name, instructions and Rondom created paper



$db = new PDO("mysql:host=server211;dbname=liveserv_mock_kigoma_db","liveserv","pb:QMs43g5]W9V");

source /home/liveserv/virtualenv/public_html/pepa/3.11/bin/activate && cd /home/liveserv/public_html/pepa


cd /home/liveserv/public_html/pepa
source /home/liveserv/virtualenv/public_html/pepa/3.11/bin/activate

python manage.py runserver 0.0.0.0:8000

*#*#4636#*#*

penpaper/urls.py
exams/urls.py
exams/views.py


pip install numpy==2.3.3 pandas==2.3.2  --no-cache-dir

pip install --no-cache-dir numpy==2.3.3 pandas==2.3.2

pip uninstall -y numpy pandas
pip cache purge
pip install --no-cache-dir numpy==2.3.3 pandas==2.3.2

pip uninstall -y numpy pandas
pip cache purge
pip install --no-cache-dir numpy==1.26.4 pandas==2.2.2




>>> print("NumPy version:", numpy.__version__)
NumPy version: 2.3.3
>>> print("Pandas version:", pandas.__version__)
Pandas version: 2.3.2


Package                    Version
-------------------------- -----------
aiofiles                   24.1.0
aiohappyeyeballs           2.6.1
aiohttp                    3.12.11
aiosignal                  1.3.2
altair                     5.5.0
amqp                       5.3.1
anyio                      4.9.0
asgiref                    3.9.1
async-timeout              5.0.1
asyncio                    3.4.3
attrs                      25.3.0
bcrypt                     4.3.0
beautifulsoup4             4.13.4
billiard                   4.2.2
blinker                    1.9.0
cachetools                 6.2.0
captcha                    0.7.1
celery                     5.3.6
certifi                    2025.10.5
cffi                       1.17.1
chainmap                   1.0.3
charset-normalizer         3.4.2
chromedrivermanager        0.0.1
click                      8.2.1
click-didyoumean           0.3.1
click-plugins              1.1.1.2
click-repl                 0.3.0
colorama                   0.4.6
combomethod                1.0.12
contourpy                  1.3.3
cryptography               45.0.6
cycler                     0.12.1
Django                     4.2.7
django-adminlte3           0.1.6
djangorestframework        3.14.0
et_xmlfile                 2.0.0
extra-streamlit-components 0.1.81
Flask                      3.1.1
fonttools                  4.59.2
frozenlist                 1.6.2
gitdb                      4.0.12
GitPython                  3.1.45
h11                        0.16.0
html5lib                   1.1
httpcore                   1.0.9
httpx                      0.28.1
idna                       3.10
itsdangerous               2.2.0
Jinja2                     3.1.6
jsonschema                 4.25.1
jsonschema-specifications  2025.4.1
kiwisolver                 1.4.9
kombu                      5.5.4
lxml                       5.4.0
MarkupSafe                 3.0.2
matplotlib                 3.10.6
multidict                  6.4.4
narwhals                   2.2.0
nulltype                   2.3.1
numpy                      2.2.6
opencv-python              4.12.0.88
openpyxl                   3.1.5
options                    1.4.10
outcome                    1.3.0.post0
packaging                  25.0
pandas                     2.3.0
pillow                     11.3.0
pip                        25.2
plotly                     6.3.0
prompt_toolkit             3.0.52
propcache                  0.3.1
protobuf                   6.32.0
pyarrow                    21.0.0
pycparser                  2.22
pydeck                     0.9.1
PyJWT                      2.10.1
pyparsing                  3.2.4
pypiwin32                  223
PySocks                    1.7.1
pytesseract                0.3.13
python-dateutil            2.9.0.post0
python-docx                1.1.0
python-dotenv              1.1.0
pytz                       2025.2
pywin32                    310
PyYAML                     6.0.2
redis                      5.0.4
referencing                0.36.2
reportlab                  4.0.7
requests                   2.32.3
rpds-py                    0.27.0
selenium                   4.38.0
setuptools                 65.5.0
six                        1.12.0
smmap                      5.0.2
sniffio                    1.3.1
sortedcontainers           2.4.0
soupsieve                  2.7
sqlparse                   0.5.3
streamlit                  1.48.1
streamlit-authenticator    0.4.2
tenacity                   9.1.2
toml                       0.10.2
tornado                    6.5.2
tqdm                       4.67.1
trio                       0.32.0
trio-websocket             0.12.2
typing_extensions          4.15.0
tzdata                     2025.2
undetected-chromedriver    3.5.5
urljoin                    1.0.0
urllib3                    2.5.0
vine                       5.1.0
watchdog                   6.0.0
wcwidth                    0.2.14
webdriver-manager          4.0.2
webencodings               0.5.1
websocket-client           1.8.0
websockets                 15.0.1
Werkzeug                   3.1.3
wsproto                    1.2.0
xlsxwriter                 3.2.5
yarl                       1.20.0







