Showing courses in two blocks by category in Moodle Dashboard - moodle

We have Moodle site v.3.6.3+ and we are trying to customise the view of dashboard.
We have 10 courses with 2 main categories, and need to display each category courses in a separate block in the dashboard.
Students may be enrolled in 2 courses from the first category and enrolled in 3 courses from the second category. So we need to display the enrolled courses of first category in one block and the other enrolled courses of second category in the other block.
We searched for a plugin which may provides this feature, but with no luck.

Add the "Recently accessed block" in your dashboard and look for the "myoverview" and "recentlyaccssedcourses" folders under block in your application directly. You might have to look forward about how the code is written in "myoverview" block and modify the "recentlyaccssedcourses" accordingly. Since, I am also working on the same this is as far as i reached.

I try to duplicate the myoverview block as a new one. Making all the proper changes to create a new block. I also use grunt to recreate the amd modules.
But something was missing because wasn't loading the courses.
I fix this by using pure js, duplicating the node element of the block, and filtering it with js.

Related

Is there a way to permanently add a box displaying points of students in the navbar

So I am working on a project that awards points to students for submitting assignments or participating in forums, these points are then exposed as an Http resource using Flask.
The points are calculated by looking at the events triggered for each student.
One of the requirements right now is to add a box next to the student's name that shows the total amount of points they have. I have two ways of accessing the points, either by an http request from moodle or by storing and retrieving the points from moodle's database.
My question is what is the best approach of creating this "box", I have tried using moodle blocks and hacking the code but nothing seems to be working. Is creating a plugin for this the only solution or is there a simpler way to do it (if it is even possible)?
To answer your question properly you should have provided at least the theme and the Moodle version you work with. Should this box be displayed everywhere? Is the score calculated for every course individually?
Two proposals that came into my mind:
You could create a custom plugin of type block. There you can display the score of the user of the session and the top ten for example (If the score is calculated for each course individually). A disadvantage is that every teacher of a course could remove that block easily, if he or she wants to.
If the score counts system-wide you could put that box at the start page of your Moodle website, where only people with higher rights will be able to remove it.
If you use boost you could display the score in the navbar right next to the users name. For that you will have to create a new child theme of boost and overwrite navbar.mustache of theme_boost which get's it's information from columns2.php because it's included into columns2.mustache. In this PHP file you can include your logic and display it with the HTML which you put into navbar.mustache.
Of course these are not really simple ways to do that. But at the moment I doubt that an easy solution exists for this problem.

Master-detail view using a found set

I have two tables: Users and Tasks. Each User can have many Tasks but every Task can have only one User.
If I click on John Smith in the first layout I'll be taken to a new layout that shows me only John's tasks (thanks to "Go to related record" script).
Now, what I'm trying to accomplish - and need some help with - is from this layout I would like to be able to see a scrolling list of all John's tasks on the left (but only their titles). When I select, say, Task 20 I want to see all of Task 20's metadata on the right. In other words, a master-detail view like this:
I followed this video tutorial​ which got me close to my goal but not all the way. If you skip to the 6:20 mark you can see what he does. But basically his approach is this:
From the Contacts layout he creates a portal.
He creates a summary field called listOf and chooses to create a "List of" IDs from the Contacts table
He creates a relationship from the ID field and the listOf field
He populates the portal with this data
He uses a script to "Go to related record" when the user clicks on a button in the row
This approach works great for the master-detail view, but it has one problem for me. I don't want to see all tasks, just John's tasks (or whoever I clicked on in the previous layout).
Not sure how to solve this. Do I need to create a "Constrained found set" when I navigate from John Smith's record in the previous Users layout?
First, I would have a standard portal on the left, using a cartesian join to show all records, or you can use this technique with the summary field if you wish, but it is not necessary.
Then add a filter to the portal to only display records with the same User ID as the current record. This will accomplish what you need.

Create a Google Form (or similar) that verifies Student ID before submission

