lti.html 2.18 KB
Newer Older
1 2 3 4
<%!
import json
from django.utils.translation import ugettext as _
%>
5

6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
<h2 class="problem-header">
    ## Translators:  "External resource" means that this learning module is hosted on a platform external to the edX LMS
    ${display_name} (${_('External resource')})
</h2>

% if has_score and weight:
    <div class="problem-progress">
        % if module_score is not None:
            ## Translators: "points" is the student's achieved score on this LTI unit, and "total_points" is the maximum number of points achievable.
            (${_("{points} / {total_points} points").format(points=module_score, total_points=weight)})
        % else:
            ## Translators: "total_points" is the maximum number of points achievable on this LTI unit
            (${_("{total_points} points possible").format(total_points=weight)})
        % endif
    </div>
% endif

Valera Rozuvan committed
23 24 25
<div
    id="${element_id}"
    class="${element_class}"
26 27
    data-ask-to-send-username="${ask_to_send_username}"
    data-ask-to-send-email="${ask_to_send_email}"
Valera Rozuvan committed
28
>
29

30
% if launch_url and launch_url !=  'http://www.example.com' and not hide_launch:
31
    % if open_in_a_new_page:
32
        <div class="wrapper-lti-link">
33 34 35
            % if description:
                <div class="lti-description">${description}</div>
            % endif
polesye committed
36
            <p class="lti-link external"><a target="_blank" class="link_lti_new_window" href="${form_url}">
37
                ${button_text or _('View resource in a new window')}
38
                 <i class="icon fa fa-external-link"></i>
39 40
            </a></p>
        </div>
41 42 43
    % else:
        ## The result of the form submit will be rendered here.
        <iframe
44
            title="Form Result"
45
            class="ltiLaunchFrame"
polesye committed
46
            name="ltiFrame-${element_id}"
47
            src="${form_url}"
48 49
        ></iframe>
    % endif
50
% elif not hide_launch:
51
    <h3 class="error_message">
Valera Rozuvan committed
52
        ${_('Please provide launch_url. Click "Edit", and fill in the required fields.')}
53
    </h3>
54
% endif
55 56 57 58 59 60 61 62 63

% if has_score and comment:
    <h4 class="problem-feedback-label">${_("Feedback on your work from the grader:")}</h4>
    <div class="problem-feedback">
        ## sanitized with bleach in view
        ${comment}
    </div>
% endif

64
</div>