Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
17780 | czzmrn | 1 | !! find participant personnal work for the freework wims_read_parm |
2 | !! |
||
3 | !! entry wims_read_parm : |
||
4 | !! item 1 freework to search |
||
5 | !! item 2 participant login |
||
6 | !! output=date,time |
||
7 | !! userfileexists=1/0 1 if user as upload a file in one of the student zone |
||
8 | !! flistusersol= list of corrected file upload by supervisor |
||
9 | |||
10 | !! cfr. adm/class/freework/proc/findfile3.proc |
||
11 | !! |
||
12 | !! This file lists user deposits both for type=2 and for type=3 |
||
13 | |||
14 | fw_=!item 1 of $wims_read_parm |
||
15 | user_=!item 2 of $wims_read_parm |
||
16 | |||
17 | listing_=!sh cd $wims_home/log/classes/$wims_class/freeworksdata/$fw_/work;\ |
||
18 | list=`ls -d $(user_)-* $(user_).* 2>/dev/null`;\ |
||
19 | if [ -n "$$list" ]; then for k in $$list; do stat --format="%y" $$k | awk -F"[ :]" '{b=$$1; gsub(/\-/,"",b); print b","$$2":"$$3}' ; done; fi; |
||
20 | listing_=!sh echo "$listing_" | sort; |
||
21 | !if $listing_!=$empty |
||
22 | output=$(listing_[-1;]) |
||
23 | !else |
||
24 | output=0 |
||
25 | !endif |
||
26 | userfile=!sh cd $wims_home/log/classes/$wims_class/freeworksdata/$fw_/work;\ |
||
27 | ls -al $(user_)-file*/* 2>/dev/null; |
||
28 | !if $userfile!=$empty |
||
29 | userfileexists=1 |
||
30 | flistusersol=!listfile $wims_home/log/classes/$wims_class/freeworksdata/$fw_/co/$(user_)-file |
||
31 | flistusersol=!words2items $flistusersol |
||
32 | !else |
||
33 | userfileexists=0 |
||
34 | flistusersol=$empty |
||
35 | !endif |