summaryrefslogtreecommitdiff
path: root/CFD/casestudy-dev-doc.rst
blob: d1925f6793f2640a0c787d4acc8ce073ec00403f (plain)
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
Document Information
====================

Name of the Document: Developer Documentation for Case Study Feature

Date: 11/05/2017

Author: Priyanka Bhagwat

Designation: Software Engineer

Introduction
============

The Case Studies Project aims to promote open source software, such as
OpenFOAM by developing complex case studies using OpenFOAM available to
CFD researchers and users for reference and usage. The participants of
this project can share complex computation problems for this purpose.

Assumptions
===========

It is assumed that the readers of this document are familiar with the
Drupal 7, PHP, MySQL and software engineering. It is also assumed that
the required resources will be available to achieve the objectives of
the plan.

Module Requirements
===================

To achieve this feature the following modules are required

Views

Panels

Entity

Token

Entity\_reference

Rules,

Date,

Link,

Linkicon,

Ctools,

Fieldaccess

Auto\_entitylabel

Disable Field

Field collection

Field Conditional State

SMTP Authentication Support


**Structure-> Field collection-> Field collection field\_personal\_details**


|image111|


**Create-> Content Types -> Case Study Proposal**

**Purpose-** To propose the case study project using the proposal form.

**Modules used (other than core)** -

-  Field Conditional State-When the user selects the checkbox, the
       respective fields are visible.

-  Field Collection- field\_personal\_details field collection is used

-  Date

|image1|

**Create-> Content Types -> Case Study Code Submission**

**Purpose-** To submit the case study codes once the proposal is
accepted.

**Modules used (other than core)** -

-  Date

|image2|


**View**

**Structure -> Views ->Case Study**

1. **Manage Proposal.**

    **Purpose-** This is the admin interface for the reviewer to
    accept/reject the case study proposal.

    **URL-**
    `*http://cfd.fossee.in/case-study/manage-proposal* <http://cfd.fossee.in/case-study/manage-proposal>`__

    **Roles-** Administrator, Case Study Reviewer

    **Query-**

	 SELECT node.title AS node\_title, node.nid AS nid, node.created AS
	 node\_created, 'node' AS
	 field\_data\_field\_case\_study\_status\_node\_entity\_type
	 FROM
	 {node} node
	 WHERE (( (node.status = '1') AND (node.type IN
	 ('case\_study\_proposal')) ))
	 ORDER BY node\_created DESC
	 LIMIT 25 OFFSET 0

    Description

-  The display is in the table format

-  The view is filtered by the criteria - Case study proposal and
       whether the content is published

|image3|

2. **In Progress**

    **Purpose-** This page displays the case studies in progress. The
    Proposals that are approved but not competed.

    **URL-**
    `*http://cfd.fossee.in/case-study/cs-in-progress* <http://cfd.fossee.in/case-study/cs-in-progress>`__

    **Roles-** All

    **Query -**

	 SELECT node.title AS node\_title, node.created AS node\_created
	 FROM
	 {node} node
	 LEFT JOIN {field\_data\_field\_case\_study\_title}
	 field\_data\_field\_case\_study\_title ON node.nid =
	 field\_data\_field\_case\_study\_title.field\_case\_study\_title\_target\_id
	 AND (field\_data\_field\_case\_study\_title.entity\_type = 'node' AND
	 field\_data\_field\_case\_study\_title.deleted = '0')
	 LEFT JOIN {node} field\_case\_study\_title\_node ON
	 field\_data\_field\_case\_study\_title.entity\_id =
	 field\_case\_study\_title\_node.nid
	 INNER JOIN {field\_data\_field\_case\_study\_status}
	 field\_data\_field\_case\_study\_status ON node.nid =
	 field\_data\_field\_case\_study\_status.entity\_id AND
	 (field\_data\_field\_case\_study\_status.entity\_type = 'node' AND
	 field\_data\_field\_case\_study\_status.deleted = '0')
	 LEFT JOIN {field\_data\_field\_code\_submission\_status}
	 field\_case\_study\_title\_node\_\_field\_data\_field\_code\_submission\_status
	 ON field\_case\_study\_title\_node.nid =
	 field\_case\_study\_title\_node\_\_field\_data\_field\_code\_submission\_status.entity\_id
	 AND
	 field\_case\_study\_title\_node\_\_field\_data\_field\_code\_submission\_status.field\_code\_submission\_status\_value
	 = 'Reject'
	 INNER JOIN {field\_data\_field\_code\_submission\_status}
	 field\_data\_field\_code\_submission\_status ON node.nid =
	 field\_data\_field\_code\_submission\_status.entity\_id AND
	 (field\_data\_field\_code\_submission\_status.entity\_type = 'node'
	 AND field\_data\_field\_code\_submission\_status.deleted = '0')
	 WHERE (( (node.status = '1') AND (node.type IN
	 ('case\_study\_proposal')) AND
	 (field\_data\_field\_case\_study\_status.field\_case\_study\_status\_value
	 = 'Approve') AND
	 (field\_case\_study\_title\_node\_\_field\_data\_field\_code\_submission\_status.field\_code\_submission\_status\_value
	 IS NULL ) AND
	 (field\_data\_field\_code\_submission\_status.field\_code\_submission\_status\_value
	 = 'Complete') ))
	 ORDER BY node\_created DESC
	 LIMIT 25 OFFSET 0

    **Description**

