This repository has been archived by the owner on Jul 1, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gallery.class.php
73 lines (54 loc) · 1.6 KB
/
gallery.class.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<?php
defined('MOODLE_INTERNAL') || die();
class gallery {
protected $data;
public function __construct($id) {
global $DB;
$this->data = $DB->get_record('gallery',array('id'=>$id),'*', MUST_EXIST);
}
public function id() {
return $this->data->id;
}
public function course() {
return $this->data->course;
}
public function name() {
return $this->data->name;
}
public function intro() {
return $this->data->intro;
}
public function introformat() {
return $this->data->introformat;
}
public function showdescription() {
return $this->data->showdescription;
}
public function previewheight() {
return $this->data->previewheight;
}
public function showthumbnails() {
return $this->data->showthumbnails;
}
public function showthumbstitles() {
return $this->data->showthumbstitles;
}
public function showoriginalimage() {
return $this->data->showoriginalimage;
}
public function imageattachments() {
return $this->data->imageattachments;
}
public function completionaddimages() {
return $this->data->completionaddimages;
}
public function completionaddcomments() {
return $this->data->completionaddcomments;
}
public function isValid() {
return !is_null($this->data);
}
public function data() {
return $this->data;
}
}