Distributing grade details in the online semester from your university account

Nilava Metya
nilavam@cmi.ac.in

April, 2021

When this online circus started, I was given my scores and grades, but there was this lack of information. I could not "see" my graded script. Things improved slowly. For some courses, I got the scores for individual questions, and for some, I got the letter grade directly which was really frustrating (even if it was an A - the highest possible grade).

It is understandable that people not very familiar with technology are familiarizing themselves. What is not understandable is that people not familiar with technology don't reject the suggestion of others who are familiar with the technology. Whatever I am going to pen down in this article, I already had this idea (not a concrete implementation) a year ago. But I did not find an appropriate place to implement this (except to suggest to people who were not open to suggestions), until I got the opportunity to be a teaching assistant (I graded scripts there) in one of the courses.

I even asked the authorities to develop a mechanism to make it easy for graders to distribute scores among students, without copying individual scores from the excel sheet to some online database, or mailing students one by one manually. I was told that there are some difficulties.

When I got the chance to be a TA for the (UG) Algebra I course at CMI, I decided to be the change I wanted to see. And looked up the internet myself, to find something which suited the job. It did take me a while to figure out stuff, because I was not very learned either. But I figured out something in the end. Of course, there might be problems with this method and there are ways to improve. But my aim is to bridge the gap between graders and students, to ensure that technology does to cost a student their right to information. I'm sure this article (implementation of the idea) will certainly give produce some nonzero momentum which will keep growing in the future.

Whatever is mentioned in this article is written with CMI as an example. I shall be using python to write a script which will automate the process. There are (I can ensure that) analogous methods for institutes which are not CMI. In CMI, moodle is the online service used for the management of courses. User details (roll number, email id) can be downloaded from there (in .csv format).

You will ofcourse first need a table or database or datasheet which will contain the marks and comments and other data which we want to distribute to the students.
I use Google Sheets for this. It has all the basic features one needs for maintaining data and also allows multiple Google users to collaborate (edit and view).

Fun fact: People can use Google Sheets or Microsoft Excel for functional programming. Check out the video here.

The sheet(s) must contain the data about details of the student. For example, I had the first three columns of my sheets as Name, Roll number and CMI userid. An example of entries under these columns could be Nilava Metya, BMC201930 and nilavam@cmi.ac.in, respectively.
The other columns would contain data about each individual student. For example, I used to label them as s1, c1, s2, c2, and so on. These are abbreviations for score 1, comment 1, score 2, and so on. There was a TOTAL column at the end, which kept track of the total score of the students. You need not calculate the scores manually. Just enter the formula =SUM(cells_to_sum__separated_by_commas).

In case of a large database, you might want to do some conditional formatting, so that you can "look" for something easily. For example, I wanted that I would spot the ungraded scripts (I used to grade a few scripts everyday). So what I did was the following:

Make sure Python 3 or higher is installed on your institute's local machine. If not, please ask the admins to get it for you. All CMI local machines have it installed and can be used with the command python3. You must be able to use it from the terminal (basic task like running a .py file). The command I would use to execute a file named file.py is python3 file.py (assuming my terminal is open in the same directory as my file). Some machines will directly recognize python instead of python3. If you want to check which verstion of python the command is linked to, try executing python --version. Here is an example from my terminal. Note: I was using my account through ssh. To know how to connect to your institute computer remotely, see here.

nilavam@access2:~$ python --version
Python 2.7.16
nilavam@access2:~$ python3 --version
Python 3.7.3

Once you have your database (with the scores and details of students) and Python 3, you can go ahead and send emails. All CMI local computers have Python 3 installed on them and can be used with the command python3. Download the google sheet in .csv format and store it in a directory (on your institute computer). Rename the file as contact.csv. Make sure the file name is contact with extension .csv, and not contact.csv with extension .csv.

  1. Download this python code. Make appropriate changes to the file. You will have to put in a message (email body), and the column headings of contact.csv file in order, etc. The texts inside braces inside the email body (mail_content) are parameters which are taken from contact.csv file. These are different for each person, so the details are fetched from the .csv file, put into the body, and mailed.
  2. Please verify that your account security is not compromised by usage of this file. Store it in the same directory as contact.csv. This directory must be on your local computer of your institute. To work remotely, you can send them via ssh, using the scp command on your local computer.
  3. After you have made appropriate changes, save the file. Now open your terminal (on your institute's physical local computer, or through ssh) and using the cd command, navigate to the directory containing the contact.csv and cmi_send_mail.py files.
    Execute python3 cmi_send_mail.py.

Works exactly like this example.