-  The display is in the table format

-  The view is filtered by the criteria -

   -  Case study proposal

   -  Content is published

   -  Proposal Status


|image4|

3. **Code Submission**

    **Purpose-** This is the interface where the user can submit the
    codes once the proposal is accepted

    **URL-**
    `*http://cfd.fossee.in/case-study/cs-code-submission* <http://cfd.fossee.in/case-study/cs-code-submission>`__

    **Roles-** All

    **Query-**

	 SELECT node.title AS node\_title, node.nid AS nid,
	 field\_case\_study\_title\_node.nid AS
	 field\_case\_study\_title\_node\_nid, node.created AS node\_created,
	 'node' AS field\_data\_field\_upload\_cs\_zip\_node\_entity\_type
	 FROM
	 {node} node
	 LEFT JOIN {field\_data\_field\_case\_study\_title}
	 field\_data\_field\_case\_study\_title ON node.nid =
	 field\_data\_field\_case\_study\_title.field\_case\_study\_title\_target\_id
	 AND (field\_data\_field\_case\_study\_title.entity\_type = 'node' AND
	 field\_data\_field\_case\_study\_title.deleted = '0')
	 LEFT JOIN {node} field\_case\_study\_title\_node ON
	 field\_data\_field\_case\_study\_title.entity\_id =
	 field\_case\_study\_title\_node.nid
	 LEFT JOIN {field\_data\_field\_upload\_cs\_zip}
	 field\_case\_study\_title\_node\_\_field\_data\_field\_upload\_cs\_zip
	 ON field\_case\_study\_title\_node.nid =
	 field\_case\_study\_title\_node\_\_field\_data\_field\_upload\_cs\_zip.entity\_id
	 AND
	 (field\_case\_study\_title\_node\_\_field\_data\_field\_upload\_cs\_zip.entity\_type
	 = 'node' AND
	 field\_case\_study\_title\_node\_\_field\_data\_field\_upload\_cs\_zip.deleted
	 = '0')
	 INNER JOIN {field\_data\_field\_case\_study\_status}
	 field\_data\_field\_case\_study\_status ON node.nid =
	 field\_data\_field\_case\_study\_status.entity\_id AND
	 (field\_data\_field\_case\_study\_status.entity\_type = 'node' AND
	 field\_data\_field\_case\_study\_status.deleted = '0')
	 WHERE (( (node.uid = '1' ) )AND(( (node.status = '1') AND (node.type
	 IN ('case\_study\_proposal')) AND
	 (field\_case\_study\_title\_node\_\_field\_data\_field\_upload\_cs\_zip.field\_upload\_cs\_zip\_fid
	 IS NULL ) AND
	 (field\_data\_field\_case\_study\_status.field\_case\_study\_status\_value
	 = 'Approve') )))
	 ORDER BY node\_created DESC
	 LIMIT 25 OFFSET 0

   **Description**

-  The display is in the table format

-  The view is filtered by the criteria -

   -  Case study proposal

   -  Content is published

   -  Proposal Status

|image5|

