Spaces:
Running

IL_CMS_Tools / docs /PROJECT_MAP.md
Sahil Kumar
Claude Opus 5.5
LO Classifier: question level from the Difficulty Classifier (PCMB) model
4ab30d7
|
Raw History Blame Contribute Delete
16.6 kB

Project Map β€” what every file is for

This page explains, in plain English, what each file in IL CMS Tools does. If you are new to the project, start here. For setup and day-to-day use, see the README.

The big picture

IL CMS Tools is one website made of several small tools. Each tool helps the content team do a CMS job faster: upload questions, tag them, check answers, write solutions, make slides, and so on.

  • backend/ holds all the Python code. app.py is the website itself. The other files are helpers that app.py calls.
  • frontend/ holds the web pages (HTML) and the shared style and script files.
  • database/ holds the data the tools read, like the table of contents (TOC) lists and option lists.
  • samples/ holds example files that users can download and fill in.
  • tests/ holds the automatic checks. Run them with pytest.

When someone opens a page, app.py shows the HTML file for that page. When they click a button, the page calls app.py, and app.py uses the helper files to talk to the CMS.


Files in the main folder

File What it is for
README.md The main guide: what each tool does, how to run it, how to deploy it.
SOLUTIONS_FORMAT.md Explains the text format for pasting solutions into the Solutions tool.
Dockerfile Instructions to build the app for the online server (Hugging Face Space).
requirements.txt The list of Python packages the app needs.
pytest.ini Settings for the automatic tests.
start_app_only.bat Double-click this on the laptop to run the app locally.
.gitignore Files git must not save (passwords, logins, generated files, private documents).
.dockerignore Files that must not go into the online server image.
.gitattributes Tells git how to handle line endings and binary files.
.env (local only, never shared) Passwords and secret keys for this computer. Made on first run.

Each tool: which files do the work

Home and login

File What it is for
frontend/templates/login.html The team password page.
frontend/templates/home.html The dashboard: CMS login card and a card for each tool.
frontend/templates/_nav.html The left sidebar that every page shows.

Uploader β€” create questions in the CMS from Excel, Word or Markdown

File What it is for
frontend/templates/uploader.html The Uploader page.
backend/app.py Reads the uploaded file, turns each question into CMS format, and uploads it.
backend/mathtype_mtef.py Converts MathType equations in Word files into a format the CMS can show.
backend/vendor/OMML2MML.XSL Converts normal Word equations into a format the CMS can show.
backend/upload_md.py Runs the same upload from the command line, without the website.
backend/make_sample_docx.py Makes the sample Word file in samples/ that users fill in.

Tagger β€” add chapter/topic/subtopic and other tags from a filled Excel

File What it is for
frontend/templates/tagger.html The Tagger page.
backend/api_tagger.py The tagging engine. Tags many questions at once through the CMS API.
backend/ai_tagger/push_tags.py Writes the tags onto one question and checks that they saved.
backend/ai_tagger/approve_tags.py Moves a question through review to "approved".
backend/ai_tagger/extract_toc.py Finds the CMS ID for a chapter/topic/subtopic name. Also looks up a question's current TOC.
backend/tagger.py CMS login helpers and Excel helpers. Also holds the older, slower tagging engine that clicks through the CMS in a browser.
backend/make_template.py Builds the blank tagging Excel, with dropdowns of valid values.

AI Tagging β€” let an AI suggest tags, check them, then push them

File What it is for
frontend/templates/tag.html The AI Tagging page. The Foundation Tagging page uses the same file.
backend/tag_assist.py Gives the page the JEE/NEET TOC lists to choose from.
backend/ai_assist.py Builds the prompt to paste into the AI, then checks the AI's answer.
backend/cms_text.py Turns CMS question content (including maths) into readable text for the prompt.

Foundation Tagging β€” the same as AI Tagging, for school Grades 3 to 10

File What it is for
backend/foundation_toc.py Gives the page the TOC lists for each school grade, and the CMS IDs needed to tag them.
backend/export_foundation_exam_toc.py Writes database/foundation_exam_toc_live.xlsx β€” the live CMS exam TOC for Grades 3–10 (community.infinitylearn.com/curriculum/exam), every chapter/topic/subtopic with the active status at each level, so the vocabulary can be reviewed in Excel before a rebuild.
backend/build_foundation_toc.py Builds Grades 3–10 in database/foundation_toc.json from foundation_exam_toc_live.xlsx, embedding only rows whose subtopic is Active under a live chapter and topic.
backend/build_foundation_exam_toc.py Adds one grade β€” or, with --merge, one subject β€” to database/foundation_toc.json from that grade's CMS "exam TOC" Excel export (fast: about 2 minutes), matching the exam by name and live-checking every row. That is how Mental Ability was first added to Grades 5–10.
backend/build_kcet_toc.py Builds database/kcet_toc.json (the KCET choice on AI Tagging) from the CMS KCET TOC export, checking every row against CMS. Add --no-cms-check for a freshly downloaded export: it builds from the export alone (seconds, no login, nothing carried over from the old file) and splits Biology into Botany/Zoology by the NEET final active TOC, then the NCERT list.
backend/build_active_exam_toc.py Builds database/active_exam_toc.json (the JEE Main and NEET choices on AI Tagging) from each exam's active CMS TOC export, checking every row against CMS. JEE Main: Physics, Chemistry, Maths. NEET: Physics, Chemistry, Botany, Zoology. Video / IPE / bridge-course chapters are left out. Add --no-cms-check when the exports were just downloaded from CMS: it trusts their IDs and names and finishes in seconds instead of checking every row live.

