123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101 |
- <?php
- require_once('Resource.class.php');
- class Quiz extends Resource
- {
-
- var $title;
-
- var $description;
-
- var $random;
-
- var $quiz_type;
-
- var $active;
-
- var $media;
-
- var $question_ids;
-
- var $attempts;
-
- function Quiz($id,$title,$description,$random,$type,$active,$media,$attempts=0)
- {
- parent::Resource($id,RESOURCE_QUIZ);
- $this->title = $title;
- $this->description = $description;
- $this->random = $random;
- $this->quiz_type = $type;
- $this->active = $active;
- $this->media = $media;
- $this->attempts = $attempts;
- $this->question_ids = array();
- }
-
- function add_question($id)
- {
- $this->question_ids[] = $id;
- }
-
- function show()
- {
- parent::show();
- echo $this->title;
- }
- }
- ?>
|