Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Bist Du *? - selbstgemacht
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) Diskussionsforum
View previous topic :: View next topic  
Author Message
slick
Bodhisattva
Bodhisattva


Joined: 20 Apr 2003
Posts: 3495

PostPosted: Wed Apr 19, 2006 1:08 pm    Post subject: Bist Du *? - selbstgemacht Reply with quote

Hier nochwas für Testwillige...

http://www.deruwe.de/files/gentoo/wissenstest/fragen.php

Da so ein Test einfach zu stricken ist hier der passende (sicher nicht perfekte) Code dazu, falls jemand selbst so ein Umfrage bauen möchte.

English users please go here so see the "international version" ;-)

Code:
<html><head><title></title></head><body><form method="post" action="<?php echo $PHP_SELF; ?>">

<?php

$fragen = array(
   array(
      array('Erste Frage?',2), // Frage, Nr. richtige Antwort (arraykey+1)
      array( // Antworten
         'falsche Antwort',
         'richtige Antwort',
         'falsche Antwort',
         'falsche Antwort'
      )
   ),
   array(
      array('Zweite Frage?',1), // Frage, Nr. richtige Antwort (arraykey+1)
      array( // Antworten
         'richtige Antwort',
         'falsche Antwort',
         'falsche Antwort',
         'falsche Antwort'
      )
   )
);

if (! $_POST['submit']) {
   $i=0;
   foreach ($fragen as $frage) {
      echo '<p><b>'.$frage[0][0].'</b></p><p>'."\n";
      $j=1;
      foreach ($frage[1] as $antwort) {
         echo '<input type="radio" name="a'.$i.'" value="'.$j.'" /> '.$antwort.' <br />'."\n";
         $j++;
      }
      echo '</p>'."\n";
      $i++;
   }
   echo '<p><input type="submit" name="submit" value=" Auswertung anzeigen " /></p>';
} else {
   $i=0;
   $korrekt=0;
   foreach ($fragen as $frage) {
      if ($_POST['a'.$i] == $frage[0][1]) {
         $korrekt++;
      }
      $i++;
   }
   echo '<p>Du hast '.$korrekt.' von '.count($fragen).' Fragen richtig beantwortet.</p>';
}
?>
</form></body></html>


EDIT: URL geändert


Last edited by slick on Tue May 09, 2006 7:48 am; edited 5 times in total
Back to top
View user's profile Send private message
dakjo
Veteran
Veteran


Joined: 31 Jan 2004
Posts: 1544

PostPosted: Wed Apr 19, 2006 1:31 pm    Post subject: Reply with quote

Juchuuuuuuuuuuu 'Du hast 15 von 15 Fragen richtig beantwortet'
Back to top
View user's profile Send private message
Finswimmer
Bodhisattva
Bodhisattva


Joined: 02 Sep 2004
Posts: 5467
Location: Langen (Hessen), Germany

PostPosted: Wed Apr 19, 2006 1:32 pm    Post subject: Reply with quote

Du hast 14 von 15 Fragen richtig beantwortet

Nah dran, und was war jetzt falsch? ;)

Tobi
_________________
Bitte auf Rechtschreibung, korrekte Formatierung und Höflichkeit achten!
Danke
Back to top
View user's profile Send private message
slick
Bodhisattva
Bodhisattva


Joined: 20 Apr 2003
Posts: 3495

PostPosted: Wed Apr 19, 2006 1:40 pm    Post subject: Reply with quote

dakjo wrote:
Juchuuuuuuuuuuu 'Du hast 15 von 15 Fragen richtig beantwortet'

Finswimmer wrote:
Du hast 14 von 15 Fragen richtig beantwortet

Da sieht man den Unterschied von Veteran zu l33t ;-) 8)
Back to top
View user's profile Send private message
Roller
Tux's lil' helper
Tux's lil' helper


Joined: 22 Jan 2005
Posts: 114
Location: Esslingen/Germany

PostPosted: Wed Apr 19, 2006 1:41 pm    Post subject: Reply with quote

slick wrote:
dakjo wrote:
Juchuuuuuuuuuuu 'Du hast 15 von 15 Fragen richtig beantwortet'

Finswimmer wrote:
Du hast 14 von 15 Fragen richtig beantwortet

Da sieht man den Unterschied von Veteran zu l33t ;-) 8)


Dann stimmt bei mir aber was nicht:
"Du hast 15 von 15 Fragen richtig beantwortet"
Back to top
View user's profile Send private message
c_m
Guru
Guru


