EliteConf
 All Data Structures Namespaces Files Functions Variables Pages
AdminviewevaluationsController.php
Go to the documentation of this file.
1 <?php
2 
9 {
10  public function actionIndex()
11  {
12  $this->render('index');
13  }
14 
18  public function comments($paperid)
19  {
20 
22 
23  if(Yii::app()->user->id != NULL)
24  $usid = Yii::app()->user->id;
25  else
26  $usid = 0;
27 
28  //select all conferences that the user has admin as his user type
29  $comment = mysql_query("SELECT * FROM paper_comment WHERE paperid='$paperid'");
30 
31  if(mysql_num_rows($comment)!=0)
32  {
33  while($row = mysql_fetch_array($comment))
34  {
35 
36  $content = $row['content'];
37  $commentid = $row['comment_id'];
38  $referee = mysql_query("SELECT * FROM users WHERE userid IN (SELECT DISTINCT referee_id FROM referee_comment WHERE comment_id='$commentid')");
39 
40  while($row2 = mysql_fetch_array($referee))
41  {
42  $refereename = $row2['username'];
43 
44  echo "<b>" . $refereename . " : </b>" . $content . "<br><br>";
45 
46  }
47  }}
48  else echo "There are no comments for this paper.<br><br>";
49 
50  }
51 
56  public function view_evaluation($paperid)
57  {
58 
60 
61  if(Yii::app()->user->id != NULL)
62  $usid = Yii::app()->user->id;
63  else
64  $usid = 0;
65 
66  //select all conferences that the user has admin as his user type
67  $evaluation = mysql_query("SELECT * FROM paper_evaluation WHERE paper_id='$paperid'");
68 
69  if(mysql_num_rows($evaluation)!=0)
70  {
71  while($row = mysql_fetch_array($evaluation))
72  {
73 
74  $recommendation = $row['recommendation'];
75  $categorization = $row['categorization'];
76  $evaluationid = $row['evaluation_id'];
77  $referee = mysql_query("SELECT * FROM users WHERE userid IN (SELECT DISTINCT referee_id FROM paper_evaluation_referee WHERE evaluation_id='$evaluationid')");
78 
79  while($row2 = mysql_fetch_array($referee))
80  {
81  $refereename = $row2['username'];
82 
83  echo "<b><b>" . $refereename . " : </b></b><br>";
84  echo "<b>Recommendation : </b>" ; echo $this->recommendation($recommendation) . "<br>";
85  echo "<b>Categorization : </b>" ; echo $this->categorization($categorization) . "<br><br>";
86  }
87  }}
88  else echo "There are no evaluations for this paper.<br><br>";
89 
90  }
91 
92  public function recommendation($recommendation)
93  {
94  if($recommendation==0) echo "Reject";
95  else if($recommendation==1) echo "Probable Reject";
96  else if($recommendation==2) echo "Marginal Tend To Reject";
97  else if($recommendation==3) echo "Marginal Tend To Accept";
98  else if($recommendation==4) echo "Probable Accept";
99  else if($recommendation==5) echo "Accept";
100 
101  }
102 
103  public function categorization($categorization)
104  {
105  if($categorization==0) echo "Highly Theoretical";
106  else if($categorization==1) echo "Tends Towards Theoretical";
107  else if($categorization==2) echo "Balanced Theory And Practice";
108  else if($categorization==3) echo "Tends Towards Practical";
109  else if($categorization==4) echo "Highly Practical";
110 
111 
112  }
113 
114  // Uncomment the following methods and override them if needed
115  /*
116  public function filters()
117  {
118  // return the filter configuration for this controller, e.g.:
119  return array(
120  'inlineFilterName',
121  array(
122  'class'=>'path.to.FilterClass',
123  'propertyName'=>'propertyValue',
124  ),
125  );
126  }
127 
128  public function actions()
129  {
130  // return external action classes, e.g.:
131  return array(
132  'action1'=>'path.to.ActionClass',
133  'action2'=>array(
134  'class'=>'path.to.AnotherActionClass',
135  'propertyName'=>'propertyValue',
136  ),
137  );
138  }
139  */
140 }