diff --git a/resources/images/professor-ubuntu/server/getValueAndTime.sh b/resources/images/professor-ubuntu/server/getValueAndTime.sh index 742692d..08bf02a 100644 --- a/resources/images/professor-ubuntu/server/getValueAndTime.sh +++ b/resources/images/professor-ubuntu/server/getValueAndTime.sh @@ -7,4 +7,4 @@ start=`date +%s.%N` finish=`date +%s.%N` diff=$( echo "$finish - $start" | bc -l ) -echo $diff > time.txt \ No newline at end of file +/usr/bin/echo $diff > time.txt \ No newline at end of file diff --git a/resources/images/professor-ubuntu/server/main.py b/resources/images/professor-ubuntu/server/main.py index 93d06db..42cfa77 100644 --- a/resources/images/professor-ubuntu/server/main.py +++ b/resources/images/professor-ubuntu/server/main.py @@ -77,11 +77,12 @@ async def get_assignment(id: str, assignment_id: str): file_list = os.listdir(dir_path) return_dict = {} for file in file_list: - f = open(dir_path+"/"+file, "r") + file_path=dir_path+"/"+file + f = open(file_path, "r") content = f.read() return_dict["content"] = content f.close() - os.system('/bin/bash %s/getValueAndTime.sh' % curr_path) + os.system('/bin/bash %s/getValueAndTime.sh %s' % (curr_path, file_path)) f = open("%s/values.txt" % curr_path, "r") values = f.read() return_dict["values"] = values