Skip to main content
Homepage
Explore
Search or go to…
/
Sign in
Explore
Primary navigation
Project
M
moodle-tool_lifecycle
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
?
Collapse sidebar
Snippets
Groups
Projects
Show more breadcrumbs
elc
moodle-tool_lifecycle
Commits
88ffa232
Commit
88ffa232
authored
Jul 2, 2019
by
Justus Dieckmann
Browse files
Options
Downloads
Patches
Plain Diff
Course shortname and Workflow name as secondary information
parent
3c84a233
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
classes/table/interaction_log_table.php
+23
-26
23 additions, 26 deletions
classes/table/interaction_log_table.php
styles.css
+2
-1
2 additions, 1 deletion
styles.css
with
25 additions
and
27 deletions
classes/table/interaction_log_table.php
+
23
−
26
View file @
88ffa232
...
@@ -21,6 +21,7 @@
...
@@ -21,6 +21,7 @@
* @copyright 2019 Justus Dieckmann WWU
* @copyright 2019 Justus Dieckmann WWU
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
*/
namespace
tool_lifecycle\table
;
namespace
tool_lifecycle\table
;
use
core\plugininfo\format
;
use
core\plugininfo\format
;
...
@@ -38,9 +39,9 @@ class interaction_log_table extends \table_sql {
...
@@ -38,9 +39,9 @@ class interaction_log_table extends \table_sql {
parent
::
__construct
(
$uniqueid
);
parent
::
__construct
(
$uniqueid
);
global
$PAGE
;
global
$PAGE
;
$fields
=
"l.id as processid, c.id as courseid, c.fullname as coursefullname,
w.title as workflow
, "
.
$fields
=
"l.id as processid, c.id as courseid, c.fullname as coursefullname,
c.shortname as courseshortname
, "
.
"
s.id as stepinstanceid, s.instancename as stepinstancename, s.subpluginname as subpluginname
, "
.
"
w.title as workflow, s.subpluginname as subpluginname, s.instancename as stepname, u.id as userid
, "
"u.id as userid, "
.
get_all_user_name_fields
(
true
,
'u'
)
.
", l.time, l.action"
;
.
get_all_user_name_fields
(
true
,
'u'
)
.
", l.time, l.action"
;
$from
=
'{tool_lifecycle_action_log} l join '
.
$from
=
'{tool_lifecycle_action_log} l join '
.
'{course} c on l.courseid = c.id join '
.
'{course} c on l.courseid = c.id join '
.
'{tool_lifecycle_workflow} w on l.workflowid = w.id join '
.
'{tool_lifecycle_workflow} w on l.workflowid = w.id join '
.
...
@@ -53,6 +54,7 @@ class interaction_log_table extends \table_sql {
...
@@ -53,6 +54,7 @@ class interaction_log_table extends \table_sql {
$where
=
'l.courseid IN ('
.
$ids
.
')'
;
$where
=
'l.courseid IN ('
.
$ids
.
')'
;
}
}
$this
->
column_nosort
=
array
(
'action'
);
$this
->
set_sql
(
$fields
,
$from
,
$where
,
[]);
$this
->
set_sql
(
$fields
,
$from
,
$where
,
[]);
$this
->
define_baseurl
(
$PAGE
->
url
);
$this
->
define_baseurl
(
$PAGE
->
url
);
$this
->
init
();
$this
->
init
();
...
@@ -62,20 +64,29 @@ class interaction_log_table extends \table_sql {
...
@@ -62,20 +64,29 @@ class interaction_log_table extends \table_sql {
* Initialises the columns of the table.
* Initialises the columns of the table.
*/
*/
public
function
init
()
{
public
function
init
()
{
$this
->
define_columns
([
'course
id
'
,
'
coursefullname'
,
'workflow'
,
'time
'
,
'user'
,
'
action
'
]);
$this
->
define_columns
([
'course'
,
'
step'
,
'action
'
,
'user'
,
'
time
'
]);
$this
->
define_headers
([
$this
->
define_headers
([
get_string
(
'course'
),
get_string
(
'course'
),
get_string
(
'fullnamecourse'
),
get_string
(
'step'
,
'tool_lifecycle'
),
get_string
(
'workflow'
,
'tool_lifecycle'
),
get_string
(
'action'
,
'tool_lifecycle'
),
get_string
(
'date'
),
get_string
(
'user'
),
get_string
(
'user'
),
get_string
(
'
action'
,
'tool_lifecycl
e'
)
get_string
(
'
dat
e'
)
,
]);
]);
$this
->
setup
();
$this
->
setup
();
}
}
public
function
col_course
(
$row
)
{
$courselink
=
\html_writer
::
link
(
course_get_url
(
$row
->
courseid
),
$row
->
coursefullname
);
return
$courselink
.
'<br><span class="secondary-info">'
.
$row
->
courseshortname
.
'</span>'
;
}
public
function
col_step
(
$row
)
{
return
$row
->
stepname
.
'<br><span class="secondary-info">Workflow: '
.
$row
->
workflow
.
'</span>'
;
}
/**
/**
* Render user column.
* Render user column.
*
* @param $row
* @param $row
* @return string
* @return string
*/
*/
...
@@ -86,6 +97,7 @@ class interaction_log_table extends \table_sql {
...
@@ -86,6 +97,7 @@ class interaction_log_table extends \table_sql {
/**
/**
* Render time column.
* Render time column.
*
* @param $row
* @param $row
* @return string
* @return string
* @throws \coding_exception
* @throws \coding_exception
...
@@ -95,26 +107,11 @@ class interaction_log_table extends \table_sql {
...
@@ -95,26 +107,11 @@ class interaction_log_table extends \table_sql {
return
userdate
(
$row
->
time
,
$dateformat
);
return
userdate
(
$row
->
time
,
$dateformat
);
}
}
/**
public
function
col_action
(
$row
)
{
* Render courseid column.
$interactionlib
=
lib_manager
::
get_step_interactionlib
(
$row
->
subpluginname
);
* @param $row
return
$interactionlib
->
get_action_string
(
$row
->
action
);
* @return string course link
*/
public
function
col_courseid
(
$row
)
{
return
\html_writer
::
link
(
course_get_url
(
$row
->
courseid
),
$row
->
courseid
);
}
}
/**
* Render coursefullname column.
* @param $row
* @return string course link
*/
public
function
col_coursefullname
(
$row
)
{
return
\html_writer
::
link
(
course_get_url
(
$row
->
courseid
),
$row
->
coursefullname
);
}
public
function
print_nothing_to_display
()
{
public
function
print_nothing_to_display
()
{
global
$OUTPUT
;
global
$OUTPUT
;
...
...
...
...
This diff is collapsed.
Click to expand it.
styles.css
+
2
−
1
View file @
88ffa232
...
@@ -2,7 +2,8 @@
...
@@ -2,7 +2,8 @@
overflow
:
initial
;
overflow
:
initial
;
}
}
.lifecycle-table
span
.workflow_displaytitle
{
.lifecycle-table
span
.workflow_displaytitle
,
.lifecycle-table
span
.secondary-info
{
color
:
#888
;
color
:
#888
;
font-size
:
.9em
;
font-size
:
.9em
;
padding
:
0.5em
;
padding
:
0.5em
;
...
...
...
...
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
sign in
to comment