EOppi student grading: Difference between revisions

From wikiluntti
 
(16 intermediate revisions by the same user not shown)
Line 2: Line 2:


Set the grades according to the points given to the exercises.
Set the grades according to the points given to the exercises.
I encountered some problems while trying to add a long file: Internal server error. Thus, there is many parts.


== Theory ==
== Theory ==


Save the database as a csv file and read it. Choose the exercises and run the python script.
Save the database as a csv file and read it. Choose the exercises and run the python script. See the script at
 
<syntaxhighlight lang="python">
#Python3
 
import csv
import math
import glob
import numpy as np
 
def getExeNames(titles):
    ti = []
    for title in titles[1:]:
        ti.append(title)
    return ti
 
def getRow(row):
    r = [row[0]]
 
    points = []
    for i,p in enumerate( row[1:] ):
        #Convert the numbers separated by space into a array of integers
        #Fetch the max value of and return those.
        #print( p )
        #print( [(i) for i in p.strip().split(' ')] )
        values = [int('0'+i) for i in p.strip().split(' ')]
        #print( values );
        r.append( max( values ))
 
    return r
 
</syntaxhighlight>
 
 
== Part 2 ==
 
== Part 3 ==
 
== Part 4 ==
 
 
== Part 5 ==
 


== Part 6 ==
https://gist.github.com/markkuleino/bea1d81b41b233a8a3dbb2b6659a2222

Latest revision as of 19:59, 5 March 2021

Introduction

Set the grades according to the points given to the exercises.

I encountered some problems while trying to add a long file: Internal server error. Thus, there is many parts.

Theory

Save the database as a csv file and read it. Choose the exercises and run the python script. See the script at

https://gist.github.com/markkuleino/bea1d81b41b233a8a3dbb2b6659a2222