Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add submission filename and line number to feedback-type #6

Closed
KBorm opened this issue May 20, 2019 · 7 comments
Closed

add submission filename and line number to feedback-type #6

KBorm opened this issue May 20, 2019 · 7 comments
Labels
enhancement New feature or request

Comments

@KBorm
Copy link

KBorm commented May 20, 2019

The following elements should be added to the feedback-type (response):

  • submission filename

  • line number in submission file (referred by submission filename)

This information can be used to improve feedback in LMS in case of e.g. compiler errors (jump to line in editor).

@KBorm KBorm added the enhancement New feature or request label May 20, 2019
@KBorm
Copy link
Author

KBorm commented May 20, 2019

minOccurs = 0

@upriss
Copy link
Contributor

upriss commented Jul 2, 2020

To clarify: this not the filename of the submission, but a filename of some submitted file (eg a file within a jar-file). This file may not already have a fileref because it can be a part of another file (eg jar-file).
A question is whether this is relevant for any type of test. If it is only relevant for some types of tests, then maybe it should be dealt with in a test-type specific namespace. My suggestion would be to add the possibility to add test-type specific namespaces.

@KBorm
Copy link
Author

KBorm commented Jul 2, 2020

I prefer to have a simple solution for the LMS (resp. the receiver of the response). I think that test-type specific handling is more complicated. That is why I want to have the information in the response format.
Right now my Moodle plugin does not need to know anything about test specific data to run a task.

@KBorm
Copy link
Author

KBorm commented Jul 18, 2020

Filename and line could be added to feedback-type as follows:

<xs:complexType name="feedback-type">
  <xs:sequence>
  <xs:element name="title" minOccurs="0" type="xs:string"/>
  <xs:element name="content" minOccurs="0">
     ..................
  </xs:element>
  <xs:element name="filerefs" type="tns:filerefs-type" minOccurs="0"/>
  </xs:sequence>
  <xs:attribute name="filename" type="xs:string"/>
  <xs:attribute name="line" type="xs:unsignedInt"/>
  <xs:attribute name="level" type="tns:feedback-level-type"/>
</xs:complexType>

@KBorm
Copy link
Author

KBorm commented Aug 3, 2020

Cursor position within line should also be added resulting in:

<xs:complexType name="feedback-type">
xs:sequence
<xs:element name="title" minOccurs="0" type="xs:string"/>
<xs:element name="content" minOccurs="0">
..................
</xs:element>
<xs:element name="filerefs" type="tns:filerefs-type" minOccurs="0"/>
</xs:sequence>
<xs:attribute name="filename" type="xs:string"/>
<xs:attribute name="line" type="xs:unsignedInt"/>
<xs:attribute name="cursor" type="xs:unsignedInt"/>
<xs:attribute name="level" type="tns:feedback-level-type"/>
</xs:complexType>

@upriss
Copy link
Contributor

upriss commented Aug 6, 2020

We already have an attribute "filename" in some other context, I am wondering whether one could prefix the 3 new attribute with some word which makes it clear that they belong together and that these are files in the submission which don't already have a fileref. Something like "code-filename", "code-line", "code-cursor".

@KBorm
Copy link
Author

KBorm commented Oct 30, 2020

In the meantime I think about another approach using a plaintext log:

  1. 'normalized' plaintext log such as
    ['['{message type}[ {message reference]'] ']{filename}:{line#}[:{column#}]:message
    + an indicator if normailzed log is used
    or even
  2. original plaintext log
    + a regular expression for correct parsing the log

Pro:

  • The LMS does not have to parse the log in order to display it properly (faster and less error-prone).
  • The response is smaller (number of bytes).
  • 2: The student sees the original log format that he or she is familiar with.
  • 2: Output format could be the same in different tools.

Cons:

  • 2: There are different regular expression formats (PCRE?)
  • Switch of concept: All other information is stored in XML

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants