Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
iena
iena-mahara-link
Commits
8fb2c1e0
Commit
8fb2c1e0
authored
Oct 27, 2021
by
Myriam Delaruelle
Browse files
fix timestamps course shortname
parent
9b80772d
Changes
4
Hide whitespace changes
Inline
Side-by-side
entity/block_mahara_iena_connexion.php
View file @
8fb2c1e0
...
...
@@ -197,7 +197,6 @@ class block_mahara_iena_connexion
$course_name
=
block_mahara_iena_getCourseName
(
$COURSE
->
shortname
);
var_dump
(
$course_name
);
$group
=
new
stdClass
();
$group
->
name
=
get_string
(
'course_group'
,
'block_mahara_iena'
)
.
" "
.
$course_name
.
" – "
.
$mo_group_name
;
$group
->
description
=
get_string
(
'course_group'
,
'block_mahara_iena'
)
.
" "
.
$course_name
.
" – "
.
$mo_group_name
;
...
...
lib.php
View file @
8fb2c1e0
...
...
@@ -8,9 +8,9 @@ function block_mahara_iena_isValidTimeStamp($timestamp)
function
block_mahara_iena_getCourseName
(
$coursename
){
$course_name
=
$coursename
;
$isTimeStamp
=
substr
(
$coursename
,
-
1
,
11
);
$isTimeStamp
=
substr
(
$coursename
,
-
1
0
);
if
(
block_mahara_iena_isValidTimeStamp
(
$isTimeStamp
)){
$course_name
=
substr
(
$coursename
,
-
1
1
);
$course_name
=
substr
(
$coursename
,
0
,
strlen
(
$coursename
)
-
1
2
);
}
return
$course_name
;
...
...
mahara_iena.php
View file @
8fb2c1e0
...
...
@@ -32,7 +32,7 @@ $course_ctx = context_course::instance($course->id);
$students
=
get_enrolled_users
(
$course_ctx
);
$usersTab
=
array
();
$course_name
=
block_mahara_iena_getCourseName
(
$COURSE
->
shortname
);
//Here we check by email, if the student have the same email into mahara and moodle he is add to group
if
(
count
(
$students
)
==
0
)
{
...
...
mahara_iena_groups.php
View file @
8fb2c1e0
...
...
@@ -76,7 +76,6 @@ if (count($students) == 0) {
}
$course_name
=
block_mahara_iena_getCourseName
(
$COURSE
->
shortname
);
var_dump
(
$course_name
);
array_push
(
$mahara_groups
,
array
(
'name'
=>
$course_name
.
" – "
.
$group
->
name
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment