GithubHelp home page GithubHelp logo

moodle-an-hochschulen / moodle-block_course_overview_campus Goto Github PK

View Code? Open in Web Editor NEW
8.0 8.0 13.0 416 KB

Moodle block which provides all functionality of block_course_overview, provides additional filters to be used on university campuses as well as the possibility to hide courses from the course list

License: GNU General Public License v3.0

PHP 90.92% CSS 1.53% JavaScript 7.55%
moodle moodle-block moodle-plugin

moodle-block_course_overview_campus's People

Contributors

abias avatar davosmith avatar kathrin84 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

moodle-block_course_overview_campus's Issues

Wrong id used for teacher filter

Hi,

I think there is a small issue in the teacher filter part.
On line 439 the only id field which is requested is ra.id which is the roleid.
The correct id I think should be the user id which would be:
$courseteachers = get_role_users($teacherroles, $context, true, 'ra.id, u.id, u.lastname, u.firstname, r.sortorder', 'u.lastname, u.firstname');

can you confirm that?

regards,

Mario

Suggestions

Hi guys, love the block.

Was wondering if you had considered two features:

1: Show courses by subcategories in the course filter menu. I.e. If a course is in a subcategory, display its parent category in the filter dropdown as well. Maybe a greyed-out option.

2: Choose to have course descriptions/details collapsed by default (e.g. SCORM attempt info).

Cheers
Phil

Suggestion: Students see list of all courses they are enrolled to, but can only access those available.

Hi, I had raised this suggestion in moodle.org wrt the default Course Overview block, but we are now immersed in using Course Overview on Campus. Well done for developing such an amazing block.

Situation
At the start of every academic year, we receive a number of queries from students who claim that cannot see some of their courses listed in the block, the likelihood being that the teacher had not yet made the course visible to students (rather than the students were not enrolled to their course).

Suggestion
We feel that it would be beneficial for all parties if the course overview block could also show all courses which a student is enrolled to, in spite of whether the course is set as visible or not. Obviously, courses not set as visible would remain inaccessible. Such feature would make the system more 'transparent', in the sense that students would know which courses they are enrolled to, and that its simply the teacher who has not yet made a course accessible to them.

Any chance of including this feature or some guidance to tweak the current block?

Thanks!

Problem with dropdown after logging back in

I added this block to my dashboard with only the top-level category filter enabled. I logged into Moodle and chose a category and the courses I'm enrolled in dropped down as they should. But when I log out and then back in or visit a course and then return to the dashboard, the previously chosen category still shows, but the courses don't drop down. Even when I click the desired category again in the dropdown list, the courses don't drop down. Only when I choose a different category and then choose the previous one that I wanted in the first place does it work. Students will see this and think they've been dropped from their courses. Tried it with Firefox and Chrome with the same issue.

Notification : duplicate value - Debug Mode

Hello,

I'm using a Moodle 2.9 site with the last version of your awesome block (Release 2.9 (Build: 2015092900)). I've noticed on particular user, i got an error when i turn on debug messages. Here is one example :

debug-cooc

And this is our configuration's block :

conf-cooc

I've applied a var_dump function on the $courseteachers var and this is the output of the interesting line :

[847]=> object(stdClass)#2171 (5) { ["id"]=> string(3) "847" ["lastname"]=> string(7) "Doe" ["firstname"]=> string(8) "Jane" ["sortorder"]=> string(1) "3" ["roleid"]=> string(1) "3" }

Do you have any idea to fix the problem ?

Thanks in advance for your help !

Seb

PHP Notice: Undefined variable / PHP Warning: array_key_exists() expects parameter

A lot of entries in my php error log

[25-Sep-2018 05:07:28 Europe/Berlin] PHP Notice: Undefined variable: courseteachers in /var/www/moodle/blocks/course_overview_campus/block_course_overview_campus.php on line 644
[25-Sep-2018 05:07:28 Europe/Berlin] PHP Warning: array_key_exists() expects parameter 2 to be array, null given in /var/www/moodle/blocks/course_overview_campus/block_course_overview_campus.php on line 644

Moodle 3.5.2 (Build: 20180910)
PHP Version 7.0.30-0+deb9u1
Course overview on campus block_course_overview_campus v3.5-r1 2018070200

Great plugin by the way!

Suggestion: Separate link for category/top category at course list output

Hi, I support a Moodle setup that is being used in sort of multisite setup by using top categories as "site" per organization. Unfortunately Moodle itself doesn't have a really useful way of filtering the categories by "site".

Your plugin is almost there for out needs, but currently the course link covers both course and category name.

Having a separate link for category at course list would help the users very much at browsing their all available courses and organization's categories. Would it be possible for you to make such a change? Or would you rather have a pull request?

Missing course category attribute

Hi,