In the CMS, each school grade is its own exam with its own chapters, and the exam-TOC pages at community.infinitylearn.com/curriculum/exam are the source of truth:

  • export_foundation_exam_toc.py reads those pages' API for "CBSE Grade 3" to "CBSE Grade 10" into database/foundation_exam_toc_live.xlsx β€” every node with its active status, nothing filtered β€” so the school vocabulary can be reviewed in Excel.
  • build_foundation_toc.py then embeds only the live rows: subtopic Active, chapter and topic not retired. Retired content is common (Areas(IPL), Book Based Assets, …(CM)(Inactive)); the CMS also keeps several active tenant variants of one chapter (Algebra(CO-IPL) beside Algebra(New_IPL)), and those are kept as they are, one row each.
  • Subjects offered: Maths, English and EVS in Grades 3–5; Physics, Chemistry, Biology and English in Grades 6–10; Mental Ability in Grades 5–10; Reasoning in Grades 6–10 (CMS maps no reasoning subject to Grades 3–4).
  • Grades 4 and 5 are Draft in the CMS exam list; they are included because they are the exams in use.

To add another grade or exam (for example "SC_Grade 4 CBSE"), download its exam-TOC export from CMS and run build_foundation_exam_toc.py on it.

Questions tagged here appear under the chosen grade exam in the CMS editor.

Quiz PPT and Custom PPT β€” make slide decks

File What it is for
frontend/templates/ppt.html The Quiz PPT page (slides made from CMS questions).
backend/ppt_api.py Fetches the questions and draws them onto slides.
frontend/templates/deckbuilder.html The Custom PPT page (slides you type yourself).
backend/deck_builder.py Builds the custom slides.

Diagram Upload β€” store a picture and get a link for it

File What it is for
frontend/templates/upload_image.html The Diagram Upload page. app.py does the upload.

Resolve TOC β€” see which chapter/topic/subtopic questions are tagged with

File What it is for
frontend/templates/resolve_toc.html The Resolve TOC page.
backend/ai_tagger/extract_toc.py Looks up each question's TOC names.

Question Text β€” turn questions into plain text

File What it is for
frontend/templates/qtext.html The Question Text page.
backend/qtext.py Turns each question into plain text you can paste into a prompt.

Unapprove and Approve (admin only)

File What it is for
frontend/templates/unapprove.html The Unapprove/Approve page.
backend/unapprove.py Moves approved questions back to draft so they can be edited.
backend/approve.py Checks that a question is really ready, then approves it.

Question Tags (admin only) β€” add CMS tags like "XL 500 (2026-27)" to questions

File What it is for
frontend/templates/qtags.html The Question Tags page: pick tags, paste QIDs, check, then add.
backend/qtags.py Loads the CMS tag list, refuses any name not on it, and adds tags to each question. Approved questions stay approved.

The CMS editor's Tags box only offers names from a fixed list (/tag/getTags on the community API), and a question stores the tag's name in labels. The dropdown's tags are set in DEFAULT_TAGS in qtags.py. Any other tag can be typed in, and is checked against the CMS list first.

LO Classifier β€” match questions to learning outcomes

File What it is for
frontend/templates/lo.html The LO Classifier page.
backend/lo_assist.py Builds the prompt and checks the AI's answer against the LO lists. Also works out each question's level (Difficulty Classifier PCMB): the AI scores six things from 1 to 5 β€” Conceptual, Reasoning, Mathematical/Technical, Application, Integration, Problem-solving β€” and the app turns them into D = 0.25C + 0.25R + 0.15M + 0.15A + 0.10I + 0.10P and a level: very easy (below 1.50), easy (below 2.30), moderate (below 3.20), difficult (below 4.10) or very difficult. The AI also gives the complexity level (L1–L4) and the conceptual code (SS/SM/MM), saved as separate columns.
frontend/templates/lo_poc.html A trial version for two Biology chapters. Only shown on the laptop.
backend/lo_poc/lo_poc.py The trial version's logic. Can also run from the command line.
backend/lo_poc/lo_poc_taxonomy.json The LO list for the trial version.
backend/lo_poc/build_poc_taxonomy.py Builds that LO list from the subject expert's Excel.
backend/lo_poc/out/ Sample input and output files for the trial version.

Q-A Verification β€” have an AI re-solve questions to catch wrong answers

