From b1b0d75831b3d81c41549358dde122b9fba0c054 Mon Sep 17 00:00:00 2001 From: "gasperfele@fri1.uni-lj.si" Date: Thu, 23 Mar 2017 07:40:07 +0000 Subject: the edit_find_grep_compile_convert task now works git-svn-id: https://svn.lusy.fri.uni-lj.si/kpov-public-svn/kpov-public@407 5cf9fbd1-b2bc-434c-b4b7-e852f4f63414 --- kpov_judge/tasks/vlc_stream_rtp/task.py | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'kpov_judge/tasks/vlc_stream_rtp') diff --git a/kpov_judge/tasks/vlc_stream_rtp/task.py b/kpov_judge/tasks/vlc_stream_rtp/task.py index 4ae435d..ea9b905 100644 --- a/kpov_judge/tasks/vlc_stream_rtp/task.py +++ b/kpov_judge/tasks/vlc_stream_rtp/task.py @@ -9,12 +9,11 @@ instructions = { 'si':u""" Postavi navidezni računalnik SimpleArbiter z diska simpleArbiter ter StudentVLC z diska student-VLC. Poskrbi, da bosta na istem omrežju, od -koder bosta imela dostop tudi do Interneta -Na StudentVLC posodobi datoteko /etc/apt/sources.list, preveri posodobitve in -naloži VLC. +koder bosta imela dostop tudi do Interneta Na StudentVLC posodobi datoteko +/etc/apt/sources.list, preveri posodobitve in naloži VLC. Posnemi ali kako drugače ustvari film ter poskrbi, da bo film dostopen na -lokalnem omrežju prek RTP z imenom toka {TOK} na naslovu {NASLOV}. +lokalnem omrežju prek RTP z imenom toka {TOK} na naslovu {NASLOV}, vrata {PORT}. Računaj, da bodo film lahko videli tvoji sošolci. Kršenje avtorskih pravic je pri reševanju te naloge strogo prepovedano. """, @@ -27,7 +26,7 @@ VLC. Record or otherwise create a movie and make sure the movie is avaliable on your local network via RTP with the name of the stream {TOK} at the address -{NASLOV}. +{NASLOV} on port {PORT}. Take into account that the movie may be seen by your classmates. Copyright infrigement while solving this task is strictly prohibited. @@ -102,15 +101,19 @@ def task_check(results, params): p1_d = p1_l[1:-1] p1_s = "" for i in p1_d: - p1_s += "".join([j for j in i.split(' ')[1:]]) - sname = "".join([ hex(ord(i))[2:] for i in params['TOK']]) + p1_s = p1_s + "".join([j.strip() for j in i.split(' ')[1:]]) + sname = "".join([hex(ord(i))[2:] for i in params['TOK']]) if p1_s.find(sname) > 2: score += 5 - s = "IP [^ ]* > {}.{}: UDP, length [0-9]+\n\r".format( + else: + hints.append("stream name not found in stream announcement") + s = "IP [^ ]* > {}.{}: UDP, length [0-9]+".format( re.escape(params['NASLOV']), params['PORT']) if re.search(s, results['tcpdump']): score += 5 + else: + hints.append("RTP stream not detected in " + results['tcpdump']) return score, hints def prepare_disks(templates, task_params, global_params): -- cgit v1.2.1