4. **Manage code**

    **Purpose-** This is the admin interface for the reviewer to
    accept/reject the case study codes are submitted.

    **URL-**
    `*http://cfd.fossee.in/case-study/cs-manage-code* <http://cfd.fossee.in/case-study/cs-manage-code>`__

    **Roles-** Administrator, Case Study Reviewer

    **Query-**
	SELECT node.title AS node\_title, node.nid AS nid, node.created AS node\_created, 'node' AS field\_data\_field\_code\_submission\_status  \_node\_entity\_type FROM
	{node}node                                                         
	WHERE (( (node.status = '1') AND (node.type IN 'case\_study\_code\_submission')) 
	ORDER BY node\_created DESC
	LIMIT 25 OFFSET 0  
                                                                                                                     
    **Description**

-  The display is in the table format

-  The view is filtered by the criteria -

   -  Case study proposal

   -  Content is published

   -  Proposal Status

|image6|

5. **Completed Case Studies**

    **Purpose-** This is the admin interface for the reviewer to
    accept/reject the case study codes are submitted.

    **URL-**
    `*http://cfd.fossee.in/case-study/cs-code-submission* <http://cfd.fossee.in/case-study/cs-code-submission>`__

    **Roles-** Administrator, Case Study Reviewer

    **Query**
	SELECT node.title AS node\_title, node.nid AS nid, field\_case\_study\_title\_node.nid AS field\_case\_study\_title\_node\_nid, node.created AS node\_created, 'node' AS field\_data\_field\_attachment\_node\_entity\_type, 'node' AS field\_data\_field\_upload\_cs\_zip\_node\_entity\_type, 'node' AS field\_data\_field\_personal\_details\_node\_entity\_type                                      {node} node                                                                 
	LEFT JOIN {field\_data\_field\_case\_study\_title} field\_data\_field\_case\_study\_title ON node.nid = field\_data\_field\_case\_study\_title.field\_case\_study\_title\_target\_id AND (field\_data\_field\_case\_study\_title.entity\_type = 'node' AND field\_data\_field\_case\_study\_title.deleted = '0')                            
	LEFT JOIN {node} field\_case\_study\_title\_node ON field\_data\_field\_case\_study\_title.entity\_id = field\_case\_study\_title\_node.nid                                                                           INNER JOIN {field\_data\_field\_code\_submission\_status} field\_case\_study\_title\_node\_\_field\_data\_field\_code\_submission\_status ON field\_case\_study\_title\_node.nid = field\_case\_study\_title\_node\_\_field\_data\_field\_code\_submission\_status.entity\_id AND (field\_case\_study\_title\_node\_\_field\_data\_field\_code\_submission\_status.entity\_type = 'node' AND field\_case\_study\_title\_node\_\_field\_data\_field\_code\_submission\_status.deleted = '0')   |
	 WHERE (( (node.status = '1') AND (node.type IN ('case\_study\_proposal')) AND (field\_case\_study\_title\_node\_\_field\_data\_field\_code\_submission\_status.field\_code\_submission\_status\_value = 'Complete') ))  
	 ORDER BY node\_created DESC                                            |
	 LIMIT 25 OFFSET 0 
    **Description**

-  The display is in the table format

-  The view is filtered by the criteria -

   -  Case study proposal

   -  Content is published

   -  Proposal Status

|image7|

6. **Attachment- After code submission**

    **Purpose-** This is the admin interface for the reviewer to
    accept/reject the case study codes are submitted.

    **URL-**
    `*http://cfd.fossee.in/case-study/cs-code-submission* <http://cfd.fossee.in/case-study/cs-code-submission>`__

    **Roles-** Administrator, Case Study Reviewer

    **Query**
	SELECT node.title AS node\_title, node.nid AS nid, node.created AS node\_created, 'node' AS field\_data\_field\_upload\_cs\_zip\_node\_entity\_type    
	FROM                                                                 
	{node} node                                                           
	WHERE (( (node.uid = '1' ) )AND(( (node.status = '1') AND (node.type IN ('case\_study\_code\_submission')) )))                                         
	ORDER BY node\_created DESC                                          
		LIMIT 10 OFFSET 0                                                                                                                            
    Description

-  The display is in the table format

-  The view is filtered by the criteria -

   -  Case study proposal

   -  Content is published

   -  Proposal Status

|image8|

**Configuration -> Workflow -> Rules**

The Rules module allows site administrators to define conditionally
executed actions based on occurring events

On approval CS

.. |image111| image:: media/personaldetailsFC.png
   :width: 6.65104in
   :height: 2.37500in
.. |image1| image:: media/CT-proposal.png
   :width: 6.71875in
   :height: 5.14063in
.. |image2| image:: media/CT-submission.png
   :width: 6.27083in
   :height: 2.38021in
.. |image3| image:: media/manage-proposal.png
   :width: 6.91146in
   :height: 3.77083in
.. |image4| image:: media/in-progress.png
   :width: 6.96354in
   :height: 3.97917in
.. |image5| image:: media/code-submission.png
   :width: 6.95313in
   :height: 4.10417in
.. |image6| image:: media/manage-code.png
   :width: 6.80729in
   :height: 3.98958in
.. |image7| image:: media/competed-cs.png
   :width: 6.86979in
   :height: 4.19792in
.. |image8| image:: media/after-code-sub.png
   :width: 6.26772in
   :height: 2.90278in