Proyectos de Subversion Moodle

Rev

Autoría | Ultima modificación | Ver Log |

{{!
    This file is part of Moodle - http://moodle.org/

    Moodle is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    Moodle is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
}}
{{!
    @template tool_lp/competency_summary

    Summary of a competency

    Context variables required for this template:
    * competency
      * id
      * shortname
      * idnumber
      * description
    * framework
      * shortname
    * comppath array of ancestors
    * showrelatedcompetencies boolean
    * related
    * showrule boolean
    * rule
      * outcome
      * type

    Example context (json):
    {
        "competency": {
            "id": 1,
            "shortname": "C1",
            "idnumber": "PATH",
            "description": "Can do something"
        },
        "framework": {
            "shortname": "F1"
        }
    }
}}
<div class='competency-heading'>
    <div id="competency_link_{{competency.id}}" class="mt-2 d-block">

        <div class="d-inline-flex align-items-center">
            <h5 class="mb-0">{{{competency.shortname}}}</h5>
            {{#showlinks}}
                <a href="{{pluginbaseurl}}/competencies.php?competencyid={{competency.id}}"><span class="badge badge-info ml-2">{{competency.idnumber}}</span></a>
            {{/showlinks}}
            {{^showlinks}}
                <span class="badge badge-sq badge-xs badge-light ml-2">{{competency.idnumber}}</span>
            {{/showlinks}}
        </div>
    </div>
    {{#framework}}
        <div class="competency-origin mt-3 pt-3 border-top">
            <div class="d-inline-flex align-items-center">
                <h3 class="mb-0">{{{framework.shortname}}}</h3>
                <span class="badge badge-info ml-2">{{taxonomyterm}}</span>
            </div>
        </div>
    {{/framework}}
</div>

{{#competency.description}}
<p>{{{competency.description}}}</p>
{{/competency.description}}

{{#comppath}}
<hr />
    <span class="float-left">{{#str}}path, tool_lp{{/str}}&nbsp;</span>{{> tool_lp/competency_path }}
{{/comppath}}
{{#showrelatedcompetencies}}
    {{> tool_lp/related_competencies }}
{{/showrelatedcompetencies}}

{{#showrule}}
    <h5>{{#str}}competencyrule, tool_lp{{/str}}</h5>
    <dl>
        <dt>{{#str}}outcome, tool_lp{{/str}}</dt>
        <dd>{{rule.outcome}}</dd>
        <dt>{{#str}}when, tool_lp{{/str}}</dt>
        <dd>{{rule.type}}</dd>
    </dl>
{{/showrule}}