Skip to content

Commit

Permalink
Merge branch 'dm_cpy' of https://github.com/SheetalKashid/gstudio int…
Browse files Browse the repository at this point in the history
…o dm_cpy
  • Loading branch information
SheetalKashid committed Dec 20, 2019
2 parents bc0568d + 5485c41 commit 6242df2
Show file tree
Hide file tree
Showing 16 changed files with 1,046 additions and 11 deletions.
61 changes: 61 additions & 0 deletions doc/release-scripts/19.07.r1.patch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# Patch 19.07.r1-patch [July'19]
---
## Repositories

1. **gStudio**:
- Repository : https://github.com/gnowledge/gstudio
- Commit: `235eb4e9818a333e132595664838a22c8e4b4d11`
- Branch: `master`


---
## Scripts/Actionables

- **Updating `gstudio` repository**:
+ git fetch https://github.com/gnowledge/gstudio master
+ git merge `<commit_hash>`

---

## Bugs & Issues:
- Bug: qbank.tar.gz files (which are compressed Mongo dump of Qbank part of school db) copied through syncthing didnt have complete data for most schools.
- URL: https://github.com/CLIxIndia-Dev/qbank-gstudio-scripts
- Commit Number: `002cbdff2e596f2dab6f0b2c14efd5a561b3dae0`
- Branch: `master`
- Fix: Changed timeout from 60 seconds to 30 min(1800 seconds).
`gstudio code update`

---
## New Features:
- Assessment report download in CSV and PDF format.
+ Assessment_Results button will be visible on all the activity pages containing OpenAssessments.
+ Assessment Reports can be downloaded by Teacher or Administrator login ids.
+ **Observations**
+ Given are the Assessment Types when user attempts the assessments,the particular results gets stored.

a. Multiple Choice
b. True and False
c. Survey
d. Short answer
e. Multiple answers

+ Given are the Assessment Types when user attempts the assessments, the results being stored as "Response recorded".

a. Drag and drop
b. Movable object chain
c. Movable words sentence
d. Movable words sandbox

+ Given are the Assessment Types shows the file name of the recorded audio or uploaded files as responses.

a. File upload
b. Audio upload


+ Results are being displayed when assessments are attempted in English, Hindi and Telugu.
+ URL: `https://github.com/gnowledge/gstudio`
+ Commit Number: `235eb4e9818a333e132595664838a22c8e4b4d11`
+ Branch: `master`
`gstudio code update`


108 changes: 108 additions & 0 deletions doc/release-scripts/template_addition.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
from gnowsys_ndf.ndf.models import *
from gnowsys_ndf.ndf.views import *
from gnowsys_ndf.settings import *

active_node = node_collection.collection.GSystem()
tags = []
group_id = '58bd05c45a162d0148f65c71'
active_node.fill_gstystem_values(tags = tags)
active_node.name = unicode('Photo_Slider')
active_node.group_set = [ObjectId('58bd05c45a162d0148f65c71')]
active_node.type_of = [ObjectId('58d24b6af9d307025372fda6')]
active_node.created_by = 1
active_node_content = '''
<script src="/static/ndf/js/slider.js"></script>
<script src="/static/ndf/bower_components/slick/slick.js"></script>
<!--script src="/static/ndf/bower_components/slick-carousel/slick/slick.js"></script>
<script src="/static/ndf/bower_components/slick-carousel/js/scripts.js"></script-->
<style>
html, body {
margin: 0;
padding: 0;
}
* {
box-sizing: border-box;
}
.slider {
width: 50%;
margin: 100px auto;
}
.slick-slide {
margin: 0px 20px;
}
.slick-slide img {
width: 100%;
}
.slick-prev:before,
.slick-next:before {
color: #713558;
font-size: 2vw;
}
.slick-slide {
transition: all ease-in-out .3s;
opacity: .2;
}
.slick-active {
opacity: 0.75;
}
.slick-current {
opacity: 1;
}
// #slider_ul{
// @media screen and (min-width: 1024px) {
// width:calc(900px + 2vmin);
// }
// @media screen and (min-width: 768px) {
// width:calc(600px + 2vmin);
//}
//@media screen and (max-width:425px){
// width:calc(300px + 2vmin);
//}
//}
.slick-dots li button:before
{
opacity: 1 !important;
color: white;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.slick-dots li.slick-active button:before
{
opacity: 1 !important;
color: white;
}
.slick-dots li.slick-active button::after
{
opacity: 1 !important;
color: white;
}
.slick-dots li{
font-size:2vw !important;
}
.slick-dots li button::before {
font-size: 1vw !important;
}
</style>
<!--section class="vertical-center slider" id="slider_ul" style="width:900px"></section-->
<section class="single-item slider" id="slider_ul">Sliders</section>
'''
#active_node_content = u'<style type="text/css">html, body {\r\nmargin: 0;\r\npadding: 0;\r\n}\r\n* {\r\nbox-sizing: border-box;\r\n}\r\n.slider {\r\nwidth: 50%;\r\nmargin: 100px auto;\r\n}\r\n.slick-slide {\r\nmargin: 0px 20px;\r\n}\r\n.slick-slide img {\r\nwidth: 100%;\r\n}\r\n.slick-prev:before,\r\n.slick-next:before {\r\ncolor: #713558;\r\n}\r\n\r\n.slick-slide {\r\ntransition: all ease-in-out .3s;\r\nopacity: .2;\r\n}\r\n.slick-active {\r\nopacity: .5;\r\n}\r\n.slick-current {\r\nopacity: 1;\r\n}\r\nsection{\r\n@media screen and (min-width: 1024px) {\r\nwidth:calc(900px + 2vmin);\r\n}\r\n@media screen and (min-width: 768px) {\r\nwidth:calc(600px + 2vmin);\r\n}\r\n@media screen and (max-width:425px){\r\nwidth:calc(300px + 2vmin);\r\n}\r\n}\r\n</style>\r\n<script>\r\nfunction image_list(){\r\nvar image = [\'/media/4/7/2/c31079fcc30ab3b6b7e34c15d15d192a6012cba11aac317ebf72cdb2cb5c0.png\',\'/media/a/2/c/73c197b755bd98fba342f66f10ecfee03c7d283bbdf258a7c3fef291fb2c7.png\'];\r\nvar i = 0;\r\nfor(i =0;i < image.length;i++){\r\n//var listitem_div = document.createElement(\'DIV\');\r\n//listitem_div.id = i;\r\nvar image_element = document.createElement(\'IMG\');\r\nimage_element.setAttribute(\'src\',image[i]);\r\n//listitem_div.appendChild(image_element);\r\ndocument.getElementById("slider_ul").appendChild(image_element);\r\n}\r\n//$( "#slider_ul" ).load(window.location.href + " #slider_ul" );\r\n// location.reload();\r\n}\r\n}\r\n</script><!--section class="vertical-center slider" id="slider_ul" style="width:900px"></section-->\r\n<section class="vertical-center slider" id="slider_ul">Sliders</section>\r\n<script>\r\n$(document).on(\'ready\', function() {\r\n$(".vertical-center").slick({\r\ndots: true,\r\nvertical: true,\r\ncenterMode: true,\r\n});\r\n});\r\n</script>'

active_node.content = unicode(active_node_content)
#active_node.content = active_node_content.encode('ascii', 'xmlcharrefreplace')
active_node.save(groupid = group_id)
print active_node


39 changes: 39 additions & 0 deletions doc/script_to_find_existing_authored_assessment_links.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#script to find the existing authored assessments based on a given Assessment_Offered Id as input.
import pymongo
import pprint
from pymongo import MongoClient
from gnowsys_ndf.ndf.models import *

client = MongoClient('localhost', 27017)
db = client['assessment']
#print db
#print client
collection = db['AssessmentOffered']
#print collection

print "General Instructions for authoring: Open the existing assessment activity that u want to modify"
print "check the iframe source and copy the Assessment Offered Id that lies in between %3A <Assessment_Offered Id> %40ODL.MIT.EDU"
print "\n"

