diff --git a/gnowsys-ndf/gnowsys_ndf/ndf/static/ndf/js/meta_info.js b/gnowsys-ndf/gnowsys_ndf/ndf/static/ndf/js/meta_info.js new file mode 100644 index 0000000000..a97adc2ec5 --- /dev/null +++ b/gnowsys-ndf/gnowsys_ndf/ndf/static/ndf/js/meta_info.js @@ -0,0 +1,24 @@ +var header_logo_dataURL; +function toDataUrl(url, callback) { + var xhr = new XMLHttpRequest(); + xhr.onload = function() { + var reader = new FileReader(); + reader.onloadend = function() { + callback(reader.result); + } + reader.readAsDataURL(xhr.response); + }; + xhr.open('GET', url); + xhr.responseType = 'blob'; + xhr.send(); +} + +toDataUrl('/static/ndf/images/Clix-logo.png', function(myBase64) { + header_logo_dataURL = myBase64; // myBase64 is the base64 string +}); + + +function get_current_datetime_val(){ + var date = new Date(); + return date.toDateString() + " " + date.toLocaleTimeString() +} diff --git a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/admin_course_analytics.html b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/admin_course_analytics.html new file mode 100644 index 0000000000..81f370a577 --- /dev/null +++ b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/admin_course_analytics.html @@ -0,0 +1,237 @@ +{% load i18n %} +{% load multiply from simple_filters %} +{% load get_group_object check_is_gstaff get_profile_full_name from ndf_tags %} + + + + + + + + + + + + + + + + + +{% get_profile_full_name request.user as req_user_full_name %} +
+
+ {% trans "Your analytics is loading. Please wait." %} +
+ +
+
+
+ Points table for students
+   + Gallery uploads +   + Note Making +   + Quiz Performance +   + Interactions
+ * Click on the student's name to view detailed analytics. +
+
+
+
+
+
+
+ +
+ + \ No newline at end of file diff --git a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/course_about.html b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/course_about.html index 0a46399aca..6c6ff7f756 100755 --- a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/course_about.html +++ b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/course_about.html @@ -221,14 +221,8 @@
Subject
-
- - - -
- - - {# #} +

+ {# #} {% endif %} @@ -255,358 +249,8 @@
Created On
{# #} {# #} +

-
-
- - - - - - -{% if show_analytics_notifications %} -{% check_is_gstaff group_id request.user as gstaff_access %} -
-
- {#
#} - {% comment %} -
-
ONGOING SESSION
-

Taking Screenshots of the work and doing something

- -
- {% endcomment %} -
-
    -
  • Notifications
  • - - {% if request.user.is_authenticated and not gstaff_access %} - {# {% if request.user.is_authenticated and not gstaff_access and request.user.id in group_obj.author_set %} #} -
  • - Progress Report -
  • - - {% elif gstaff_access or request.user.id in group_object.group_admin %} - -
  • Group Analytics
  • - {% endif %} - -
-
- -
- {% if gstaff_access %} -
-
-
- Points table for students -
-
-   - Gallery uploads -   - Note Making -   - Quiz Performance -   - Interactions -
-
- * Click on the student's name to view detailed analytics. -
-
-
-
-
- - {% endif %} - -
-
-
- {#
#} -
-
- -{% endif %} + {% endblock head %} {% block body_content %} @@ -63,18 +64,23 @@ {% if request.user.is_authenticated %} -
  • - - {% if 'Group' in group_object_member_of_names_list %} - {% trans "Stats" %}{% else %}{% trans "Progress Report" %} - {% endif %} - -
  • - {% endif %} +
  • + + {% if 'Group' in group_object_member_of_names_list %} + {% trans "Stats" %}{% else %} + {% if is_gstaff %} + {% trans "Group Progress" %} + {% else %} + {% trans "Progress" %} + {% endif %} + {% endif %} + +
  • + {% endif %} {% if 'Group' in group_object_member_of_names_list and "base_unit" not in group_object_member_of_names_list and "announced_unit" not in group_object_member_of_names_list %} -
  • - {% trans "Topic Map" %} -
  • +
  • + {% trans "Topic Map" %} +
  • {% endif %} {% comment %}
  • @@ -204,7 +210,6 @@

    {% trans "Delete Unit:" %} {% firstof group_object.altnames group_object.nam
    -
    {% if title == "about" %} {% include "ndf/course_about.html" %} @@ -216,10 +221,14 @@

    {% trans "Delete Unit:" %} {% firstof group_object.altnames group_object.nam {% include "ndf/gnotebook.html" %} {% endif %}

    -
    - {% if title == 'progress_report' %} +
    + {% if title == 'course_analytics' %} + {% if is_gstaff %} + {% include "ndf/admin_course_analytics.html" %} + {% else %} {% include "ndf/user_course_analytics.html" %} {% endif %} + {% endif %}
    {% if title == 'course content' %} diff --git a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/lms_dashboard.html b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/lms_dashboard.html index d001c73f9c..be59fac67b 100644 --- a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/lms_dashboard.html +++ b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/lms_dashboard.html @@ -5,6 +5,10 @@ {# lms_dashboard.html lms My Desk screen #} {% block title %} My Desk {% endblock%} +{% block head %} + +{% endblock %} + {% block body_content %} {% load ndf_tags %} {% get_gstudio_workspace_instance as is_workspace_instance %} @@ -216,7 +220,6 @@

    Joined Workspaces and Enrolled Courses

    Close [×] -
    @@ -224,7 +227,6 @@

    Joined Workspaces and Enrolled Courses

    function show_my_performance(this_obj){ data_unit_id = $(this_obj).attr("data-node-id"); - $.blockUI(); $.ajax({ url: "{% url 'course_analytics' group_id request.user.id %}", type: "GET", @@ -232,9 +234,7 @@

    Joined Workspaces and Enrolled Courses

    data: { "data_unit_id":data_unit_id }, - global: false, success: function(data){ - $.unblockUI(); $('.performaceReportModalData').html(data); $('#performaceReportModal').foundation('reveal', 'open'); }, @@ -302,6 +302,5 @@

    Joined Workspaces and Enrolled Courses

    } }); - {% endblock %} diff --git a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/user_course_analytics.html b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/user_course_analytics.html index ff8a4a6e3c..374e6fd0b6 100644 --- a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/user_course_analytics.html +++ b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/user_course_analytics.html @@ -1,6 +1,7 @@ {% load i18n %} {% load multiply from simple_filters %} -{% load get_group_object from ndf_tags %} +{% load get_group_object check_is_gstaff get_site_variables from ndf_tags %} +{% get_site_variables as site %}