Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
iena-course-format
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
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
iena
iena-course-format
Commits
d06a34e8
Commit
d06a34e8
authored
7 months ago
by
DELARUELLE Myriam
Browse files
Options
Downloads
Patches
Plain Diff
fix moodle44
parent
9c9086df
No related branches found
No related tags found
No related merge requests found
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
classes/output/courseformat/content.php
+1
-1
1 addition, 1 deletion
classes/output/courseformat/content.php
format.js
+0
-50
0 additions, 50 deletions
format.js
format.php
+2
-25
2 additions, 25 deletions
format.php
lib.php
+5
-1
5 additions, 1 deletion
lib.php
renderer.php
+0
-1
0 additions, 1 deletion
renderer.php
with
8 additions
and
78 deletions
classes/output/courseformat/content.php
+
1
−
1
View file @
d06a34e8
...
...
@@ -46,7 +46,7 @@ class content extends content_base {
*/
public
function
export_for_template
(
\renderer_base
$output
)
{
global
$CFG
,
$COURSE
,
$USER
;
$data
=
parent
::
export_for_template
(
$output
);
//$section_entity = new course_format_iena_sections();
...
...
This diff is collapsed.
Click to expand it.
format.js
+
0
−
50
View file @
d06a34e8
...
...
@@ -23,57 +23,7 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
M
.
course
=
M
.
course
||
{};
M
.
course
.
format
=
M
.
course
.
format
||
{};
M
.
course
.
format
.
get_config
=
function
()
{
return
{
container_node
:
'
ul
'
,
container_class
:
'
buttons
'
,
section_node
:
'
li
'
,
section_class
:
'
section
'
};
};
M
.
course
.
format
.
swap_sections
=
function
(
Y
,
node1
,
node2
)
{
var
CSS
=
{
COURSECONTENT
:
'
course-content
'
,
SECTIONADDMENUS
:
'
section_add_menus
'
};
var
sectionlist
=
Y
.
Node
.
all
(
'
.
'
+
CSS
.
COURSECONTENT
+
'
'
+
M
.
course
.
format
.
get_section_selector
(
Y
));
// Swap the non-ajax menus, noting these are not always present (depends on theme and user prefs).
if
(
sectionlist
.
item
(
node1
).
one
(
'
.
'
+
CSS
.
SECTIONADDMENUS
))
{
sectionlist
.
item
(
node1
).
one
(
'
.
'
+
CSS
.
SECTIONADDMENUS
).
swap
(
sectionlist
.
item
(
node2
).
one
(
'
.
'
+
CSS
.
SECTIONADDMENUS
));
}
};
M
.
course
.
format
.
process_sections
=
function
(
Y
,
sectionlist
,
response
,
sectionfrom
,
sectionto
)
{
var
CSS
=
{
SECTIONNAME
:
'
sectionname
'
},
SELECTORS
=
{
SECTIONLEFTSIDE
:
'
.left .section-handle img
'
};
if
(
response
.
action
==
'
move
'
)
{
if
(
sectionfrom
>
sectionto
)
{
var
temp
=
sectionto
;
sectionto
=
sectionfrom
;
sectionfrom
=
temp
;
}
var
ele
,
str
,
stridx
,
newstr
;
for
(
var
i
=
sectionfrom
;
i
<=
sectionto
;
i
++
)
{
var
content
=
Y
.
Node
.
create
(
'
<span>
'
+
response
.
sectiontitles
[
i
]
+
'
</span>
'
);
sectionlist
.
item
(
i
).
all
(
'
.
'
+
CSS
.
SECTIONNAME
).
setHTML
(
content
);
ele
=
sectionlist
.
item
(
i
).
one
(
SELECTORS
.
SECTIONLEFTSIDE
);
str
=
ele
.
getAttribute
(
'
alt
'
);
stridx
=
str
.
lastIndexOf
(
'
'
);
newstr
=
str
.
substr
(
0
,
stridx
+
1
)
+
i
;
ele
.
setAttribute
(
'
alt
'
,
newstr
);
ele
.
setAttribute
(
'
title
'
,
newstr
);
}
}
};
(
function
()
{
$
(
"
.iena-description .description-inner
"
).
each
(
function
(
index
){
...
...
This diff is collapsed.
Click to expand it.
format.php
+
2
−
25
View file @
d06a34e8
...
...
@@ -41,29 +41,6 @@ require_once($CFG->libdir . '/completionlib.php');
$PAGE
->
requires
->
js
(
'/course/format/iena/js/jquery.min.js'
);
$PAGE
->
requires
->
js
(
'/course/format/iena/format.js'
);
/*if ($topic = optional_param('topic', 0, PARAM_INT)) {
$url = $PAGE->url;
$url->param('section', $topic);
debugging('Outdated topic param passed to course/view.php', DEBUG_DEVELOPER);
redirect($url);
}
$context = context_course::instance($course->id);
if (($marker >= 0) && has_capability('moodle/course:setcurrentsection', $context) && confirm_sesskey()) {
$course->marker = $marker;
course_set_marker($course->id, $marker);
}
$course = course_get_format($course)->get_course();
course_create_sections_if_missing($course, 0);
$renderer = $PAGE->get_renderer('format_iena');
if (!empty($displaysection)) {
$renderer->print_single_section_page($course, null, null, null, null, $displaysection);
} else {
$renderer->switch_mode($course);
}*/
// Horrible backwards compatible parameter aliasing.
if
(
$topic
=
optional_param
(
'topic'
,
0
,
PARAM_INT
))
{
...
...
@@ -89,8 +66,8 @@ if (($marker >= 0) && has_capability('moodle/course:setcurrentsection', $context
course_create_sections_if_missing
(
$course
,
0
);
$renderer
=
$PAGE
->
get_renderer
(
'format_iena'
);
if
(
!
empty
(
$displaysection
))
{
$format
->
set_section
_
num
ber
(
$displaysection
);
if
(
!
is_null
(
$displaysection
))
{
$format
->
set_sectionnum
(
$displaysection
);
}
$outputclass
=
$format
->
get_output_classname
(
'content'
);
$widget
=
new
$outputclass
(
$format
);
...
...
This diff is collapsed.
Click to expand it.
lib.php
+
5
−
1
View file @
d06a34e8
...
...
@@ -36,6 +36,7 @@ class format_iena extends format_topics {
global
$PAGE
;
static
$courseformatoptions
=
false
;
if
(
$courseformatoptions
===
false
)
{
$courseformatoptions
=
array
();
$courseformatoptions
[
'allmodulesbreadcrum'
]
=
array
(
'default'
=>
0
,
'type'
=>
PARAM_INT
,
...
...
@@ -341,7 +342,10 @@ class format_iena extends format_topics {
$url
->
param
(
'section'
,
$sectionno
);
}
else
{
if
(
empty
(
$CFG
->
linkcoursesections
)
&&
!
empty
(
$options
[
'navigation'
]))
{
return
null
;
$sectioninfo
=
$this
->
get_section
(
$sectionno
);
//return new moodle_url('/course/section.php', ['id' => $sectioninfo->id]);
$url
->
set_anchor
(
'section-'
.
$sectionno
);
return
$url
;
}
$url
->
set_anchor
(
'section-'
.
$sectionno
);
}
...
...
This diff is collapsed.
Click to expand it.
renderer.php
+
0
−
1
View file @
d06a34e8
...
...
@@ -21,7 +21,6 @@
defined
(
'MOODLE_INTERNAL'
)
||
die
();
require_once
(
$CFG
->
dirroot
.
'/course/format/topics/renderer.php'
);
/**
* format_iena_renderer
...
...
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