QueraToCSV is a simple python CLI project to convert the Quera results file into CSV files.

Overview

QueraToCsv



English

QueraToCSV is a simple python CLI project to convert the Quera results file into CSV files.

Quera is an Iranian Learning management system (LMS) that has an online judge for programming languages. Some Iranian universities use it to automate the evaluation of programming assignments.

Quera is currently more than an LMS and features other services such as programming contest and talent acquisition, but this project only focuses on its use as an LMS.

What is this project?

This project uses a simple python script to convert Quera result files into CSV.

Quera shows the score of each individual in its system and also generates a .txt log for each student submission. Most courses tend to use Google Sheets (or Excel) to gather all the grades in one place, and lecturers or teaching assistants usually should put the scores on the Google Sheets manually, because usually students outside of the course register in the Quera class, and Quera's Excel output includes a lot of extra data from students of other classes and even TAs, So the excel needs a lot of cleaning, and usually manually copy-pasting the scores was faster than cleaning this Excel.

This project is developed to automate this process. Lecturers and Teaching Assistants can get a cumulative log file for all submissions of an assignment ordered by Student-IDs. These output files include a result.txt log file for each student with the final score of that student in the assignment. This python project gets a CSV file of Student IDs and then finds each student's score in those log files and puts them in another CSV file.

Example Usage

For simple usage, you can use this command on the source of this repository:

python ./src/main.py -s ./example/students.csv -d ./example/1.csv -f ./example/scores/1

or

python3 ./src/main.py -s ./example/students.csv -d ./example/1.csv -f ./example/scores/1

-s indicates source CSV file that includes student-IDs.

-d indicates the name of output CSV.

-f indicates the folder in which we have subfolders for each student's assignments.

Source CSV file should have a structure like this:

Students,Score
90101234,   0
90101235,   0
90101236,   0
90101237,   0
Students Score
90101234 0 (or blank)
90101235 0 (or blank)
90101236 0 (or blank)
90101237 0 (or blank)

By default, it expects Students as the name of the Student-ID column and Score for the scores column, but you can override it by --id and --score parameter.

Example:

Let us assume we have a class with students 90101234,90101235,90101236,90101237. We put them in a CSV file named students.csv.

We have a programming assignment with two questions. We use the 'download final submission ordered by question button.' (دانلود ارسال‌های نهایی، دسته‌بندی‌شده بر اساس سؤال) in Quera.

After that, we will have a zip. We extract it in a directory named scores. Now we should have a directory tree-like this:

├── main.py
├── students.csv
├── scores
│   ├── 1
│   │   ├── 90101234
│   │   │   └── result.txt
│   │   ├── 90101235
│   │   │   └── result.txt
│   │   └── 90101236
│   │       └── result.txt
│   └── 2
│       ├── 90101234
│       │   └── result.txt
│       ├── 90101235
│       │   └── result.txt
│       └── 90101237
│           └── result.txt
│       └── other_student
│           └── result.txt

Now we can simply run these commands to get the csv files of scores of each assignment:

python main.py -s students.csv -d 1.csv -f scores/1
python main.py -s students.csv -d 2.csv -f scores/2

Also, the scores for other_student which was not in our class will be ignored, and we need not worry about cleaning the CSV file.

Our program also handles persian alphabets for student-IDs.

فارسی

QueraToCSV یک پروژه ساده پایتون برای تبدیل فایل‌نتایج کوئرا به CSV است .

کوئرا یک سیستم مدیریت آموزش (LMS) به همراه سیستم داوری آنلاین برای زبان‌های برنامه‌نویسی است. تعدادی از دانشگاه‌های ایران از کوئرا برای اتوماسیون و خودکارسازی فرآیند تصحیح تمرین‌های برنامه نویسی استفاده‌ می‌کنند.

البته کوئرا در حال حاضر فراتر از یک سیستم مدیریت آموزش است و سرویس‌های ممختلفی نظیر مسابقات و آگهی‌های جذب استعداد و استخدام هم در آن قرار گرفته‌اند. با این حال این پروژه فقط بر جنبه داوری‌ آنلاین و سیستم LMS کوئرا تمرکز دارد.

این پروژه چیست؟

این پروژه از یک اسکریپت ساده پایتون برای تبدیل فایل‌های نتایج کوئرا به فایل CSV استفاده می‌کند.

سامانه کوئرا امتیاز هر یک از دانشجویان را در سیستم خود نشان داده و به ازای هر ارسال هر دانشجو یک فایل log هم ایجاد می‌کنند. بیش‌تر درس‌های دانشگاه از Google Sheet (یا اکسل) برای تجمیع نمرات دانشجویان استفاده می‌کنند و مدرسان یا دستیاران آموزشی دروس این نمرات را در نهایت در Google Sheets قرار می‌دهند. با این حال این کار معمولا به صورت دستی انجام می‌شود، زیرا علیرغم این که کوئرا خروجی Excel هم تولید می‌کند، معمولا دانشجویانی غیر از دانشجویان اصلی درس هم در صفحه کوئرا آن ثبت نام کرده و خروجی Excel کوئرا شامل داده‌های بسیار زیادی برای دانشجویان متفرقه و یا حتی دستیاران آموزشی می‌شود که عملا باعث می‌شود نتوان آن ها را به صورت یکجا در Sheets کپی پیست کرد و عموما راهکار، کپی کردن دستی نمرات دانشجویان درس است؛ زیرا تمیز کردن این فایل اکسل گاهی اوقات بیش از وارد کردن دستی نمرات زمان می‌برد.

این پروژه توسعه یافته‌است تا این فرآیند را تا حد امکان اتوماتیک کند. مدرسان و دستیاران آموزشی امکان دریافت فایل‌های Log تمامی ارسال‌های داشنجویان برای یک تمرین و سوالات آن را به صورت تجمیعی دارند. این فایل‌های خروجی هر کدام شامل یک فایل result.txt هستند که نمره نهایی دانشجو در آن نوشته شده است. این پروژه پایتون به عنوان ورودی یک فایل CSV شامل شماره دانشجویی دانشجویان اصلی درس و همچنین پوشه‌ای شامل این Log ها را گرفته و در خروجی، یک CSV جدید شامل شماره دانشجویی و نمره هر یک از داشنجویان در آن تمرین تولید می‌کند.

نمونه استفاده

برای استفاده خیلی ساده، شما می‌توانید دستور زیر را در ریشه این مخزن گیتهاب اجرا کنید تا با کمک فایل‌های نمونه‌ای که قرار داده شده، شاهد تولید فایل خروجی باشید:

python ./src/main.py -s ./example/students.csv -d ./example/1.csv -f ./example/scores/1

یا

python3 ./src/main.py -s ./example/students.csv -d ./example/1.csv -f ./example/scores/1

s-: نشان‌دهنده فایل CSV ورودی‌ است که شماره‌دانشجویی داشنجویان در آن قرار گرفته است.

d-: نشان‌دهنده نام فایل CSV خروجی است.

f-: نشان‌دهنده پوشه‌ای است که در آن زیرپوشه‌های شامل result.txt برای هر دانشجو وجود دارد.

فایل CSV اولیه‌ای که به عنوان ورودی می‌دهید باید ساختاری به صورت زیر داشته باشد:

Students,Score
90101234,   0
90101235,   0
90101236,   0
90101237,   0
Students Score
90101234 0 (or blank)
90101235 0 (or blank)
90101236 0 (or blank)
90101237 0 (or blank)

به طور پیش‌ُفرض انتظار می‌رود که ستون مربوط به شماره داشنجویی‌ها به نام Students بوده و ستون نمرات هم Score باشد. با این حال می‌توانید این دو را به کمک id-- و score-- تغییر بدهید.

مثال-

فرض کنید یک کلاس داریم که شامل دانشجویانی با شماره دانشجویی‌های 90101234,90101235,90101236,90101237 باشد. این شماره‌دانشجویی‌ها معمولا در اختیار مدرسان درس هستند و به راحتی می‌توان آن‌ها را در یک CSV با فرمت بالا کپی‌پیست کرد.

حال فرض کنید یک تمرین برنامه‌نویسی در کوئرا قرار داده‌ایم که دو سوال داشته است. با کلیک روی گزینه «دانلود ارسال‌های نهایی، دسته بندی شده براساس سوال» یک فایل فشرده zip از کوئرا داللود می‌کنیم.

پس از آن با استخراج این فایل zip در یک پوشه مثلا با نام scores، ساختاری مشابه زیر بدست می‌آوریم:

├── main.py
├── students.csv
├── scores
│   ├── 1
│   │   ├── 90101234
│   │   │   └── result.txt
│   │   ├── 90101235
│   │   │   └── result.txt
│   │   └── 90101236
│   │       └── result.txt
│   └── 2
│       ├── 90101234
│       │   └── result.txt
│       ├── 90101235
│       │   └── result.txt
│       └── 90101237
│           └── result.txt
│       └── other_student
│           └── result.txt

حال به راحتی با اجرای دو دستور زیر می‌توانیم نمرات را برای دانشجویان کلاس در یک فایل csv بدست بیاوریم. نمره دانشجویان متفرقه هم در نظر گرفته نمی‌شود و نیازی به نگرانی برای پاکسازی فایل csv نخواهیم داشت.

python main.py -s students.csv -d 1.csv -f scores/1
python main.py -s students.csv -d 2.csv -f scores/2

این برنامه، اعداد فارسی که بعضا دانشجویان به عنوان شماره دانشجویی وارد می‌کنند را هم به خوبی هندل می‌کند.