we've noticed, that if you set the setting categorycoursefilter to false, but secondrowshowcategoryname to true you get an error Notice: Undefined property: stdClass::$categoryname in ....

The reason is that the categoryname property is set, only if the option categorycoursefilter is enabled.

As far as I can tell, it's enough to change the line 412 to

if ($coc_config->categorycoursefilter === true || $coc_config->secondrowshowcategoryname === true) {

but you may consider a more general solution.

I can submit a pull request, of course ;)

Eye icon not work

Hi everyone!

I have the following problem in my moodles. (2.5.9 with Clean theme, 2.8.5+ with Decaf theme)

When i try to use the "eye" icon the courses doesn't get hidden. The icon changes, but the course still remain visible(in couse settings too).

So:
1

Now i click on the eye icon:

2

Click on the "Managing hidden courses".

3

Click on the eye icons:

4

As you can see, no effect on the course's setting.

Performance

Hey,

we are dealing with great performance problems. Users with more then 20 courses have to wait sometimes over 30 secounds until the site with the block attached to it gets loaded. Please take a look at the existing moodle issue for the course overview block: https://tracker.moodle.org/browse/MDL-34785

Thx Alex

"No courses" text

Hi. This plugin would benefit with some "No courses to display" text, if there werent any. Maybe toggleable in the settings.

Error when users are enrolled in too many courses (or long course names)

Some users who are enrolled in many courses (~100) get the following error when logging in or opening their dashboard in Moodle 3.3.2 with Boost theme: "Coding error detected, it must be fixed by a programmer: Invalid value in set_user_preference() call, value is is too long for the value column".
In the debug mode we find that this error may be related to the plugin moodle-block_course_overview_campus. The version of our plugin according to our moodle-plugin overview is 2017063000.
Is there any way you or we can fix that easily?
The plugin works fine for users being enrolled in fewer courses, only teachers who are in charge of a large number of courses get this error message.

We would be very happy if you could help us,
best wishes from Vienna,
Klaus

This is what we get from the debug-mode:

line 1022 of /lib/outputrequirementslib.php: call to debugging()
line 1465 of /blocks/course_overview_campus/block_course_overview_campus.php: call to page_requirements_manager->js_call_amd()
line 288 of /blocks/moodleblock.class.php: call to block_course_overview_campus->get_content()
line 230 of /blocks/moodleblock.class.php: call to block_base->formatted_contents()
line 1197 of /lib/blocklib.php: call to block_base->get_content_for_output()
line 1249 of /lib/blocklib.php: call to block_manager->create_block_contents()
line 374 of /lib/blocklib.php: call to block_manager->ensure_content_created()
line 3839 of /lib/outputrenderers.php: call to block_manager->region_has_content()
line 42 of /theme/university_boost/layout/columns2.php: call to core_renderer->blocks()
line 1162 of /lib/outputrenderers.php: call to include()
line 1092 of /lib/outputrenderers.php: call to core_renderer->render_page_layout()
line 164 of /my/index.php: call to core_renderer->header()

Coding error detected, it must be fixed by a programmer: Invalid value in set_user_preference() call, value is is too long for the value column
Debug info:
Error code: codingerror
Stack trace:

line 1897 of /lib/moodlelib.php: coding_exception thrown
line 436 of /blocks/course_overview_campus/locallib.php: call to set_user_preference()
line 1500 of /blocks/course_overview_campus/block_course_overview_campus.php: call to block_course_overview_campus_remember_notshowncourses_for_local_boostcoc()
line 288 of /blocks/moodleblock.class.php: call to block_course_overview_campus->get_content()
line 230 of /blocks/moodleblock.class.php: call to block_base->formatted_contents()
line 1197 of /lib/blocklib.php: call to block_base->get_content_for_output()
line 1249 of /lib/blocklib.php: call to block_manager->create_block_contents()
line 374 of /lib/blocklib.php: call to block_manager->ensure_content_created()
line 3839 of /lib/outputrenderers.php: call to block_manager->region_has_content()
line 42 of /theme/university_boost/layout/columns2.php: call to core_renderer->blocks()
line 1162 of /lib/outputrenderers.php: call to include()
line 1092 of /lib/outputrenderers.php: call to core_renderer->render_page_layout()
line 164 of /my/index.php: call to core_renderer->header()

Suggestions

Hi,

Please note that for academic year 2016/17 we have started making use of the 'Course Overview on Campus' block due to some changes in the infrastructure of the VLE. In previous years we have always used the 'Course Overview' block.

