Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Curriculum-Request
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Tim Steiner
Curriculum-Request
Commits
23ec7100
Commit
23ec7100
authored
15 years ago
by
Tim Steiner
Browse files
Options
Downloads
Patches
Plain Diff
Added parameter for votes to table (no UI yet) on voting approval action.
parent
6813b59c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
application/modules/requests/models/ApprovalActionVoteModel.php
+7
-2
7 additions, 2 deletions
...ation/modules/requests/models/ApprovalActionVoteModel.php
application/modules/ucc/controllers/ReportsController.php
+5
-5
5 additions, 5 deletions
application/modules/ucc/controllers/ReportsController.php
with
12 additions
and
7 deletions
application/modules/requests/models/ApprovalActionVoteModel.php
+
7
−
2
View file @
23ec7100
...
...
@@ -49,7 +49,7 @@ class Requests_ApprovalActionVoteModel extends Requests_ApprovalActionQueueModel
foreach
(
$records
as
$record
)
{
$objectId
=
$record
[
'approvalAction'
];
$date
=
$record
[
'date'
];
$objects
[
$objectId
]
->
_data
[
'dates'
][]
=
new
Zend_Date
(
$date
);
$objects
[
$objectId
]
->
_data
[
'dates'
][]
=
new
Zend_Date
(
$date
);
}
if
(
Unl_Util
::
isArray
(
$objects
))
{
...
...
@@ -215,7 +215,7 @@ class Requests_ApprovalActionVoteModel extends Requests_ApprovalActionQueueModel
foreach
(
$votes
as
$vote
)
{
$voteTally
[
$vote
[
'vote'
]]
++
;
}
if
(
$voteTally
[
'Table'
]
>=
2
)
{
if
(
$voteTally
[
'Table'
]
>=
$this
->
getVotesToTable
()
)
{
$request
->
setState
(
'Table'
);
continue
;
}
...
...
@@ -249,6 +249,11 @@ class Requests_ApprovalActionVoteModel extends Requests_ApprovalActionQueueModel
return
$this
->
_data
[
'quorum'
];
}
public
function
getVotesToTable
()
{
return
$this
->
_data
[
'votesToTable'
];
}
public
function
getRequiredVotes
()
{
return
$this
->
_data
[
'requiredVotes'
];
...
...
This diff is collapsed.
Click to expand it.
application/modules/ucc/controllers/ReportsController.php
+
5
−
5
View file @
23ec7100
...
...
@@ -92,7 +92,7 @@ class Ucc_ReportsController extends App_Controller_Action
$difference
=
$currentCourse
->
getDifferenceSummary
(
$originalCourse
,
$request
);
$voteResult
=
$this
->
_tallyVotes
(
$votes
,
$startDate
,
$endDate
);
$voteResult
=
$this
->
_tallyVotes
(
$votes
,
$startDate
,
$endDate
,
$approvalAction
->
getVotesToTable
()
);
$data
[]
=
new
Unl_Model_Array
(
array
(
'time'
=>
$time
->
getTimestamp
(),
...
...
@@ -152,7 +152,7 @@ class Ucc_ReportsController extends App_Controller_Action
$requestVoteTally
[
$requestId
][
$vote
->
getVote
()]
++
;
}
$requestVoteResults
[
$requestId
]
=
$this
->
_tallyVotes
(
$votes
,
$startDate
,
$endDate
);
$requestVoteResults
[
$requestId
]
=
$this
->
_tallyVotes
(
$votes
,
$startDate
,
$endDate
,
$approvalAction
->
getVotesToTable
()
);
}
$this
->
view
->
requestVoteTally
=
$requestVoteTally
;
$this
->
view
->
requestVoteResults
=
$requestVoteResults
;
...
...
@@ -183,7 +183,7 @@ class Ucc_ReportsController extends App_Controller_Action
$requestVoteTally
[
$requestId
][
$vote
->
getVote
()]
++
;
}
$requestVoteResults
[
$requestId
]
=
$this
->
_tallyVotes
(
$votes
,
$startDate
,
$endDate
);
$requestVoteResults
[
$requestId
]
=
$this
->
_tallyVotes
(
$votes
,
$startDate
,
$endDate
,
$approvalAction
->
getVotesToTable
()
);
}
$this
->
view
->
aceRequestVoteTally
=
$requestVoteTally
;
$this
->
view
->
aceRequestVoteResults
=
$requestVoteResults
;
...
...
@@ -195,7 +195,7 @@ class Ucc_ReportsController extends App_Controller_Action
$this
->
render
(
'monthly-extended'
);
}
protected
function
_tallyVotes
(
$votes
,
$startDate
,
$endDate
)
protected
function
_tallyVotes
(
$votes
,
$startDate
,
$endDate
,
$votesToTable
)
{
$voteTally
=
array
();
$voteResult
=
''
;
...
...
@@ -214,7 +214,7 @@ class Ucc_ReportsController extends App_Controller_Action
}
}
if
(
$voteCount
<
7
||
$voteTally
[
'Table'
]
>=
2
)
{
if
(
$voteCount
<
7
||
$voteTally
[
'Table'
]
>=
$votesToTable
)
{
$voteResult
=
'Table'
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment