| 1 | efrain | 1 | {{!
 | 
        
           |  |  | 2 |     This file is part of Moodle - http://moodle.org/
 | 
        
           |  |  | 3 |   | 
        
           |  |  | 4 |     Moodle is free software: you can redistribute it and/or modify
 | 
        
           |  |  | 5 |     it under the terms of the GNU General Public License as published by
 | 
        
           |  |  | 6 |     the Free Software Foundation, either version 3 of the License, or
 | 
        
           |  |  | 7 |     (at your option) any later version.
 | 
        
           |  |  | 8 |   | 
        
           |  |  | 9 |     Moodle is distributed in the hope that it will be useful,
 | 
        
           |  |  | 10 |     but WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
        
           |  |  | 11 |     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 | 
        
           |  |  | 12 |     GNU General Public License for more details.
 | 
        
           |  |  | 13 |   | 
        
           |  |  | 14 |     You should have received a copy of the GNU General Public License
 | 
        
           |  |  | 15 |     along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
 | 
        
           |  |  | 16 | }}
 | 
        
           |  |  | 17 | {{!
 | 
        
           |  |  | 18 |     @template core_courseformat/local/content/section/cmsummary
 | 
        
           |  |  | 19 |   | 
        
           |  |  | 20 |     Displays the activities summary of a section.
 | 
        
           |  |  | 21 |   | 
        
           |  |  | 22 |     Example context (json):
 | 
        
           |  |  | 23 |     {
 | 
        
           |  |  | 24 |         "showcompletion": true,
 | 
        
           |  |  | 25 |         "mods": [
 | 
        
           |  |  | 26 |             {
 | 
        
           |  |  | 27 |                 "name": "Forums",
 | 
        
           |  |  | 28 |                 "count": "3"
 | 
        
           |  |  | 29 |             },
 | 
        
           |  |  | 30 |             {
 | 
        
           |  |  | 31 |                 "name": "Books",
 | 
        
           |  |  | 32 |                 "count": "2"
 | 
        
           |  |  | 33 |             }
 | 
        
           |  |  | 34 |         ],
 | 
        
           |  |  | 35 |         "modprogress": "Total 5"
 | 
        
           |  |  | 36 |     }
 | 
        
           |  |  | 37 | }}
 | 
        
           |  |  | 38 | {{#modprogress}}
 | 
        
           | 1441 | ariadna | 39 | <div class="section-summary-activities d-flex flex-wrap">{{#mods}}<span class="badge badge-xs badge-light">{{name}}: {{count}}</span>{{/mods}}
 | 
        
           | 1 | efrain | 40 |     {{#showcompletion}}
 | 
        
           |  |  | 41 |     <div class="rui-modprogress sr-only" id="rui-modprogress-{{id}}">
 | 
        
           |  |  | 42 |         {{modprogress}}
 | 
        
           |  |  | 43 |     </div>
 | 
        
           |  |  | 44 |   | 
        
           |  |  | 45 |     <div class="rui-course-progresschart w-100 bg-white rounded border p-2 px-3 mt-2">
 | 
        
           |  |  | 46 |         <div class="course-progressbar-wrapper">
 | 
        
           |  |  | 47 |             <div class="row no-gutters align-items-center">
 | 
        
           |  |  | 48 |                 <div class="progressbar-container col">
 | 
        
           |  |  | 49 |                     <div class="rui-progress my-2">
 | 
        
           | 1441 | ariadna | 50 |                         <div class="rui-progress-bar" role="progressbar" aria-valuenow="" aria-valuemin="0" aria-valuemax="100" data-bs-toggle="tooltip"></div>
 | 
        
           | 1 | efrain | 51 |                     </div>
 | 
        
           |  |  | 52 |                 </div>
 | 
        
           |  |  | 53 |   | 
        
           |  |  | 54 |                 <div class="rui-progress-count">
 | 
        
           |  |  | 55 |                     <svg class="icon mx-1" width="24" height="24" fill="none" viewBox="0 0 24 24">
 | 
        
           |  |  | 56 |                         <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4.75 12C4.75 7.99594 7.99594 4.75 12 4.75V4.75C16.0041 4.75 19.25 7.99594 19.25 12V12C19.25 16.0041 16.0041 19.25 12 19.25V19.25C7.99594 19.25 4.75 16.0041 4.75 12V12Z"></path>
 | 
        
           |  |  | 57 |                         <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9.75 12.75L10.1837 13.6744C10.5275 14.407 11.5536 14.4492 11.9564 13.7473L14.25 9.75"></path>
 | 
        
           |  |  | 58 |                     </svg>
 | 
        
           |  |  | 59 |                     <div class="d-flex">
 | 
        
           |  |  | 60 |                     <div class="rui-progress-count-completed" data-id="{{id}}"><div class="count-completed-value"></div></div>
 | 
        
           |  |  | 61 |                     <span class="pl-1">/</span>
 | 
        
           |  |  | 62 |                     <div class="rui-progress-count-total d-flex"><div class="count-total-value"></div></div>
 | 
        
           |  |  | 63 |                 </div>
 | 
        
           |  |  | 64 |             </div>
 | 
        
           |  |  | 65 |         </div>
 | 
        
           | 1441 | ariadna | 66 |     </div>{{/showcompletion}}</div>{{/modprogress}}
 |