Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
moodle-mod_pdfannotator
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
elc
moodle-mod_pdfannotator
Commits
fe7bf143
Commit
fe7bf143
authored
2 years ago
by
anisa kusumadewi
Browse files
Options
Downloads
Patches
Plain Diff
Revert "Fix type incompatibility in statistic"
This reverts commit
e456750c
.
parent
e456750c
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
model/statistics.class.php
+6
-6
6 additions, 6 deletions
model/statistics.class.php
with
6 additions
and
6 deletions
model/statistics.class.php
+
6
−
6
View file @
fe7bf143
...
...
@@ -76,7 +76,7 @@ class pdfannotator_statistics {
* Returns the average number of questions/answers a user wrote in this pdf-annotator.
* Only users that wrote at least one comment are included.
* @param type $isquestion '1' for questions, '0' for answers
* @return
float
* @return
type
*/
public
function
get_comments_average_annotator
(
$isquestion
)
{
global
$DB
;
...
...
@@ -85,14 +85,14 @@ class pdfannotator_statistics {
.
"WHERE pdfannotatorid = ? AND isquestion = ? AND isdeleted = ? "
.
"GROUP BY userid ) AS counts"
;
return
(
float
)
key
(
$DB
->
get_records_sql
(
$sql
,
array
(
$this
->
annotatorid
,
$isquestion
,
'0'
)));
return
key
(
$DB
->
get_records_sql
(
$sql
,
array
(
$this
->
annotatorid
,
$isquestion
,
'0'
)));
}
/**
* Returns the average number of questions/answers a user wrote in this course.
* Only users that wrote at least one comment are included.
* @param type $isquestion '1' for questions, '0' for answers
* @return
float
* @return
type
*/
public
function
get_comments_average_course
(
$isquestion
)
{
global
$DB
;
...
...
@@ -102,7 +102,7 @@ class pdfannotator_statistics {
.
"WHERE a.course = ? AND a.id = c.pdfannotatorid AND c.isquestion = ? AND c.isdeleted = ?"
.
"GROUP BY c.userid ) AS counts"
;
return
(
float
)
key
(
$DB
->
get_records_sql
(
$sql
,
array
(
$this
->
courseid
,
$isquestion
,
'0'
)));
return
key
(
$DB
->
get_records_sql
(
$sql
,
array
(
$this
->
courseid
,
$isquestion
,
'0'
)));
}
/**
...
...
@@ -224,7 +224,7 @@ class pdfannotator_statistics {
* @param type $annotatorid
* @param type $isquestion '1' for questions, '0' for answers
* @param type $userid false by default for comments by all users. Userid for comments by a specific user
* @return
float
* @return
type
*/
public
static
function
count_comments_annotator
(
$annotatorid
,
$isquestion
,
$userid
=
false
)
{
global
$DB
;
...
...
@@ -234,7 +234,7 @@ class pdfannotator_statistics {
$conditions
[
'userid'
]
=
$userid
;
}
return
(
float
)
$DB
->
count_records
(
'pdfannotator_comments'
,
$conditions
);
return
$DB
->
count_records
(
'pdfannotator_comments'
,
$conditions
);
}
/**
...
...
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