Jump to content
sclough

Launching the Assignment Monitor with jQuery

Recommended Posts

We've got some code to open the quick assign window to create new homework tasks. This is just a click function like this:

var $target = jQuery('[data-action=launch_quick_assign]:first');
  $target.on('click', function(el, ev) { 
  ev.stopPropagation(); 
  el.frogui_modules_quickassign(); 
}.bind($target.get(0), $target));

I was wondering which frog UI module I'd need to call to open the assignment monitor screen?

Link to comment
Share on other sites

Hi @sclough,

You can open the Assignment Monitor app using the new endpoints in FrogOS.js

Normally we would do this;

FrogOS.openApp(
    'assignmentreports',
    { view: "monitor" }
);

But it doesn't seem to be behaving itself at the moment, so lets pull apart what this does under the hood.

$('.os_core:first').trigger('os.internal.launchapp', {
    data: {
        name: 'assignmentreports',
        view: 'monitor'
    }
});

The above code will give you the desired result. I will be logging a bug to fix the FrogOS.js and hopefully that will go out in one of the next few hotfixes :)

  • Like 1
Link to comment
Share on other sites

21 minutes ago, sfoster said:

Thanks Chris :)

Is there anywhere we can get a list of endpoints please?

Simon

Hi Simon,

We don't typically give out these endpoints, we are looking to augment them and present them in a cleaner way, hence FrogOS.js

Whilst the official documentation is a few months away; here is a quick summary of the endpoints available to you as of the Dickens Release.

/**
 * Get the current user
 * @method getUser
 * @version 2015-06-29
 * @author Chris Smith
 *
 * @codestart javascript
 *
 * var element = jQuery('.welcome-msg'),
 *     user = FrogOS.getUser();
 *
 * element.text(
 *      sprintf('Hello <strong>%s</strong>', user.attr('displayname'))
 * );
 *
 * @codeend
 *
 * @return {Lib.Model.User} An instance of the User Class
 */
getUser: function() {},

/**
 * Alias Sprintf into our namespace.
 * @method sprintf
 * @version 2015-06-29
 * @author Chris Smith
 * @type {Function}
 *
 * @codestart javascript
 *
 * var date = moment().format('dddd MMMM YYYY'),
 *     element = jQuery('.welcome-msg');
 *
 * element.text(
 *      sprintf('Here\'s the schedule for %s', date);
 * );
 *
 * @codeend
 */
sprintf: sprintf,

/**
 * Alias FDP api method
 * @method fdp
 * @version 2015-07-02
 * @author Chris Smith
 * @type {Function}
 *
 * @codestart javascript
 *
 * FrogOS.fdp({
 *     url: 'notification/send',
 *     path: '/api/fdp/2/',
 *     type: 'POST',
 *     data: {
 *         recipients: recipients_list,
 *         message: my_message
 *     }
 * }).done(function(response) {
 *     // Do things
 * }).fail(function(e) {
 *     // Report Error
 * });
 *
 * @codeend
 *
 * @returns {jQuery.Promise} Promise Object
 */
fdp: function(options) {},

/**
 * Open a Site or Assignment
 * @method openSite
 * @version 2016-06-20
 * @author  Chris Smith
 *
 * @codestart javascript
 *
 * FrogOS.openSite({
 *     site: '/a_user/example_site'
 * });
 *
 * @codeend
 * @return this
 */
openSite: function(options) {},

/**
 * Open an application
 * @param  {String} appName Name of App
 * @param  {Object} options Application Info
 *
 * @codestart javascript
 *
 * // Open Student App
 * FrogOS.openApp(
 *     'assignmentreports',
 *     {
 *         view: student
 *     }
 * );
 *
 * @codend
 *
 * @note options parameter currently broken @chris.smith - 06/10/2016
 *
 * @return this
 */
openApp: function(appName, options) {}

Hope this helps :)

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Similar Content

    • By MarkB
      Hi,
      One of my annoyances with work setting on FrogLearn (and I do a lot of that) is that an assignment is either open or closed.  If it is open, students don't see their marks. If it is closed, students can't submit. If a student, having seen her marks, asks to be allowed to resubmit, the task has to be reopened for all. A late submitter can't submit unless the task is reopened for all. (These limitations didn't exist in Frog3).
      I'm wondering if the 'convert to individuals' option might overcome all these problems, i.e. allow me to close and release marks to all,, then reopen an assignment for an individual who is late, plus reassign work to any keen re-doers (or those I'm not happy with) individually.
      Yet it is important that the results remain in the class markbook..
      Is that what the button does?  Would hitting this button have any other implications?
      I could experiment with my classes but is has been hard enough getting them used to FrogLearn, without unnecessarily rocking the boat....
      Any comments?
       
      Cheers,  Mark
      PS.   LOVING most of FrogLearn!
       
       
       
    • By emoseley
      Has anyone else encountered this problem on a similarly sized device?   We use the 11-inch MacBook Air and iPad.  When we make a quick assignment (specifically using Google Assignment)  the "Hand In" button is below the bottom of the screen with no ability to scroll down.   Since students are not Handing in the work the teacher has to access student work using the cumbersome back door through Google. This also affects iPads.   For quizzes. assigned directly from FrogDrive or through quick assignments we have the same problem, especially on iPads.  I was wondering why my numbers were so low at elementary since we were pushing the Championships.  Turnes out teachers had no interest since reports did not show because students literally could not hand in the quiz. 
    • By S Marcham
      Hello, I have 2 questions that our Business Studies teacher asked me, I have had a look but not sure if possible, thanks.
      1. Is it possible in assignments that when a student sends back their completed worksheet/project  (probably using file drop in assignments) to the teacher, that the teacher can then mark the same worksheet/project  with comments and send it back to the student to amend? And then the student  can send the same amended copy back to the teacher etc? So its all kept in one thread?
      2. Also the business studies teacher here marks work using pass, merit or distinction – Is it possible to set this as a marking system in assignments?
    • By clangstaff
      Staff to be able to 'Download wall' from assignments
      Currently only Administrators can click 'download wall' and download all communication that has taken place on an assignment. We would like for staff to have the ability to do this too so they can easily download evidence of feedback between staff and student on assignments.
      https://ideas.frogcommunity.com/ideas/FRG-I-1246
    • By clangstaff
      I've created the following on the ideas portal - please get voting on this so Frog might finally consider it!
       
      Confirmation of a student viewing an assignment
      As with social media messaging services it would be useful for staff to know if/when a student has viewed a homework on Frog. This could be shown with a little eye icon next to each students name in the assignment manager.
      This functionality is available within several competitors to Frog and would make life much easier for staff as they could quickly identify which students simply haven't checked their homework assignment.
      https://ideas.frogcommunity.com/ideas/FRG-I-1242
×
×
  • Create New...