File What it is for
frontend/templates/verify.html The Verification page.
backend/verify_assist.py Builds the "solve these" prompt and compares the AI's answers with the stored ones.

Solutions and Answer Keys β€” write solutions onto questions

File What it is for
frontend/templates/solutions.html The Solutions page.
backend/solution_assist.py Builds the prompt, reads the solutions back, and saves them with the answer key.
backend/pdf_reader.py Reads text out of a solutions PDF.

Job History and Usage β€” who ran what, and when

File What it is for
frontend/templates/history.html The Job History page.
frontend/templates/usage.html The Usage stats page (laptop only).
backend/il_job_history.py Reads past runs from the shared online database.
backend/il_shared_usage.py Sends each run to the shared team dashboard.
backend/il_artifacts.py Keeps result files online so they can be downloaded later.

Shared helpers

File What it is for
backend/il_endpoints.py The CMS server addresses, kept in one place. Change them here to switch between test and live CMS.
backend/cms_text.py Turns CMS question content into readable text. Used by every AI tool.
frontend/static/il-common.js Small JavaScript helpers that every page uses.
frontend/static/il-laptop.css The shared page layout and styles.

Data files (database/)

File What it is for How to rebuild it
exam_toc.json JEE Main / NEET TOC lists for AI Tagging. python backend/build_exam_toc.py
exam_toc_aliases.xlsx Manual name fixes used when building exam_toc.json. Edit by hand.
kcet_toc.json KCET TOC lists for AI Tagging, with the CMS IDs needed to tag them. Biology is shown as Botany and Zoology. python backend/build_kcet_toc.py "<KCET TOC export>.xlsx" (about 16 minutes), or with --no-cms-check for a fresh export (seconds)
active_exam_toc.json JEE Main and NEET TOC lists for AI Tagging, from each exam's active CMS TOC, with the CMS IDs needed to tag them. Replaces the JEE Main / NEET lists in exam_toc.json. python backend/build_active_exam_toc.py "<JEE Main export>.xlsx" "<NEET export>.xlsx" (about 12 minutes)
foundation_toc.json School Grade 3–10 TOC lists for Foundation Tagging. python backend/export_foundation_exam_toc.py && python backend/build_foundation_toc.py (about 9 minutes). A one-off grade or subject: python backend/build_foundation_exam_toc.py "<exam toc export>.xlsx" (about 2 minutes).
cms_options.json Backup list of valid tag values (objective, bloom level, and so on). python backend/build_cms_options.py
lo_taxonomy.json The learning-outcome lists for the LO Classifier. python backend/build_lo_taxonomy.py
ppt_template.pptx The default slide design for Quiz PPT and Custom PPT. Replace the file.

These are made while the app runs. They stay on this computer and are never shared: tagging_template.xlsx, exam_toc_review.xlsx, kcet_toc_review.xlsx, foundation_exam_toc_review.xlsx, foundation_exam_toc_live.xlsx, usage_log.csv, lo_bank/, tagger_sessions/ (CMS logins), tagger_reports/, tagger_screenshots/.

Builder scripts

These scripts are not part of the website. Run them by hand on the laptop when the source data changes, then commit the new data file.

Script When to run it
backend/build_exam_toc.py When the JEE/NEET TOC sheets or the CMS TOC change.
backend/export_foundation_exam_toc.py When you want the live school TOC (Grades 3–10) with each row's active status, before rebuilding foundation_toc.json.
backend/build_foundation_toc.py After export_foundation_exam_toc.py, to rebuild Grades 3–10 in foundation_toc.json from the live TOC.
backend/build_foundation_exam_toc.py When you get a new exam TOC export for one grade (or a subject to merge into grades that exist).
backend/build_kcet_toc.py When you get a new CMS KCET TOC export.
backend/build_active_exam_toc.py When you get new active JEE Main / NEET TOC exports from CMS.
backend/build_cms_options.py When the CMS changes its dropdown values.
backend/build_lo_taxonomy.py When an LO sheet changes.
backend/make_template.py When the CMS question form changes.
backend/make_sample_docx.py When the Word sample format changes.

Sample files (samples/)

File What it is for
sample_questions.xlsx, .docx, .md Example question files for the Uploader, in each supported format.
sample_questions_nest16.md, sample_questions_nest16_ready.md A real exam set, before and after it was fixed up for upload.
sample_answer_key.md Example answer key format.
sample_tagging.xlsx Example filled tagging sheet for the Tagger.
README.md, WORD_FORMAT.md How to fill in the sample files.

Tests (tests/)

Each test_*.py file checks one part of the app. Its name says which part, for example test_unapprove.py checks Unapprove and test_foundation_toc.py checks Foundation Tagging. conftest.py holds setup shared by all tests. Run everything with:

python -m pytest

Private folders (never shared)

Folder What it is for
docs/handover/ Handover documents and emails.
backend/lo_poc/ncert/ NCERT textbook text for the LO trial (copyrighted).