# Last edited on 2024-01-01 08:01:44 by stolfi PROCESSING OF MC937/MO603 HAND-INS Processing must be done on baikal or cratera since there is no POV-Ray on mamaus. CREATING LOGS DIRECTORY mkdir LOGS JUNK FETCHING STUDENT FILES FROM STANDARD LOCATIONS Fetched labs: # aula=2023-11-29 aula=2023-12-06 echo "=== fetching ${aula} ===" mkdir -p ${aula} ( cd ${aula} && ../../tools/mc937_fetch_lab.sh ${aula} main.pov main.png main-m.gif main-f.gif ) # Initial grades file: ( cd ${aula} && mc937_make_initial_grades_file.sh ${aula} ) mc937_check_labs_fetch.sh > fetched.txt cat fetched.txt CREATING NECESSARY FILES FOR EACH LAB Files for all labs: aulas=( 2023-[0-9][0-9]-[0-9][0-9] ) for aula in ${aulas[@]}; do echo "=== ${aula} ===" 1>&2 ( cd ${aula} && rm -v lab_files.dir ) # Title file: ( cd ${aula} && echo title.txt >> lab_files.dir && touch title.txt ) # Copy files that may vary from class to class: for file in Makefile camlight.inc ras.txt ; do ( cd ${aula} && echo ${file} >> lab_files.dir && if [[ ! ( -s ${file} ) ]]; then cp -av ../${file} ./ ; fi; ) done # Link files that do not depend on class for link in eixos.inc gaiola.inc tt-fonts PLACEHOLDERS.make ; do ( cd ${aula} && echo ${link} >> lab_files.dir && if [[ ! ( -s ${link} ) ]]; then ln -sv ../${link} ; fi; ) done done Files for static image labs: aulas=( 2023-{08-{09,16,23,30},09-{06,13,20,27},11-29,12-06} ) for aula in ${aulas[@]}; do echo "=== ${aula} ===" 1>&2 # Link files that do not depend on class for link in STATIC.make ; do ( cd ${aula} && echo ${link} >> lab_files.dir && if [[ ! ( -s ${link} ) ]]; then ln -sv ../${link} ; fi; ) done done Additional files for animation labs: aulas=( 2023-11-08 2023-11-22 ) for aula in ${aulas[@]}; do echo "=== ${aula} ===" 1>&2 # Link files that do not depend on class for link in galho.inc MOVIE.make mc937_tile_movie_frames.sh mc937_animate_movie_frames.sh ; do ( cd ${aula} && echo ${link} >> lab_files.dir && if [[ ! ( -s ${link} ) ]]; then ln -sv ../${link} ; fi; ) done done Additional files for Bézier arc labs: aulas=( 2023-09-13 2023-09-20 ) for aula in ${aulas[@]}; do echo "=== ${aula} ===" 1>&2 # Link files that do not depend on class for link in bezpoly.inc ; do ( cd ${aula} && echo ${link} >> lab_files.dir && if [[ ! ( -s ${link} ) ]]; then ln -sv ../${link} ; fi; ) done done Additional file for Bézier patch labs: aulas=( 2023-11-29 ) for aula in ${aulas[@]}; do echo "=== ${aula} ===" 1>&2 # Link files that do not depend on class for link in retalho.inc ; do ( cd ${aula} && echo ${link} >> lab_files.dir && if [[ ! ( -s ${link} ) ]]; then ln -sv ../${link} ; fi; ) done done Additional files for solar panel labs: aulas=( 2023-12-06 ) for aula in ${aulas[@]}; do echo "=== ${aula} ===" 1>&2 # Link files that do not depend on class for link in calcula_energia.sh plota_energia.sh mc937_tile_movie_frames.sh direcao_do_sol.inc parametros.inc ; do ( cd ${aula} && echo ${link} >> lab_files.dir && if [[ ! ( -s ${link} ) ]]; then ln -sv ../${link} ; fi; ) done done FETCHING EXTRA FILES FOR SOME STUDENTS aula=2023-09-20; ra=220792; ( cd ${aula}/${ra} && mc937_fetch_lab_student.sh ${aula} ${ra} ${aula} "objs.inc" "textures.inc" ) aula=2023-09-20; ra=238077; ( cd ${aula}/${ra} && mc937_fetch_lab_student.sh ${aula} ${ra} ${aula} "grau_{1,2,3,4}.inc" ) aula=2023-09-27; ra=220792; ( cd ${aula}/${ra} && mc937_fetch_lab_student.sh ${aula} ${ra} ${aula} "objs.inc" "textures.inc" ) aula=2023-11-08; ra=220792; ( cd ${aula}/${ra} && mc937_fetch_lab_student.sh ${aula} ${ra} ${aula} "objs.inc" "textures.inc" ) aula=2023-11-22; ra=220792; ( cd ${aula}/${ra} && mc937_fetch_lab_student.sh ${aula} ${ra} ${aula} "objs.inc" "textures.inc" ) aula=2023-12-06; ra=220792; ( cd ${aula}/${ra} && mc937_fetch_lab_student.sh ${aula} ${ra} ${aula} "objs.inc" "textures.inc" ) EDITING AND RUNNING THE LABS Build images/movies and their index pages. Manually: # aula=2023-09-20; labtype=0 # aula=2023-09-27; labtype=0 # aula=2023-11-08; labtype=1 # aula=2023-11-22; labtype=1 # aula=2023-11-29; labtype=0 aula=2023-12-06; labtype=2 ( cd ${aula} && mc937_process_lab.sh ${aula} ${labtype} ) ( cd ${aula} && mc937_edit_and_grade_labday.sh ${aula} ${labtype} ) ( cd ${aula} && mc937_make_lab_page.sh ${aula} ${labtype} ) aula=2023-09-20; labtype=0 ( cd ${aula} && mc937_edit_and_grade_labday.sh ${aula} ${labtype} ) ( cd ${aula} && mc937_make_lab_page.sh ${aula} ${labtype} ) REMAKING INDIVIDUAL STUDENTS # aula=2023-11-22; labtype=1 aula=2023-12-06; labtype=2 ra=108231; ( cd ${aula}/${ra} && ls -l main.pov && mc937_process_lab_student.sh ${aula} ${ra} ${labtype} ); ra=212328; ( cd ${aula}/${ra} && ls -l main.pov && mc937_process_lab_student.sh ${aula} ${ra} ${labtype} ); ra=215743; ( cd ${aula}/${ra} && ls -l main.pov && mc937_process_lab_student.sh ${aula} ${ra} ${labtype} ); ra=216241; ( cd ${aula}/${ra} && ls -l main.pov && mc937_process_lab_student.sh ${aula} ${ra} ${labtype} ); ra=182553; ( cd ${aula}/${ra} && ls -l main.pov && mc937_process_lab_student.sh ${aula} ${ra} ${labtype} ); ra=219081; ( cd ${aula}/${ra} && ls -l main.pov && mc937_process_lab_student.sh ${aula} ${ra} ${labtype} ); ra=220792; ( cd ${aula}/${ra} && ls -l main.pov && mc937_process_lab_student.sh ${aula} ${ra} ${labtype} ); ra=224828; ( cd ${aula}/${ra} && ls -l main.pov && mc937_process_lab_student.sh ${aula} ${ra} ${labtype} ); ra=233427; ( cd ${aula}/${ra} && ls -l main.pov && mc937_process_lab_student.sh ${aula} ${ra} ${labtype} ); ra=236769; ( cd ${aula}/${ra} && ls -l main.pov && mc937_process_lab_student.sh ${aula} ${ra} ${labtype} ); ra=238077; ( cd ${aula}/${ra} && ls -l main.pov && mc937_process_lab_student.sh ${aula} ${ra} ${labtype} ); ra=240501; ( cd ${aula}/${ra} && ls -l main.pov && mc937_process_lab_student.sh ${aula} ${ra} ${labtype} ); ra=248287; ( cd ${aula}/${ra} && ls -l main.pov && mc937_process_lab_student.sh ${aula} ${ra} ${labtype} ); ra=248342; ( cd ${aula}/${ra} && ls -l main.pov && mc937_process_lab_student.sh ${aula} ${ra} ${labtype} ); ra=248343; ( cd ${aula}/${ra} && ls -l main.pov && mc937_process_lab_student.sh ${aula} ${ra} ${labtype} ); ra=248438; ( cd ${aula}/${ra} && ls -l main.pov && mc937_process_lab_student.sh ${aula} ${ra} ${labtype} ); ra=248448; ( cd ${aula}/${ra} && ls -l main.pov && mc937_process_lab_student.sh ${aula} ${ra} ${labtype} ); ( cd ${aula} && mc937_make_lab_page.sh ${aula} ${labtype} ) CLEANING UP THE LIST OF STUDENTS FOR EACH LAB cd ~/public_html/courses/MC937-2023-2-A/progs/hand-in for aula in 2023-??-?? ; do pushd ${aula} bool 1-2 ../ras.txt ras.txt > .excluded for ra in `cat .excluded` ; do if [[ -s ${ra}/main-orig.pov ]]; then echo "** ${aula}/${ra} has main.pov" 1>&2 fi done popd done for aula in 2023-??-?? ; do pushd ${aula} mc937_make_lab_page.sh ${aula} 0 popd done # FETCHING STUDENT FILES FROM NON-STANDARD LOCATIONS # # Fetched additional files: # # now="`yyyy-mm-dd-hhmmss`" # povfiles=( main.pov main.png main-m.gif main-f.gif ) # for trud in \ # ; \ # do # xx=( `echo ${trud} | tr '.' ' '` ) # ra="${xx[0]}" # aula="${xx[1]}" # handed="${xx[2]}" # mkdir -p ${aula}/${ra} # lablog="LOGS/fetch_special_${aula}_ra${ra}_${now}.log" # ( cd ${aula}/${ra} && ../../../tools/mc937_fetch_lab_student.sh ${aula} ${ra} ${handed} ${povfiles[@]} ) >> ${lablog}; # stulog="${aula}/${ra}/wget-log.txt" # if [[ -e ${stulog} ]]; then cat ${stulog} >> ${lablog}; fi # done # # # 173041.2021-08-11.2021-08-16 \ # # 187700.2021-09-22.2021-09-22 \ # # 187700.2021-09-29.2021-09-29 \ # # Got 2021-09-15/167494/main.{pov,png} through email. Copied to main-orig.{pov,png}. EDITING THE HAND-IN POV FILES AND GRADING THE LABS Done: aulas_to_grade=( `cat labs.txt | gawk '/^[0-9]/{ if ($3 == 3) { print $1 } }'` ) aulas_to_grade=( 2023-09-20 ) for aula in ${aulas_to_grade[@]} ; do ( cd ${aula} && mc937_edit_and_grade_labday.sh ${aula} ) done CHECKING INCONSISTENT DATES Checking dates of fetched files: cat .all-fetched \ | flag-inconsistent-dates.sed \ | sed -e 's:/main: main:' \ | sort -b -k3,3 -k4,4 -k2,2r \ | egrep -v -e '[ ][+]' \ > .inconsistent-dates.txt No inconsitencies in tp00, tp01, tp02. # Inconsistencies in tp03: # # ~ra221525/mc937/2019-03-22 2019-03-22-190500 tp03 : OK, handed in at 19:05. # ~ra148729/mc937/2019-03-22 2019-03-21-161600 tp03 : Exported old file without doing anything. # # ~ra136686/mc937/2019-04-12 2019-04-05-162700 tp06 : Exported old file without doing anything. # # ~ra139511/mc937/2019-04-26 2019-04-26-234400 tp07 : OK, handed in at 23:44. # # ~ra148729/mc937/2019-05-03 2019-05-03-195000 tp08 : OK, handed in at 19:50. # # ~ra139511/mc937/2019-05-10 2019-05-10-211300 tp09 : OK, handed in at 21:13 # # ~ra145715/mc937/2019-05-17 2019-05-17-191400 tp10 : OK, handed in at 19:14 # # ~ra139511/mc937/2019-05-24 2019-05-24-220200 tp11 : OK, handed in at 22:02 # # ~ra139511/mc937/2019-06-07 2019-06-07-220300 tp13 : OK, handed in at 22:03 COLLECTING THE GRADES # for tp in tp{0{1,2,3,4,5,6,7,8,9},1{0,1,2,3}} ; do # ( cd ${tp} && ( echo "#" >> notas-hdr.txt; echo "#" >> notas-tlr.txt ; ../make-labday-grades-file.sh ) ) ; # done CREATING DEFAULT GRADE FILES # make-initial-grade-files.sh tp{0{1,2,3,4,5,6,7,8,9},1{0,1,2,3}} # # Checking: # # for tp in tp{0{1,2,3,4,5,6,7,8,9},1{0,1}} ; do # echo "=== ${tp} ===" # for ra in `list-ras.sh` ; do # printf "%s: " "${ra}" # cat ${tp}/${ra}/nota.txt # done # done CREATING MASTER INDEX make-all-labs-index-page.sh `ls -d tp?? | sort ` CHECKING TP?? EDITS Comparing the tp?? hand-ins with the hand-out ("tp??/main-hand-out.pov"): for ra in `list-ras.sh` ; do echo "=== ${ra} =========================================" prdiff -Bb tp??/main-hand-out.pov tp??/${ra}/main-orig.pov done IDENTIFYING ABSENTEES export handin="/home/stolfilocal/public_html/cursos/MC937-2023-2-A/progs/hand-in" cd ${handin} for tp in tp{0{6,7,8,9},1{0,1,2,3,4}} ; do echo "=== ${tp} ===" pushd ${tp} ( find -name 'main.pov' -print ) \ | sed -e 's:/main.pov.*$::g' \ | sed -e 's:[.]/::g' \ | sort | uniq \ > .pres list-ras.sh \ | sort | uniq \ > .ras bool 1-2 .ras .pres > .absent cat .absent popd done