File tree Expand file tree Collapse file tree 5 files changed +17
-21
lines changed Expand file tree Collapse file tree 5 files changed +17
-21
lines changed Original file line number Diff line number Diff line change 11
11
" {{ url(
12
12
' chamilo_core_resource_view' , {
13
13
' id' : resource .resourceNode .id ,
14
- ' cid' : course ? course .id : 0 ,
15
- ' sid' : session ? session .id : 0 ,
16
14
' type' : type ,
17
15
' tool' : tool ,
18
16
' filter' : ' resource_show_preview'
23
21
{% autoescape false %}
24
22
<iframe border =" 0" frameborder =" 0" style =" width:100%;height:600px" src =" {{ url(' chamilo_core_resource_view' , {
25
23
' id' : resource .resourceNode .id ,
26
- ' cid' : course ? course .id : 0 ,
27
- ' sid' : session ? session .id : 0 ,
28
24
' type' : type ,
29
25
' tool' : tool
30
26
}
39
35
<a
40
36
href =" {{ url(' chamilo_core_resource_download' , {
41
37
' id' : resource .resourceNode .id ,
42
- ' cid' : course ? course .id : 0 ,
43
- ' sid' : session ? session .id : 0 ,
44
38
' type' : type ,
45
39
' tool' : tool
46
40
}
Original file line number Diff line number Diff line change 4
4
<a class =" btn btn--success"
5
5
href =" {{ url(' chamilo_core_resource_view' , {
6
6
' id' : resource .resourceNode .id ,
7
- ' cid' : course .id ,
8
- ' sid' : session .id ,
9
7
' type' : type ,
10
8
' tool' : tool ,
11
9
' mode' : ' download'
Original file line number Diff line number Diff line change 27
27
<a
28
28
href =" {{ url(' chamilo_core_resource_view' , {
29
29
' id' : comment .resourceNode .id ,
30
- ' cid' : course ? course .id : 0 ,
31
- ' sid' : session ? session .id : 0 ,
32
30
' type' : ' student_publications_comments' ,
33
31
' tool' : ' student_publications' ,
34
32
})
65
63
</ul >
66
64
<br />
67
65
68
- {% endautoescape %}
66
+ {% endautoescape %}
Original file line number Diff line number Diff line change 24
24
<a class =" btn btn--success"
25
25
href =" {{ url(' chamilo_core_resource_view' , {
26
26
' id' : work .resourceNode .id ,
27
- ' cid' : course ? course .id : 0 ,
28
- ' sid' : session ? session .id : 0 ,
29
27
' tool' : ' student_publication' ,
30
28
' type' : ' student_publications' ,
31
29
' mode' : ' download'
Original file line number Diff line number Diff line change @@ -64,14 +64,22 @@ public function normalize(
64
64
if ($ object ->hasResourceNode ()) {
65
65
$ resourceNode = $ object ->getResourceNode ();
66
66
67
- $ params = [
68
- 'id ' => $ resourceNode ->getUuid (),
69
- 'cid ' => $ courseId ,
70
- 'sid ' => $ sessionId ,
71
- 'gid ' => $ groupId ,
72
- 'tool ' => $ resourceNode ->getResourceType ()->getTool ()->getTitle (),
73
- 'type ' => $ resourceNode ->getResourceType ()->getTitle (),
74
- ];
67
+ if ($ resourceNode ->hasResourceFile ()) {
68
+ $ params = [
69
+ 'id ' => $ resourceNode ->getUuid (),
70
+ 'tool ' => $ resourceNode ->getResourceType ()->getTool ()->getTitle (),
71
+ 'type ' => $ resourceNode ->getResourceType ()->getTitle (),
72
+ ];
73
+ } else {
74
+ $ params = [
75
+ 'id ' => $ resourceNode ->getUuid (),
76
+ 'cid ' => $ courseId ,
77
+ 'sid ' => $ sessionId ,
78
+ 'gid ' => $ groupId ,
79
+ 'tool ' => $ resourceNode ->getResourceType ()->getTool ()->getTitle (),
80
+ 'type ' => $ resourceNode ->getResourceType ()->getTitle (),
81
+ ];
82
+ }
75
83
76
84
// if ($getFile) {
77
85
// Get all links from resource.
You can’t perform that action at this time.
0 commit comments