Since we launched this year's VLE, we have been receiving emails, mostly from tutors, with suggestions for the 'Course Overview on Campus' block. Below we identify the three most common suggestions we've been getting:

  1. Courses should be displayed in chronological order, rather than in alphabetical order.
    For instance, we organise courses in Categories, namely, 'Academic Year 2016/17', 'Academic Year 2015/16', etc, and we have organised the categories so that 'Academic Year 2016/17' is displayed as the first option from the 'Category' filter menu in the 'Course Overview on Campus' block. When users use the 'All' option they prefer to see all courses for the current academic year listed first, followed by last year's courses, etc. At the moment, the courses are being displayed in alphabetical order.
    We are aware of the 'Filter by Term' option, however, in our case this is not a feasible option.
  2. Choose a particular category to set default.
    By default, the 'Course Overview on Campus' block displays 'All' courses which the user is registered for. Is it possible to have a setting for the block where admin personnel can choose to set a particular category as default, please?
  3. Allow users to rearrange the sequence in which the various courses for a particular category are displayed.
    This feature is available in the 'Course Overview' block, and therefore some of our users have been used to this feature in previous years.

Much thanks in advance.

Best Regards,
Naomi

Show teacher name only show surname

I checked the following setting:
Second row: Show teacher name
block_course_overview_campus | secondrowshowteachername

I expect to show teacher full name (surname + lastname)

But the actual result is only to show surname.

Is it a bug?

Please add a "Reset filters" button

Hi,
Your plugin is great and we still use it in Moodle 3.7 :-)

One of the few issues we encounter with the plugin is that users (students and teachers) set the UI filters of the plugin to their needs, forget about it, and then contact our support team and claim that they don't see a course that they are enrolled to.

Is it possible to add a noticeable "Reset filters" button that would give a visual clue to the users that maybe there is a need to change the filters? Of course it's also a functionality improvement, because the in some cases the user wouldn't have to change each of the filters in order to see the full list of courses.

If the button addition is problematic, it would be great if at least the color of the filters (font and/or background) could be changed via the UI. It's already something that can be done using CSS modification, but it is a little bit cumbersome, cause it involves editing files on the server.

Thanks in advance, even if just for taking the time to read this :-)

Bug: Refreshing VLE page shows category as empty

Hi,

Thanks for this block. We are currently testing the latest version of the Course Overview on Campus block on Moodle 3.1.

We have noticed that if a user chooses a specific category and accesses a course within the category, then clicks the 'Back' button, the category is displayed as empty. This also happens if the user clicks the 'Refresh' button.

Moreover, we've noticed that if a user chooses a top-category with several parent categories, and accesses a course within the category, upon clicking the 'Back' button, only those courses which fall directly within the top-category are displayed. To resolve this, the user has to choose another category, and then go back to the required category to display all necessary courses.

We've also tested this with debug mode on, and the following was displayed:
Notice: Undefined variable: hidemanagebox in /var/www/html/vle/blocks/course_overview_campus/block_course_overview_campus.php on line 1293

While this is not a major issue, and we can work around it, we appreciate if there's a fix for this in the future.

Much thanks in advance,
Naomi

Courses missing since update

Since updating to the latest version (2.5, Build: 2013090301), most of my courses have gone missing, for no clear reason I can see so far.
For example, the display list now ends with the winter term 2012/2013, although there were many courses in summer 2013 that I took part in...?

"Undefined variable: modchoices" error whenever I perform an upgrade

I'm running Moodle 3.3+ with PHP 7.0 and the latest version of the block code (master branch). Every time I perform a command-line upgrade, I receive the following error:

PHP Notice: Undefined variable: modchoices in [MOODLEROOT]/blocks/course_overview_campus/settings.php on line 95

This happens for every upgrade, even if it doesn't involve this plugin directly. Any thoughts on what I might do to fix it?

User can see hidden categories

When a category is hidden non-admin users cannot see it or the sub-categories and courses within it. However in our dashboard which uses this block they are still visible.
We are using Moodle 3.3.5+ and course_overview_campus v3.3-r1.

Yours Denis Featherstone
Hertford Regional College

Plugin breaks behat tests

When running behat tests with this plugin installed and set as a default block on the user's dashboard we get various debug notices which make the tests fail.

These include:

Exception - Notice: Undefined property: stdClass::$termmode in [dirroot]/blocks/course_overview_campus/locallib.php on line 222
...

and

