Rev 2441 | Rev 3070 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
23 | reyssat | 1 | |
1393 | bpr | 2 | !read adm/title.phtml 3\ |
3 | \ |
||
2071 | zjchen | 4 | 练习的二进制文件 |
23 | reyssat | 5 | |
6 | !if $quota=yes |
||
7 | <b>错误</b>. 你不再能放文件到你的班级里, 因为它的内容已经达到或超出硬盘空间的限制. 抱歉. |
||
8 | <p> |
||
9 | !goto sendend |
||
10 | !endif |
||
11 | |||
12 | !set wims_form_method=file |
||
2071 | zjchen | 13 | 你可以上传各种类型的文件 (图像, mp3, pdf, ...). |
14 | |||
23 | reyssat | 15 | !form reply |
2071 | zjchen | 16 | 发送到练习的文件 : |
3049 | bpr | 17 | <input type=file name="wims_deposit"> |
18 | <input type=submit value="发送"> |
||
23 | reyssat | 19 | </form> |
20 | |||
21 | :sendend |
||
22 | !if $imglist=$empty |
||
2071 | zjchen | 23 | 此练习尚无二进制文件. |
23 | reyssat | 24 | !else |
2071 | zjchen | 25 | 这里是本练习的文件表. |
23 | reyssat | 26 | <p><center><table border=2> |
2071 | zjchen | 27 | <th>文件名<th>概要<th>- |
23 | reyssat | 28 | !for i in $imglist |
3049 | bpr | 29 | <tr><td valign="middle" align="center">$i |
30 | <td valign="middle" align="center"> |
||
1086 | bpr | 31 | <img src="$wims_ref_name?cmd=getfile&+session=$wims_session&+special_parm=oefimg/$i" alt="" |
23 | reyssat | 32 | height=40 width=50> |
3049 | bpr | 33 | <td valign="middle" align="center"> |
2071 | zjchen | 34 | !href cmd=reply&delfile=$i $wims_name_erase |
23 | reyssat | 35 | !next i |
36 | $table_end <p> |
||
2071 | zjchen | 37 | !if $imgfname!= |
38 | !set example=$imgfname |
||
39 | !else |
||
23 | reyssat | 40 | !set example=!item 1 of $imglist |
2071 | zjchen | 41 | !endif |
42 | $wims_deposit $imgfname |
||
43 | 在练习陈述中使用内部参数 \imagedir 可以引用这些文件. |
||
44 | !set example1=!lowercase $example |
||
45 | !if .gif isin $example1 or .jpg isin $example1 or .png isin $example1 |
||
46 | !set test_=1 |
||
47 | !endif |
||
48 | !if $test_=1 |
||
49 | !set eximage=$example |
||
50 | !else |
||
51 | !set eximage=file.jpg |
||
52 | !endif |
||
53 | 例如, 你可以写 |
||
23 | reyssat | 54 | <center><pre> |
2071 | zjchen | 55 | !if $test_=1 |
56 | <img src="\imagedir/$example"> |
||
57 | !else |
||
58 | <a href="\imagedir/$example">$example</a>. |
||
59 | !endif |
||
60 | </pre></center> |
||
61 | 对于图形文件, 你可以写 |
||
62 | <tt><img src="\imagedir/$eximage"></tt>, 或 |
||
63 | <tt>\img{\imagedir/$eximage}</tt> 或 |
||
64 | <tt>\img{\imagedir/$eximage}{html 选项}</tt>. |
||
65 | 这个方法的好处是学生看不到文件名. |
||
23 | reyssat | 66 | 由于这样做的代价较大, 请仅在必要时才使用. |
2071 | zjchen | 67 | <p>对于其他类型的文件, 可以使用 html 的命令 : |
68 | <tt><a href="\imagedir/file.pdf">file.pdf</a></tt> ... |
||
23 | reyssat | 69 | !endif |
1393 | bpr | 70 | !set wims_menu_items=!append line \ |
71 | testexo,1,cmd=resume&level=3&realtest=yes&retest=again\ |
||
72 | backcreatexo,1,cmd=reply&level=3\ |
||
73 | to $wims_menu_items |
||
23 | reyssat | 74 | |
1393 | bpr | 75 | !!!href cmd=resume&level=3&realtest=yes&retest=again 测试此练习 |
2071 | zjchen | 76 | |
1393 | bpr | 77 | !!. |
78 | !!!href cmd=reply&level=3 返回菜单 |
||
79 |