Author: Michael G
Showcase Shorts Edition #4
Hello Community Members,
Happy new year and welcome to our 4th edition of Showcase Shorts.
Despite the holiday period in play in most of our MoodleHQ team locations, we have made great progress during the last few weeks in delivering our product strategy.
Our plans for 2023 and beyond will see the development of Moodle’s product portfolio focus on ‘Improving our User Experience and Flow’ and ‘Evolving our Technology’.
Improving our user experience and flow
This sprint, we progressed a number of key initiatives under this umbrella which will come to fruition as part of the Moodle LMS 4.2 Release, scheduled for late April 2023.
You can find out more about expected changes to Course Hierarchy, including indentation and activity formatting, which have been informed by a thorough discovery process and supported by key members of the community by watching this ‘Showcase Short’.
We are also continuing our work on improving the Gradebook look and feel, with progress made during our last sprint demonstrated in this video.
Finally, we have further progressed work on Bulk Editing for courses and activities, a project proudly supported by the Moodle Users Association, which you can see in this short edit.
Evolving our technology
This sprint, we continued our focus on integrations with progress made towards enhancing our messaging experience through the introduction of an integration with Matrix and further improvements to our integration with TinyMCE. You can find out more about progress on these pieces of work by watching this video.
Recently completed research, conducted with our users and Moodle Partners, will inform the prioritisation of our integration efforts moving forward. To see a summary of the research findings, please watch this ‘Showcase Short’ presented by Carles Aguiló, our Technical Partnerships Manager.
Work also continues on our MoodleNet, Mobile Applications and MoodleCloud offerings which we will share with you in our next ‘Showcase Shorts’ editions.
More broadly, our strategy at Moodle will always include a continued focus on engagement with you, our Community!
In this short video, you can see the latest developments with enhancements to our Moodle Academy and Moodle.org sites.
And finally, before we leave you, we would like to congratulate the Moodle Workplace team on their most recent release, which you can find out more about in this note.
Until next sprint!
The Moodle Products Team
Specbee: How to create and apply a patch with Git Diff and Git Apply commands for your Drupal website
Akshay Devadiga
24 Jan, 2023
Git has been a reliable version control tool for a large number of closed and open-source projects. With Drupal being an extremely collaborative open-source content management framework, a trackable, transparent, and distributed version control system like Git is a perfect fit. Git replaced a long-time version control partner – CVS – in early 2011 and became every Drupal developer and contributor’s favorite tool for its security, distributed nature, agile workflow, and of course, being open source!
If you’re a Drupal developer, you should be familiar with patches already. Patches are like band-aids. They are small pieces of code that are added on top of already existing code files to support it or fix any issues. Different types of patches include bug fixes, security vulnerability fixes, performance enhancements, styling fixes, etc. If you are a regular contributor to the Drupal project, you should know that to fix an issue in Drupal core or contributed modules, you must submit a patch to an issue in the issues queue. These patches are then examined and tested by the module maintainer and applied if found beneficial.
This is a revised version of the article. We’d like to thank Anktiha Shetty and Pratik Kadambari for all their great inputs!
There are different ways to apply a Git patch. Let’s learn more about various Git Diff commands and how to create/apply a patch with the help of Git diff and Git apply. We will assume that you have already cloned/obtained a copy of the project in your local repository and have pulled the latest changes so you’re not working on an older version of the project. Take a look at some Github best practices here.
What does the Git Diff command do?
Git diff is a command to output the changes between two sources inside the Git repository. The data sources can be two different branches, commits, files, etc.
The common use cases of git diff commands are listed below.
• $ git diff
This command will output all the modified changes which are not added to git or staged.
• $ git diff filename
This will output the changes of that current file to its previous committed state.
• $ git diff branch_name
This will output the modifications of the current branch to the mentioned branch to its previous committed state.
• $ git diff –staged (or –cached) path/to/file
Once the changes are added to Git or moved to staging, you will not be able to see the diff of the files. To see the staged changes, you can use diff with –staged or –cached option.
• $ git diff HEAD
To see the changes from both staged and unstaged changes (not untracked files) together, you can use the git diff HEAD command. If you have all changes staged for commit, then both commands i.e., –staged/–-cached and HEAD will output the same.
• $ git diff commit_id1 commit_id2
To see the difference between any two commits you can use this git diff command where you need to mention the two commit ids.
If you want to see the list of commits made in the Git repo, use the command $ git log. This will list out all the commits (starting from the latest commit) along with their respective commit ids, the author (developer) and the date it was committed on.
Creating a Git patch with git diff
To create a Git patch, we can use any of the git diff commands to get the changes. We then need to save the changes to a file which can be used as below.
• $ git diff > my_custom_patch_file.patch
Apply the Git Patch
Drupal developers will want to apply Git patches frequently to update changes or to fix bugs. Developers will create a patch file that can be used by other developers according to their needs. To apply a git patch to the current branch use the following command.
• $ git apply patch_file.patch
Try the above command with the -v or –verbose option. It will cause additional information about the current patch being applied to be reported (as shown below).
Other useful Git patch apply conditions:
1. Working with trailing white spaces
Use –whitespace option to handle such situations.
Here the patch is created accidentally with trailing whitespaces (as shown below).
If the patch is applied as is: $git apply patch_file.patch
The patch will be applied (with whitespace warnings) and will still retain the whitespaces which can cause linting errors.
To fix trailing whitespaces while applying the patch, use the option –whitespace=fix, the patch will be applied, and trailing whitespaces will be removed.
Usage: $git apply –whitespace=fix patch_file.patch
2. Checking the patch before applying
To check before applying the patch, use option –check
The command will show no warnings and errors if the patch is applied cleanly.
3. To see file statistics before applying the patch
Use –stat option with the git apply command. It will list all files which will be changed upon applying the patch.
The patch will only show information, and will not be applied.
To apply patch along with “stat” options add option –apply in command.
Usage: $git apply –stat –apply patch_file.patch
4. To apply only changes that are getting removed
Use Option –no-add with git apply.
For example:
Here only changes in red will be applied and green will be excluded.
Usage: $git apply –no-add patch_file.patch
5. Exclude and include the patch to be applied to selected files
Use –exclude option to exclude files from applying patch change.
$git apply –exclude=file_name.ext patch_file.patch
Changes on other files, excluding mentioned file, will be reflected.
Vice versa:
$git apply –include=file_name.ext patch_file.patch
Changes only on the mentioned file will be reflected.
Rubber Duck Dev Show Episode 70 | Teaching Young Developers with Melissa Amaya
Increasing 5G Quality of Experience (QoE) Using SONiC and Open Packet Broker
5G has revolutionized the use of data services for mobile users worldwide, providing high data rate / high capacity, low latency, and massive connectivity. These characteristics of 5G have forced mobile carriers to increase their focus on ways to improve network service and their customer’s Quality of Experience (QoE). This requires sophisticated network monitoring to […]
The post Increasing 5G Quality of Experience (QoE) Using SONiC and Open Packet Broker appeared first on Linux.com.
Start this year fresh with Mozilla’s tech challenge
If you’ve already ditched your new year’s goals, we’re here to help. How about a refreshening of your online life with new habits and routines? Are there newsletters you don’t read anymore? Mobile apps you no longer use? Or social media platforms you’ve left (ahem, Twitter)? We want to help. We’ve put together a month-long […]
The post Start this year fresh with Mozilla’s tech challenge appeared first on The Mozilla Blog.
texinfo @ Savannah: Texinfo 7.0.2 released
We have released version 7.0.2 of Texinfo, the GNU documentation format. This is a minor bug-fix release.
It’s available via a mirror (xz is much smaller than gz, but gz is available too just in case):
http://ftpmirror.gnu.org/texinfo/texinfo-7.0.2.tar.xz
http://ftpmirror.gnu.org/texinfo/texinfo-7.0.2.tar.gz
Please send any comments to bug-texinfo@gnu.org.
Full announcement:
https://lists.gnu.org/archive/html/info-gnu/2023-01/msg00008.html