Commit 07401e0c authored by Kedar Aitawdekar's avatar Kedar Aitawdekar 💻 Committed by GitHub

Merge pull request #1599 from katkamrachana/alpha-dev

Provision to add Jhapps in Course content
parents ae076d37 8bc4ef82
......@@ -85,6 +85,6 @@ quizitem_max_attempts,QuizItem Maximum Attempts,int,[],"[""QuizItem"",""QuizItem
quizitem_check_answer,QuizItem Check Answer,bool,[],"[""QuizItem"",""QuizItemEvent""]",FALSE,TRUE,[],[],
quizitempost_user_submitted_ans,QuizItemPost User Submitted Answer,list,[],"[""QuizItemPost""]",TRUE,TRUE,[],[],
quizitempost_user_checked_ans,QuizItemPost User Checked Answer,list,[],"[""QuizItemPost""]",TRUE,TRUE,[],[],
discussion_enable,Discussion Enable,bool,[],"[""Page"", ""File"",""E-Book"",""QuizItemEvent""]",TRUE,TRUE,[],[],
discussion_enable,Discussion Enable,bool,[],"[""Page"", ""File"",""E-Book"",""QuizItemEvent"", ""Jsmol"", ""TurtleBlocks"", ""PoliceSquad"", ""OpenStoryTool"", ""BioMechanics""]",TRUE,TRUE,[],[],
is_bigbluebutton,Online Meeting,bool,[],"[""Event""]",TRUE,TRUE,[],[],
open_event,Open Event (All group members can join the event),bool,[],"[""Event""]",TRUE,TRUE,[],[],
......@@ -45,4 +45,4 @@ subject_type,member_of,name,altnames,inverse_name,object_type,object_cardinality
"[""CourseEventGroup""]","[""Binary""]",group_has_course_event,CourseEventGroup;Course,course_event_for_group,"[""Course""]",1
"[""Course"",""BaseCourseGroup"",""Group"",""ProgramEventGroup"",""PartnerGroup""]","[""Binary""]",has_logo,Course;File,logo_of,"[""File""]",1
"[""QuizItemEvent"",""Page"",""File""]","[""Binary""]",clone_of,QuizItemEvent;QuizItem,has_clone,"[""QuizItem"",""Page"",""File""]",1
"[""QuizItem"",""QuizItemEvent"",""Page"",""File"",""Forum""]","[""Binary""]",has_thread,QuizItemEvent;Twist,thread_of,"[""Twist""]",100
"[""QuizItem"",""QuizItemEvent"",""Page"",""File"",""Forum"",""Jsmol"", ""TurtleBlocks"", ""PoliceSquad"", ""OpenStoryTool"", ""BioMechanics""]","[""Binary""]",has_thread,QuizItemEvent;Twist,thread_of,"[""Twist""]",100
......@@ -910,5 +910,46 @@
$(".change-thumbnail-area").show();
})
// iframe for html content
function adjustIframeHt(){
var iframeBodyHt = $("iframe").contents().find("body").height();
var docHeight = $(window).height();
docHeight -= docHeight * 0.20;
$("iframe").not('.twitter-share-button').height(docHeight + 50);
var changedHt;
setTimeout(function(){
changedHt = $("iframe").contents().find("body").height();
// if(changedHt > iframeBodyHt) { adjustIframeHt() }
if(changedHt < docHeight) {
adjustIframeHt();
}
}, 4000 );
}
$("document").ready(function(){
setTimeout(function() { adjustIframeHt() },3000);
// making <a> disabled of images in html pages in iframe
var imgInIframe = $("iframe#html-res-iframe").contents().find("img");
imgInIframe.each(function(){
var tempImgAnchor = $(this).parent("a");
// additional check if parent is <a> and if it contains url pattern: "/gstudio/resources/images/show/"
if(tempImgAnchor.is("a") && $(tempImgAnchor).attr("href").trim().contains("/gstudio/resources/images/show/"))
{
tempImgAnchor.attr("href", "");
tempImgAnchor.on("click", function(e){ e.preventDefault(); } )
}
})
});
</script>
......@@ -629,47 +629,6 @@ if($('.breadcrumbs').length == 0)
$('#view-graph').append(svgdata);
});
// iframe for html content
function adjustIframeHt(){
var iframeBodyHt = $("iframe").contents().find("body").height();
var docHeight = $(window).height();
docHeight -= docHeight * 0.20;
$("iframe").not('.twitter-share-button').height(docHeight + 50);
var changedHt;
setTimeout(function(){
changedHt = $("iframe").contents().find("body").height();
// if(changedHt > iframeBodyHt) { adjustIframeHt() }
if(changedHt < docHeight) {
adjustIframeHt();
}
}, 4000 );
}
$("document").ready(function(){
setTimeout(function() { adjustIframeHt() },3000);
// making <a> disabled of images in html pages in iframe
var imgInIframe = $("iframe#html-res-iframe").contents().find("img");
imgInIframe.each(function(){
var tempImgAnchor = $(this).parent("a");
// additional check if parent is <a> and if it contains url pattern: "/gstudio/resources/images/show/"
if(tempImgAnchor.is("a") && $(tempImgAnchor).attr("href").trim().contains("/gstudio/resources/images/show/"))
{
tempImgAnchor.attr("href", "");
tempImgAnchor.on("click", function(e){ e.preventDefault(); } )
}
})
});
// $(document).on('open', '#view-map-widget[data-reveal]', function () {
......
......@@ -1438,13 +1438,16 @@ def get_resources(request, group_id):
resource_type = "Pandora_video"
if resource_type == "Quiz":
resource_type = "QuizItem"
if resource_type == "File":
resource_type = ["File", "Jsmol", "PoliceSquad", "OpenStoryTool", "TurtleBlocks", "BioMechanics"]
resource_gst_id = [GSystemType.get_gst_name_id(each_gst)[1] for each_gst in resource_type]
else:
resource_gst_name, resource_gst_id = GSystemType.get_gst_name_id(resource_type)
# resource_gst = node_collection.one({'_type': "GSystemType", 'name': resource_type})
resource_gst_name, resource_gst_id = GSystemType.get_gst_name_id(resource_type)
res = node_collection.find(
{
'member_of': resource_gst_id,
'member_of': {'$in': resource_gst_id},
'status': u"PUBLISHED",
'$or':[{'group_set': ObjectId(group_id)},{'contributors': request.user.id}]
}
......
......@@ -622,7 +622,7 @@ GSTUDIO_SITE_HOME_PAGE = None # it is url rendered on template. e.g: "/welcome"
GSTUDIO_SITE_NAME = "metaStudio" # holds the name of site. e.g: "NROER, "tiss" etc. (Override it in local_settings)
GSTUDIO_SITE_ISSUES_PAGE = ""
GSTUDIO_EBOOKS_HELP_TEXT = "" #ebook help text page url(page:"how to read ebooks")
GSTUDIO_SUPPORTED_JHAPPS = ['Jsmol','Police Squad','Open Story Tool','BioMechanics']
GSTUDIO_SUPPORTED_JHAPPS = ['Jsmol','Police Squad','Open Story Tool','BioMechanics', 'TurtleBlocks']
# terms & conditions
GSTUDIO_OID_TC = None
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment