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
Library and command-line utility for rendering projects templates.

A library for rendering project templates. Works with local paths and git URLs. Your project can include any file and Copier can dynamically replace v

808 Jan 04, 2023
CLI Web-CAT interface for people who use VIM.

CLI Web-CAT CLI Web-CAT interface. Installation git clone https://github.com/phuang1024/cliwebcat cd cliwebcat python setup.py bdist_wheel sdist cd di

Patrick 4 Apr 11, 2022
Python CLI vm manager for remote access of docker images via noVNC

vmman is a tool to quickly boot and view docker-based VMs running on a linux server through noVNC without ssh tunneling on another network.

UCSD Engineers for Exploration 1 Nov 29, 2021
StackOverflow in your terminal.

how. How do I ...? This project was started to help developers ask more questions. Table of Contents Installation Usage Foss Community Copyright Insta

Ron Nathaniel 2 Jan 31, 2022
ICMP Reverse Shell written in Python 3 and with Scapy (backdoor/rev shell)

icmpdoor - ICMP Reverse Shell icmpdoor is an ICMP rev shell written in Python3 and scapy. Tested on Ubuntu 20.04, Debian 10 (Kali Linux), and Windows

Jeroen van Kessel 206 Dec 29, 2022
Navigate torrents in CLI with Mariner.

Navigate torrents in CLI with Mariner. It offers a simple interface for streamlined experience. No more annoying ads and pop-up windows.

2 Oct 20, 2021
A minimal ascii-representation of your local weather.

Ascii-Weather A simple, ascii-based weather visualizer for the terminal. The ascii-art updates to match the current weather and conditions. Uses ipinf

Aaron R. 12 Jan 29, 2022
This is a CLI program which can help you generate your own QR Code.

Python-QR-code-generator This is a CLI program which can help you generate your own QR Code. Single.py This will allow you only to input a single mess

1 Dec 24, 2021
A CLI application for storing contacts as a csv file written in Python.

Contacter A CLI application for storing contacts as a csv file written in Python. You can use this to save your contacts with a special relations tag

nostalgicnerdpenguin 1 Oct 23, 2021
adds flavor of interactive filtering to the traditional pipe concept of UNIX shell

percol __ ____ ___ ______________ / / / __ \/ _ \/ ___/ ___/ __ \/ / / /_/ / __/ / / /__/ /_/ / / / .__

Masafumi Oyamada 3.2k Jan 07, 2023
A webmining CLI tool & library for python.

minet is a webmining command line tool & library for python (= 3.6) that can be used to collect and extract data from a large variety of web sources

médialab Sciences Po 165 Dec 17, 2022
Phishing-Detective is a command line application for Windows 10 built to detect a phishing site from two url's

Phishing-Detective Phishing-Detective is a command line application for Windows 10 built to detect a phishing site from two url's How it works A simpl

2 Jun 23, 2022
Tmux Based Dropdown Dashboard For Python

sextans It's a private configuration and an ongoing experiment while I use Archlinux. A simple drop down dashboard based on tmux. It includes followin

秋葉 4 Dec 22, 2021
spade is the next-generation networking command line tool.

spade is the next-generation networking command line tool. Say goodbye to the likes of dig, ping and traceroute with more accessible, more informative and prettier output.

Vivaan Verma 5 Jan 28, 2022
Gamestonk Terminal is an awesome stock and crypto market terminal

Gamestonk Terminal is an awesome stock and crypto market terminal. A FOSS alternative to Bloomberg Terminal.

Gamestonk Terminal 18.6k Jan 03, 2023
Baseline is a cross-platform library and command-line utility that creates file-oriented baselines of your systems.

Baselining, on steroids! Baseline is a cross-platform library and command-line utility that creates file-oriented baselines of your systems. The proje

Nelson 4 Dec 09, 2022
As easy as /aitch-tee-tee-pie/ 🥧 Modern, user-friendly command-line HTTP client for the API era. JSON support, colors, sessions, downloads, plugins & more. https://twitter.com/httpie

HTTPie: human-friendly CLI HTTP client for the API era HTTPie (pronounced aitch-tee-tee-pie) is a command-line HTTP client. Its goal is to make CLI in

HTTPie 25.4k Dec 30, 2022
GoogleFormSpammer - A simple CLI script to spam Google Forms used by Crypto Wallet scammers to collect stolen data

GoogleFormSpammer - A simple CLI script to spam Google Forms used by Crypto Wallet scammers to collect stolen data

14 Dec 17, 2022
LSD (Linux Spotify Downloader) is a command line tool for downloading or rather recording content on Spotify.

LSD (Linux Spotify Downloader) is a command line tool for downloading or rather recording content on Spotify.

Jannis Zahn 7 Jun 21, 2022
Faza - Faza terminal, Faza help to beginners for pen testing

Faza terminal simple tool for pen testers Use small letter only for commands Don't use space after command 'help' for more information Installation gi

Ag3ntQ 5 Feb 20, 2022