[moodle] / contrib / plugins / grade / report / visual / visualizations / visualization.php Repository:

Annotation of /contrib/plugins/grade/report/visual/visualizations/visualization.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (view) (download)

1 : dservos 1.1 <?php
2 :    
3 :     class edge {
4 :     public $sortby;
5 :     public $groupby;
6 :    
7 :     public function __construct($sortby = null, $groupby = null) {
8 :     $this->sortby = $sortby;
9 :     $this->groupby = $groupby;
10 :     }
11 :     }
12 :    
13 :     class encoder {
14 :     const ENCODER_DEFUALT = 1;
15 :     const ENCODER_COLOR = 1;
16 :     const ENCODER_SHAPE = 2;
17 :     const ENCODER_SIZE = 3;
18 :    
19 :     private static $counter = 0;
20 :    
21 :     public $id;
22 :    
23 :     public $type;
24 :    
25 :     public $settings;
26 :    
27 :     public $datafield;
28 :    
29 :     public function __construct($type, $datafield, array $settings = null) {
30 :     $this->type = $type;
31 :     $this->settings = $settings;
32 :     $this->datafield = $datafield;
33 :     $this->id = self::$counter++;
34 :     }
35 :     }
36 :    
37 :     class legend {
38 :     public $encoder;
39 :    
40 :     public function __construct($encoder) {
41 :     $this->encoder = $encoder;
42 :     }
43 :     }
44 :    
45 :     abstract class visualization {
46 :    
47 :     const LAYOUT_DEFAULT = 1;
48 :     const LAYOUT_AXIS = 1;
49 :     const LAYOUT_CIRCLE = 2;
50 :     const LAYOUT_DENDROGRAM = 3;
51 :     const LAYOUT_FORCEDIRECTED = 4;
52 :     const LAYOUT_INDENTEDTREE = 5;
53 :     const LAYOUT_NODELINKTREE = 6;
54 :     const LAYOUT_PIE = 7;
55 :     const LAYOUT_RADIALTREE = 8;
56 :     const LAYOUT_RANDOM = 9;
57 :     const LAYOUT_STACKEDAREA = 10;
58 :     const LAYOUT_TREEMAP = 11;
59 :    
60 :     const SHAPE_BEZIER = 1;
61 :     const SHAPE_BLOCK = -1;
62 :     const SHAPE_CARDINAL = 2;
63 :     const SHAPE_HORIZONTAL_BAR = -5;
64 :     const SHAPE_LINE = 0;
65 :     const SHAPE_POLYBLOB = -3;
66 :     const SHAPE_POLYGON = -2;
67 :     const SHAPE_VERTICAL_BAR = -4;
68 :     const SHAPE_WEDGE = -6;
69 :    
70 :    
71 :     public $name;
72 :    
73 :     public $layout = self::LAYOUT_DEFAULT;
74 :    
75 :     public $layoutsettings = null;
76 :    
77 :     public $edges = null;
78 :    
79 :     public $nodeshape = null;
80 :    
81 :     public $edgeshape = null;
82 :    
83 :     public $font = 'monospace';
84 :    
85 :     public $fontsize = 20;
86 :    
87 :     public $legends = null;
88 :    
89 :     public $xaxis;
90 :    
91 :     public $yaxis;
92 :    
93 :     public $xaxislabelformat;
94 :    
95 :     public $yaxislabelformat;
96 :    
97 :     public $xaxismin;
98 :    
99 :     public $xaxismax;
100 :    
101 :     public $yaxismin;
102 :    
103 :     public $yaxismax;
104 :    
105 :     public $xaxislabel;
106 :    
107 :     public $yaxislabel;
108 :    
109 :     public $yaxisyoffset;
110 :    
111 :     public $yaxisxoffset;
112 :    
113 :     public $xaxisyoffset;
114 :    
115 :     public $xaxisxoffset;
116 :    
117 :     public $title;
118 :    
119 :     public $capabilities = null;
120 :    
121 :     public $encoders = null;
122 :    
123 :     public $backgroundcolor = 'ffffff';
124 :    
125 :     public $width = 800;
126 :    
127 :     public $height = 600;
128 :    
129 :     public $framerate = 30;
130 :    
131 :     public $quality = "high";
132 :    
133 :     public $popupbgcolor = '7777ff';
134 :    
135 :     public $popupbgalpha = 0.60;
136 :    
137 :     public $popuplinecolor = '0000ff';
138 :    
139 :     public $popuplinealpha = 0.3;
140 :    
141 :     public $popuplinesize = 3;
142 :    
143 :     public $popupfont = 'monospace';
144 :    
145 :     public $popupfontsize = 12;
146 :    
147 :     public $buttonbgcolor = '9999FF';
148 :    
149 :     public $buttonbgalpha = 0.6;
150 :    
151 :     public $buttonfont = 'monospace';
152 :    
153 :     public $buttonfontsize = 12;
154 :    
155 :     public $buttonlinesize = 1;
156 :    
157 :     public $buttonlinecolor = '4444FF';
158 :    
159 :     public $buttonlinealpha = 0.3;
160 :    
161 :     public function __construct($name) {
162 :     $this->name = $name;
163 :     }
164 :    
165 :     abstract public function report_data($visualreport);
166 :     }
167 :    
168 :     ?>

Moodle CVS Admin
ViewVC Help
Powered by ViewVC 1.0.7