Context:
I teach at a university with mostly monolingual, English-speaking teachers, and students with mostly Russian and Kazakh names.
I want to create a simple form (like this https://docs.google.com/forms/d/1zo0vSfrH-xIosENy1wVjOd_VvPL5LL6UX6g4VqIPFn0/viewform ) that would keep track of reports of plagiarism on a Google Sheet (like this https://docs.google.com/spreadsheets/d/1h2nAvCq31xumi4SvjMvWWp8RR7ppJ_NtLCiuvrLqVkc/edit?usp=sharing )
Having the English speaking teachers type in Russian and Kazakh names would likely lead to mistakes. There are too many students at the university to choose them from a drop-down menu, and would be too many teachers and courses to create separate Google Forms for all of them, or to use Google's branching page choices (it would require creating hundreds of pages). So I would like instructors to be able to type in the Student ID # and their own Instructor ID #, and then have some way to verify that they have typed that information in correctly (so we don't have the wrong students being penalized, or penalties that don't get assigned to any student at all).
Questions:
1. Is there any possible way (via scripting, an add-on, etc.) to have Google Forms take the Student ID from Page 1, then look up the student's name on the Student Info tab of the Google Sheet and insert it into the text field on the second page of the Google form, so the instructor can verify it's the correct student? (Or any other technique anyone can think of that would allow a Google Form user to verify that they had entered the correct data, or help manage the massive number of choices of students in a university of several thousand students.)
If (as I'm afraid), there is no way to do it with Google Forms, can anyone suggest a Form creation platform that would do something like this, and that would integrate with Google Sheets or something similar?
Any help would be appreciated. Thanks in advance.
If you are open to doing it differently I'd go this route...
1) Use a short answer box and allow edits to answers.
2) Put the onSubmit() trigger into the sheet. When a submission comes in, send a follow up email to the person with the ID that they typed and the student name that it corresponds to. Let them know that no action is required if that is correct. If it isn't correct, they should edit their response with the edit response link which you can get using getEditResponseUrl(). I'd call it done right here and only worry about additional features if they are needed. It isn't as ideal as verifying at the time but would get the same thing done for people that can't keep their IDs straight. :-)
3) But... if you have people that keep messing up and they don't fix their issues or whatever, add a link in the email to confirm that the entry is accurate. If it isn't then a weekly/daily task runs that deletes any entries that haven't been confirmed and are older than Y days.
4) Alternately, instead of verifying what they type, give them drop down lists made up of a combination of student ID and name. I'd have multiple lists, depending on the number of active students. One or many though, make a script in the sheet that updates the dropdowns in the form either on edit or by manually running the script, either from a menu item or by attaching it to an icon on the page where the IDs/names are at. They should see 12345 - Joe Smith as the option and can find the right one if that student name doesn't match the ID they thought they should use.
I have a script like #4 that I use to populate a form with updated products whenever the list changes. I tied it to a big red button JPG to help the end users remember to run it when they change something, as a menu option didn't work and running every time there was an edit was too much.
If you list of students/IDs also includes the teachers/classes/etc you could even do custom forms for each staff member that uses the form that only populates their students. Not sure how many staff you have so that might not be practical. Though again, once you have the script and the data is accurate, updates are a single click.

Best Product Listing Option for Concrete5

I'm going to be creating a Concrete5 website that will feature product listings. The listing system must offer all your typical ecommerce features, minus the ability to purchase items. It's strictly for browsing purposes only.
For example:
- Browse by category
- Search products
- Listings/results page with thumbnails and brief information (title, description, price in US/CAD, manufacturer, maker, etc.)
- Products single page (with detailed information, attributes and gallery/images)
All the things you'd expect to find in a listing system.
My issue is I can't find a specific add-on for something like product listings. This leaves me thinking that it may be best to use the e-commerce add on and do my best to hide anything related to the cart/payment process. That way it could just be used for everything else it offers.
What are your thoughts on this? Is there a better option?
Thanks for the advice!
Use the page list block. It has everything you need except for searching. But, in essence, that's what your requirements call for -- listing of pages.
Create a page type for your "product". The "brief information" can be in the Content block, or you can set as attributes. You'll probably want to make some minor changes to the block's view (by creating a new template) that displays the image as you want, the proper attributes, etc. Something similar to http://www.concrete5.org/documentation/how-tos/designers/styling-the-page-list-block/
There are several adanced page list blocks in the marketplace. You might want to start with those.
Right creat Page type.
After creat Page attributes.
Add a block page_list create a template for it and filter by attributes.
You can even use ajax to filter.
http://www.weblicating.com/doku/doku.php?id=cheatsheet/#.UbR7P0BmiSp
U can find here about page_list or read documentation Concrete5.

creating interface for adding n number of products to a category using umbraco

I know this question has been asked many times i went through all of them but couldn't find the right solution hence writing my problem here may be again...
I want to create CMS for category-Products solution..i think the name itself is quite explanatory..
Every category can have n number of products in to it.
but i couldnt get how can i do this via umbraco.
i know, i can access child not via inline razor macro but how to access child node contents ...or may be some other right way!!
Please dont give me links to Run away modules..i have already visited them ...and could understand very little...
Any suggestion will be helpful.
Create (if you haven't already) two different document types; one called Category, the other called Product. (You'll also want to add the appropriate properties.) In the Structure tab of Category, be sure to allow Product (and don't forget to allow Category under whatever type it will live). From here, you should be able to create Category nodes, and then beneath each of them, Product nodes.