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

4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
<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
21 22 23
<div
    id="${element_id}"
    class="${element_class}"
24 25
    data-ask-to-send-username="${ask_to_send_username}"
    data-ask-to-send-email="${ask_to_send_email}"
Valera Rozuvan committed
26
>
27

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

% 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

61
</div>