Joined: 29 Jun 2005
Posts: 358

PostPosted: Wed Apr 19, 2006 1:45 pm    Post subject: Reply with quote

13 :oops:
Naja, mit Bugreports mach ich nicht viel und Gentoos kannt ich nicht ^^
Back to top
View user's profile Send private message
Finswimmer
Bodhisattva
Bodhisattva


Joined: 02 Sep 2004
Posts: 5467
Location: Langen (Hessen), Germany

PostPosted: Wed Apr 19, 2006 1:56 pm    Post subject: Reply with quote

Ok. Fehler gefunden.
Dumme Tiere ;) Sind für mich alles gaaaaaanz süße putzige Pinguine :)


Tobi
_________________
Bitte auf Rechtschreibung, korrekte Formatierung und Höflichkeit achten!
Danke
Back to top
View user's profile Send private message
smg
Veteran
Veteran


Joined: 13 Aug 2004
Posts: 1402
Location: /home/stephan

PostPosted: Wed Apr 19, 2006 2:23 pm    Post subject: Reply with quote

Quote:
Du hast 15 von 15 Fragen richtig beantwortet


Juhu!
_________________
GnuPG-Key-ID: 0xF8C275D4
Fingerprint: 5B6F 134A 189B A24D 342B 0961 8D4B 0230 F8C2 75D4
Code:
perl -WTe '($")=$/;print qq(@{[reverse('0'..'100')]}$/BOOM!$/);'
Back to top
View user's profile Send private message
ian!
Bodhisattva
Bodhisattva


Joined: 25 Feb 2003
Posts: 3829
Location: Essen, Germany

PostPosted: Wed Apr 19, 2006 2:58 pm    Post subject: Reply with quote

Coole Idee!

Quote:
Du hast 15 von 15 Fragen richtig beantwortet


Hätte wer was anderes erwartet? :wink:
_________________
"To have a successful open source project, you need to be at least somewhat successful at getting along with people." -- Daniel Robbins
Back to top
View user's profile Send private message
treor
Apprentice
Apprentice


Joined: 03 May 2005
Posts: 174
Location: germany

PostPosted: Wed Apr 19, 2006 3:05 pm    Post subject: Reply with quote

14/15 weil ich direkt bei der 1 pinguin ancklicken wollte aber irgendwie auf de kuh gelandet bin ^^
Back to top
View user's profile Send private message
slick
Bodhisattva
Bodhisattva


Joined: 20 Apr 2003
Posts: 3495

PostPosted: Wed Apr 19, 2006 3:08 pm    Post subject: Reply with quote

ian! wrote:
Coole Idee!


Wer den Test eigenständig erweitern will (oder einfach nur schummeln weil er nicht über 10 kommt :twisted:) hier die Fragen passend für das Script oben.

EDIT: URL geändert


Last edited by slick on Wed Apr 19, 2006 9:12 pm; edited 2 times in total
Back to top
View user's profile Send private message
l3u
Advocate
Advocate


Joined: 26 Jan 2005
Posts: 2616
Location: Konradsreuth (Germany)

PostPosted: Wed Apr 19, 2006 3:39 pm    Post subject: Reply with quote

Laaangweilig ;-)
Back to top
View user's profile Send private message
b3cks
Veteran
Veteran


Joined: 23 Mar 2004
Posts: 1481
Location: Bremen (GER)

PostPosted: Wed Apr 19, 2006 4:21 pm    Post subject: Reply with quote

Libby wrote:
Laaangweilig ;-)

++
Quote:
Du hast 15 von 15 Fragen richtig beantwortet

Da fehlt ein Punkt! ;)
_________________
I am /root and if you see me laughing you better have a backup.
Back to top
View user's profile Send private message
Uncle Enzo
n00b
n00b


Joined: 15 Feb 2006
Posts: 28
Location: Bern / Switzerland

PostPosted: Wed Apr 19, 2006 4:38 pm    Post subject: Reply with quote

Quote:
Du hast 15 von 15 Fragen richtig beantwortet


hui kewl :P
Back to top
View user's profile Send private message
Ctrl+Alt+Del
Guru
Guru


Joined: 04 Jul 2004
Posts: 326
Location: .de

PostPosted: Wed Apr 19, 2006 4:44 pm    Post subject: Reply with quote