Maintainer

Owner
Amirmahdi Namjoo
Amirmahdi Namjoo
Amirmahdi Namjoo
A helper program to play wordle

A helper program to play wordle

1 Jan 22, 2022
This is a repository for collecting global custom management extensions for the Django Framework.

Django Extensions Django Extensions is a collection of custom extensions for the Django Framework. Getting Started The easiest way to figure out what

Django Extensions 6k Jan 03, 2023
Python-based implementation and comparison of strategies to guess words at Wordle

Solver and comparison of strategies for Wordle Motivation The goal of this repository is to compare, in terms of performance, strategies that minimize

Ignacio L. Ibarra 4 Feb 16, 2022
touch command for Windows

Touch touch command for Windows Setup: Clone the repository git clone https://github.com/g-paras/touch.git cd touch Install touch module python setup.

Paras Gupta 5 Jan 04, 2022
CLI for SQLite Databases with auto-completion and syntax highlighting

litecli Docs A command-line client for SQLite databases that has auto-completion and syntax highlighting. Installation If you already know how to inst

dbcli 1.8k Dec 31, 2022
Multifunctional library for creating progress bars.

👋 Content Installation Using github Using pypi Quickstart Flags Useful links Documentation Pypi Changelog TODO Contributing FAQ Bar structure ⚙️ Inst

DenyS 27 Jan 01, 2023
Wordle-cli - Command-line clone of Josh Wardle's WORDLE

Command-line clone of Josh Wardle's WORDLE, inspired by Paul Battley's Ruby vers

Klipspringer 32 Jan 03, 2023
texel - Command line interface for reading spreadsheets inside terminal

texel - Command line interface for reading spreadsheets inside terminal. Sometimes, you have to deal with spreadsheets. Those are sad times. Fortunate

128 Dec 19, 2022
commandline version of wordle game and my auto solver.

Wordle Machine (and Wordle Game) (in commandline) My implementation of the Wordle game (inspired by https://www.powerlanguage.co.uk/wordle/) and my in

Kevin Xu 11 Jan 03, 2023
Command line tool for google dorks

CLI for google dorks This is the command line tool made with pytohn which allows the users to perform Google dorks easily Installation Install google

subrahmanya s hegade 3 Feb 08, 2022
CLI/library to control FNIRSI DC Power Supply (DC-6006L, etc)

dc6006l - CLI/library to control FNIRSI DC Power Supply (DC-6006L, etc) What is this? FNIRSI DC6006L is a programmable DC power supply that is quite c

Taisuke Yamada 7 Sep 25, 2022
Generate an ASCII Art from keyword put in the cli

ascii-art-generator-cli Generate an ASCII Art from keyword put in the cli Install git clone https://github.com/Nathanlauga/ascii-art-generator-cli cd

Nathan Lauga 1 Nov 14, 2021
A minimal todo list for your terminal.

todo A minimal todo list for your terminal. Installation Run the following command. pip install git+https://github.com/piero-vic/todo.git Usage todo

Piero Lescano 7 Aug 08, 2022
CLI tool for typescript tasks & migrations

typed CLI tool for typescript tasks & migrations Installation Usage $ typed --list Subcommands: bootstrap 🔨 Bootstrap your environment for TypeS

Lob 1 Nov 15, 2021
Simple script to download OTA packages from Realme's endpoint.

Realme OTA Downloader CLI tool (based on this C# program) to create requests to the Realme's endpoint. Requirements Python 3.9. pycryptodome. Installa

Roger Ortiz 64 Dec 28, 2022
🎈 A Mini CLI-based Operating System simulator

Mini OS Simulator Summary 🎈 A Mini CLI-based Operating System simulator, well, not really. It simulates a file system with songs and movies and stuff

Jaiyank S. 3 Feb 14, 2022
pypinfo is a simple CLI to access PyPI download statistics via Google's BigQuery.

pypinfo: View PyPI download statistics with ease. pypinfo is a simple CLI to access PyPI download statistics via Google's BigQuery. Installation pypin

Ofek Lev 351 Dec 26, 2022
Generate folder trees directly from the terminal.

Dir Tree Artist 🎨 🌲 Intro Easily view folder structure, with parameters to sieve out what you want. Choose to exclude files from being viewed (.git,

Glenda T 0 May 17, 2022
googler is a power tool to Google (web, news, videos and site search) from the command-line.

googler is a power tool to Google (web, news, videos and site search) from the command-line.

Terminator X 5.9k Jan 04, 2023
A python script that enables a raspberry pi sd card through the CLI and automates the process of configuring network details and ssh.

This project is one script (wpa_helper.py) written in python that will allow for the user to automate the proccess of setting up a new boot disk and configuring ssh and network settings for the pi

Theo Kirby 6 Jun 24, 2021