Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

18 Helpful

About mobrien

  • Rank

Personal Information

  • School
    Penistone Grammar School

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. @Graham Quince the idea of grouping staff into teams is good, but the HR manager would have to check around 20 teams' sites/forms (!!) for updates as the data viewer only appears to display data from a single form. The idea of having a dynamic keyword was so that the teacher would specify the staff code of their line manager. Using this keyword, filters could be applied to only display them to the relevant line manager - worth a thought, perhaps? I'd used your Governor Portal policies as the source for my thinking this morning. @adamw my other consideration for thought is that the first layer of approval would work great, but how does the HR manager get notified of the response updates? Would it be possible to add a two stage notification system...? Thank you to you both
  2. @adamw and @Graham Quince thank you for this - it sounds like it is getting close to the solution we are looking for! Thanks for your tips - I'll take a look at them now, in particular the Wall idea. Intrigued to hear the afore mentioned 'other' development. Looking forward to the details as ever! Thanks for your help so far.
  3. Dear Community, I have been granted a day today to develop a system for staff absence requests in School. I had originally planned on using SharePoint, but I was inspired by @Graham Quince at Frog18 yesterday and have started to look at using Frog instead. A combination of Forms, Data Viewer and the Keyword widget appear to be the key. I have, however, hit a couple of conundrums that I am struggling to resolve, and wonder if there might be any help from the community. Please treat me as a complete coding beginner with very little experience... Description: Teacher1 creates an 'Absence Request' site from a template Teacher1 enters details into the page describing the absence. e.g. dates, reasons etc. (I can build this all in HTML, but the forms widget will make a nicer job). They submit the data to be stored (and viewed later), AND click the 'Submit' keyword button LineManager1 sees the site in a keyword-filtered site list. LineManager1 reads the data Teacher1 entered, and approves/rejects with another keyword widget. Queries (3) Is there a way to create a button that will create a new site from a specific template? How do I store the data entered in the fields into he page of the site so that the owner AND line manager can read the data (not by using the Data Viewer format)? Is it possible to have a field (variable) with a button that sets a keyword equal to that field. I hope you can help. Thank you
  4. mobrien

    Timetable Widget

    @pconkie You are quite simply: a genius! Brilliant, works a treat. Thank you very much.
  5. mobrien

    Timetable Widget

    Hi @pconkie, Thank you for this! It has not quite worked, but nearly there. I've amended it for the two subjects in my own TT (science and physics) and double checked that this is the SIMs name. I also made the 'stringtocolour' changes to 'subjecttocolour', as suggested. I also took out all other subject references to make sure eliminate any other variables and gave it a go. However, the timetable is only returned in the default colour specification (black in this instance). Is there anything that I am missing?: var subjectToColour = function(subject) { var colour = ""; switch(subject.toLowerCase()) { case "science": colour = "#4daa50"; break; case "physics": colour = "#007681"; break; default: colour = "black"; } return colour; }; Thank you for your help with this.
  6. mobrien

    Timetable Widget

    @pconkie I've just been having a play with this code and have got it to work!! (after some serious trial and error...) Brilliant stuff, though! In section 5 you describe how you generated the subject colours, based upon their names as they arrive. I've managed to amend the colour schemes by adjusting the 'p * 8' multiplier here: var stringToColour = function(str) { var hash = 0; for (var i = 0; i < str.length; i++) { hash = str.charCodeAt(i) + ((hash << 5) - hash); } var colour = '#'; for (var p = 0; p < 3; p++) { var value = (hash >> (p * 8)) & 0xFF; colour += ('00' + value.toString(16)).substr(-2); } return colour; }; My question is, would it be possible to pre-select a colour per subject? For example, we have a colour coded building, and it would be nice to match the subjects with their location colour. I know in you post you mentioned that you tried to avoid this, though. Thanks, Michael.
  7. Excellent, many thanks @Graham Quince, worked a treat!
  8. Dear Community, On the Frog website designs showcase page, there is a link to Theale Green School. We have noticed that they have a calendar widget on their homepage without the skeuomorphic red rings at the top. Does anyone have some code to achieve this with the HTML widget? All I have managed to do so far is remove the header text. Thanks, Michael
  9. Hi @Graham Quince, Thank you for the explanation - makes total sense. It's good to know that security is a non-negotiable. M.
  10. mobrien

    HTML Table Sorting

    @pconkie Many thanks for this, that's really clear now. Thank you for taking the time to explain it to me. So, I think I might have a finished product, as below. This will be used to display students' Rewards to tutors during tutor time. All in one place, with one set of data. @Chris.Smith and @pconkie, what you have built for me here is far more than I could have expected. Thank you. Once we have a live version with the Excel part to build the data, I'll post the results here. Thank you again, Michael
  11. We have had FrogPlay for just over two years now. we haven't ever done a huge launch with students, just offered it to departments to embed in their departmental sites, and made links to it available on a student hub page. Science and Maths have really seen the most success and command most of the usage so far. See the screenshot below with our stats. This equates to 4200 quizzes this year, 54% completed by Y11 students. Our 'in school' figures are high because internal home work marking lessons are regularly followed by an opportunity to use FrogPlay to further embed their learning. In the next few weeks we are launching a Y10 dedicated site and FrogPlay competetion to encourage revision before end of year mock exams. For this coming year we are going to be running a section of our rewards system to further incentivise FrogPlay use, and ultimately, embed learning retention. i was at a curriculum leader meeting this Tuesday giving a breakdown of Frog's usage stats and individual student success stories. One particular reference I made was to the Technology courses, where they have only a very basic department site (currently...) but students have spent just under 5 hours on FrogPlay for DT alone ! It's great.
  12. @Graham Quince and community Frog, In another topic about HTML tables that @Chris.Smith is providing me with a huge amount of hand-holding, he mentioned amending the data contained within my HTML code using a script and JSON format data. It is much simpler than lines and lines of HTML for each row data. It started me thinking: further to our discussions about using FireBase to contain and access individualised data, could there be an alternative method written directly into the HTML widget, without the need for FireBase? My thinking for the HTML is as follows, and as mentioned in my other post, please note that my skills are barrel bottom in terms of availability: 1. Call up/define the logged in user's upn, as described in the "Displaying personalised, custom data" post on the Frog Community 2. Define a table 3. Provide all required table cell data in JSON format within the script (see below) 4. Populate the data in the table with the fields that ONLY correspond to those that match the user's upn. This would somehow also require the data in the JSON format to contain and recognise the upn? Upn would obviously not be displayed. @Chris.Smith included the JSON data as follows. I have amended it to include a reference upn and an alternative use. data = [ { upn: 'FRG_12321', name: 'Student Tom', house: 'Bowman', tutor: 'ACR', MyMaths un: 'Tom', MyMaths pw: 'tree' }, { upn: 'FRG_34243', name: 'Student Sarah', house: 'Fulford', tutor: 'MOB', MyMaths un: 'Sarah', MyMaths pw: 'flower' } ]; The applications for this are enormous, such as passwords as in the data, or sharing student grades. Hope you can help, Michael
  13. mobrien

    HTML Table Sorting

    @Chris.Smith At the risk of taking far too much of your time here, I am stuck. Please bear in mind that you are conversing with a total coding beginner here - I was good with formatting an HTML table, largely thanks to Google, but was totally lost within the scripting syntaxes that you have provided me with! I can follow what is taking place within the code, but have zero idea as to how to edit it with what you suggest! So, Query1: should the definition of the cell colours appear after line 14? Query 2: Where and how (important...) do I 'set the attributes against the row when preparing the template' as you suggest? Ever grateful, Michael <style> .template { display: none; } thead { background-color: red; } th, tbody { border-width: 1px; border-color: #e6e6e6; border-style: double; padding: 10px; font-size:14px } </style> <table class="table table-striped"> <colgroup> <col style="width: 25%"> <col style="width: 15%"> <col style="width: 15%"> <col style="width: 15%"> <col style="width: 15%"> <col style="width: 15%"> </colgroup> <thead> <th>Name</th> <th>House</th> <th>Tutor</th> <th>Achievement</th> <th>Behaviour</th> <th>Total</th> </thead> <tbody></tbody> </table> <table class="template"> <tbody> <tr> <td data-field="name"></td> <td data-field="house"></td> <td data-field="tutor"></td> <td data-field="achievement"></td> <td data-field="behaviour"></td> <td data-field="total"></td> </tr> </tbody> </table> <script type="text/javascript"> var returnSuccess = function(params, output) { return [ 200, "success", { "data": output, "status": "success", "params": params } ]; }, data = [ { name: 'Student 1', house: 'Bowman', tutor: 'ACR', achievement: 1100, behaviour: 10, total: 1090 }, { name: 'Student 2', house: 'Fulford', tutor: 'MOB', achievement: 1623, behaviour: 196, total: 1427 } ]; $.fixture('GET myapi.get', function(original, settings, headers) { return returnSuccess(original.data, data); }); $.fixture('GET myapi.sort', function(original, settings, headers) { var params = original.data, key = params.key, direction = params.direction, sorted_data = data.sort(function(a, b) { if (direction === 'asc') { if (a[key] < b[key]) { return -1; } else if (a[key] > b[key]) { return 1; } else { return 0; } } else { if (a[key] < b[key]) { return 1; } else if (a[key] > b[key]) { return -1; } else { return 0; } } }); return returnSuccess(params, sorted_data); }); $.fixture('GET myapi.filter', function(original, settings, headers) { var params = original.data, filtered_data = []; for (var key in params) { filtered_data = data.filter(function(datum) { if (datum[key].constructor.name !== "String") { return parseInt(params[key], 10) <= datum[key]; } return (new RegExp(params[key], 'gi')).test(datum[key]); }); } filtered_data = Array.prototype.concat.apply([], filtered_data); filtered_data = filtered_data.filter(function(datum, index, self) { return self.indexOf(datum) === index; }); return returnSuccess(params, filtered_data); }); </script> <script> var promise, renderData, applyTableFilter; if (steal.then !== undefined) { promise = steal('//frogui/components/mysorter/mysorter.js', '//frogui/components/tablefilter/tablefilter.js'); } else { promise = steal.import('frogui/components/mysorter/mysorter', 'frogui/components/tablefilter/tablefilter'); } promise.then(function() { var $table = this.element.find('table:first'), $tbody = $table.children('tbody'), $template = this.element.find('.template tbody > tr'), houses = {}, tutor = {}; $table.frogui_components_mysorter({ headers: { name: 'asc', house: 'asc', tutor: 'asc', achievement: 'asc', behaviour: 'asc', total: 'asc' } }); applyTableFilter = function() { $table.frogui_components_tablefilter({ filters: { name: { type: 'text', placeholder: 'Student Name', data: [], position: 0 }, house: { type: 'select', data: Object.keys(houses), placeholder: 'House', position: 1 }, tutor: { type: 'select', data: Object.keys(tutor), placeholder: 'Tutor', position: 2 } } }); $table.find('.filter-row, .filter-submit-row').removeClass('hide'); }; renderData = function(data) { data.forEach(function(datum) { var $row = $template.clone(); for (var key in datum) { $row.find('[data-field='+key+']').text(datum[key]); } houses[datum.house] = null; tutor[datum.tutor] = null; applyTableFilter(); $tbody.append($row); }.bind(this)); }.bind(this); $table.on('mysorter.sort', function(ev, sort) { Frog.Model.api('myapi.sort', sort) .done(function(resp) { $tbody.empty(); renderData(resp.data); }); }); $table.on('tablefilter.submit', function(ev, data) { Frog.Model.api('myapi.filter', data) .done(function(resp) { $tbody.empty(); renderData(resp.data); }); }); $table.on('tablefilter.reset', function(ev, data) { Frog.Model.api('myapi.get') .done(function(resp) { $tbody.empty(); renderData(resp.data); }); }); Frog.Model.api('myapi.get') .done(function(resp) { renderData(resp.data); }); }.bind(this)); </script> <script> var house_colors = {}, getColorForHouse; getColorForHouse = function(house_name) { var data = {}; if (house_name in house_colors) { return house_colors[house_name]; } data.color = (Math.floor(Math.random() * 16777215)).toString(16); data.text = (parseInt(data.color, 16) > 0xffffff / 2) ? '000000' : 'FFFFFF'; house_colors[house_name] = data; return data; }; renderData = function(data) { data.forEach(function(datum) { var $row = $template.clone(), color_data = getColorForHouse(datum.house); for (var key in datum) { $row.find('[data-field='+key+']').text(datum[key]); } houses[datum.house] = null; tutor[datum.tutor] = null; applyTableFilter(); $row.find('[data-field=house]') .css({ 'backgroundColor': '#' + color_data.color, 'color': '#' + color_data.text }); $tbody.append($row); }.bind(this)); }.bind(this); </script>
  14. mobrien

    HTML Table Sorting

    @Chris.Smith Yes, that's right, a different colour for each House colour
  15. mobrien

    HTML Table Sorting

    @Chris.Smith I had a good play with this yesterday evening and I'm not far from what appears in my mind's eye (see attachment). I removed some of the filter conditions so that Tutors have only those that they will need. The final part of the jigsaw is whether there is the possibility of conditionally formatting the 'House' cells/column. i.e. that the 'Bowman' cell appears one colour, 'Fulford' another colour etc. I can see that there is javascript if, then else possibility, but I have no clue how this might be written into the new json code that I am now using. Do you have any suggestions? Michael
  • Create New...