Du hast 15 von 15 Fragen richtig beantwortet
der war zu einfach :)
Back to top
View user's profile Send private message
Storm.Xapek.de
Tux's lil' helper
Tux's lil' helper


Joined: 09 Feb 2006
Posts: 97

PostPosted: Wed Apr 19, 2006 7:01 pm    Post subject: Reply with quote

14 von 15, hab die Forum-Frage nicht richtig gelesen.
Aber eigentlich garnciht so schlecht, kann man den test noch erweitern?
Dann könnten wir so ne Art Einbürgerungstest draus machen :-)
Back to top
View user's profile Send private message
tost
Guru
Guru


Joined: 10 Dec 2005
Posts: 506

PostPosted: Wed Apr 19, 2006 7:09 pm    Post subject: Reply with quote

Hehe bevor man sich registrieren kann mal so 20 Fragen davon stellen :D

14 von 15 :oops:

tost
Back to top
View user's profile Send private message
slick
Bodhisattva
Bodhisattva


Joined: 20 Apr 2003
Posts: 3495

PostPosted: Wed Apr 19, 2006 7:55 pm    Post subject: Reply with quote

Storm.Xapek.de wrote:
Aber eigentlich garnciht so schlecht, kann man den test noch erweitern?

slick wrote:
Wer den Test eigenständig erweitern will (oder einfach nur schummeln weil er nicht über 10 kommt :twisted:) hier die Fragen passend für das Script oben.

Kann jeder kopieren und frei umbauen/erweitern... ich freu mich darauf...
Back to top
View user's profile Send private message
hoschi
Advocate
Advocate


Joined: 19 Jul 2003
Posts: 2517
Location: Ulm, Germany, Europe

PostPosted: Wed Apr 19, 2006 10:22 pm    Post subject: Reply with quote

15 von 15 :D
Danke fuer den Code, und den Test ;)

Kriege ich jetzt LPIC 1 ?
_________________
Just you and me strogg!
Back to top
View user's profile Send private message
mrsteven
Veteran
Veteran


Joined: 04 Jul 2003
Posts: 1939

PostPosted: Wed Apr 19, 2006 10:44 pm    Post subject: Reply with quote

15/15. Was habe ich gewonnen?
Back to top
View user's profile Send private message
ConiKost
Developer
Developer


Joined: 11 Jan 2005
Posts: 1371

PostPosted: Wed Apr 19, 2006 10:47 pm    Post subject: Reply with quote

*freu*

Quote:
Du hast 15 von 15 Fragen richtig beantwortet
Back to top
View user's profile Send private message
slick
Bodhisattva
Bodhisattva


Joined: 20 Apr 2003
Posts: 3495

PostPosted: Thu Apr 20, 2006 7:08 am    Post subject: Reply with quote

Aufgrund des netten Feedbacks hier der Test Nr. 2, diesmal etwas schwieriger - na wer schafft es ohne zu schummeln auf 15 Punkte? Die Fragen als Array gibts auch wieder extra.
Back to top
View user's profile Send private message
zworK
Guru
Guru


Joined: 07 May 2004
Posts: 308

PostPosted: Thu Apr 20, 2006 9:34 am    Post subject: Reply with quote

15/15 beim ersten :D
13/15 beim zweiten. Hab mich mit dem $PORTAGE_TMPDIR verhauen. Die drittletzte konnte ich nicht wissen, da nie gemacht.

Aber schöne Fragen :wink:


Last edited by zworK on Thu Apr 20, 2006 9:53 am; edited 1 time in total
Back to top
View user's profile Send private message
pablo_supertux
Advocate
Advocate


Joined: 25 Jan 2004
Posts: 2953
Location: Somewhere between reality and Middle-Earth and in Freiburg (Germany)

PostPosted: Thu Apr 20, 2006 9:48 am    Post subject: Reply with quote

"Du hast 15 von 15 Fragen richtig beantwortet" Yahooooooooo... :)
_________________
A! Elbereth Gilthoniel!
silivren penna míriel
o menel aglar elenath,
Gilthoniel, A! Elbereth!
Back to top
View user's profile Send private message
slick
Bodhisattva
Bodhisattva


Joined: 20 Apr 2003
Posts: 3495

PostPosted: Thu Apr 20, 2006 10:10 am    Post subject: Reply with quote

Und weil so schnell der Arbeitstag vorbeigeht, hier noch ein ganz anderer Test. :twisted:
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) Diskussionsforum All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum