Skip to content

Commit

Permalink
Suggestion design Complete. Milestone Complete
Browse files Browse the repository at this point in the history
This was the last thing to be done in this version. Suggestion system is
all stable now. There were some errrors in the percentange calculation
system.
piyushparkash committed Jan 9, 2016
1 parent 5c18649 commit bbd1f83
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions vanshavali/suggest.php
Original file line number Diff line number Diff line change
@@ -105,7 +105,7 @@ public function checkpercent() {
//Get all Rejections, Approvals, Dontknow's
$query = $db->query("select * from suggest_approved where suggest_id=" . $this->id);
$row2 = $db->get('select count(*) as totaluser from member where username!="" and password!=""');
$total = (float)mysql_num_rows($query);
$total = (float) $row2['totaluser'];
$noapproved = 0.0;
$norejected = 0.0;
$nodontknow = 0.0;
@@ -123,9 +123,9 @@ public function checkpercent() {
break;
}
}
$noapproved = (float)($noapproved / $total) * 100;
$nodontknow = (float)($nodontknow / $total) * 100;
$norejected = (float)($norejected / $total) * 100;
$noapproved = (float) ($noapproved / $total) * 100;
$nodontknow = (float) ($nodontknow / $total) * 100;
$norejected = (float) ($norejected / $total) * 100;

//If approved>50 then accept the suggestion
//if rejected>50 then reject the suggestion

0 comments on commit bbd1f83

Please sign in to comment.