The function assign_print_overview() is now deprecated.
line 576 of /mod/assign/lib.php: call to debugging()
line 206 of /blocks/course_overview_campus/locallib.php: call to assign_print_overview()
...
The function chat_print_overview() is now deprecated.
line 1184 of /mod/chat/lib.php: call to debugging()
line 206 of /blocks/course_overview_campus/locallib.php: call to chat_print_overview()
...
The function choice_print_overview() is now deprecated.
line 949 of /mod/choice/lib.php: call to debugging()
line 206 of /blocks/course_overview_campus/locallib.php: call to choice_print_overview()
...
The function forum_print_overview() is now deprecated.
line 1411 of /mod/forum/lib.php: call to debugging()
line 206 of /blocks/course_overview_campus/locallib.php: call to forum_print_overview()
...
The function grouptool_print_overview() is now deprecated.
line 622 of /mod/grouptool/lib.php: call to debugging()
line 206 of /blocks/course_overview_campus/locallib.php: call to grouptool_print_overview()
...
The function lesson_print_overview() is now deprecated.
line 566 of /mod/lesson/lib.php: call to debugging()
line 206 of /blocks/course_overview_campus/locallib.php: call to lesson_print_overview()
...
The function quiz_print_overview() is now deprecated.
line 1615 of /mod/quiz/lib.php: call to debugging()
line 206 of /blocks/course_overview_campus/locallib.php: call to quiz_print_overview()
...
The function scorm_print_overview() is now deprecated.
line 1114 of /mod/scorm/lib.php: call to debugging()
line 206 of /blocks/course_overview_campus/locallib.php: call to scorm_print_overview()
...
Exception - Notice: Undefined property: stdClass::$firstrowcoursename in [dirroot]/blocks/course_overview_campus/block_course_overview_campus.php on line 1297

You already explain the print_overview calls in your README. But the other two notices look like they can be prevented.

Plugin Name in language file

For the version - 2017063000, running on a linux box, the pluginname on the block title is not translating properly.

Can you let us know if there is any updates available?

Thanks

suggestion: filter by asignment state

Hello Alexander,

Thank you for this wonderful plugin. Our students are really fond of your plugin. In the meanwhile the students have given me a lot of feedback about this plugin. Some of the students have some good ideas, maybe you are interested in their ideas.

1: The students use your plugin to discover unsubmitted asignments. but to search a very long list of assignments and courses they have a hard time. the students have in mind to solve this problem. these are their suggestions:

a: is it possible to give the different states a predefined color: like 'submitted for grading' (green orange) 'graded' (green) 'not submitted' (red). then you have some division in the states.

b. is it possible to filter for example with a dropdown menu the different states.for example: the dropdown menu consists of: 'not submitted' 'submitted for grading' , and so on. when they pick a state, they see only the the states chosen in the menu. they can see for example only assignments they did not submit for. and see only teh assignments which have been graded.

c: both the upper proposals.

Do you understand what I mean? is it possible to do that in course overview on campus. can you expand your plugin with such feature? :)

I hope to hear from you soon. Thanks in advance,

Mitchell

Moodle 2.6 error(s)

Hello Alexander,

I am not sure if you are interested in it. But I am testing course overview on campus on Moodle 2.6. You probably encounter this issue fast enough ;)

when adding the block on my hom page the following error appears:

Debug info: Unknown column 'c.modinfo' in 'field list'
SELECT c.id,c.category,c.sortorder,c.shortname,c.fullname,c.idnumber,c.startdate,c.visible,c.groupmode,c.groupmodeforce,c.cacherev,c.modinfo,c.sectioncache , ctx.id AS ctxid, ctx.path AS ctxpath, ctx.depth AS ctxdepth, ctx.contextlevel AS ctxlevel, ctx.instanceid AS ctxinstance
FROM mdl_course c
JOIN (SELECT DISTINCT e.courseid
FROM mdl_enrol e
JOIN mdl_user_enrolments ue ON (ue.enrolid = e.id AND ue.userid = ?)
WHERE ue.status = ? AND e.status = ? AND ue.timestart < ? AND (ue.timeend = 0 OR ue.timeend > ?)
) en ON (en.courseid = c.id)
LEFT JOIN mdl_context ctx ON (ctx.instanceid = c.id AND ctx.contextlevel = ?)
WHERE c.id <> ?
ORDER BY c.fullname ASC
[array (
0 => '2',
1 => 0,
2 => 0,
3 => 1386153500,
4 => 1386153500,
5 => 50,
6 => '1',
)]
Error code: dmlreadexception
Stack trace:

line 441 of /lib/dml/moodle_database.php: dml_read_exception thrown
line 996 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
line 599 of /lib/enrollib.php: call to mysqli_native_moodle_database->get_records_sql()
line 147 of /blocks/course_overview_campus/block_course_overview_campus.php: call to enrol_get_my_courses()
line 296 of /blocks/moodleblock.class.php: call to block_course_overview_campus->get_content()
line 238 of /blocks/moodleblock.class.php: call to block_base->formatted_contents()
line 956 of /lib/blocklib.php: call to block_base->get_content_for_output()
line 1008 of /lib/blocklib.php: call to block_manager->create_block_contents()
line 353 of /lib/blocklib.php: call to block_manager->ensure_content_created()
line 37 of /theme/formal_white/layout/general.php: call to block_manager->region_has_content()
line 866 of /lib/outputrenderers.php: call to include()
line 796 of /lib/outputrenderers.php: call to core_renderer->render_page_layout()
line 153 of /my/index.php: call to core_renderer->header()

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.