Offrd_id=raw_input("Enter the Assessment_Offered Id:")
print "Please verify the Assessment_Offered_Id you entered:",Offrd_id

# sample authoring link: auth_link='https://assessments-clix.tiss.edu/#/banks/assessment.Bank%3A58bd924b91d0d90b7ee4aa8e%40ODL.MIT.EDU/assessments/assessment.Assessment%3A58be5f0591d0d91c07bbb6f2%40ODL.MIT.EDU/'

ofd_data=collection.find_one({"_id": ObjectId(Offrd_id)},{'_id':0,'assessmentId':1})
#print ofd_data['assessmentId']

bank_id=collection.find_one({"_id":ObjectId(Offrd_id)},{'_id':0,'assignedBankIds':1})
bnk_id= bank_id['assignedBankIds']
#print bnk_id[0]
print"="*90
auth_link='https://assessments-clix.tiss.edu/#/banks/'+bnk_id[0]+'/assessments/'+ofd_data['assessmentId']+'/'
print "\n"
print "Click on this authoring link to edit the existing assessment:-",auth_link
print "\n"
print "Note:- Click on the authoring link above to edit the assessment, first click on unpublish, edit the assessment, then click on publish and recheckwhether the assessments modification getting reflected."





2 changes: 2 additions & 0 deletions gnowsys-ndf/gnowsys_ndf/ndf/models/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,9 @@ def user_details_dict(self):

contributor_names = []
for each_pk in self.contributors:
#print "user:",User.objects.get(pk=each_pk).username
contributor_names.append(User.objects.get(pk=each_pk).username)
#print "contributor:",contributor_names
user_details['contributors'] = contributor_names

if self.modified_by:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,7 @@
padding: 0 0 10px !important;
border-bottom: 2px solid #ddd;
opacity: 0;
overflow-y: scroll;
overflow-y: hidden;
transition: all 1s ease-in-out;
}

Expand Down
19 changes: 19 additions & 0 deletions gnowsys-ndf/gnowsys_ndf/ndf/static/ndf/js/slider.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
$(document).on('ready', function() {

// $(".single-item").slick({
// dots: true,
// vertical: false,
// centerMode: true,
// });
// $('.one-time').slick({
// dots: true,
// infinite: true,
// speed: 300,
// slidesToShow: 1,
// adaptiveHeight: true
// });
$(".single-item").slick({
vertical:false,
dots:true
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@

{% block body_content %}
{% check_is_gstaff group_id request.user as is_gstaff %}
{% check_if_pre_or_post_assessment node.pk as show_assessmentresults %}
{% user_access_policy groupid request.user as user_access_priv %}
{% get_group_object groupid as group_object %}
{% get_attribute_value node.pk 'discussion_enable' as node_discussion %}
{% get_attribute_value node.pk 'player_discussion_enable' as player_discussion %}
{% get_thread_node node.pk as thread_node_obj %}
{% get_attribute_value thread_node_obj.pk 'thread_interaction_type' as thr_int_type %}
{% get_default_discussion_lbl as disc_label %}

<style type="text/css">
.disabled , .disabled i {
color:gray !important;
Expand All @@ -41,8 +41,13 @@
</li>
<!--List item 2--><li class="li-size"><a href="#" title ="{% firstof group_object.altnames group_object.name %}" style="background-color: white !important;color:#713558;">
{% firstof group_object.altnames group_object.name %}
{% if is_gstaff and "QuizItemEvent" in node.member_of_names_list or "QuizItem" in node.member_of_names_list%}
{% if is_gstaff %}
{% if "QuizItemEvent" in node.member_of_names_list or "QuizItem" in node.member_of_names_list%}
<a href="{% url 'course_quiz_data' group_id %}" class="header_text_block right">RESULTS</a>
{% endif %}
{% endif %}
{% if is_gstaff and show_assessmentresults %}
<a href="{% url 'course_assessment_data' group_id node.pk%}" class="header_text_block right">Assessment_Results</a>
{% endif %}
</a>
</li>
Expand Down
Loading

0 comments on commit 6242df2

Please sign in to comment.