Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
moodle-block_course_overview_uwmoodle
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
uw-moodle
moodle-block_course_overview_uwmoodle
Commits
20498607
Commit
20498607
authored
11 years ago
by
Matt Petro
Browse files
Options
Downloads
Patches
Plain Diff
UWMOODLE-531 block course_overview_uwmoodle: Fixes for 2.6 compatibility
parent
479412ec
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
locallib.php
+11
-7
11 additions, 7 deletions
locallib.php
styles.css
+1
-0
1 addition, 0 deletions
styles.css
version.php
+2
-2
2 additions, 2 deletions
version.php
with
14 additions
and
9 deletions
locallib.php
+
11
−
7
View file @
20498607
...
...
@@ -39,12 +39,16 @@ defined('MOODLE_INTERNAL') || die;
function
block_course_overview_uwmoodle_get_overviews
(
$courses
)
{
$htmlarray
=
array
();
if
(
$modules
=
get_plugin_list_with_function
(
'mod'
,
'print_overview'
))
{
foreach
(
$modules
as
$fname
)
{
try
{
$fname
(
$courses
,
$htmlarray
);
}
catch
(
Exception
$e
)
{
// Log the error message, and otherwise ignore the error
error_log
(
"course_overview_uwmoodle: Error in getting overviews. "
.
$e
->
getMessage
());
// Split courses list into batches with no more than MAX_MODINFO_CACHE_SIZE courses in one batch.
// Otherwise we exceed the cache limit in get_fast_modinfo() and rebuild it too often.
if
(
defined
(
'MAX_MODINFO_CACHE_SIZE'
)
&&
MAX_MODINFO_CACHE_SIZE
>
0
&&
count
(
$courses
)
>
MAX_MODINFO_CACHE_SIZE
)
{
$batches
=
array_chunk
(
$courses
,
MAX_MODINFO_CACHE_SIZE
,
true
);
}
else
{
$batches
=
array
(
$courses
);
}
foreach
(
$batches
as
$courses
)
{
foreach
(
$modules
as
$fname
)
{
$fname
(
$courses
,
$htmlarray
);
}
}
}
...
...
@@ -101,7 +105,7 @@ function block_course_overview_uwmoodle_get_child_shortnames($courseid) {
function
block_course_overview_uwmoodle_get_sorted_courses
()
{
global
$USER
;
$courses
=
enrol_get_my_courses
(
'id, shortname, fullname, modinfo, sectioncache'
,
'fullname'
,
0
);
$courses
=
enrol_get_my_courses
(
null
,
'fullname'
,
0
);
$site
=
get_site
();
if
(
array_key_exists
(
$site
->
id
,
$courses
))
{
...
...
This diff is collapsed.
Click to expand it.
styles.css
+
1
−
0
View file @
20498607
...
...
@@ -118,6 +118,7 @@
visibility
:
hidden
;
position
:
absolute
;
left
:
-9999px
;
display
:
initial
;
}
#uwmm_mycourses_block
.courselistcontainer
{
...
...
This diff is collapsed.
Click to expand it.
version.php
+
2
−
2
View file @
20498607
...
...
@@ -19,8 +19,8 @@ defined('MOODLE_INTERNAL') || die();
$plugin
->
component
=
'block_course_overview_uwmoodle'
;
$plugin
->
version
=
2013071801
;
$plugin
->
release
=
'1.
1
'
;
$plugin
->
requires
=
201
2062500
;
$plugin
->
release
=
'1.
2
'
;
$plugin
->
requires
=
201
3111802
;
$plugin
->
maturity
=
MATURITY_RC
;
$plugin
->
cron
=
43200
;
// Set min time between cron executions to 12 hours
...
...
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